fxruby 1.6.9 → 1.6.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/lib/fox16/kwargs.rb +2717 -0
  2. data/lib/fox16/version.rb +1 -1
  3. metadata +3 -2
@@ -0,0 +1,2717 @@
1
+ require 'fox16'
2
+
3
+ module Fox
4
+
5
+
6
+ class FX4Splitter
7
+ alias old_initialize initialize
8
+ def initialize(p, *args, &blk)
9
+ argument_names = %w{opts x y width height}
10
+ default_params = { :opts => FOURSPLITTER_NORMAL, :x => 0, :y => 0, :width => 0, :height => 0 }
11
+ params = {}
12
+ params = args.pop if args.last.is_a? Hash
13
+ if args.length > 0 && (args.first.nil? || args.first.is_a?(FXObject))
14
+ tgt, sel = args[0], args[1]
15
+ args.each_with_index { |e, i| params[argument_names[i-2].intern] = e if i >= 2 }
16
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
17
+ params = default_params.merge(params)
18
+ old_initialize(p, tgt, sel, params[:opts], params[:x], params[:y], params[:width], params[:height], &blk)
19
+ else
20
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
21
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
22
+ params = default_params.merge(params)
23
+ old_initialize(p, params[:opts], params[:x], params[:y], params[:width], params[:height], &blk)
24
+ end
25
+ end
26
+ end
27
+
28
+ class FXDockBar
29
+ alias old_initialize initialize
30
+ def initialize(p, *args, &blk)
31
+ argument_names = %w{opts x y width height padLeft padRight padTop padBottom hSpacing vSpacing}
32
+ default_params = { :opts => LAYOUT_TOP|LAYOUT_LEFT|LAYOUT_FILL_X, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => 3, :padRight => 3, :padTop => 2, :padBottom => 2, :hSpacing => DEFAULT_SPACING, :vSpacing => DEFAULT_SPACING }
33
+ params = {}
34
+ params = args.pop if args.last.is_a? Hash
35
+ if args.length > 0 && (args.first.nil? || args.first.is_a?(FXComposite))
36
+ q = args[0]
37
+ args.each_with_index { |e, i| params[argument_names[i-1].intern] = e if i >= 1 }
38
+ if params.key? :padding
39
+ value = params.delete(:padding)
40
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
41
+ end
42
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
43
+ params = default_params.merge(params)
44
+ old_initialize(p, q, params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], params[:hSpacing], params[:vSpacing], &blk)
45
+ else
46
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
47
+ if params.key? :padding
48
+ value = params.delete(:padding)
49
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
50
+ end
51
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
52
+ params = default_params.merge(params)
53
+ old_initialize(p, params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], params[:hSpacing], params[:vSpacing], &blk)
54
+ end
55
+ end
56
+ end
57
+
58
+ class FXFont
59
+ alias old_initialize initialize
60
+ def initialize(a, arg1, *args, &blk)
61
+ if args.length > 0
62
+ face, size = arg1, args[0]
63
+ argument_names = %w{weight slant encoding setWidth hints}
64
+ default_params = { :weight => FXFont::Normal, :slant => FXFont::Straight, :encoding => FONTENCODING_DEFAULT, :setWidth => FXFont::NonExpanded, :hints => 0 }
65
+ params = {}
66
+ params = args.pop if args.last.is_a? Hash
67
+ args.each_with_index { |e, i| params[argument_names[i-1].intern] = e if i >= 1 }
68
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
69
+ params = default_params.merge(params)
70
+ old_initialize(a, face, size, params[:weight], params[:slant], params[:encoding], params[:setWidth], params[:hints], &blk)
71
+ else
72
+ old_initialize(a, arg1, &blk)
73
+ end
74
+ end
75
+ end
76
+
77
+ class FXGLCanvas
78
+ alias old_initialize initialize
79
+ def initialize(parent, vis, *args, &blk)
80
+ argument_names = %w{target selector opts x y width height}
81
+ default_params = { :target => nil, :selector => 0, :opts => 0, :x => 0, :y => 0, :width => 0, :height => 0 }
82
+ params = {}
83
+ params = args.pop if args.last.is_a? Hash
84
+ if args.length > 0 && (args[0].is_a?(FXGLCanvas))
85
+ sharegroup = args[0]
86
+ args.each_with_index { |e, i| params[argument_names[i-1].intern] = e if i >= 1 }
87
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
88
+ params = default_params.merge(params)
89
+ old_initialize(parent, vis, sharegroup, params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], &blk)
90
+ else
91
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
92
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
93
+ params = default_params.merge(params)
94
+ old_initialize(parent, vis, params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], &blk)
95
+ end
96
+ end
97
+ end
98
+
99
+ class FXGLViewer
100
+ alias old_initialize initialize
101
+ def initialize(parent, vis, *args, &blk)
102
+ argument_names = %w{target selector opts x y width height}
103
+ default_params = { :target => nil, :selector => 0, :opts => 0, :x => 0, :y => 0, :width => 0, :height => 0 }
104
+ params = {}
105
+ params = args.pop if args.last.is_a? Hash
106
+ if args.length > 0 && (args[0].is_a?(FXGLViewer))
107
+ sharegroup = args[0]
108
+ args.each_with_index { |e, i| params[argument_names[i-1].intern] = e if i >= 1 }
109
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
110
+ params = default_params.merge(params)
111
+ old_initialize(parent, vis, sharegroup, params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], &blk)
112
+ else
113
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
114
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
115
+ params = default_params.merge(params)
116
+ old_initialize(parent, vis, params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], &blk)
117
+ end
118
+ end
119
+ end
120
+
121
+ class FXMenuBar
122
+ alias old_initialize initialize
123
+ def initialize(p, *args, &blk)
124
+ argument_names = %w{opts x y width height padLeft padRight padTop padBottom hSpacing vSpacing}
125
+ default_params = { :opts => LAYOUT_TOP|LAYOUT_LEFT|LAYOUT_FILL_X, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => 3, :padRight => 3, :padTop => 2, :padBottom => 2, :hSpacing => DEFAULT_SPACING, :vSpacing => DEFAULT_SPACING }
126
+ params = {}
127
+ params = args.pop if args.last.is_a? Hash
128
+ if args.length > 0 && (args[0].nil? || args[0].is_a?(FXComposite))
129
+ q = args[0]
130
+ args.each_with_index { |e, i| params[argument_names[i-1].intern] = e if i >= 1 }
131
+ if params.key? :padding
132
+ value = params.delete(:padding)
133
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
134
+ end
135
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
136
+ params = default_params.merge(params)
137
+ old_initialize(p, q, params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], params[:hSpacing], params[:vSpacing], &blk)
138
+ else
139
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
140
+ if params.key? :padding
141
+ value = params.delete(:padding)
142
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
143
+ end
144
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
145
+ params = default_params.merge(params)
146
+ old_initialize(p, params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], params[:hSpacing], params[:vSpacing], &blk)
147
+ end
148
+ end
149
+ end
150
+
151
+ class FXSplitter
152
+ alias old_initialize initialize
153
+ def initialize(p, *args, &blk)
154
+ argument_names = %w{opts x y width height}
155
+ default_params = { :opts => SPLITTER_NORMAL, :x => 0, :y => 0, :width => 0, :height => 0 }
156
+ params = {}
157
+ params = args.pop if args.last.is_a? Hash
158
+ if args.length > 0 && (args.first.nil? || args.first.is_a?(FXObject))
159
+ tgt, sel = args[0], args[1]
160
+ args.each_with_index { |e, i| params[argument_names[i-2].intern] = e if i >= 2 }
161
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
162
+ params = default_params.merge(params)
163
+ old_initialize(p, tgt, sel, params[:opts], params[:x], params[:y], params[:width], params[:height], &blk)
164
+ else
165
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
166
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
167
+ params = default_params.merge(params)
168
+ old_initialize(p, params[:opts], params[:x], params[:y], params[:width], params[:height], &blk)
169
+ end
170
+ end
171
+ end
172
+
173
+ class FXToolBar
174
+ alias old_initialize initialize
175
+ def initialize(p, *args, &blk)
176
+ argument_names = %w{opts x y width height padLeft padRight padTop padBottom hSpacing vSpacing}
177
+ default_params = { :opts => LAYOUT_TOP|LAYOUT_LEFT|LAYOUT_FILL_X, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => 3, :padRight => 3, :padTop => 2, :padBottom => 2, :hSpacing => DEFAULT_SPACING, :vSpacing => DEFAULT_SPACING }
178
+ params = {}
179
+ params = args.pop if args.last.is_a? Hash
180
+ if args.length > 0 && (args[0].nil? || args[0].is_a?(FXComposite))
181
+ q = args[0]
182
+ args.each_with_index { |e, i| params[argument_names[i-1].intern] = e if i >= 1 }
183
+ if params.key? :padding
184
+ value = params.delete(:padding)
185
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
186
+ end
187
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
188
+ params = default_params.merge(params)
189
+ old_initialize(p, q, params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], params[:hSpacing], params[:vSpacing], &blk)
190
+ else
191
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
192
+ if params.key? :padding
193
+ value = params.delete(:padding)
194
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
195
+ end
196
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
197
+ params = default_params.merge(params)
198
+ old_initialize(p, params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], params[:hSpacing], params[:vSpacing], &blk)
199
+ end
200
+ end
201
+ end
202
+
203
+ class FXWindow
204
+ alias old_initialize initialize
205
+ def initialize(p, *args, &blk)
206
+ if p.is_a? FXApp
207
+ old_initialize(p, *args, &blk)
208
+ else
209
+ argument_names = %w{opts x y width height}
210
+ default_params = { :opts => 0, :x => 0, :y => 0, :width => 0, :height => 0 }
211
+ params = {}
212
+ params = args.pop if args.last.is_a? Hash
213
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
214
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
215
+ params = default_params.merge(params)
216
+ old_initialize(p, params[:opts], params[:x], params[:y], params[:width], params[:height], &blk)
217
+ end
218
+ end
219
+ end
220
+
221
+ class FX7Segment
222
+ alias old_initialize initialize
223
+ def initialize(p, text, *args, &blk)
224
+ argument_names = %w{opts x y width height padLeft padRight padTop padBottom}
225
+ default_params = { :opts => SEVENSEGMENT_NORMAL, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => DEFAULT_PAD, :padRight => DEFAULT_PAD, :padTop => DEFAULT_PAD, :padBottom => DEFAULT_PAD }
226
+ params = {}
227
+ params = args.pop if args.last.is_a? Hash
228
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
229
+ if params.key? :padding
230
+ value = params.delete(:padding)
231
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
232
+ end
233
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
234
+ params = default_params.merge(params)
235
+ old_initialize(p, text, params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], &blk)
236
+ end
237
+ end
238
+
239
+ class FXApp
240
+ alias old_initialize initialize
241
+ def initialize(*args, &blk)
242
+ argument_names = %w{appName vendorName}
243
+ default_params = { :appName => "Application", :vendorName => "FoxDefault" }
244
+ params = {}
245
+ params = args.pop if args.last.is_a? Hash
246
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
247
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
248
+ params = default_params.merge(params)
249
+ old_initialize(params[:appName], params[:vendorName], &blk)
250
+ end
251
+ end
252
+
253
+ class FXArrowButton
254
+ alias old_initialize initialize
255
+ def initialize(parent, *args, &blk)
256
+ argument_names = %w{target selector opts x y width height padLeft padRight padTop padBottom}
257
+ default_params = { :target => nil, :selector => 0, :opts => ARROW_NORMAL, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => DEFAULT_PAD, :padRight => DEFAULT_PAD, :padTop => DEFAULT_PAD, :padBottom => DEFAULT_PAD }
258
+ params = {}
259
+ params = args.pop if args.last.is_a? Hash
260
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
261
+ if params.key? :padding
262
+ value = params.delete(:padding)
263
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
264
+ end
265
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
266
+ params = default_params.merge(params)
267
+ old_initialize(parent, params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], &blk)
268
+ end
269
+ end
270
+
271
+ class FXBitmap
272
+ alias old_initialize initialize
273
+ def initialize(app, *args, &blk)
274
+ argument_names = %w{pixels opts width height}
275
+ default_params = { :pixels => nil, :opts => 0, :width => 1, :height => 1 }
276
+ params = {}
277
+ params = args.pop if args.last.is_a? Hash
278
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
279
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
280
+ params = default_params.merge(params)
281
+ old_initialize(app, params[:pixels], params[:opts], params[:width], params[:height], &blk)
282
+ end
283
+ end
284
+
285
+ class FXBitmapFrame
286
+ alias old_initialize initialize
287
+ def initialize(p, bmp, *args, &blk)
288
+ argument_names = %w{opts x y width height padLeft padRight padTop padBottom}
289
+ default_params = { :opts => FRAME_SUNKEN|FRAME_THICK, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => 0, :padRight => 0, :padTop => 0, :padBottom => 0 }
290
+ params = {}
291
+ params = args.pop if args.last.is_a? Hash
292
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
293
+ if params.key? :padding
294
+ value = params.delete(:padding)
295
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
296
+ end
297
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
298
+ params = default_params.merge(params)
299
+ old_initialize(p, bmp, params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], &blk)
300
+ end
301
+ end
302
+
303
+ class FXBitmapView
304
+ alias old_initialize initialize
305
+ def initialize(p, *args, &blk)
306
+ argument_names = %w{bmp target selector opts x y width height}
307
+ default_params = { :bmp => nil, :target => nil, :selector => 0, :opts => 0, :x => 0, :y => 0, :width => 0, :height => 0 }
308
+ params = {}
309
+ params = args.pop if args.last.is_a? Hash
310
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
311
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
312
+ params = default_params.merge(params)
313
+ old_initialize(p, params[:bmp], params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], &blk)
314
+ end
315
+ end
316
+
317
+ class FXBMPIcon
318
+ alias old_initialize initialize
319
+ def initialize(a, *args, &blk)
320
+ argument_names = %w{pix clr opts width height}
321
+ default_params = { :pix => nil, :clr => FXRGB(192,192,192), :opts => 0, :width => 1, :height => 1 }
322
+ params = {}
323
+ params = args.pop if args.last.is_a? Hash
324
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
325
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
326
+ params = default_params.merge(params)
327
+ old_initialize(a, params[:pix], params[:clr], params[:opts], params[:width], params[:height], &blk)
328
+ end
329
+ end
330
+
331
+ class FXBMPImage
332
+ alias old_initialize initialize
333
+ def initialize(a, *args, &blk)
334
+ argument_names = %w{pix opts width height}
335
+ default_params = { :pix => nil, :opts => 0, :width => 1, :height => 1 }
336
+ params = {}
337
+ params = args.pop if args.last.is_a? Hash
338
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
339
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
340
+ params = default_params.merge(params)
341
+ old_initialize(a, params[:pix], params[:opts], params[:width], params[:height], &blk)
342
+ end
343
+ end
344
+
345
+ class FXButton
346
+ alias old_initialize initialize
347
+ def initialize(parent, text, *args, &blk)
348
+ argument_names = %w{icon target selector opts x y width height padLeft padRight padTop padBottom}
349
+ default_params = { :icon => nil, :target => nil, :selector => 0, :opts => BUTTON_NORMAL, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => DEFAULT_PAD, :padRight => DEFAULT_PAD, :padTop => DEFAULT_PAD, :padBottom => DEFAULT_PAD }
350
+ params = {}
351
+ params = args.pop if args.last.is_a? Hash
352
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
353
+ if params.key? :padding
354
+ value = params.delete(:padding)
355
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
356
+ end
357
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
358
+ params = default_params.merge(params)
359
+ old_initialize(parent, text, params[:icon], params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], &blk)
360
+ end
361
+ end
362
+
363
+ class FXCanvas
364
+ alias old_initialize initialize
365
+ def initialize(parent, *args, &blk)
366
+ argument_names = %w{target selector opts x y width height}
367
+ default_params = { :target => nil, :selector => 0, :opts => FRAME_NORMAL, :x => 0, :y => 0, :width => 0, :height => 0 }
368
+ params = {}
369
+ params = args.pop if args.last.is_a? Hash
370
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
371
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
372
+ params = default_params.merge(params)
373
+ old_initialize(parent, params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], &blk)
374
+ end
375
+ end
376
+
377
+ class FXCheckButton
378
+ alias old_initialize initialize
379
+ def initialize(parent, text, *args, &blk)
380
+ argument_names = %w{target selector opts x y width height padLeft padRight padTop padBottom}
381
+ default_params = { :target => nil, :selector => 0, :opts => CHECKBUTTON_NORMAL, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => DEFAULT_PAD, :padRight => DEFAULT_PAD, :padTop => DEFAULT_PAD, :padBottom => DEFAULT_PAD }
382
+ params = {}
383
+ params = args.pop if args.last.is_a? Hash
384
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
385
+ if params.key? :padding
386
+ value = params.delete(:padding)
387
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
388
+ end
389
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
390
+ params = default_params.merge(params)
391
+ old_initialize(parent, text, params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], &blk)
392
+ end
393
+ end
394
+
395
+ class FXChoiceBox
396
+ alias old_initialize initialize
397
+ def initialize(owner, caption, text, icon, choices, *args, &blk)
398
+ argument_names = %w{opts x y width height}
399
+ default_params = { :opts => 0, :x => 0, :y => 0, :width => 0, :height => 0 }
400
+ params = {}
401
+ params = args.pop if args.last.is_a? Hash
402
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
403
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
404
+ params = default_params.merge(params)
405
+ old_initialize(owner, caption, text, icon, choices, params[:opts], params[:x], params[:y], params[:width], params[:height], &blk)
406
+ end
407
+ end
408
+
409
+ class FXColorBar
410
+ alias old_initialize initialize
411
+ def initialize(parent, *args, &blk)
412
+ argument_names = %w{target selector opts x y width height padLeft padRight padTop padBottom}
413
+ default_params = { :target => nil, :selector => 0, :opts => FRAME_NORMAL, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => DEFAULT_PAD, :padRight => DEFAULT_PAD, :padTop => DEFAULT_PAD, :padBottom => DEFAULT_PAD }
414
+ params = {}
415
+ params = args.pop if args.last.is_a? Hash
416
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
417
+ if params.key? :padding
418
+ value = params.delete(:padding)
419
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
420
+ end
421
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
422
+ params = default_params.merge(params)
423
+ old_initialize(parent, params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], &blk)
424
+ end
425
+ end
426
+
427
+ class FXColorDialog
428
+ alias old_initialize initialize
429
+ def initialize(owner, title, *args, &blk)
430
+ argument_names = %w{opts x y width height}
431
+ default_params = { :opts => 0, :x => 0, :y => 0, :width => 0, :height => 0 }
432
+ params = {}
433
+ params = args.pop if args.last.is_a? Hash
434
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
435
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
436
+ params = default_params.merge(params)
437
+ old_initialize(owner, title, params[:opts], params[:x], params[:y], params[:width], params[:height], &blk)
438
+ end
439
+ end
440
+
441
+ class FXColorItem
442
+ alias old_initialize initialize
443
+ def initialize(text, clr, *args, &blk)
444
+ argument_names = %w{data}
445
+ default_params = { :data => nil }
446
+ params = {}
447
+ params = args.pop if args.last.is_a? Hash
448
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
449
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
450
+ params = default_params.merge(params)
451
+ old_initialize(text, clr, params[:data], &blk)
452
+ end
453
+ end
454
+
455
+ class FXColorList
456
+ alias old_initialize initialize
457
+ def initialize(p, *args, &blk)
458
+ argument_names = %w{target selector opts x y width height}
459
+ default_params = { :target => nil, :selector => 0, :opts => LIST_BROWSESELECT, :x => 0, :y => 0, :width => 0, :height => 0 }
460
+ params = {}
461
+ params = args.pop if args.last.is_a? Hash
462
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
463
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
464
+ params = default_params.merge(params)
465
+ old_initialize(p, params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], &blk)
466
+ end
467
+ end
468
+
469
+ class FXColorRing
470
+ alias old_initialize initialize
471
+ def initialize(p, *args, &blk)
472
+ argument_names = %w{target selector opts x y width height padLeft padRight padTop padBottom}
473
+ default_params = { :target => nil, :selector => 0, :opts => FRAME_NORMAL, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => DEFAULT_PAD, :padRight => DEFAULT_PAD, :padTop => DEFAULT_PAD, :padBottom => DEFAULT_PAD }
474
+ params = {}
475
+ params = args.pop if args.last.is_a? Hash
476
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
477
+ if params.key? :padding
478
+ value = params.delete(:padding)
479
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
480
+ end
481
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
482
+ params = default_params.merge(params)
483
+ old_initialize(p, params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], &blk)
484
+ end
485
+ end
486
+
487
+ class FXColorSelector
488
+ alias old_initialize initialize
489
+ def initialize(parent, *args, &blk)
490
+ argument_names = %w{target selector opts x y width height}
491
+ default_params = { :target => nil, :selector => 0, :opts => 0, :x => 0, :y => 0, :width => 0, :height => 0 }
492
+ params = {}
493
+ params = args.pop if args.last.is_a? Hash
494
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
495
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
496
+ params = default_params.merge(params)
497
+ old_initialize(parent, params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], &blk)
498
+ end
499
+ end
500
+
501
+ class FXColorWell
502
+ alias old_initialize initialize
503
+ def initialize(parent, *args, &blk)
504
+ argument_names = %w{color target selector opts x y width height padLeft padRight padTop padBottom}
505
+ default_params = { :color => 0, :target => nil, :selector => 0, :opts => COLORWELL_NORMAL, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => DEFAULT_PAD, :padRight => DEFAULT_PAD, :padTop => DEFAULT_PAD, :padBottom => DEFAULT_PAD }
506
+ params = {}
507
+ params = args.pop if args.last.is_a? Hash
508
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
509
+ if params.key? :padding
510
+ value = params.delete(:padding)
511
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
512
+ end
513
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
514
+ params = default_params.merge(params)
515
+ old_initialize(parent, params[:color], params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], &blk)
516
+ end
517
+ end
518
+
519
+ class FXColorWheel
520
+ alias old_initialize initialize
521
+ def initialize(p, *args, &blk)
522
+ argument_names = %w{target selector opts x y width height padLeft padRight padTop padBottom}
523
+ default_params = { :target => nil, :selector => 0, :opts => FRAME_NORMAL, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => DEFAULT_PAD, :padRight => DEFAULT_PAD, :padTop => DEFAULT_PAD, :padBottom => DEFAULT_PAD }
524
+ params = {}
525
+ params = args.pop if args.last.is_a? Hash
526
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
527
+ if params.key? :padding
528
+ value = params.delete(:padding)
529
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
530
+ end
531
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
532
+ params = default_params.merge(params)
533
+ old_initialize(p, params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], &blk)
534
+ end
535
+ end
536
+
537
+ class FXComboBox
538
+ alias old_initialize initialize
539
+ def initialize(p, cols, *args, &blk)
540
+ argument_names = %w{target selector opts x y width height padLeft padRight padTop padBottom}
541
+ default_params = { :target => nil, :selector => 0, :opts => COMBOBOX_NORMAL, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => DEFAULT_PAD, :padRight => DEFAULT_PAD, :padTop => DEFAULT_PAD, :padBottom => DEFAULT_PAD }
542
+ params = {}
543
+ params = args.pop if args.last.is_a? Hash
544
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
545
+ if params.key? :padding
546
+ value = params.delete(:padding)
547
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
548
+ end
549
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
550
+ params = default_params.merge(params)
551
+ old_initialize(p, cols, params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], &blk)
552
+ end
553
+ end
554
+
555
+ class FXComposite
556
+ alias old_initialize initialize
557
+ def initialize(parent, *args, &blk)
558
+ argument_names = %w{opts x y width height}
559
+ default_params = { :opts => 0, :x => 0, :y => 0, :width => 0, :height => 0 }
560
+ params = {}
561
+ params = args.pop if args.last.is_a? Hash
562
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
563
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
564
+ params = default_params.merge(params)
565
+ old_initialize(parent, params[:opts], params[:x], params[:y], params[:width], params[:height], &blk)
566
+ end
567
+ end
568
+
569
+ class FXDataTarget
570
+ alias old_initialize initialize
571
+ def initialize(*args, &blk)
572
+ argument_names = %w{value target selector}
573
+ default_params = { :value => nil, :target => nil, :selector => 0 }
574
+ params = {}
575
+ params = args.pop if args.last.is_a? Hash
576
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
577
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
578
+ params = default_params.merge(params)
579
+ old_initialize(params[:value], params[:target], params[:selector], &blk)
580
+ end
581
+ end
582
+
583
+ class FXDelegator
584
+ alias old_initialize initialize
585
+ def initialize(*args, &blk)
586
+ argument_names = %w{delegate}
587
+ default_params = { :delegate => nil }
588
+ params = {}
589
+ params = args.pop if args.last.is_a? Hash
590
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
591
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
592
+ params = default_params.merge(params)
593
+ old_initialize(params[:delegate], &blk)
594
+ end
595
+ end
596
+
597
+ class FXDial
598
+ alias old_initialize initialize
599
+ def initialize(p, *args, &blk)
600
+ argument_names = %w{target selector opts x y width height padLeft padRight padTop padBottom}
601
+ default_params = { :target => nil, :selector => 0, :opts => DIAL_NORMAL, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => DEFAULT_PAD, :padRight => DEFAULT_PAD, :padTop => DEFAULT_PAD, :padBottom => DEFAULT_PAD }
602
+ params = {}
603
+ params = args.pop if args.last.is_a? Hash
604
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
605
+ if params.key? :padding
606
+ value = params.delete(:padding)
607
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
608
+ end
609
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
610
+ params = default_params.merge(params)
611
+ old_initialize(p, params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], &blk)
612
+ end
613
+ end
614
+
615
+ class FXDialogBox
616
+ alias old_initialize initialize
617
+ def initialize(owner, title, *args, &blk)
618
+ argument_names = %w{opts x y width height padLeft padRight padTop padBottom hSpacing vSpacing}
619
+ default_params = { :opts => DECOR_TITLE|DECOR_BORDER, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => 10, :padRight => 10, :padTop => 10, :padBottom => 10, :hSpacing => 4, :vSpacing => 4 }
620
+ params = {}
621
+ params = args.pop if args.last.is_a? Hash
622
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
623
+ if params.key? :padding
624
+ value = params.delete(:padding)
625
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
626
+ end
627
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
628
+ params = default_params.merge(params)
629
+ old_initialize(owner, title, params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], params[:hSpacing], params[:vSpacing], &blk)
630
+ end
631
+ end
632
+
633
+ class FXDirBox
634
+ alias old_initialize initialize
635
+ def initialize(p, *args, &blk)
636
+ argument_names = %w{target selector opts x y width height padLeft padRight padTop padBottom}
637
+ default_params = { :target => nil, :selector => 0, :opts => FRAME_SUNKEN|FRAME_THICK|TREELISTBOX_NORMAL, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => DEFAULT_PAD, :padRight => DEFAULT_PAD, :padTop => DEFAULT_PAD, :padBottom => DEFAULT_PAD }
638
+ params = {}
639
+ params = args.pop if args.last.is_a? Hash
640
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
641
+ if params.key? :padding
642
+ value = params.delete(:padding)
643
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
644
+ end
645
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
646
+ params = default_params.merge(params)
647
+ old_initialize(p, params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], &blk)
648
+ end
649
+ end
650
+
651
+ class FXDirDialog
652
+ alias old_initialize initialize
653
+ def initialize(owner, name, *args, &blk)
654
+ argument_names = %w{opts x y width height}
655
+ default_params = { :opts => 0, :x => 0, :y => 0, :width => 500, :height => 300 }
656
+ params = {}
657
+ params = args.pop if args.last.is_a? Hash
658
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
659
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
660
+ params = default_params.merge(params)
661
+ old_initialize(owner, name, params[:opts], params[:x], params[:y], params[:width], params[:height], &blk)
662
+ end
663
+ end
664
+
665
+ class FXDirItem
666
+ alias old_initialize initialize
667
+ def initialize(text, *args, &blk)
668
+ argument_names = %w{oi ci data}
669
+ default_params = { :oi => nil, :ci => nil, :data => nil }
670
+ params = {}
671
+ params = args.pop if args.last.is_a? Hash
672
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
673
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
674
+ params = default_params.merge(params)
675
+ old_initialize(text, params[:oi], params[:ci], params[:data], &blk)
676
+ end
677
+ end
678
+
679
+ class FXDirList
680
+ alias old_initialize initialize
681
+ def initialize(p, *args, &blk)
682
+ argument_names = %w{target selector opts x y width height}
683
+ default_params = { :target => nil, :selector => 0, :opts => 0, :x => 0, :y => 0, :width => 0, :height => 0 }
684
+ params = {}
685
+ params = args.pop if args.last.is_a? Hash
686
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
687
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
688
+ params = default_params.merge(params)
689
+ old_initialize(p, params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], &blk)
690
+ end
691
+ end
692
+
693
+ class FXDirSelector
694
+ alias old_initialize initialize
695
+ def initialize(p, *args, &blk)
696
+ argument_names = %w{target selector opts x y width height}
697
+ default_params = { :target => nil, :selector => 0, :opts => 0, :x => 0, :y => 0, :width => 0, :height => 0 }
698
+ params = {}
699
+ params = args.pop if args.last.is_a? Hash
700
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
701
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
702
+ params = default_params.merge(params)
703
+ old_initialize(p, params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], &blk)
704
+ end
705
+ end
706
+
707
+ class FXDockSite
708
+ alias old_initialize initialize
709
+ def initialize(p, *args, &blk)
710
+ argument_names = %w{opts x y width height padLeft padRight padTop padBottom hSpacing vSpacing}
711
+ default_params = { :opts => 0, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => 0, :padRight => 0, :padTop => 0, :padBottom => 0, :hSpacing => 0, :vSpacing => 0 }
712
+ params = {}
713
+ params = args.pop if args.last.is_a? Hash
714
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
715
+ if params.key? :padding
716
+ value = params.delete(:padding)
717
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
718
+ end
719
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
720
+ params = default_params.merge(params)
721
+ old_initialize(p, params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], params[:hSpacing], params[:vSpacing], &blk)
722
+ end
723
+ end
724
+
725
+ class FXDockTitle
726
+ alias old_initialize initialize
727
+ def initialize(p, text, *args, &blk)
728
+ argument_names = %w{target selector opts x y width height padLeft padRight padTop padBottom}
729
+ default_params = { :target => nil, :selector => 0, :opts => FRAME_NORMAL|JUSTIFY_CENTER_X|JUSTIFY_CENTER_Y, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => 0, :padRight => 0, :padTop => 0, :padBottom => 0 }
730
+ params = {}
731
+ params = args.pop if args.last.is_a? Hash
732
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
733
+ if params.key? :padding
734
+ value = params.delete(:padding)
735
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
736
+ end
737
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
738
+ params = default_params.merge(params)
739
+ old_initialize(p, text, params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], &blk)
740
+ end
741
+ end
742
+
743
+ class FXDriveBox
744
+ alias old_initialize initialize
745
+ def initialize(p, *args, &blk)
746
+ argument_names = %w{target selector opts x y width height padLeft padRight padTop padBottom}
747
+ default_params = { :target => nil, :selector => 0, :opts => FRAME_SUNKEN|FRAME_THICK|LISTBOX_NORMAL, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => DEFAULT_PAD, :padRight => DEFAULT_PAD, :padTop => DEFAULT_PAD, :padBottom => DEFAULT_PAD }
748
+ params = {}
749
+ params = args.pop if args.last.is_a? Hash
750
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
751
+ if params.key? :padding
752
+ value = params.delete(:padding)
753
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
754
+ end
755
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
756
+ params = default_params.merge(params)
757
+ old_initialize(p, params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], &blk)
758
+ end
759
+ end
760
+
761
+ class FXFileDialog
762
+ alias old_initialize initialize
763
+ def initialize(owner, name, *args, &blk)
764
+ argument_names = %w{opts x y width height}
765
+ default_params = { :opts => 0, :x => 0, :y => 0, :width => 500, :height => 300 }
766
+ params = {}
767
+ params = args.pop if args.last.is_a? Hash
768
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
769
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
770
+ params = default_params.merge(params)
771
+ old_initialize(owner, name, params[:opts], params[:x], params[:y], params[:width], params[:height], &blk)
772
+ end
773
+ end
774
+
775
+ class FXFileDict
776
+ alias old_initialize initialize
777
+ def initialize(app, *args, &blk)
778
+ argument_names = %w{db}
779
+ default_params = { :db => nil }
780
+ params = {}
781
+ params = args.pop if args.last.is_a? Hash
782
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
783
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
784
+ params = default_params.merge(params)
785
+ old_initialize(app, params[:db], &blk)
786
+ end
787
+ end
788
+
789
+ class FXFileItem
790
+ alias old_initialize initialize
791
+ def initialize(text, *args, &blk)
792
+ argument_names = %w{bi mi ptr}
793
+ default_params = { :bi => nil, :mi => nil, :ptr => nil }
794
+ params = {}
795
+ params = args.pop if args.last.is_a? Hash
796
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
797
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
798
+ params = default_params.merge(params)
799
+ old_initialize(text, params[:bi], params[:mi], params[:ptr], &blk)
800
+ end
801
+ end
802
+
803
+ class FXFileList
804
+ alias old_initialize initialize
805
+ def initialize(p, *args, &blk)
806
+ argument_names = %w{target selector opts x y width height}
807
+ default_params = { :target => nil, :selector => 0, :opts => 0, :x => 0, :y => 0, :width => 0, :height => 0 }
808
+ params = {}
809
+ params = args.pop if args.last.is_a? Hash
810
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
811
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
812
+ params = default_params.merge(params)
813
+ old_initialize(p, params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], &blk)
814
+ end
815
+ end
816
+
817
+ class FXFileSelector
818
+ alias old_initialize initialize
819
+ def initialize(p, *args, &blk)
820
+ argument_names = %w{target selector opts x y width height}
821
+ default_params = { :target => nil, :selector => 0, :opts => 0, :x => 0, :y => 0, :width => 0, :height => 0 }
822
+ params = {}
823
+ params = args.pop if args.last.is_a? Hash
824
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
825
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
826
+ params = default_params.merge(params)
827
+ old_initialize(p, params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], &blk)
828
+ end
829
+ end
830
+
831
+ class FXFileStream
832
+ alias old_initialize initialize
833
+ def initialize(*args, &blk)
834
+ argument_names = %w{cont}
835
+ default_params = { :cont => nil }
836
+ params = {}
837
+ params = args.pop if args.last.is_a? Hash
838
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
839
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
840
+ params = default_params.merge(params)
841
+ old_initialize(params[:cont], &blk)
842
+ end
843
+ end
844
+
845
+ class FXFoldingItem
846
+ alias old_initialize initialize
847
+ def initialize(text, *args, &blk)
848
+ argument_names = %w{openIcon closedIcon data}
849
+ default_params = { :openIcon => nil, :closedIcon => nil, :data => nil }
850
+ params = {}
851
+ params = args.pop if args.last.is_a? Hash
852
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
853
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
854
+ params = default_params.merge(params)
855
+ old_initialize(text, params[:openIcon], params[:closedIcon], params[:data], &blk)
856
+ end
857
+ end
858
+
859
+ class FXFoldingList
860
+ alias old_initialize initialize
861
+ def initialize(p, *args, &blk)
862
+ argument_names = %w{target selector opts x y width height}
863
+ default_params = { :target => nil, :selector => 0, :opts => TREELIST_NORMAL, :x => 0, :y => 0, :width => 0, :height => 0 }
864
+ params = {}
865
+ params = args.pop if args.last.is_a? Hash
866
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
867
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
868
+ params = default_params.merge(params)
869
+ old_initialize(p, params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], &blk)
870
+ end
871
+ end
872
+
873
+ class FXFontDialog
874
+ alias old_initialize initialize
875
+ def initialize(owner, name, *args, &blk)
876
+ argument_names = %w{opts x y width height}
877
+ default_params = { :opts => 0, :x => 0, :y => 0, :width => 600, :height => 380 }
878
+ params = {}
879
+ params = args.pop if args.last.is_a? Hash
880
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
881
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
882
+ params = default_params.merge(params)
883
+ old_initialize(owner, name, params[:opts], params[:x], params[:y], params[:width], params[:height], &blk)
884
+ end
885
+ end
886
+
887
+ class FXFontSelector
888
+ alias old_initialize initialize
889
+ def initialize(p, *args, &blk)
890
+ argument_names = %w{target selector opts x y width height}
891
+ default_params = { :target => nil, :selector => 0, :opts => 0, :x => 0, :y => 0, :width => 0, :height => 0 }
892
+ params = {}
893
+ params = args.pop if args.last.is_a? Hash
894
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
895
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
896
+ params = default_params.merge(params)
897
+ old_initialize(p, params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], &blk)
898
+ end
899
+ end
900
+
901
+ class FXFrame
902
+ alias old_initialize initialize
903
+ def initialize(parent, *args, &blk)
904
+ argument_names = %w{opts x y width height padLeft padRight padTop padBottom}
905
+ default_params = { :opts => FRAME_NORMAL, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => DEFAULT_PAD, :padRight => DEFAULT_PAD, :padTop => DEFAULT_PAD, :padBottom => DEFAULT_PAD }
906
+ params = {}
907
+ params = args.pop if args.last.is_a? Hash
908
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
909
+ if params.key? :padding
910
+ value = params.delete(:padding)
911
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
912
+ end
913
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
914
+ params = default_params.merge(params)
915
+ old_initialize(parent, params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], &blk)
916
+ end
917
+ end
918
+
919
+ class FXGIFCursor
920
+ alias old_initialize initialize
921
+ def initialize(a, pix, *args, &blk)
922
+ argument_names = %w{hx hy}
923
+ default_params = { :hx => -1, :hy => -1 }
924
+ params = {}
925
+ params = args.pop if args.last.is_a? Hash
926
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
927
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
928
+ params = default_params.merge(params)
929
+ old_initialize(a, pix, params[:hx], params[:hy], &blk)
930
+ end
931
+ end
932
+
933
+ class FXGIFIcon
934
+ alias old_initialize initialize
935
+ def initialize(a, *args, &blk)
936
+ argument_names = %w{pix clr opts width height}
937
+ default_params = { :pix => nil, :clr => 0, :opts => 0, :width => 1, :height => 1 }
938
+ params = {}
939
+ params = args.pop if args.last.is_a? Hash
940
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
941
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
942
+ params = default_params.merge(params)
943
+ old_initialize(a, params[:pix], params[:clr], params[:opts], params[:width], params[:height], &blk)
944
+ end
945
+ end
946
+
947
+ class FXGIFImage
948
+ alias old_initialize initialize
949
+ def initialize(a, *args, &blk)
950
+ argument_names = %w{pix opts width height}
951
+ default_params = { :pix => nil, :opts => 0, :width => 1, :height => 1 }
952
+ params = {}
953
+ params = args.pop if args.last.is_a? Hash
954
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
955
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
956
+ params = default_params.merge(params)
957
+ old_initialize(a, params[:pix], params[:opts], params[:width], params[:height], &blk)
958
+ end
959
+ end
960
+
961
+ class FXGLContext
962
+ alias old_initialize initialize
963
+ def initialize(app, visual, *args, &blk)
964
+ argument_names = %w{other}
965
+ default_params = { :other => nil }
966
+ params = {}
967
+ params = args.pop if args.last.is_a? Hash
968
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
969
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
970
+ params = default_params.merge(params)
971
+ old_initialize(app, visual, params[:other], &blk)
972
+ end
973
+ end
974
+
975
+ class FXGradientBar
976
+ alias old_initialize initialize
977
+ def initialize(p, *args, &blk)
978
+ argument_names = %w{target selector opts x y width height padLeft padRight padTop padBottom}
979
+ default_params = { :target => nil, :selector => 0, :opts => FRAME_NORMAL, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => DEFAULT_PAD, :padRight => DEFAULT_PAD, :padTop => DEFAULT_PAD, :padBottom => DEFAULT_PAD }
980
+ params = {}
981
+ params = args.pop if args.last.is_a? Hash
982
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
983
+ if params.key? :padding
984
+ value = params.delete(:padding)
985
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
986
+ end
987
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
988
+ params = default_params.merge(params)
989
+ old_initialize(p, params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], &blk)
990
+ end
991
+ end
992
+
993
+ class FXGroupBox
994
+ alias old_initialize initialize
995
+ def initialize(parent, text, *args, &blk)
996
+ argument_names = %w{opts x y width height padLeft padRight padTop padBottom hSpacing vSpacing}
997
+ default_params = { :opts => GROUPBOX_NORMAL, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => DEFAULT_SPACING, :padRight => DEFAULT_SPACING, :padTop => DEFAULT_SPACING, :padBottom => DEFAULT_SPACING, :hSpacing => DEFAULT_SPACING, :vSpacing => DEFAULT_SPACING }
998
+ params = {}
999
+ params = args.pop if args.last.is_a? Hash
1000
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1001
+ if params.key? :padding
1002
+ value = params.delete(:padding)
1003
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
1004
+ end
1005
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1006
+ params = default_params.merge(params)
1007
+ old_initialize(parent, text, params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], params[:hSpacing], params[:vSpacing], &blk)
1008
+ end
1009
+ end
1010
+
1011
+ class FXHeaderItem
1012
+ alias old_initialize initialize
1013
+ def initialize(text, *args, &blk)
1014
+ argument_names = %w{ic s ptr}
1015
+ default_params = { :ic => nil, :s => 0, :ptr => nil }
1016
+ params = {}
1017
+ params = args.pop if args.last.is_a? Hash
1018
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1019
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1020
+ params = default_params.merge(params)
1021
+ old_initialize(text, params[:ic], params[:s], params[:ptr], &blk)
1022
+ end
1023
+ end
1024
+
1025
+ class FXHeader
1026
+ alias old_initialize initialize
1027
+ def initialize(p, *args, &blk)
1028
+ argument_names = %w{target selector opts x y width height padLeft padRight padTop padBottom}
1029
+ default_params = { :target => nil, :selector => 0, :opts => HEADER_NORMAL, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => DEFAULT_PAD, :padRight => DEFAULT_PAD, :padTop => DEFAULT_PAD, :padBottom => DEFAULT_PAD }
1030
+ params = {}
1031
+ params = args.pop if args.last.is_a? Hash
1032
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1033
+ if params.key? :padding
1034
+ value = params.delete(:padding)
1035
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
1036
+ end
1037
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1038
+ params = default_params.merge(params)
1039
+ old_initialize(p, params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], &blk)
1040
+ end
1041
+ end
1042
+
1043
+ class FXHorizontalFrame
1044
+ alias old_initialize initialize
1045
+ def initialize(p, *args, &blk)
1046
+ argument_names = %w{opts x y width height padLeft padRight padTop padBottom hSpacing vSpacing}
1047
+ default_params = { :opts => 0, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => DEFAULT_SPACING, :padRight => DEFAULT_SPACING, :padTop => DEFAULT_SPACING, :padBottom => DEFAULT_SPACING, :hSpacing => DEFAULT_SPACING, :vSpacing => DEFAULT_SPACING }
1048
+ params = {}
1049
+ params = args.pop if args.last.is_a? Hash
1050
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1051
+ if params.key? :padding
1052
+ value = params.delete(:padding)
1053
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
1054
+ end
1055
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1056
+ params = default_params.merge(params)
1057
+ old_initialize(p, params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], params[:hSpacing], params[:vSpacing], &blk)
1058
+ end
1059
+ end
1060
+
1061
+ class FXICOIcon
1062
+ alias old_initialize initialize
1063
+ def initialize(a, *args, &blk)
1064
+ argument_names = %w{pix clr opts width height}
1065
+ default_params = { :pix => nil, :clr => 0, :opts => 0, :width => 1, :height => 1 }
1066
+ params = {}
1067
+ params = args.pop if args.last.is_a? Hash
1068
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1069
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1070
+ params = default_params.merge(params)
1071
+ old_initialize(a, params[:pix], params[:clr], params[:opts], params[:width], params[:height], &blk)
1072
+ end
1073
+ end
1074
+
1075
+ class FXICOImage
1076
+ alias old_initialize initialize
1077
+ def initialize(a, *args, &blk)
1078
+ argument_names = %w{pix opts width height}
1079
+ default_params = { :pix => nil, :opts => 0, :width => 1, :height => 1 }
1080
+ params = {}
1081
+ params = args.pop if args.last.is_a? Hash
1082
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1083
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1084
+ params = default_params.merge(params)
1085
+ old_initialize(a, params[:pix], params[:opts], params[:width], params[:height], &blk)
1086
+ end
1087
+ end
1088
+
1089
+ class FXIcon
1090
+ alias old_initialize initialize
1091
+ def initialize(app, *args, &blk)
1092
+ argument_names = %w{pix clr opts width height}
1093
+ default_params = { :pix => nil, :clr => 0, :opts => 0, :width => 1, :height => 1 }
1094
+ params = {}
1095
+ params = args.pop if args.last.is_a? Hash
1096
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1097
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1098
+ params = default_params.merge(params)
1099
+ old_initialize(app, params[:pix], params[:clr], params[:opts], params[:width], params[:height], &blk)
1100
+ end
1101
+ end
1102
+
1103
+ class FXIconDict
1104
+ alias old_initialize initialize
1105
+ def initialize(app, *args, &blk)
1106
+ argument_names = %w{path}
1107
+ default_params = { :path => defaultIconPath }
1108
+ params = {}
1109
+ params = args.pop if args.last.is_a? Hash
1110
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1111
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1112
+ params = default_params.merge(params)
1113
+ old_initialize(app, params[:path], &blk)
1114
+ end
1115
+ end
1116
+
1117
+ class FXIconItem
1118
+ alias old_initialize initialize
1119
+ def initialize(text, *args, &blk)
1120
+ argument_names = %w{bigIcon miniIcon data}
1121
+ default_params = { :bigIcon => nil, :miniIcon => nil, :data => nil }
1122
+ params = {}
1123
+ params = args.pop if args.last.is_a? Hash
1124
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1125
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1126
+ params = default_params.merge(params)
1127
+ old_initialize(text, params[:bigIcon], params[:miniIcon], params[:data], &blk)
1128
+ end
1129
+ end
1130
+
1131
+ class FXIconList
1132
+ alias old_initialize initialize
1133
+ def initialize(p, *args, &blk)
1134
+ argument_names = %w{target selector opts x y width height}
1135
+ default_params = { :target => nil, :selector => 0, :opts => ICONLIST_NORMAL, :x => 0, :y => 0, :width => 0, :height => 0 }
1136
+ params = {}
1137
+ params = args.pop if args.last.is_a? Hash
1138
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1139
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1140
+ params = default_params.merge(params)
1141
+ old_initialize(p, params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], &blk)
1142
+ end
1143
+ end
1144
+
1145
+ class FXImage
1146
+ alias old_initialize initialize
1147
+ def initialize(a, *args, &blk)
1148
+ argument_names = %w{pixels opts width height}
1149
+ default_params = { :pixels => nil, :opts => 0, :width => 1, :height => 1 }
1150
+ params = {}
1151
+ params = args.pop if args.last.is_a? Hash
1152
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1153
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1154
+ params = default_params.merge(params)
1155
+ old_initialize(a, params[:pixels], params[:opts], params[:width], params[:height], &blk)
1156
+ end
1157
+ end
1158
+
1159
+ class FXImageFrame
1160
+ alias old_initialize initialize
1161
+ def initialize(p, img, *args, &blk)
1162
+ argument_names = %w{opts x y width height padLeft padRight padTop padBottom}
1163
+ default_params = { :opts => FRAME_SUNKEN|FRAME_THICK, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => 0, :padRight => 0, :padTop => 0, :padBottom => 0 }
1164
+ params = {}
1165
+ params = args.pop if args.last.is_a? Hash
1166
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1167
+ if params.key? :padding
1168
+ value = params.delete(:padding)
1169
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
1170
+ end
1171
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1172
+ params = default_params.merge(params)
1173
+ old_initialize(p, img, params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], &blk)
1174
+ end
1175
+ end
1176
+
1177
+ class FXImageView
1178
+ alias old_initialize initialize
1179
+ def initialize(p, *args, &blk)
1180
+ argument_names = %w{img target selector opts x y width height}
1181
+ default_params = { :img => nil, :target => nil, :selector => 0, :opts => 0, :x => 0, :y => 0, :width => 0, :height => 0 }
1182
+ params = {}
1183
+ params = args.pop if args.last.is_a? Hash
1184
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1185
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1186
+ params = default_params.merge(params)
1187
+ old_initialize(p, params[:img], params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], &blk)
1188
+ end
1189
+ end
1190
+
1191
+ class FXInputDialog
1192
+ alias old_initialize initialize
1193
+ def initialize(owner, caption, label, *args, &blk)
1194
+ argument_names = %w{icon opts x y width height}
1195
+ default_params = { :icon => nil, :opts => INPUTDIALOG_STRING, :x => 0, :y => 0, :width => 0, :height => 0 }
1196
+ params = {}
1197
+ params = args.pop if args.last.is_a? Hash
1198
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1199
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1200
+ params = default_params.merge(params)
1201
+ old_initialize(owner, caption, label, params[:icon], params[:opts], params[:x], params[:y], params[:width], params[:height], &blk)
1202
+ end
1203
+ end
1204
+
1205
+ class FXJPGIcon
1206
+ alias old_initialize initialize
1207
+ def initialize(a, *args, &blk)
1208
+ argument_names = %w{pix clr opts width height}
1209
+ default_params = { :pix => nil, :clr => 0, :opts => 0, :width => 1, :height => 1 }
1210
+ params = {}
1211
+ params = args.pop if args.last.is_a? Hash
1212
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1213
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1214
+ params = default_params.merge(params)
1215
+ old_initialize(a, params[:pix], params[:clr], params[:opts], params[:width], params[:height], &blk)
1216
+ end
1217
+ end
1218
+
1219
+ class FXJPGImage
1220
+ alias old_initialize initialize
1221
+ def initialize(a, *args, &blk)
1222
+ argument_names = %w{pix opts width height}
1223
+ default_params = { :pix => nil, :opts => 0, :width => 1, :height => 1 }
1224
+ params = {}
1225
+ params = args.pop if args.last.is_a? Hash
1226
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1227
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1228
+ params = default_params.merge(params)
1229
+ old_initialize(a, params[:pix], params[:opts], params[:width], params[:height], &blk)
1230
+ end
1231
+ end
1232
+
1233
+ class FXKnob
1234
+ alias old_initialize initialize
1235
+ def initialize(p, *args, &blk)
1236
+ argument_names = %w{target selector opts x y width height padLeft padRight padTop padBottom}
1237
+ default_params = { :target => nil, :selector => 0, :opts => KNOB_NORMAL, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => DEFAULT_PAD, :padRight => DEFAULT_PAD, :padTop => DEFAULT_PAD, :padBottom => DEFAULT_PAD }
1238
+ params = {}
1239
+ params = args.pop if args.last.is_a? Hash
1240
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1241
+ if params.key? :padding
1242
+ value = params.delete(:padding)
1243
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
1244
+ end
1245
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1246
+ params = default_params.merge(params)
1247
+ old_initialize(p, params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], &blk)
1248
+ end
1249
+ end
1250
+
1251
+ class FXLabel
1252
+ alias old_initialize initialize
1253
+ def initialize(parent, text, *args, &blk)
1254
+ argument_names = %w{icon opts x y width height padLeft padRight padTop padBottom}
1255
+ default_params = { :icon => nil, :opts => LABEL_NORMAL, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => DEFAULT_PAD, :padRight => DEFAULT_PAD, :padTop => DEFAULT_PAD, :padBottom => DEFAULT_PAD }
1256
+ params = {}
1257
+ params = args.pop if args.last.is_a? Hash
1258
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1259
+ if params.key? :padding
1260
+ value = params.delete(:padding)
1261
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
1262
+ end
1263
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1264
+ params = default_params.merge(params)
1265
+ old_initialize(parent, text, params[:icon], params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], &blk)
1266
+ end
1267
+ end
1268
+
1269
+ class FXListItem
1270
+ alias old_initialize initialize
1271
+ def initialize(text, *args, &blk)
1272
+ argument_names = %w{icon data}
1273
+ default_params = { :icon => nil, :data => nil }
1274
+ params = {}
1275
+ params = args.pop if args.last.is_a? Hash
1276
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1277
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1278
+ params = default_params.merge(params)
1279
+ old_initialize(text, params[:icon], params[:data], &blk)
1280
+ end
1281
+ end
1282
+
1283
+ class FXList
1284
+ alias old_initialize initialize
1285
+ def initialize(p, *args, &blk)
1286
+ argument_names = %w{target selector opts x y width height}
1287
+ default_params = { :target => nil, :selector => 0, :opts => LIST_NORMAL, :x => 0, :y => 0, :width => 0, :height => 0 }
1288
+ params = {}
1289
+ params = args.pop if args.last.is_a? Hash
1290
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1291
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1292
+ params = default_params.merge(params)
1293
+ old_initialize(p, params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], &blk)
1294
+ end
1295
+ end
1296
+
1297
+ class FXListBox
1298
+ alias old_initialize initialize
1299
+ def initialize(p, *args, &blk)
1300
+ argument_names = %w{target selector opts x y width height padLeft padRight padTop padBottom}
1301
+ default_params = { :target => nil, :selector => 0, :opts => FRAME_SUNKEN|FRAME_THICK|LISTBOX_NORMAL, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => DEFAULT_PAD, :padRight => DEFAULT_PAD, :padTop => DEFAULT_PAD, :padBottom => DEFAULT_PAD }
1302
+ params = {}
1303
+ params = args.pop if args.last.is_a? Hash
1304
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1305
+ if params.key? :padding
1306
+ value = params.delete(:padding)
1307
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
1308
+ end
1309
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1310
+ params = default_params.merge(params)
1311
+ old_initialize(p, params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], &blk)
1312
+ end
1313
+ end
1314
+
1315
+ class FXMainWindow
1316
+ alias old_initialize initialize
1317
+ def initialize(app, title, *args, &blk)
1318
+ argument_names = %w{icon miniIcon opts x y width height padLeft padRight padTop padBottom hSpacing vSpacing}
1319
+ default_params = { :icon => nil, :miniIcon => nil, :opts => DECOR_ALL, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => 0, :padRight => 0, :padTop => 0, :padBottom => 0, :hSpacing => 4, :vSpacing => 4 }
1320
+ params = {}
1321
+ params = args.pop if args.last.is_a? Hash
1322
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1323
+ if params.key? :padding
1324
+ value = params.delete(:padding)
1325
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
1326
+ end
1327
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1328
+ params = default_params.merge(params)
1329
+ old_initialize(app, title, params[:icon], params[:miniIcon], params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], params[:hSpacing], params[:vSpacing], &blk)
1330
+ end
1331
+ end
1332
+
1333
+ class FXMatrix
1334
+ alias old_initialize initialize
1335
+ def initialize(parent, *args, &blk)
1336
+ argument_names = %w{n opts x y width height padLeft padRight padTop padBottom hSpacing vSpacing}
1337
+ default_params = { :n => 1, :opts => MATRIX_BY_ROWS, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => DEFAULT_SPACING, :padRight => DEFAULT_SPACING, :padTop => DEFAULT_SPACING, :padBottom => DEFAULT_SPACING, :hSpacing => DEFAULT_SPACING, :vSpacing => DEFAULT_SPACING }
1338
+ params = {}
1339
+ params = args.pop if args.last.is_a? Hash
1340
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1341
+ if params.key? :padding
1342
+ value = params.delete(:padding)
1343
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
1344
+ end
1345
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1346
+ params = default_params.merge(params)
1347
+ old_initialize(parent, params[:n], params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], params[:hSpacing], params[:vSpacing], &blk)
1348
+ end
1349
+ end
1350
+
1351
+ class FXMDIDeleteButton
1352
+ alias old_initialize initialize
1353
+ def initialize(p, *args, &blk)
1354
+ argument_names = %w{target selector opts x y width height}
1355
+ default_params = { :target => nil, :selector => 0, :opts => FRAME_RAISED, :x => 0, :y => 0, :width => 0, :height => 0 }
1356
+ params = {}
1357
+ params = args.pop if args.last.is_a? Hash
1358
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1359
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1360
+ params = default_params.merge(params)
1361
+ old_initialize(p, params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], &blk)
1362
+ end
1363
+ end
1364
+
1365
+ class FXMDIRestoreButton
1366
+ alias old_initialize initialize
1367
+ def initialize(p, *args, &blk)
1368
+ argument_names = %w{target selector opts x y width height}
1369
+ default_params = { :target => nil, :selector => 0, :opts => FRAME_RAISED, :x => 0, :y => 0, :width => 0, :height => 0 }
1370
+ params = {}
1371
+ params = args.pop if args.last.is_a? Hash
1372
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1373
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1374
+ params = default_params.merge(params)
1375
+ old_initialize(p, params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], &blk)
1376
+ end
1377
+ end
1378
+
1379
+ class FXMDIMaximizeButton
1380
+ alias old_initialize initialize
1381
+ def initialize(p, *args, &blk)
1382
+ argument_names = %w{target selector opts x y width height}
1383
+ default_params = { :target => nil, :selector => 0, :opts => FRAME_RAISED, :x => 0, :y => 0, :width => 0, :height => 0 }
1384
+ params = {}
1385
+ params = args.pop if args.last.is_a? Hash
1386
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1387
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1388
+ params = default_params.merge(params)
1389
+ old_initialize(p, params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], &blk)
1390
+ end
1391
+ end
1392
+
1393
+ class FXMDIMinimizeButton
1394
+ alias old_initialize initialize
1395
+ def initialize(p, *args, &blk)
1396
+ argument_names = %w{target selector opts x y width height}
1397
+ default_params = { :target => nil, :selector => 0, :opts => FRAME_RAISED, :x => 0, :y => 0, :width => 0, :height => 0 }
1398
+ params = {}
1399
+ params = args.pop if args.last.is_a? Hash
1400
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1401
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1402
+ params = default_params.merge(params)
1403
+ old_initialize(p, params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], &blk)
1404
+ end
1405
+ end
1406
+
1407
+ class FXMDIWindowButton
1408
+ alias old_initialize initialize
1409
+ def initialize(p, pup, *args, &blk)
1410
+ argument_names = %w{target selector opts x y width height}
1411
+ default_params = { :target => nil, :selector => 0, :opts => 0, :x => 0, :y => 0, :width => 0, :height => 0 }
1412
+ params = {}
1413
+ params = args.pop if args.last.is_a? Hash
1414
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1415
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1416
+ params = default_params.merge(params)
1417
+ old_initialize(p, pup, params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], &blk)
1418
+ end
1419
+ end
1420
+
1421
+ class FXMDIMenu
1422
+ alias old_initialize initialize
1423
+ def initialize(owner, *args, &blk)
1424
+ argument_names = %w{target}
1425
+ default_params = { :target => nil }
1426
+ params = {}
1427
+ params = args.pop if args.last.is_a? Hash
1428
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1429
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1430
+ params = default_params.merge(params)
1431
+ old_initialize(owner, params[:target], &blk)
1432
+ end
1433
+ end
1434
+
1435
+ class FXMDIChild
1436
+ alias old_initialize initialize
1437
+ def initialize(p, name, *args, &blk)
1438
+ argument_names = %w{ic pup opts x y width height}
1439
+ default_params = { :ic => nil, :pup => nil, :opts => 0, :x => 0, :y => 0, :width => 0, :height => 0 }
1440
+ params = {}
1441
+ params = args.pop if args.last.is_a? Hash
1442
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1443
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1444
+ params = default_params.merge(params)
1445
+ old_initialize(p, name, params[:ic], params[:pup], params[:opts], params[:x], params[:y], params[:width], params[:height], &blk)
1446
+ end
1447
+ end
1448
+
1449
+ class FXMDIClient
1450
+ alias old_initialize initialize
1451
+ def initialize(p, *args, &blk)
1452
+ argument_names = %w{opts x y width height}
1453
+ default_params = { :opts => 0, :x => 0, :y => 0, :width => 0, :height => 0 }
1454
+ params = {}
1455
+ params = args.pop if args.last.is_a? Hash
1456
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1457
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1458
+ params = default_params.merge(params)
1459
+ old_initialize(p, params[:opts], params[:x], params[:y], params[:width], params[:height], &blk)
1460
+ end
1461
+ end
1462
+
1463
+ class FXMemoryStream
1464
+ alias old_initialize initialize
1465
+ def initialize(*args, &blk)
1466
+ argument_names = %w{cont}
1467
+ default_params = { :cont => nil }
1468
+ params = {}
1469
+ params = args.pop if args.last.is_a? Hash
1470
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1471
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1472
+ params = default_params.merge(params)
1473
+ old_initialize(params[:cont], &blk)
1474
+ end
1475
+ end
1476
+
1477
+ class FXMenuButton
1478
+ alias old_initialize initialize
1479
+ def initialize(parent, text, *args, &blk)
1480
+ argument_names = %w{icon popupMenu opts x y width height padLeft padRight padTop padBottom}
1481
+ default_params = { :icon => nil, :popupMenu => nil, :opts => JUSTIFY_NORMAL|ICON_BEFORE_TEXT|MENUBUTTON_DOWN, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => DEFAULT_SPACING, :padRight => DEFAULT_SPACING, :padTop => DEFAULT_SPACING, :padBottom => DEFAULT_SPACING }
1482
+ params = {}
1483
+ params = args.pop if args.last.is_a? Hash
1484
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1485
+ if params.key? :padding
1486
+ value = params.delete(:padding)
1487
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
1488
+ end
1489
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1490
+ params = default_params.merge(params)
1491
+ old_initialize(parent, text, params[:icon], params[:popupMenu], params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], &blk)
1492
+ end
1493
+ end
1494
+
1495
+ class FXMenuCaption
1496
+ alias old_initialize initialize
1497
+ def initialize(parent, text, *args, &blk)
1498
+ argument_names = %w{icon opts}
1499
+ default_params = { :icon => nil, :opts => 0 }
1500
+ params = {}
1501
+ params = args.pop if args.last.is_a? Hash
1502
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1503
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1504
+ params = default_params.merge(params)
1505
+ old_initialize(parent, text, params[:icon], params[:opts], &blk)
1506
+ end
1507
+ end
1508
+
1509
+ class FXMenuCascade
1510
+ alias old_initialize initialize
1511
+ def initialize(parent, text, *args, &blk)
1512
+ argument_names = %w{icon popupMenu opts}
1513
+ default_params = { :icon => nil, :popupMenu => nil, :opts => 0 }
1514
+ params = {}
1515
+ params = args.pop if args.last.is_a? Hash
1516
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1517
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1518
+ params = default_params.merge(params)
1519
+ old_initialize(parent, text, params[:icon], params[:popupMenu], params[:opts], &blk)
1520
+ end
1521
+ end
1522
+
1523
+ class FXMenuCheck
1524
+ alias old_initialize initialize
1525
+ def initialize(p, text, *args, &blk)
1526
+ argument_names = %w{target selector opts}
1527
+ default_params = { :target => nil, :selector => 0, :opts => 0 }
1528
+ params = {}
1529
+ params = args.pop if args.last.is_a? Hash
1530
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1531
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1532
+ params = default_params.merge(params)
1533
+ old_initialize(p, text, params[:target], params[:selector], params[:opts], &blk)
1534
+ end
1535
+ end
1536
+
1537
+ class FXMenuCommand
1538
+ alias old_initialize initialize
1539
+ def initialize(p, text, *args, &blk)
1540
+ argument_names = %w{ic target selector opts}
1541
+ default_params = { :ic => nil, :target => nil, :selector => 0, :opts => 0 }
1542
+ params = {}
1543
+ params = args.pop if args.last.is_a? Hash
1544
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1545
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1546
+ params = default_params.merge(params)
1547
+ old_initialize(p, text, params[:ic], params[:target], params[:selector], params[:opts], &blk)
1548
+ end
1549
+ end
1550
+
1551
+ class FXMenuPane
1552
+ alias old_initialize initialize
1553
+ def initialize(owner, *args, &blk)
1554
+ argument_names = %w{opts}
1555
+ default_params = { :opts => 0 }
1556
+ params = {}
1557
+ params = args.pop if args.last.is_a? Hash
1558
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1559
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1560
+ params = default_params.merge(params)
1561
+ old_initialize(owner, params[:opts], &blk)
1562
+ end
1563
+ end
1564
+
1565
+ class FXMenuRadio
1566
+ alias old_initialize initialize
1567
+ def initialize(p, text, *args, &blk)
1568
+ argument_names = %w{target selector opts}
1569
+ default_params = { :target => nil, :selector => 0, :opts => 0 }
1570
+ params = {}
1571
+ params = args.pop if args.last.is_a? Hash
1572
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1573
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1574
+ params = default_params.merge(params)
1575
+ old_initialize(p, text, params[:target], params[:selector], params[:opts], &blk)
1576
+ end
1577
+ end
1578
+
1579
+ class FXMenuSeparator
1580
+ alias old_initialize initialize
1581
+ def initialize(parent, *args, &blk)
1582
+ argument_names = %w{opts}
1583
+ default_params = { :opts => 0 }
1584
+ params = {}
1585
+ params = args.pop if args.last.is_a? Hash
1586
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1587
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1588
+ params = default_params.merge(params)
1589
+ old_initialize(parent, params[:opts], &blk)
1590
+ end
1591
+ end
1592
+
1593
+ class FXMenuTitle
1594
+ alias old_initialize initialize
1595
+ def initialize(parent, text, *args, &blk)
1596
+ argument_names = %w{icon popupMenu opts}
1597
+ default_params = { :icon => nil, :popupMenu => nil, :opts => 0 }
1598
+ params = {}
1599
+ params = args.pop if args.last.is_a? Hash
1600
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1601
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1602
+ params = default_params.merge(params)
1603
+ old_initialize(parent, text, params[:icon], params[:popupMenu], params[:opts], &blk)
1604
+ end
1605
+ end
1606
+
1607
+ class FXMessageBox
1608
+ alias old_initialize initialize
1609
+ def initialize(owner, caption, text, *args, &blk)
1610
+ argument_names = %w{ic opts x y}
1611
+ default_params = { :ic => nil, :opts => 0, :x => 0, :y => 0 }
1612
+ params = {}
1613
+ params = args.pop if args.last.is_a? Hash
1614
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1615
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1616
+ params = default_params.merge(params)
1617
+ old_initialize(owner, caption, text, params[:ic], params[:opts], params[:x], params[:y], &blk)
1618
+ end
1619
+ end
1620
+
1621
+ class FXOption
1622
+ alias old_initialize initialize
1623
+ def initialize(p, text, *args, &blk)
1624
+ argument_names = %w{ic target selector opts x y width height padLeft padRight padTop padBottom}
1625
+ default_params = { :ic => nil, :target => nil, :selector => 0, :opts => JUSTIFY_NORMAL|ICON_BEFORE_TEXT, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => DEFAULT_PAD, :padRight => DEFAULT_PAD, :padTop => DEFAULT_PAD, :padBottom => DEFAULT_PAD }
1626
+ params = {}
1627
+ params = args.pop if args.last.is_a? Hash
1628
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1629
+ if params.key? :padding
1630
+ value = params.delete(:padding)
1631
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
1632
+ end
1633
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1634
+ params = default_params.merge(params)
1635
+ old_initialize(p, text, params[:ic], params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], &blk)
1636
+ end
1637
+ end
1638
+
1639
+ class FXOptionMenu
1640
+ alias old_initialize initialize
1641
+ def initialize(p, *args, &blk)
1642
+ argument_names = %w{pup opts x y width height padLeft padRight padTop padBottom}
1643
+ default_params = { :pup => nil, :opts => JUSTIFY_NORMAL|ICON_BEFORE_TEXT, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => DEFAULT_PAD, :padRight => DEFAULT_PAD, :padTop => DEFAULT_PAD, :padBottom => DEFAULT_PAD }
1644
+ params = {}
1645
+ params = args.pop if args.last.is_a? Hash
1646
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1647
+ if params.key? :padding
1648
+ value = params.delete(:padding)
1649
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
1650
+ end
1651
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1652
+ params = default_params.merge(params)
1653
+ old_initialize(p, params[:pup], params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], &blk)
1654
+ end
1655
+ end
1656
+
1657
+ class FXPCXIcon
1658
+ alias old_initialize initialize
1659
+ def initialize(a, *args, &blk)
1660
+ argument_names = %w{pix clr opts width height}
1661
+ default_params = { :pix => nil, :clr => 0, :opts => 0, :width => 1, :height => 1 }
1662
+ params = {}
1663
+ params = args.pop if args.last.is_a? Hash
1664
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1665
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1666
+ params = default_params.merge(params)
1667
+ old_initialize(a, params[:pix], params[:clr], params[:opts], params[:width], params[:height], &blk)
1668
+ end
1669
+ end
1670
+
1671
+ class FXPCXImage
1672
+ alias old_initialize initialize
1673
+ def initialize(a, *args, &blk)
1674
+ argument_names = %w{pix opts width height}
1675
+ default_params = { :pix => nil, :opts => 0, :width => 1, :height => 1 }
1676
+ params = {}
1677
+ params = args.pop if args.last.is_a? Hash
1678
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1679
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1680
+ params = default_params.merge(params)
1681
+ old_initialize(a, params[:pix], params[:opts], params[:width], params[:height], &blk)
1682
+ end
1683
+ end
1684
+
1685
+ class FXPicker
1686
+ alias old_initialize initialize
1687
+ def initialize(p, text, *args, &blk)
1688
+ argument_names = %w{ic target selector opts x y width height padLeft padRight padTop padBottom}
1689
+ default_params = { :ic => nil, :target => nil, :selector => 0, :opts => BUTTON_NORMAL, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => DEFAULT_PAD, :padRight => DEFAULT_PAD, :padTop => DEFAULT_PAD, :padBottom => DEFAULT_PAD }
1690
+ params = {}
1691
+ params = args.pop if args.last.is_a? Hash
1692
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1693
+ if params.key? :padding
1694
+ value = params.delete(:padding)
1695
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
1696
+ end
1697
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1698
+ params = default_params.merge(params)
1699
+ old_initialize(p, text, params[:ic], params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], &blk)
1700
+ end
1701
+ end
1702
+
1703
+ class FXPNGIcon
1704
+ alias old_initialize initialize
1705
+ def initialize(a, *args, &blk)
1706
+ argument_names = %w{pix clr opts width height}
1707
+ default_params = { :pix => nil, :clr => 0, :opts => 0, :width => 1, :height => 1 }
1708
+ params = {}
1709
+ params = args.pop if args.last.is_a? Hash
1710
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1711
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1712
+ params = default_params.merge(params)
1713
+ old_initialize(a, params[:pix], params[:clr], params[:opts], params[:width], params[:height], &blk)
1714
+ end
1715
+ end
1716
+
1717
+ class FXPNGImage
1718
+ alias old_initialize initialize
1719
+ def initialize(a, *args, &blk)
1720
+ argument_names = %w{pix opts width height}
1721
+ default_params = { :pix => nil, :opts => 0, :width => 1, :height => 1 }
1722
+ params = {}
1723
+ params = args.pop if args.last.is_a? Hash
1724
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1725
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1726
+ params = default_params.merge(params)
1727
+ old_initialize(a, params[:pix], params[:opts], params[:width], params[:height], &blk)
1728
+ end
1729
+ end
1730
+
1731
+ class FXPopup
1732
+ alias old_initialize initialize
1733
+ def initialize(owner, *args, &blk)
1734
+ argument_names = %w{opts x y width height}
1735
+ default_params = { :opts => POPUP_VERTICAL|FRAME_RAISED|FRAME_THICK, :x => 0, :y => 0, :width => 0, :height => 0 }
1736
+ params = {}
1737
+ params = args.pop if args.last.is_a? Hash
1738
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1739
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1740
+ params = default_params.merge(params)
1741
+ old_initialize(owner, params[:opts], params[:x], params[:y], params[:width], params[:height], &blk)
1742
+ end
1743
+ end
1744
+
1745
+ class FXPPMIcon
1746
+ alias old_initialize initialize
1747
+ def initialize(a, *args, &blk)
1748
+ argument_names = %w{pix clr opts width height}
1749
+ default_params = { :pix => nil, :clr => 0, :opts => 0, :width => 1, :height => 1 }
1750
+ params = {}
1751
+ params = args.pop if args.last.is_a? Hash
1752
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1753
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1754
+ params = default_params.merge(params)
1755
+ old_initialize(a, params[:pix], params[:clr], params[:opts], params[:width], params[:height], &blk)
1756
+ end
1757
+ end
1758
+
1759
+ class FXPPMImage
1760
+ alias old_initialize initialize
1761
+ def initialize(a, *args, &blk)
1762
+ argument_names = %w{pix opts width height}
1763
+ default_params = { :pix => nil, :opts => 0, :width => 1, :height => 1 }
1764
+ params = {}
1765
+ params = args.pop if args.last.is_a? Hash
1766
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1767
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1768
+ params = default_params.merge(params)
1769
+ old_initialize(a, params[:pix], params[:opts], params[:width], params[:height], &blk)
1770
+ end
1771
+ end
1772
+
1773
+ class FXPrintDialog
1774
+ alias old_initialize initialize
1775
+ def initialize(owner, name, *args, &blk)
1776
+ argument_names = %w{opts x y width height}
1777
+ default_params = { :opts => 0, :x => 0, :y => 0, :width => 0, :height => 0 }
1778
+ params = {}
1779
+ params = args.pop if args.last.is_a? Hash
1780
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1781
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1782
+ params = default_params.merge(params)
1783
+ old_initialize(owner, name, params[:opts], params[:x], params[:y], params[:width], params[:height], &blk)
1784
+ end
1785
+ end
1786
+
1787
+ class FXProgressBar
1788
+ alias old_initialize initialize
1789
+ def initialize(p, *args, &blk)
1790
+ argument_names = %w{target selector opts x y width height padLeft padRight padTop padBottom}
1791
+ default_params = { :target => nil, :selector => 0, :opts => PROGRESSBAR_NORMAL, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => DEFAULT_PAD, :padRight => DEFAULT_PAD, :padTop => DEFAULT_PAD, :padBottom => DEFAULT_PAD }
1792
+ params = {}
1793
+ params = args.pop if args.last.is_a? Hash
1794
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1795
+ if params.key? :padding
1796
+ value = params.delete(:padding)
1797
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
1798
+ end
1799
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1800
+ params = default_params.merge(params)
1801
+ old_initialize(p, params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], &blk)
1802
+ end
1803
+ end
1804
+
1805
+ class FXProgressDialog
1806
+ alias old_initialize initialize
1807
+ def initialize(owner, caption, label, *args, &blk)
1808
+ argument_names = %w{opts x y width height}
1809
+ default_params = { :opts => PROGRESSDIALOG_NORMAL, :x => 0, :y => 0, :width => 0, :height => 0 }
1810
+ params = {}
1811
+ params = args.pop if args.last.is_a? Hash
1812
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1813
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1814
+ params = default_params.merge(params)
1815
+ old_initialize(owner, caption, label, params[:opts], params[:x], params[:y], params[:width], params[:height], &blk)
1816
+ end
1817
+ end
1818
+
1819
+ class FXRadioButton
1820
+ alias old_initialize initialize
1821
+ def initialize(parent, text, *args, &blk)
1822
+ argument_names = %w{target selector opts x y width height padLeft padRight padTop padBottom}
1823
+ default_params = { :target => nil, :selector => 0, :opts => RADIOBUTTON_NORMAL, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => DEFAULT_PAD, :padRight => DEFAULT_PAD, :padTop => DEFAULT_PAD, :padBottom => DEFAULT_PAD }
1824
+ params = {}
1825
+ params = args.pop if args.last.is_a? Hash
1826
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1827
+ if params.key? :padding
1828
+ value = params.delete(:padding)
1829
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
1830
+ end
1831
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1832
+ params = default_params.merge(params)
1833
+ old_initialize(parent, text, params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], &blk)
1834
+ end
1835
+ end
1836
+
1837
+ class FXRealSlider
1838
+ alias old_initialize initialize
1839
+ def initialize(p, *args, &blk)
1840
+ argument_names = %w{target selector opts x y width height padLeft padRight padTop padBottom}
1841
+ default_params = { :target => nil, :selector => 0, :opts => REALSLIDER_NORMAL, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => 0, :padRight => 0, :padTop => 0, :padBottom => 0 }
1842
+ params = {}
1843
+ params = args.pop if args.last.is_a? Hash
1844
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1845
+ if params.key? :padding
1846
+ value = params.delete(:padding)
1847
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
1848
+ end
1849
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1850
+ params = default_params.merge(params)
1851
+ old_initialize(p, params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], &blk)
1852
+ end
1853
+ end
1854
+
1855
+ class FXRealSpinner
1856
+ alias old_initialize initialize
1857
+ def initialize(p, cols, *args, &blk)
1858
+ argument_names = %w{target selector opts x y width height padLeft padRight padTop padBottom}
1859
+ default_params = { :target => nil, :selector => 0, :opts => REALSPIN_NORMAL, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => DEFAULT_PAD, :padRight => DEFAULT_PAD, :padTop => DEFAULT_PAD, :padBottom => DEFAULT_PAD }
1860
+ params = {}
1861
+ params = args.pop if args.last.is_a? Hash
1862
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1863
+ if params.key? :padding
1864
+ value = params.delete(:padding)
1865
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
1866
+ end
1867
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1868
+ params = default_params.merge(params)
1869
+ old_initialize(p, cols, params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], &blk)
1870
+ end
1871
+ end
1872
+
1873
+ class FXRegistry
1874
+ alias old_initialize initialize
1875
+ def initialize(*args, &blk)
1876
+ argument_names = %w{appKey vendorKey}
1877
+ default_params = { :appKey => "", :vendorKey => "" }
1878
+ params = {}
1879
+ params = args.pop if args.last.is_a? Hash
1880
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1881
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1882
+ params = default_params.merge(params)
1883
+ old_initialize(params[:appKey], params[:vendorKey], &blk)
1884
+ end
1885
+ end
1886
+
1887
+ class FXReplaceDialog
1888
+ alias old_initialize initialize
1889
+ def initialize(owner, caption, *args, &blk)
1890
+ argument_names = %w{ic opts x y width height}
1891
+ default_params = { :ic => nil, :opts => 0, :x => 0, :y => 0, :width => 0, :height => 0 }
1892
+ params = {}
1893
+ params = args.pop if args.last.is_a? Hash
1894
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1895
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1896
+ params = default_params.merge(params)
1897
+ old_initialize(owner, caption, params[:ic], params[:opts], params[:x], params[:y], params[:width], params[:height], &blk)
1898
+ end
1899
+ end
1900
+
1901
+ class FXRGBIcon
1902
+ alias old_initialize initialize
1903
+ def initialize(a, *args, &blk)
1904
+ argument_names = %w{pix clr opts width height}
1905
+ default_params = { :pix => nil, :clr => 0, :opts => 0, :width => 1, :height => 1 }
1906
+ params = {}
1907
+ params = args.pop if args.last.is_a? Hash
1908
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1909
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1910
+ params = default_params.merge(params)
1911
+ old_initialize(a, params[:pix], params[:clr], params[:opts], params[:width], params[:height], &blk)
1912
+ end
1913
+ end
1914
+
1915
+ class FXRGBImage
1916
+ alias old_initialize initialize
1917
+ def initialize(a, *args, &blk)
1918
+ argument_names = %w{pix opts width height}
1919
+ default_params = { :pix => nil, :opts => 0, :width => 1, :height => 1 }
1920
+ params = {}
1921
+ params = args.pop if args.last.is_a? Hash
1922
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1923
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1924
+ params = default_params.merge(params)
1925
+ old_initialize(a, params[:pix], params[:opts], params[:width], params[:height], &blk)
1926
+ end
1927
+ end
1928
+
1929
+ class FXRuler
1930
+ alias old_initialize initialize
1931
+ def initialize(p, *args, &blk)
1932
+ argument_names = %w{target selector opts x y width height padLeft padRight padTop padBottom}
1933
+ default_params = { :target => nil, :selector => 0, :opts => RULER_NORMAL, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => DEFAULT_PAD, :padRight => DEFAULT_PAD, :padTop => DEFAULT_PAD, :padBottom => DEFAULT_PAD }
1934
+ params = {}
1935
+ params = args.pop if args.last.is_a? Hash
1936
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1937
+ if params.key? :padding
1938
+ value = params.delete(:padding)
1939
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
1940
+ end
1941
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1942
+ params = default_params.merge(params)
1943
+ old_initialize(p, params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], &blk)
1944
+ end
1945
+ end
1946
+
1947
+ class FXRulerView
1948
+ alias old_initialize initialize
1949
+ def initialize(p, *args, &blk)
1950
+ argument_names = %w{target selector opts x y width height}
1951
+ default_params = { :target => nil, :selector => 0, :opts => 0, :x => 0, :y => 0, :width => 0, :height => 0 }
1952
+ params = {}
1953
+ params = args.pop if args.last.is_a? Hash
1954
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1955
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1956
+ params = default_params.merge(params)
1957
+ old_initialize(p, params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], &blk)
1958
+ end
1959
+ end
1960
+
1961
+ class FXScintilla
1962
+ alias old_initialize initialize
1963
+ def initialize(p, *args, &blk)
1964
+ argument_names = %w{target selector opts x y width height}
1965
+ default_params = { :target => nil, :selector => 0, :opts => 0, :x => 0, :y => 0, :width => 0, :height => 0 }
1966
+ params = {}
1967
+ params = args.pop if args.last.is_a? Hash
1968
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1969
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1970
+ params = default_params.merge(params)
1971
+ old_initialize(p, params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], &blk)
1972
+ end
1973
+ end
1974
+
1975
+ class FXScrollArea
1976
+ alias old_initialize initialize
1977
+ def initialize(parent, *args, &blk)
1978
+ argument_names = %w{opts x y width height}
1979
+ default_params = { :opts => 0, :x => 0, :y => 0, :width => 0, :height => 0 }
1980
+ params = {}
1981
+ params = args.pop if args.last.is_a? Hash
1982
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1983
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1984
+ params = default_params.merge(params)
1985
+ old_initialize(parent, params[:opts], params[:x], params[:y], params[:width], params[:height], &blk)
1986
+ end
1987
+ end
1988
+
1989
+ class FXScrollBar
1990
+ alias old_initialize initialize
1991
+ def initialize(p, *args, &blk)
1992
+ argument_names = %w{target selector opts x y width height}
1993
+ default_params = { :target => nil, :selector => 0, :opts => SCROLLBAR_VERTICAL, :x => 0, :y => 0, :width => 0, :height => 0 }
1994
+ params = {}
1995
+ params = args.pop if args.last.is_a? Hash
1996
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
1997
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
1998
+ params = default_params.merge(params)
1999
+ old_initialize(p, params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], &blk)
2000
+ end
2001
+ end
2002
+
2003
+ class FXScrollPane
2004
+ alias old_initialize initialize
2005
+ def initialize(owner, nvis, *args, &blk)
2006
+ argument_names = %w{opts}
2007
+ default_params = { :opts => 0 }
2008
+ params = {}
2009
+ params = args.pop if args.last.is_a? Hash
2010
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
2011
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
2012
+ params = default_params.merge(params)
2013
+ old_initialize(owner, nvis, params[:opts], &blk)
2014
+ end
2015
+ end
2016
+
2017
+ class FXScrollWindow
2018
+ alias old_initialize initialize
2019
+ def initialize(p, *args, &blk)
2020
+ argument_names = %w{opts x y width height}
2021
+ default_params = { :opts => 0, :x => 0, :y => 0, :width => 0, :height => 0 }
2022
+ params = {}
2023
+ params = args.pop if args.last.is_a? Hash
2024
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
2025
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
2026
+ params = default_params.merge(params)
2027
+ old_initialize(p, params[:opts], params[:x], params[:y], params[:width], params[:height], &blk)
2028
+ end
2029
+ end
2030
+
2031
+ class FXSearchDialog
2032
+ alias old_initialize initialize
2033
+ def initialize(owner, caption, *args, &blk)
2034
+ argument_names = %w{ic opts x y width height}
2035
+ default_params = { :ic => nil, :opts => 0, :x => 0, :y => 0, :width => 0, :height => 0 }
2036
+ params = {}
2037
+ params = args.pop if args.last.is_a? Hash
2038
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
2039
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
2040
+ params = default_params.merge(params)
2041
+ old_initialize(owner, caption, params[:ic], params[:opts], params[:x], params[:y], params[:width], params[:height], &blk)
2042
+ end
2043
+ end
2044
+
2045
+ class FXSeparator
2046
+ alias old_initialize initialize
2047
+ def initialize(p, *args, &blk)
2048
+ argument_names = %w{opts x y width height padLeft padRight padTop padBottom}
2049
+ default_params = { :opts => SEPARATOR_GROOVE|LAYOUT_FILL_X, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => 0, :padRight => 0, :padTop => 0, :padBottom => 0 }
2050
+ params = {}
2051
+ params = args.pop if args.last.is_a? Hash
2052
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
2053
+ if params.key? :padding
2054
+ value = params.delete(:padding)
2055
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
2056
+ end
2057
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
2058
+ params = default_params.merge(params)
2059
+ old_initialize(p, params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], &blk)
2060
+ end
2061
+ end
2062
+
2063
+ class FXHorizontalSeparator
2064
+ alias old_initialize initialize
2065
+ def initialize(p, *args, &blk)
2066
+ argument_names = %w{opts x y width height padLeft padRight padTop padBottom}
2067
+ default_params = { :opts => SEPARATOR_GROOVE|LAYOUT_FILL_X, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => 1, :padRight => 1, :padTop => 0, :padBottom => 0 }
2068
+ params = {}
2069
+ params = args.pop if args.last.is_a? Hash
2070
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
2071
+ if params.key? :padding
2072
+ value = params.delete(:padding)
2073
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
2074
+ end
2075
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
2076
+ params = default_params.merge(params)
2077
+ old_initialize(p, params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], &blk)
2078
+ end
2079
+ end
2080
+
2081
+ class FXVerticalSeparator
2082
+ alias old_initialize initialize
2083
+ def initialize(p, *args, &blk)
2084
+ argument_names = %w{opts x y width height padLeft padRight padTop padBottom}
2085
+ default_params = { :opts => SEPARATOR_GROOVE|LAYOUT_FILL_Y, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => 0, :padRight => 0, :padTop => 1, :padBottom => 1 }
2086
+ params = {}
2087
+ params = args.pop if args.last.is_a? Hash
2088
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
2089
+ if params.key? :padding
2090
+ value = params.delete(:padding)
2091
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
2092
+ end
2093
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
2094
+ params = default_params.merge(params)
2095
+ old_initialize(p, params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], &blk)
2096
+ end
2097
+ end
2098
+
2099
+ class FXShutterItem
2100
+ alias old_initialize initialize
2101
+ def initialize(p, *args, &blk)
2102
+ argument_names = %w{text icon opts x y width height padLeft padRight padTop padBottom hSpacing vSpacing}
2103
+ default_params = { :text => "", :icon => nil, :opts => 0, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => DEFAULT_SPACING, :padRight => DEFAULT_SPACING, :padTop => DEFAULT_SPACING, :padBottom => DEFAULT_SPACING, :hSpacing => DEFAULT_SPACING, :vSpacing => DEFAULT_SPACING }
2104
+ params = {}
2105
+ params = args.pop if args.last.is_a? Hash
2106
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
2107
+ if params.key? :padding
2108
+ value = params.delete(:padding)
2109
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
2110
+ end
2111
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
2112
+ params = default_params.merge(params)
2113
+ old_initialize(p, params[:text], params[:icon], params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], params[:hSpacing], params[:vSpacing], &blk)
2114
+ end
2115
+ end
2116
+
2117
+ class FXShutter
2118
+ alias old_initialize initialize
2119
+ def initialize(p, *args, &blk)
2120
+ argument_names = %w{target selector opts x y width height padLeft padRight padTop padBottom hSpacing vSpacing}
2121
+ default_params = { :target => nil, :selector => 0, :opts => 0, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => DEFAULT_SPACING, :padRight => DEFAULT_SPACING, :padTop => DEFAULT_SPACING, :padBottom => DEFAULT_SPACING, :hSpacing => DEFAULT_SPACING, :vSpacing => DEFAULT_SPACING }
2122
+ params = {}
2123
+ params = args.pop if args.last.is_a? Hash
2124
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
2125
+ if params.key? :padding
2126
+ value = params.delete(:padding)
2127
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
2128
+ end
2129
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
2130
+ params = default_params.merge(params)
2131
+ old_initialize(p, params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], params[:hSpacing], params[:vSpacing], &blk)
2132
+ end
2133
+ end
2134
+
2135
+ class FXSlider
2136
+ alias old_initialize initialize
2137
+ def initialize(p, *args, &blk)
2138
+ argument_names = %w{target selector opts x y width height padLeft padRight padTop padBottom}
2139
+ default_params = { :target => nil, :selector => 0, :opts => SLIDER_NORMAL, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => 0, :padRight => 0, :padTop => 0, :padBottom => 0 }
2140
+ params = {}
2141
+ params = args.pop if args.last.is_a? Hash
2142
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
2143
+ if params.key? :padding
2144
+ value = params.delete(:padding)
2145
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
2146
+ end
2147
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
2148
+ params = default_params.merge(params)
2149
+ old_initialize(p, params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], &blk)
2150
+ end
2151
+ end
2152
+
2153
+ class FXSpinner
2154
+ alias old_initialize initialize
2155
+ def initialize(p, cols, *args, &blk)
2156
+ argument_names = %w{target selector opts x y width height padLeft padRight padTop padBottom}
2157
+ default_params = { :target => nil, :selector => 0, :opts => SPIN_NORMAL, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => DEFAULT_PAD, :padRight => DEFAULT_PAD, :padTop => DEFAULT_PAD, :padBottom => DEFAULT_PAD }
2158
+ params = {}
2159
+ params = args.pop if args.last.is_a? Hash
2160
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
2161
+ if params.key? :padding
2162
+ value = params.delete(:padding)
2163
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
2164
+ end
2165
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
2166
+ params = default_params.merge(params)
2167
+ old_initialize(p, cols, params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], &blk)
2168
+ end
2169
+ end
2170
+
2171
+ class FXSplashWindow
2172
+ alias old_initialize initialize
2173
+ def initialize(owner, icon, *args, &blk)
2174
+ argument_names = %w{opts ms}
2175
+ default_params = { :opts => SPLASH_SIMPLE, :ms => 5000 }
2176
+ params = {}
2177
+ params = args.pop if args.last.is_a? Hash
2178
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
2179
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
2180
+ params = default_params.merge(params)
2181
+ old_initialize(owner, icon, params[:opts], params[:ms], &blk)
2182
+ end
2183
+ end
2184
+
2185
+ class FXSpring
2186
+ alias old_initialize initialize
2187
+ def initialize(p, *args, &blk)
2188
+ argument_names = %w{opts relw relh x y width height padLeft padRight padTop padBottom hSpacing vSpacing}
2189
+ default_params = { :opts => 0, :relw => 0, :relh => 0, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => DEFAULT_SPACING, :padRight => DEFAULT_SPACING, :padTop => DEFAULT_SPACING, :padBottom => DEFAULT_SPACING, :hSpacing => DEFAULT_SPACING, :vSpacing => DEFAULT_SPACING }
2190
+ params = {}
2191
+ params = args.pop if args.last.is_a? Hash
2192
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
2193
+ if params.key? :padding
2194
+ value = params.delete(:padding)
2195
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
2196
+ end
2197
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
2198
+ params = default_params.merge(params)
2199
+ old_initialize(p, params[:opts], params[:relw], params[:relh], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], params[:hSpacing], params[:vSpacing], &blk)
2200
+ end
2201
+ end
2202
+
2203
+ class FXStatusBar
2204
+ alias old_initialize initialize
2205
+ def initialize(p, *args, &blk)
2206
+ argument_names = %w{opts x y width height padLeft padRight padTop padBottom hSpacing vSpacing}
2207
+ default_params = { :opts => 0, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => 3, :padRight => 3, :padTop => 2, :padBottom => 2, :hSpacing => 4, :vSpacing => 0 }
2208
+ params = {}
2209
+ params = args.pop if args.last.is_a? Hash
2210
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
2211
+ if params.key? :padding
2212
+ value = params.delete(:padding)
2213
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
2214
+ end
2215
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
2216
+ params = default_params.merge(params)
2217
+ old_initialize(p, params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], params[:hSpacing], params[:vSpacing], &blk)
2218
+ end
2219
+ end
2220
+
2221
+ class FXStatusLine
2222
+ alias old_initialize initialize
2223
+ def initialize(p, *args, &blk)
2224
+ argument_names = %w{target selector}
2225
+ default_params = { :target => nil, :selector => 0 }
2226
+ params = {}
2227
+ params = args.pop if args.last.is_a? Hash
2228
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
2229
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
2230
+ params = default_params.merge(params)
2231
+ old_initialize(p, params[:target], params[:selector], &blk)
2232
+ end
2233
+ end
2234
+
2235
+ class FXStream
2236
+ alias old_initialize initialize
2237
+ def initialize(*args, &blk)
2238
+ argument_names = %w{cont}
2239
+ default_params = { :cont => nil }
2240
+ params = {}
2241
+ params = args.pop if args.last.is_a? Hash
2242
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
2243
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
2244
+ params = default_params.merge(params)
2245
+ old_initialize(params[:cont], &blk)
2246
+ end
2247
+ end
2248
+
2249
+ class FXSwitcher
2250
+ alias old_initialize initialize
2251
+ def initialize(p, *args, &blk)
2252
+ argument_names = %w{opts x y width height padLeft padRight padTop padBottom}
2253
+ default_params = { :opts => 0, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => DEFAULT_SPACING, :padRight => DEFAULT_SPACING, :padTop => DEFAULT_SPACING, :padBottom => DEFAULT_SPACING }
2254
+ params = {}
2255
+ params = args.pop if args.last.is_a? Hash
2256
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
2257
+ if params.key? :padding
2258
+ value = params.delete(:padding)
2259
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
2260
+ end
2261
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
2262
+ params = default_params.merge(params)
2263
+ old_initialize(p, params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], &blk)
2264
+ end
2265
+ end
2266
+
2267
+ class FXTabBar
2268
+ alias old_initialize initialize
2269
+ def initialize(p, *args, &blk)
2270
+ argument_names = %w{target selector opts x y width height padLeft padRight padTop padBottom}
2271
+ default_params = { :target => nil, :selector => 0, :opts => TABBOOK_NORMAL, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => DEFAULT_SPACING, :padRight => DEFAULT_SPACING, :padTop => DEFAULT_SPACING, :padBottom => DEFAULT_SPACING }
2272
+ params = {}
2273
+ params = args.pop if args.last.is_a? Hash
2274
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
2275
+ if params.key? :padding
2276
+ value = params.delete(:padding)
2277
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
2278
+ end
2279
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
2280
+ params = default_params.merge(params)
2281
+ old_initialize(p, params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], &blk)
2282
+ end
2283
+ end
2284
+
2285
+ class FXTabBook
2286
+ alias old_initialize initialize
2287
+ def initialize(p, *args, &blk)
2288
+ argument_names = %w{target selector opts x y width height padLeft padRight padTop padBottom}
2289
+ default_params = { :target => nil, :selector => 0, :opts => TABBOOK_NORMAL, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => DEFAULT_SPACING, :padRight => DEFAULT_SPACING, :padTop => DEFAULT_SPACING, :padBottom => DEFAULT_SPACING }
2290
+ params = {}
2291
+ params = args.pop if args.last.is_a? Hash
2292
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
2293
+ if params.key? :padding
2294
+ value = params.delete(:padding)
2295
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
2296
+ end
2297
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
2298
+ params = default_params.merge(params)
2299
+ old_initialize(p, params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], &blk)
2300
+ end
2301
+ end
2302
+
2303
+ class FXTabItem
2304
+ alias old_initialize initialize
2305
+ def initialize(p, text, *args, &blk)
2306
+ argument_names = %w{ic opts x y width height padLeft padRight padTop padBottom}
2307
+ default_params = { :ic => nil, :opts => TAB_TOP_NORMAL, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => DEFAULT_PAD, :padRight => DEFAULT_PAD, :padTop => DEFAULT_PAD, :padBottom => DEFAULT_PAD }
2308
+ params = {}
2309
+ params = args.pop if args.last.is_a? Hash
2310
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
2311
+ if params.key? :padding
2312
+ value = params.delete(:padding)
2313
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
2314
+ end
2315
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
2316
+ params = default_params.merge(params)
2317
+ old_initialize(p, text, params[:ic], params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], &blk)
2318
+ end
2319
+ end
2320
+
2321
+ class FXTableItem
2322
+ alias old_initialize initialize
2323
+ def initialize(text, *args, &blk)
2324
+ argument_names = %w{icon data}
2325
+ default_params = { :icon => nil, :data => nil }
2326
+ params = {}
2327
+ params = args.pop if args.last.is_a? Hash
2328
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
2329
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
2330
+ params = default_params.merge(params)
2331
+ old_initialize(text, params[:icon], params[:data], &blk)
2332
+ end
2333
+ end
2334
+
2335
+ class FXTable
2336
+ alias old_initialize initialize
2337
+ def initialize(p, *args, &blk)
2338
+ argument_names = %w{target selector opts x y width height padLeft padRight padTop padBottom}
2339
+ default_params = { :target => nil, :selector => 0, :opts => 0, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => DEFAULT_MARGIN, :padRight => DEFAULT_MARGIN, :padTop => DEFAULT_MARGIN, :padBottom => DEFAULT_MARGIN }
2340
+ params = {}
2341
+ params = args.pop if args.last.is_a? Hash
2342
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
2343
+ if params.key? :padding
2344
+ value = params.delete(:padding)
2345
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
2346
+ end
2347
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
2348
+ params = default_params.merge(params)
2349
+ old_initialize(p, params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], &blk)
2350
+ end
2351
+ end
2352
+
2353
+ class FXText
2354
+ alias old_initialize initialize
2355
+ def initialize(p, *args, &blk)
2356
+ argument_names = %w{target selector opts x y width height padLeft padRight padTop padBottom}
2357
+ default_params = { :target => nil, :selector => 0, :opts => 0, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => 3, :padRight => 3, :padTop => 2, :padBottom => 2 }
2358
+ params = {}
2359
+ params = args.pop if args.last.is_a? Hash
2360
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
2361
+ if params.key? :padding
2362
+ value = params.delete(:padding)
2363
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
2364
+ end
2365
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
2366
+ params = default_params.merge(params)
2367
+ old_initialize(p, params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], &blk)
2368
+ end
2369
+ end
2370
+
2371
+ class FXTextField
2372
+ alias old_initialize initialize
2373
+ def initialize(p, ncols, *args, &blk)
2374
+ argument_names = %w{target selector opts x y width height padLeft padRight padTop padBottom}
2375
+ default_params = { :target => nil, :selector => 0, :opts => TEXTFIELD_NORMAL, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => DEFAULT_PAD, :padRight => DEFAULT_PAD, :padTop => DEFAULT_PAD, :padBottom => DEFAULT_PAD }
2376
+ params = {}
2377
+ params = args.pop if args.last.is_a? Hash
2378
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
2379
+ if params.key? :padding
2380
+ value = params.delete(:padding)
2381
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
2382
+ end
2383
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
2384
+ params = default_params.merge(params)
2385
+ old_initialize(p, ncols, params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], &blk)
2386
+ end
2387
+ end
2388
+
2389
+ class FXTGAIcon
2390
+ alias old_initialize initialize
2391
+ def initialize(a, *args, &blk)
2392
+ argument_names = %w{pix clr opts width height}
2393
+ default_params = { :pix => nil, :clr => 0, :opts => 0, :width => 1, :height => 1 }
2394
+ params = {}
2395
+ params = args.pop if args.last.is_a? Hash
2396
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
2397
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
2398
+ params = default_params.merge(params)
2399
+ old_initialize(a, params[:pix], params[:clr], params[:opts], params[:width], params[:height], &blk)
2400
+ end
2401
+ end
2402
+
2403
+ class FXTGAImage
2404
+ alias old_initialize initialize
2405
+ def initialize(a, *args, &blk)
2406
+ argument_names = %w{pix opts width height}
2407
+ default_params = { :pix => nil, :opts => 0, :width => 1, :height => 1 }
2408
+ params = {}
2409
+ params = args.pop if args.last.is_a? Hash
2410
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
2411
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
2412
+ params = default_params.merge(params)
2413
+ old_initialize(a, params[:pix], params[:opts], params[:width], params[:height], &blk)
2414
+ end
2415
+ end
2416
+
2417
+ class FXTIFIcon
2418
+ alias old_initialize initialize
2419
+ def initialize(a, *args, &blk)
2420
+ argument_names = %w{pix clr opts width height}
2421
+ default_params = { :pix => nil, :clr => 0, :opts => 0, :width => 1, :height => 1 }
2422
+ params = {}
2423
+ params = args.pop if args.last.is_a? Hash
2424
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
2425
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
2426
+ params = default_params.merge(params)
2427
+ old_initialize(a, params[:pix], params[:clr], params[:opts], params[:width], params[:height], &blk)
2428
+ end
2429
+ end
2430
+
2431
+ class FXTIFImage
2432
+ alias old_initialize initialize
2433
+ def initialize(a, *args, &blk)
2434
+ argument_names = %w{pix opts width height}
2435
+ default_params = { :pix => nil, :opts => 0, :width => 1, :height => 1 }
2436
+ params = {}
2437
+ params = args.pop if args.last.is_a? Hash
2438
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
2439
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
2440
+ params = default_params.merge(params)
2441
+ old_initialize(a, params[:pix], params[:opts], params[:width], params[:height], &blk)
2442
+ end
2443
+ end
2444
+
2445
+ class FXToggleButton
2446
+ alias old_initialize initialize
2447
+ def initialize(p, text1, text2, *args, &blk)
2448
+ argument_names = %w{icon1 icon2 target selector opts x y width height padLeft padRight padTop padBottom}
2449
+ default_params = { :icon1 => nil, :icon2 => nil, :target => nil, :selector => 0, :opts => TOGGLEBUTTON_NORMAL, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => DEFAULT_PAD, :padRight => DEFAULT_PAD, :padTop => DEFAULT_PAD, :padBottom => DEFAULT_PAD }
2450
+ params = {}
2451
+ params = args.pop if args.last.is_a? Hash
2452
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
2453
+ if params.key? :padding
2454
+ value = params.delete(:padding)
2455
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
2456
+ end
2457
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
2458
+ params = default_params.merge(params)
2459
+ old_initialize(p, text1, text2, params[:icon1], params[:icon2], params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], &blk)
2460
+ end
2461
+ end
2462
+
2463
+ class FXToolBarGrip
2464
+ alias old_initialize initialize
2465
+ def initialize(p, *args, &blk)
2466
+ argument_names = %w{target selector opts x y width height}
2467
+ default_params = { :target => nil, :selector => 0, :opts => TOOLBARGRIP_SINGLE, :x => 0, :y => 0, :width => 0, :height => 0 }
2468
+ params = {}
2469
+ params = args.pop if args.last.is_a? Hash
2470
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
2471
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
2472
+ params = default_params.merge(params)
2473
+ old_initialize(p, params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], &blk)
2474
+ end
2475
+ end
2476
+
2477
+ class FXToolBarShell
2478
+ alias old_initialize initialize
2479
+ def initialize(owner, *args, &blk)
2480
+ argument_names = %w{opts x y width height hSpacing vSpacing}
2481
+ default_params = { :opts => FRAME_RAISED|FRAME_THICK, :x => 0, :y => 0, :width => 0, :height => 0, :hSpacing => 4, :vSpacing => 4 }
2482
+ params = {}
2483
+ params = args.pop if args.last.is_a? Hash
2484
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
2485
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
2486
+ params = default_params.merge(params)
2487
+ old_initialize(owner, params[:opts], params[:x], params[:y], params[:width], params[:height], params[:hSpacing], params[:vSpacing], &blk)
2488
+ end
2489
+ end
2490
+
2491
+ class FXToolBarTab
2492
+ alias old_initialize initialize
2493
+ def initialize(p, *args, &blk)
2494
+ argument_names = %w{target selector opts x y width height}
2495
+ default_params = { :target => nil, :selector => 0, :opts => FRAME_RAISED, :x => 0, :y => 0, :width => 0, :height => 0 }
2496
+ params = {}
2497
+ params = args.pop if args.last.is_a? Hash
2498
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
2499
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
2500
+ params = default_params.merge(params)
2501
+ old_initialize(p, params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], &blk)
2502
+ end
2503
+ end
2504
+
2505
+ class FXToolTip
2506
+ alias old_initialize initialize
2507
+ def initialize(app, *args, &blk)
2508
+ argument_names = %w{opts x y width height}
2509
+ default_params = { :opts => TOOLTIP_NORMAL, :x => 0, :y => 0, :width => 0, :height => 0 }
2510
+ params = {}
2511
+ params = args.pop if args.last.is_a? Hash
2512
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
2513
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
2514
+ params = default_params.merge(params)
2515
+ old_initialize(app, params[:opts], params[:x], params[:y], params[:width], params[:height], &blk)
2516
+ end
2517
+ end
2518
+
2519
+ class FXTreeItem
2520
+ alias old_initialize initialize
2521
+ def initialize(text, *args, &blk)
2522
+ argument_names = %w{openIcon closedIcon data}
2523
+ default_params = { :openIcon => nil, :closedIcon => nil, :data => nil }
2524
+ params = {}
2525
+ params = args.pop if args.last.is_a? Hash
2526
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
2527
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
2528
+ params = default_params.merge(params)
2529
+ old_initialize(text, params[:openIcon], params[:closedIcon], params[:data], &blk)
2530
+ end
2531
+ end
2532
+
2533
+ class FXTreeList
2534
+ alias old_initialize initialize
2535
+ def initialize(p, *args, &blk)
2536
+ argument_names = %w{target selector opts x y width height}
2537
+ default_params = { :target => nil, :selector => 0, :opts => TREELIST_NORMAL, :x => 0, :y => 0, :width => 0, :height => 0 }
2538
+ params = {}
2539
+ params = args.pop if args.last.is_a? Hash
2540
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
2541
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
2542
+ params = default_params.merge(params)
2543
+ old_initialize(p, params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], &blk)
2544
+ end
2545
+ end
2546
+
2547
+ class FXTreeListBox
2548
+ alias old_initialize initialize
2549
+ def initialize(p, *args, &blk)
2550
+ argument_names = %w{target selector opts x y width height padLeft padRight padTop padBottom}
2551
+ default_params = { :target => nil, :selector => 0, :opts => FRAME_SUNKEN|FRAME_THICK|TREELISTBOX_NORMAL, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => DEFAULT_PAD, :padRight => DEFAULT_PAD, :padTop => DEFAULT_PAD, :padBottom => DEFAULT_PAD }
2552
+ params = {}
2553
+ params = args.pop if args.last.is_a? Hash
2554
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
2555
+ if params.key? :padding
2556
+ value = params.delete(:padding)
2557
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
2558
+ end
2559
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
2560
+ params = default_params.merge(params)
2561
+ old_initialize(p, params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], &blk)
2562
+ end
2563
+ end
2564
+
2565
+ class FXTriStateButton
2566
+ alias old_initialize initialize
2567
+ def initialize(p, text1, text2, text3, *args, &blk)
2568
+ argument_names = %w{icon1 icon2 icon3 target selector opts x y width height padLeft padRight padTop padBottom}
2569
+ default_params = { :icon1 => nil, :icon2 => nil, :icon3 => nil, :target => nil, :selector => 0, :opts => TOGGLEBUTTON_NORMAL, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => DEFAULT_PAD, :padRight => DEFAULT_PAD, :padTop => DEFAULT_PAD, :padBottom => DEFAULT_PAD }
2570
+ params = {}
2571
+ params = args.pop if args.last.is_a? Hash
2572
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
2573
+ if params.key? :padding
2574
+ value = params.delete(:padding)
2575
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
2576
+ end
2577
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
2578
+ params = default_params.merge(params)
2579
+ old_initialize(p, text1, text2, text3, params[:icon1], params[:icon2], params[:icon3], params[:target], params[:selector], params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], &blk)
2580
+ end
2581
+ end
2582
+
2583
+ class FXVec4d
2584
+ alias old_initialize initialize
2585
+ def initialize(xx, yy, zz, *args, &blk)
2586
+ argument_names = %w{ww}
2587
+ default_params = { :ww => 1.0 }
2588
+ params = {}
2589
+ params = args.pop if args.last.is_a? Hash
2590
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
2591
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
2592
+ params = default_params.merge(params)
2593
+ old_initialize(xx, yy, zz, params[:ww], &blk)
2594
+ end
2595
+ end
2596
+
2597
+ class FXVec4f
2598
+ alias old_initialize initialize
2599
+ def initialize(xx, yy, zz, *args, &blk)
2600
+ argument_names = %w{ww}
2601
+ default_params = { :ww => 1.0 }
2602
+ params = {}
2603
+ params = args.pop if args.last.is_a? Hash
2604
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
2605
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
2606
+ params = default_params.merge(params)
2607
+ old_initialize(xx, yy, zz, params[:ww], &blk)
2608
+ end
2609
+ end
2610
+
2611
+ class FXVerticalFrame
2612
+ alias old_initialize initialize
2613
+ def initialize(p, *args, &blk)
2614
+ argument_names = %w{opts x y width height padLeft padRight padTop padBottom hSpacing vSpacing}
2615
+ default_params = { :opts => 0, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => DEFAULT_SPACING, :padRight => DEFAULT_SPACING, :padTop => DEFAULT_SPACING, :padBottom => DEFAULT_SPACING, :hSpacing => DEFAULT_SPACING, :vSpacing => DEFAULT_SPACING }
2616
+ params = {}
2617
+ params = args.pop if args.last.is_a? Hash
2618
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
2619
+ if params.key? :padding
2620
+ value = params.delete(:padding)
2621
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
2622
+ end
2623
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
2624
+ params = default_params.merge(params)
2625
+ old_initialize(p, params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], params[:hSpacing], params[:vSpacing], &blk)
2626
+ end
2627
+ end
2628
+
2629
+ class FXVisual
2630
+ alias old_initialize initialize
2631
+ def initialize(a, flgs, *args, &blk)
2632
+ argument_names = %w{d}
2633
+ default_params = { :d => 32 }
2634
+ params = {}
2635
+ params = args.pop if args.last.is_a? Hash
2636
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
2637
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
2638
+ params = default_params.merge(params)
2639
+ old_initialize(a, flgs, params[:d], &blk)
2640
+ end
2641
+ end
2642
+
2643
+ class FXWizard
2644
+ alias old_initialize initialize
2645
+ def initialize(owner, name, image, *args, &blk)
2646
+ argument_names = %w{opts x y width height padLeft padRight padTop padBottom hSpacing vSpacing}
2647
+ default_params = { :opts => DECOR_TITLE|DECOR_BORDER|DECOR_RESIZE, :x => 0, :y => 0, :width => 0, :height => 0, :padLeft => 10, :padRight => 10, :padTop => 10, :padBottom => 10, :hSpacing => 10, :vSpacing => 10 }
2648
+ params = {}
2649
+ params = args.pop if args.last.is_a? Hash
2650
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
2651
+ if params.key? :padding
2652
+ value = params.delete(:padding)
2653
+ [:padLeft, :padRight, :padTop, :padBottom].each { |s| params[s] ||= value }
2654
+ end
2655
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
2656
+ params = default_params.merge(params)
2657
+ old_initialize(owner, name, image, params[:opts], params[:x], params[:y], params[:width], params[:height], params[:padLeft], params[:padRight], params[:padTop], params[:padBottom], params[:hSpacing], params[:vSpacing], &blk)
2658
+ end
2659
+ end
2660
+
2661
+ class FXXBMIcon
2662
+ alias old_initialize initialize
2663
+ def initialize(a, *args, &blk)
2664
+ argument_names = %w{pixels mask clr opts width height}
2665
+ default_params = { :pixels => nil, :mask => nil, :clr => 0, :opts => 0, :width => 1, :height => 1 }
2666
+ params = {}
2667
+ params = args.pop if args.last.is_a? Hash
2668
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
2669
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
2670
+ params = default_params.merge(params)
2671
+ old_initialize(a, params[:pixels], params[:mask], params[:clr], params[:opts], params[:width], params[:height], &blk)
2672
+ end
2673
+ end
2674
+
2675
+ class FXXBMImage
2676
+ alias old_initialize initialize
2677
+ def initialize(a, *args, &blk)
2678
+ argument_names = %w{pixels mask opts width height}
2679
+ default_params = { :pixels => nil, :mask => nil, :opts => 0, :width => 1, :height => 1 }
2680
+ params = {}
2681
+ params = args.pop if args.last.is_a? Hash
2682
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
2683
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
2684
+ params = default_params.merge(params)
2685
+ old_initialize(a, params[:pixels], params[:mask], params[:opts], params[:width], params[:height], &blk)
2686
+ end
2687
+ end
2688
+
2689
+ class FXXPMIcon
2690
+ alias old_initialize initialize
2691
+ def initialize(a, *args, &blk)
2692
+ argument_names = %w{pix clr opts width height}
2693
+ default_params = { :pix => nil, :clr => 0, :opts => 0, :width => 1, :height => 1 }
2694
+ params = {}
2695
+ params = args.pop if args.last.is_a? Hash
2696
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
2697
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
2698
+ params = default_params.merge(params)
2699
+ old_initialize(a, params[:pix], params[:clr], params[:opts], params[:width], params[:height], &blk)
2700
+ end
2701
+ end
2702
+
2703
+ class FXXPMImage
2704
+ alias old_initialize initialize
2705
+ def initialize(a, *args, &blk)
2706
+ argument_names = %w{pix opts width height}
2707
+ default_params = { :pix => nil, :opts => 0, :width => 1, :height => 1 }
2708
+ params = {}
2709
+ params = args.pop if args.last.is_a? Hash
2710
+ args.each_with_index { |e, i| params[argument_names[i].intern] = e }
2711
+ params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) }
2712
+ params = default_params.merge(params)
2713
+ old_initialize(a, params[:pix], params[:opts], params[:width], params[:height], &blk)
2714
+ end
2715
+ end
2716
+
2717
+ end