fxruby 1.6.20 → 1.6.22.pre2

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