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