fxruby 1.6.20-x86-mingw32 → 1.6.22.pre2-x86-mingw32

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