fxruby 1.2.3 → 1.2.4
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/ANNOUNCE +5 -5
- data/ChangeLog +166 -0
- data/README +2 -2
- data/doc/apes02.html +2 -2
- data/doc/apes03.html +1 -1
- data/doc/book.html +1 -1
- data/doc/changes.html +45 -4
- data/doc/cvs.html +2 -2
- data/doc/differences.html +3 -3
- data/doc/implementation.html +1 -1
- data/doc/library.html +5 -5
- data/doc/opengl.html +5 -5
- data/doc/pt02.html +1 -1
- data/doc/scintilla.html +4 -4
- data/examples/image.rb +37 -40
- data/examples/mditest2.rb +195 -0
- data/ext/fox12/FXRuby.cpp +62 -26
- data/ext/fox12/core_wrap.cpp +19 -27
- data/ext/fox12/image_wrap.cpp +53 -11
- data/ext/fox12/include/FXRbApp.h +20 -3
- data/ext/fox12/include/FXRbScrollArea.h +4 -1
- data/ext/fox12/include/FXRbScrollWindow.h +4 -1
- data/ext/fox12/include/FXRbTable.h +6 -1
- data/lib/fox12/aliases.rb +2 -0
- data/lib/fox12/core.rb +27 -0
- data/lib/fox12/splashscreen.rb +1 -1
- data/lib/fox12/version.rb +1 -1
- data/rdoc-sources/FXAccelTable.rb +8 -8
- data/rdoc-sources/FXImage.rb +10 -4
- data/rdoc-sources/FXMemoryBuffer.rb +8 -4
- data/rdoc-sources/FXMemoryStream.rb +24 -21
- data/rdoc-sources/fxdefs.rb +6 -6
- data/tests/TC_FXImage.rb +21 -10
- data/tests/TC_FXMemoryStream.rb +44 -34
- data/tests/testcase.rb +2 -3
- metadata +3 -3
- data/INSTALL +0 -50
data/ext/fox12/core_wrap.cpp
CHANGED
|
@@ -747,6 +747,18 @@ static void free_FXFileStream(FXFileStream *);
|
|
|
747
747
|
FXMemoryStream *new_FXMemoryStream(FXObject const *cont){
|
|
748
748
|
return new FXRbMemoryStream(cont);
|
|
749
749
|
}
|
|
750
|
+
FXbool FXMemoryStream_open(FXMemoryStream *self,FXStreamDirection save_or_load,VALUE str){
|
|
751
|
+
unsigned long size=0;
|
|
752
|
+
FXuchar *data=0;
|
|
753
|
+
if(!NIL_P(str)){
|
|
754
|
+
size=RSTRING(str)->len;
|
|
755
|
+
data=reinterpret_cast<FXuchar*>(STR2CSTR(str));
|
|
756
|
+
return self->open(save_or_load,size,data);
|
|
757
|
+
}
|
|
758
|
+
else{
|
|
759
|
+
return self->open(save_or_load,data);
|
|
760
|
+
}
|
|
761
|
+
}
|
|
750
762
|
VALUE FXMemoryStream_takeBuffer(FXMemoryStream *self){
|
|
751
763
|
FXuchar* buffer;
|
|
752
764
|
unsigned long sp;
|
|
@@ -754,7 +766,7 @@ VALUE FXMemoryStream_takeBuffer(FXMemoryStream *self){
|
|
|
754
766
|
VALUE result=rb_str_new(const_cast<const char *>(reinterpret_cast<char*>(buffer)),sp);
|
|
755
767
|
FXFREE(&buffer);
|
|
756
768
|
return result;
|
|
757
|
-
|
|
769
|
+
}
|
|
758
770
|
void FXMemoryStream_giveBuffer(FXMemoryStream *self,VALUE str){
|
|
759
771
|
Check_Type(str,T_STRING);
|
|
760
772
|
FXuchar* buffer=reinterpret_cast<FXuchar*>(StringValuePtr(str));
|
|
@@ -2069,32 +2081,12 @@ static VALUE _wrap_new_FXMemoryStream(int argc, VALUE *argv, VALUE self) { FXObj
|
|
|
2069
2081
|
if (argc > 0) { SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_FXObject, 1); } {
|
|
2070
2082
|
result = (FXMemoryStream *)new_FXMemoryStream((FXObject const *)arg1);
|
|
2071
2083
|
DATA_PTR(self) = result; FXRbRegisterRubyObj(self, result); if(rb_block_given_p()){ rb_yield(self); } } return self; }
|
|
2072
|
-
static VALUE
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_FXMemoryStream, 1); arg2 = (int) NUM2INT(argv[0]);
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
static VALUE _wrap_FXMemoryStream_open__SWIG_1(int argc, VALUE *argv, VALUE self) {
|
|
2079
|
-
FXMemoryStream *arg1 = (FXMemoryStream *) 0 ; int arg2 ; unsigned long arg3 ; FXuchar *arg4 = (FXuchar *) 0 ; FXbool result;
|
|
2080
|
-
VALUE vresult = Qnil; if ((argc < 3) || (argc > 3)) rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc);
|
|
2081
|
-
SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_FXMemoryStream, 1); arg2 = (int) NUM2INT(argv[0]);
|
|
2082
|
-
arg3 = NUM2ULONG(argv[1]); arg4 = NIL_P(argv[2]) ? 0 : reinterpret_cast<FXuchar*>(STR2CSTR(argv[2]));
|
|
2083
|
-
result = (FXbool)(arg1)->open((FXStreamDirection )arg2,arg3,arg4); vresult = result ? Qtrue : Qfalse; return vresult; }
|
|
2084
|
-
static VALUE _wrap_FXMemoryStream_open(int nargs, VALUE *args, VALUE self) { int argc; VALUE argv[5]; int ii; argc = nargs + 1;
|
|
2085
|
-
argv[0] = self; for (ii = 1; (ii < argc) && (ii < 4); ii++) { argv[ii] = args[ii-1]; } if (argc == 3) { int _v; {
|
|
2086
|
-
void *ptr;
|
|
2087
|
-
_v = (NIL_P(argv[0]) || (TYPE(argv[0]) == T_DATA && SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_FXMemoryStream, 0) != -1)) ? 1 : 0; }
|
|
2088
|
-
if (_v) { { _v = ((TYPE(argv[1]) == T_FIXNUM) || (TYPE(argv[1]) == T_BIGNUM)) ? 1 : 0; } if (_v) { {
|
|
2089
|
-
_v = (NIL_P(argv[2]) || TYPE(argv[2]) == T_STRING) ? 1 : 0; } if (_v) {
|
|
2090
|
-
return _wrap_FXMemoryStream_open__SWIG_0(nargs, args, self);} } } } if (argc == 4) { int _v; {
|
|
2091
|
-
void *ptr;
|
|
2092
|
-
_v = (NIL_P(argv[0]) || (TYPE(argv[0]) == T_DATA && SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_FXMemoryStream, 0) != -1)) ? 1 : 0; }
|
|
2093
|
-
if (_v) { { _v = ((TYPE(argv[1]) == T_FIXNUM) || (TYPE(argv[1]) == T_BIGNUM)) ? 1 : 0; } if (_v) { {
|
|
2094
|
-
_v = ((TYPE(argv[2]) == T_FIXNUM) || (TYPE(argv[2]) == T_BIGNUM)) ? 1 : 0; } if (_v) { {
|
|
2095
|
-
_v = (NIL_P(argv[3]) || TYPE(argv[3]) == T_STRING) ? 1 : 0; } if (_v) {
|
|
2096
|
-
return _wrap_FXMemoryStream_open__SWIG_1(nargs, args, self);} } } } }
|
|
2097
|
-
rb_raise(rb_eArgError, "No matching function for overloaded 'FXMemoryStream_open'"); return Qnil; }
|
|
2084
|
+
static VALUE _wrap_FXMemoryStream_open(int argc, VALUE *argv, VALUE self) { FXMemoryStream *arg1 = (FXMemoryStream *) 0 ;
|
|
2085
|
+
int arg2 ; VALUE arg3 ; FXbool result; VALUE vresult = Qnil; if ((argc < 2) || (argc > 2))
|
|
2086
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc);
|
|
2087
|
+
SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_FXMemoryStream, 1); arg2 = (int) NUM2INT(argv[0]); arg3 = argv[1];
|
|
2088
|
+
result = (FXbool)FXMemoryStream_open(arg1,(FXStreamDirection )arg2,arg3); vresult = result ? Qtrue : Qfalse;
|
|
2089
|
+
return vresult; }
|
|
2098
2090
|
static VALUE _wrap_FXMemoryStream_takeBuffer(int argc, VALUE *argv, VALUE self) { FXMemoryStream *arg1 = (FXMemoryStream *) 0 ;
|
|
2099
2091
|
VALUE result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0))
|
|
2100
2092
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
|
data/ext/fox12/image_wrap.cpp
CHANGED
|
@@ -608,6 +608,19 @@ FXBitmap *new_FXBitmap(FXApp *a,void const *pix,FXuint opts,FXint w,FXint h){
|
|
|
608
608
|
|
|
609
609
|
swig_class cFXBitmap;
|
|
610
610
|
static void free_FXBitmap(FXBitmap *);
|
|
611
|
+
VALUE FXMemoryBuffer_getData(FXMemoryBuffer const *self){
|
|
612
|
+
FXColor* data = self->getData();
|
|
613
|
+
if (data) {
|
|
614
|
+
FXuint size = self->getSize();
|
|
615
|
+
VALUE ary = rb_ary_new2(size);
|
|
616
|
+
for (int i = 0; i < size; i++)
|
|
617
|
+
rb_ary_store(ary, i, UINT2NUM(data[i]));
|
|
618
|
+
return ary;
|
|
619
|
+
}
|
|
620
|
+
else {
|
|
621
|
+
return Qnil;
|
|
622
|
+
}
|
|
623
|
+
}
|
|
611
624
|
FXColor FXMemoryBuffer___getitem__(FXMemoryBuffer const *self,FXuint i){
|
|
612
625
|
return self->getData()[i];
|
|
613
626
|
}
|
|
@@ -618,8 +631,18 @@ FXColor FXMemoryBuffer___setitem__(FXMemoryBuffer *self,FXuint i,FXColor value){
|
|
|
618
631
|
|
|
619
632
|
swig_class cFXMemoryBuffer;
|
|
620
633
|
static void free_FXMemoryBuffer(FXMemoryBuffer *);
|
|
621
|
-
FXImage *new_FXImage(FXApp *a,
|
|
622
|
-
|
|
634
|
+
FXImage *new_FXImage(FXApp *a,VALUE ary,FXuint opts,FXint w,FXint h){
|
|
635
|
+
FXColor* pix=0;
|
|
636
|
+
if(!NIL_P(ary)){
|
|
637
|
+
Check_Type(ary,T_ARRAY);
|
|
638
|
+
if(FXMALLOC(&pix,FXColor,RARRAY(ary)->len)){
|
|
639
|
+
for(long i=0; i<RARRAY(ary)->len; i++){
|
|
640
|
+
pix[i]=static_cast<FXColor>(NUM2UINT(rb_ary_entry(ary,i)));
|
|
641
|
+
}
|
|
642
|
+
}
|
|
643
|
+
opts&=IMAGE_OWNED;
|
|
644
|
+
}
|
|
645
|
+
return new FXRbImage(a,pix,opts,w,h);
|
|
623
646
|
}
|
|
624
647
|
FXMemoryBuffer *FXImage_getData(FXImage const *self){
|
|
625
648
|
if(self->getData()){
|
|
@@ -1008,11 +1031,32 @@ static VALUE _wrap_FXBitmap_fill(int argc, VALUE *argv, VALUE self) { FXBitmap *
|
|
|
1008
1031
|
if ((argc < 1) || (argc > 1)) rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
|
|
1009
1032
|
SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_FXBitmap, 1); arg2 = to_FXbool(argv[0]); FXBitmap_fill(arg1,arg2);
|
|
1010
1033
|
return Qnil; }
|
|
1034
|
+
#ifdef HAVE_RB_DEFINE_ALLOC_FUNC
|
|
1035
|
+
static VALUE _wrap_FXMemoryBuffer_allocate(VALUE self) {
|
|
1036
|
+
#else
|
|
1037
|
+
static VALUE _wrap_FXMemoryBuffer_allocate(int argc, VALUE *argv, VALUE self) {
|
|
1038
|
+
#endif
|
|
1039
|
+
VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_FXMemoryBuffer);
|
|
1040
|
+
#ifndef HAVE_RB_DEFINE_ALLOC_FUNC
|
|
1041
|
+
rb_obj_call_init(vresult, argc, argv);
|
|
1042
|
+
#endif
|
|
1043
|
+
return vresult; }
|
|
1044
|
+
static VALUE _wrap_new_FXMemoryBuffer(int argc, VALUE *argv, VALUE self) { FXColor *arg1 = (FXColor *) 0 ; FXuint arg2 ;
|
|
1045
|
+
FXMemoryBuffer *result; if ((argc < 1) || (argc > 1)) rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); {
|
|
1046
|
+
Check_Type(argv[0], T_ARRAY); FXMALLOC(&arg1,FXColor,RARRAY(argv[0])->len);
|
|
1047
|
+
arg2=static_cast<FXuint>(RARRAY(argv[0])->len); for(FXint i=0; i<arg2; i++){
|
|
1048
|
+
arg1[i]=static_cast<FXColor>(NUM2UINT(rb_ary_entry(argv[0],i))); } }
|
|
1049
|
+
result = (FXMemoryBuffer *)new FXMemoryBuffer(arg1,arg2); DATA_PTR(self) = result; { FXFREE(&arg1); } return self; }
|
|
1011
1050
|
static VALUE _wrap_FXMemoryBuffer_getSize(int argc, VALUE *argv, VALUE self) { FXMemoryBuffer *arg1 = (FXMemoryBuffer *) 0 ;
|
|
1012
1051
|
FXuint result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0))
|
|
1013
1052
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
|
|
1014
1053
|
SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_FXMemoryBuffer, 1);
|
|
1015
1054
|
result = (FXuint)((FXMemoryBuffer const *)arg1)->getSize(); vresult = UINT2NUM(result); return vresult; }
|
|
1055
|
+
static VALUE _wrap_FXMemoryBuffer_getData(int argc, VALUE *argv, VALUE self) { FXMemoryBuffer *arg1 = (FXMemoryBuffer *) 0 ;
|
|
1056
|
+
VALUE result; VALUE vresult = Qnil; if ((argc < 0) || (argc > 0))
|
|
1057
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
|
|
1058
|
+
SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_FXMemoryBuffer, 1);
|
|
1059
|
+
result = (VALUE)FXMemoryBuffer_getData((FXMemoryBuffer const *)arg1); vresult = result; return vresult; }
|
|
1016
1060
|
static VALUE _wrap_FXMemoryBuffer___getitem__(int argc, VALUE *argv, VALUE self) { FXMemoryBuffer *arg1 = (FXMemoryBuffer *) 0 ;
|
|
1017
1061
|
FXuint arg2 ; FXColor result; VALUE vresult = Qnil; if ((argc < 1) || (argc > 1))
|
|
1018
1062
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
|
|
@@ -1038,17 +1082,13 @@ static VALUE _wrap_FXImage_allocate(VALUE self) {
|
|
|
1038
1082
|
rb_obj_call_init(vresult, argc, argv);
|
|
1039
1083
|
#endif
|
|
1040
1084
|
return vresult; }
|
|
1041
|
-
static VALUE _wrap_new_FXImage(int argc, VALUE *argv, VALUE self) { FXApp *arg1 = (FXApp *) 0 ;
|
|
1085
|
+
static VALUE _wrap_new_FXImage(int argc, VALUE *argv, VALUE self) { FXApp *arg1 = (FXApp *) 0 ; VALUE arg2 = (VALUE) Qnil ;
|
|
1042
1086
|
FXuint arg3 = (FXuint) 0 ; FXint arg4 = (FXint) 1 ; FXint arg5 = (FXint) 1 ; FXImage *result; if ((argc < 1) || (argc > 5))
|
|
1043
1087
|
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
|
|
1044
|
-
SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_FXApp, 1); if (argc > 1) {
|
|
1045
|
-
Check_Type(argv[1],T_ARRAY); if(FXMALLOC(&arg2,FXColor,RARRAY(argv[1])->len)){
|
|
1046
|
-
for(long i=0; i<RARRAY(argv[1])->len; i++){
|
|
1047
|
-
arg2[i]=static_cast<FXColor>(NUM2UINT(rb_ary_entry(argv[1],i))); } } } } } if (argc > 2) {
|
|
1088
|
+
SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_FXApp, 1); if (argc > 1) { arg2 = argv[1]; } if (argc > 2) {
|
|
1048
1089
|
arg3 = NUM2UINT(argv[2]); } if (argc > 3) { arg4 = NUM2INT(argv[3]); } if (argc > 4) { arg5 = NUM2INT(argv[4]); } {
|
|
1049
|
-
result = (FXImage *)new_FXImage(arg1,
|
|
1050
|
-
|
|
1051
|
-
return self; }
|
|
1090
|
+
result = (FXImage *)new_FXImage(arg1,arg2,arg3,arg4,arg5); DATA_PTR(self) = result; FXRbRegisterRubyObj(self, result);
|
|
1091
|
+
if(rb_block_given_p()){ rb_yield(self); } } return self; }
|
|
1052
1092
|
static VALUE _wrap_FXImage_getData(int argc, VALUE *argv, VALUE self) { FXImage *arg1 = (FXImage *) 0 ; FXMemoryBuffer *result;
|
|
1053
1093
|
VALUE vresult = Qnil; if ((argc < 0) || (argc > 0)) rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
|
|
1054
1094
|
SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_FXImage, 1);
|
|
@@ -3603,8 +3643,10 @@ SWIGEXPORT(void) Init_image(void) {
|
|
|
3603
3643
|
|
|
3604
3644
|
cFXMemoryBuffer.klass = rb_define_class_under(mFox, "FXMemoryBuffer", rb_cObject);
|
|
3605
3645
|
SWIG_TypeClientData(SWIGTYPE_p_FXMemoryBuffer, (void *) &cFXMemoryBuffer);
|
|
3606
|
-
|
|
3646
|
+
rb_define_alloc_func(cFXMemoryBuffer.klass, _wrap_FXMemoryBuffer_allocate);
|
|
3647
|
+
rb_define_method(cFXMemoryBuffer.klass, "initialize", VALUEFUNC(_wrap_new_FXMemoryBuffer), -1);
|
|
3607
3648
|
rb_define_method(cFXMemoryBuffer.klass, "getSize", VALUEFUNC(_wrap_FXMemoryBuffer_getSize), -1);
|
|
3649
|
+
rb_define_method(cFXMemoryBuffer.klass, "getData", VALUEFUNC(_wrap_FXMemoryBuffer_getData), -1);
|
|
3608
3650
|
rb_define_method(cFXMemoryBuffer.klass, "[]", VALUEFUNC(_wrap_FXMemoryBuffer___getitem__), -1);
|
|
3609
3651
|
rb_define_method(cFXMemoryBuffer.klass, "[]=", VALUEFUNC(_wrap_FXMemoryBuffer___setitem__), -1);
|
|
3610
3652
|
cFXMemoryBuffer.mark = 0;
|
data/ext/fox12/include/FXRbApp.h
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
***********************************************************************/
|
|
22
22
|
|
|
23
23
|
/***********************************************************************
|
|
24
|
-
* $Id: FXRbApp.h,v 1.
|
|
24
|
+
* $Id: FXRbApp.h,v 1.2 2005/02/05 17:34:32 lyle Exp $
|
|
25
25
|
***********************************************************************/
|
|
26
26
|
|
|
27
27
|
#ifndef FXRBAPP_H
|
|
@@ -43,7 +43,7 @@ static void cls ## _init(cls* self,VALUE ary,FXbool connect){ \
|
|
|
43
43
|
char **argv; \
|
|
44
44
|
int argc=1+RARRAY(ary)->len; \
|
|
45
45
|
if(FXMALLOC(&argv,char*,argc+1)){ \
|
|
46
|
-
argv[0]=
|
|
46
|
+
argv[0]="foo"; \
|
|
47
47
|
for(i=1;i<argc;i++){ \
|
|
48
48
|
argv[i]=STR2CSTR(RSTRING(rb_ary_entry(ary,i-1))); \
|
|
49
49
|
} \
|
|
@@ -55,7 +55,6 @@ static void cls ## _init(cls* self,VALUE ary,FXbool connect){ \
|
|
|
55
55
|
for(i=1;i<argc;i++){ \
|
|
56
56
|
rb_ary_push(ary,rb_str_new2(argv[i])); \
|
|
57
57
|
} \
|
|
58
|
-
FXFREE(&argv); \
|
|
59
58
|
} \
|
|
60
59
|
} \
|
|
61
60
|
inline void cls ## _exit(cls *self,FXint code){ \
|
|
@@ -63,6 +62,24 @@ inline void cls ## _exit(cls *self,FXint code){ \
|
|
|
63
62
|
}
|
|
64
63
|
|
|
65
64
|
|
|
65
|
+
/**
|
|
66
|
+
* For C/C++ applications, the argument count (argc) will always be at least
|
|
67
|
+
* one, and the first element of the argument array (argv[0]) will contain
|
|
68
|
+
* the program name. So if you type something like this:
|
|
69
|
+
*
|
|
70
|
+
* myprogram one two three
|
|
71
|
+
*
|
|
72
|
+
* then argc will be four (4) and argv will contain "myprogram", "one",
|
|
73
|
+
* "two" and "three".
|
|
74
|
+
*
|
|
75
|
+
* For Ruby applications, the size and contents of the argument array (ARGV)
|
|
76
|
+
* just correspond to the application arguments; so if you type something like
|
|
77
|
+
* this:
|
|
78
|
+
*
|
|
79
|
+
* ruby myprogram.rb one two three
|
|
80
|
+
*
|
|
81
|
+
* then the ARGV will have three elements ("one", "two" and "three").
|
|
82
|
+
*/
|
|
66
83
|
#define IMPLEMENT_FXAPP_STUBS(cls) \
|
|
67
84
|
void cls::create(){ \
|
|
68
85
|
FXRbCallVoidMethod(this,rb_intern("create")); \
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
***********************************************************************/
|
|
22
22
|
|
|
23
23
|
/***********************************************************************
|
|
24
|
-
* $Id: FXRbScrollArea.h,v 1.
|
|
24
|
+
* $Id: FXRbScrollArea.h,v 1.2 2005/02/22 14:47:14 lyle Exp $
|
|
25
25
|
***********************************************************************/
|
|
26
26
|
|
|
27
27
|
#ifndef FXRBSCROLLAREA_H
|
|
@@ -75,6 +75,9 @@ public:
|
|
|
75
75
|
|
|
76
76
|
// Destructor
|
|
77
77
|
virtual ~FXRbScrollArea(){
|
|
78
|
+
FXRbUnregisterRubyObj(horizontal);
|
|
79
|
+
FXRbUnregisterRubyObj(vertical);
|
|
80
|
+
FXRbUnregisterRubyObj(corner);
|
|
78
81
|
FXRbUnregisterRubyObj(this);
|
|
79
82
|
}
|
|
80
83
|
};
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
***********************************************************************/
|
|
22
22
|
|
|
23
23
|
/***********************************************************************
|
|
24
|
-
* $Id: FXRbScrollWindow.h,v 1.
|
|
24
|
+
* $Id: FXRbScrollWindow.h,v 1.2 2005/02/22 14:47:14 lyle Exp $
|
|
25
25
|
***********************************************************************/
|
|
26
26
|
|
|
27
27
|
#ifndef FXRBSCROLLWINDOW_H
|
|
@@ -42,6 +42,9 @@ public:
|
|
|
42
42
|
|
|
43
43
|
// Destructor
|
|
44
44
|
virtual ~FXRbScrollWindow(){
|
|
45
|
+
FXRbUnregisterRubyObj(horizontal);
|
|
46
|
+
FXRbUnregisterRubyObj(vertical);
|
|
47
|
+
FXRbUnregisterRubyObj(corner);
|
|
45
48
|
FXRbUnregisterRubyObj(this);
|
|
46
49
|
}
|
|
47
50
|
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
***********************************************************************/
|
|
22
22
|
|
|
23
23
|
/***********************************************************************
|
|
24
|
-
* $Id: FXRbTable.h,v 1.
|
|
24
|
+
* $Id: FXRbTable.h,v 1.3 2005/02/22 14:50:43 lyle Exp $
|
|
25
25
|
***********************************************************************/
|
|
26
26
|
|
|
27
27
|
#ifndef FXRBTABLE_H
|
|
@@ -410,6 +410,11 @@ public:
|
|
|
410
410
|
// Destructor
|
|
411
411
|
virtual ~FXRbTable(){
|
|
412
412
|
FXRbUnregisterRubyObj(this);
|
|
413
|
+
for(FXint r=0; r<getNumRows(); r++){
|
|
414
|
+
for(FXint c=0; c<getNumColumns(); c++){
|
|
415
|
+
FXRbUnregisterRubyObj(getItem(r,c));
|
|
416
|
+
}
|
|
417
|
+
}
|
|
413
418
|
}
|
|
414
419
|
};
|
|
415
420
|
|
data/lib/fox12/aliases.rb
CHANGED
data/lib/fox12/core.rb
CHANGED
|
@@ -66,6 +66,13 @@ module Fox
|
|
|
66
66
|
end
|
|
67
67
|
end
|
|
68
68
|
|
|
69
|
+
class FXScrollArea
|
|
70
|
+
# Returns a reference to the scroll corner (an FXScrollCorner instance) for this window.
|
|
71
|
+
def scrollCorner
|
|
72
|
+
verticalScrollBar.next
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
|
|
69
76
|
class FXSettings
|
|
70
77
|
#
|
|
71
78
|
# Read a boolean registry entry from the specified _section_ and _key_.
|
|
@@ -245,5 +252,25 @@ module Fox
|
|
|
245
252
|
self
|
|
246
253
|
end
|
|
247
254
|
end
|
|
255
|
+
|
|
256
|
+
class FXTable
|
|
257
|
+
#
|
|
258
|
+
# Append _numColumns_ columns to the right of the table..
|
|
259
|
+
# If _notify_ is +true+, a <tt>SEL_INSERTED</tt> message is sent to the
|
|
260
|
+
# table�s message target for each cell that is inserted.
|
|
261
|
+
#
|
|
262
|
+
def appendColumns(numColumns=1, notify=false)
|
|
263
|
+
insertColumns(self.numColumns, numColumns, notify)
|
|
264
|
+
end
|
|
265
|
+
|
|
266
|
+
#
|
|
267
|
+
# Append _numRows_ rows to the bottom of the table..
|
|
268
|
+
# If _notify_ is +true+, a <tt>SEL_INSERTED</tt> message is sent to the
|
|
269
|
+
# table�s message target for each cell that is inserted.
|
|
270
|
+
#
|
|
271
|
+
def appendRows(numRows=1, notify=false)
|
|
272
|
+
insertRows(self.numRows, numRows, notify)
|
|
273
|
+
end
|
|
274
|
+
end
|
|
248
275
|
end
|
|
249
276
|
|
data/lib/fox12/splashscreen.rb
CHANGED
data/lib/fox12/version.rb
CHANGED
|
@@ -13,11 +13,11 @@ module Fox
|
|
|
13
13
|
|
|
14
14
|
#
|
|
15
15
|
# Add an accelerator to the table. The _hotKey_ is a code returned
|
|
16
|
-
# by the Fox.
|
|
16
|
+
# by the Fox.fxparseAccel method. For example, to associate the
|
|
17
17
|
# Ctrl+S keypress with sending a "save" command to a document, you
|
|
18
18
|
# might use code like this:
|
|
19
19
|
#
|
|
20
|
-
# hotKey =
|
|
20
|
+
# hotKey = fxparseAccel("Ctrl+S")
|
|
21
21
|
# accelTable.addAccel(hotKey, doc, FXSEL(SEL_COMMAND, MyDocument::ID_SAVE))
|
|
22
22
|
#
|
|
23
23
|
# ==== Parameters:
|
|
@@ -37,9 +37,9 @@ module Fox
|
|
|
37
37
|
#
|
|
38
38
|
# Return +true+ if accelerator specified.
|
|
39
39
|
# Here, _hotKey_ is a code representing an accelerator key as returned
|
|
40
|
-
# by the Fox.
|
|
40
|
+
# by the Fox.fxparseAccel method. For example,
|
|
41
41
|
#
|
|
42
|
-
# if accelTable.hasAccel?(
|
|
42
|
+
# if accelTable.hasAccel?(fxparseAccel("Ctrl+S"))
|
|
43
43
|
# ...
|
|
44
44
|
# end
|
|
45
45
|
#
|
|
@@ -49,18 +49,18 @@ module Fox
|
|
|
49
49
|
# Return the target object of the given accelerator, or +nil+ if
|
|
50
50
|
# the accelerator is not present in this accelerator table.
|
|
51
51
|
# Here, _hotKey_ is a code representing an accelerator key as returned
|
|
52
|
-
# by the Fox.
|
|
52
|
+
# by the Fox.fxparseAccel method. For example,
|
|
53
53
|
#
|
|
54
|
-
# doc = accelTable.targetofAccel(
|
|
54
|
+
# doc = accelTable.targetofAccel(fxparseAccel("Ctrl+S"))
|
|
55
55
|
#
|
|
56
56
|
def targetOfAccel(hotKey) ; end
|
|
57
57
|
|
|
58
58
|
#
|
|
59
59
|
# Remove mapping for specified hot key.
|
|
60
60
|
# Here, _hotKey_ is a code representing an accelerator key as returned
|
|
61
|
-
# by the Fox.
|
|
61
|
+
# by the Fox.fxparseAccel method. For example,
|
|
62
62
|
#
|
|
63
|
-
# accelTable.removeAccel(
|
|
63
|
+
# accelTable.removeAccel(fxparseAccel("Ctrl+S"))
|
|
64
64
|
#
|
|
65
65
|
def removeAccel(hotKey) ; end
|
|
66
66
|
end
|
data/rdoc-sources/FXImage.rb
CHANGED
|
@@ -56,11 +56,10 @@ module Fox
|
|
|
56
56
|
# large images to instruct #render to use shared memory to communicate
|
|
57
57
|
# with the server.
|
|
58
58
|
#
|
|
59
|
-
#
|
|
60
59
|
# ==== Parameters:
|
|
61
60
|
#
|
|
62
61
|
# +a+:: an application instance [FXApp]
|
|
63
|
-
# +pixels+:: pixels [
|
|
62
|
+
# +pixels+:: pixels [Array of FXColor values]
|
|
64
63
|
# +opts+:: image options [Integer]
|
|
65
64
|
# +w+:: image width [Integer]
|
|
66
65
|
# +h+:: image height [Integer]
|
|
@@ -94,16 +93,23 @@ module Fox
|
|
|
94
93
|
|
|
95
94
|
#
|
|
96
95
|
# Restore client-side pixel buffer from image.
|
|
96
|
+
# This operation overwrites any current values for the client-side
|
|
97
|
+
# pixel buffer with values corresponding to the server-side image.
|
|
98
|
+
# If the image data is +nil+ at the time #restore is called, the
|
|
99
|
+
# image will first allocate an (owned) pixel buffer to use for this
|
|
100
|
+
# operation.
|
|
97
101
|
#
|
|
98
102
|
def restore() ; end
|
|
99
103
|
|
|
100
104
|
#
|
|
101
|
-
# Render the image from client-side pixel buffer
|
|
105
|
+
# Render the image from client-side pixel buffer, if there is data
|
|
106
|
+
# and if the image width and height are greater than zero.
|
|
102
107
|
#
|
|
103
108
|
def render() ; end
|
|
104
109
|
|
|
105
110
|
#
|
|
106
|
-
# Release the client-side pixels buffer, free it if it was owned
|
|
111
|
+
# Release the client-side pixels buffer, free it if it was owned
|
|
112
|
+
# (i.e. if the +IMAGE_OWNED+ option is set)..
|
|
107
113
|
# If it is not owned, the image just forgets about the buffer.
|
|
108
114
|
#
|
|
109
115
|
def release(); end
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
module Fox
|
|
2
2
|
class FXMemoryBuffer
|
|
3
3
|
|
|
4
|
-
# Pixel buffer, an array of FXColor values [Array]
|
|
5
|
-
attr_reader :data
|
|
6
|
-
|
|
7
4
|
#
|
|
8
5
|
# Return a new FXMemoryBuffer instance, initialized with the
|
|
9
6
|
# provided array of FXColor values.
|
|
@@ -12,7 +9,14 @@ module Fox
|
|
|
12
9
|
#
|
|
13
10
|
# +data+:: the initial array of FXColor values.
|
|
14
11
|
#
|
|
15
|
-
def initialize(data
|
|
12
|
+
def initialize(data); end
|
|
13
|
+
|
|
14
|
+
# Return a copy of the pixel buffer, as an array of FXColor values [Array]
|
|
15
|
+
def data; end
|
|
16
|
+
alias to_a data
|
|
17
|
+
|
|
18
|
+
# Return the size of the pixel buffer
|
|
19
|
+
def size; end
|
|
16
20
|
|
|
17
21
|
# Return the specified element (an FXColor value)
|
|
18
22
|
def [](index); end
|