class Fox::FXColorItem
Color item
Public Class Methods
Source
SWIGINTERN VALUE
_wrap_new_FXColorItem(int argc, VALUE *argv, VALUE self) {
FXString *arg1 = 0 ;
FXColor arg2 ;
void *arg3 = (void *) 0 ;
SwigValueWrapper< FXString > p1 ;
FXColorItem *result = 0 ;
if ((argc < 2) || (argc > 3)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
}
p1 = to_FXString(argv[0]); arg1 = &p1;
arg2 = to_FXColor(argv[1]);
if (argc > 2) {
arg3 = (argv[2] == Qnil) ? NULL : (void *) argv[2];
}
{
result = (FXColorItem *)new_FXColorItem((FXString const &)*arg1,arg2,arg3);
DATA_PTR(self) = result; FXRbRegisterRubyObj(self, result);
if(rb_block_given_p()){
rb_yield(self);
}
}
return self;
fail:
return Qnil;
}
Source
# File lib/fox16/kwargs.rb, line 461 def initialize(text, clr, *args, &blk) argument_names = %w{data} default_params = { :data => nil } params = {} params = args.pop if args.last.is_a? Hash args.each_with_index { |e, i| params[argument_names[i].intern] = e } params.keys.each { |key| raise ArgumentError, "Unrecognized parameter #{key}" unless default_params.keys.include?(key) } params = default_params.merge(params) old_initialize(text, clr, params[:data], &blk) end
Also aliased as: old_initialize
Public Instance Methods
Source
SWIGINTERN VALUE
_wrap_FXColorItem_color(int argc, VALUE *argv, VALUE self) {
FXColorItem *arg1 = (FXColorItem *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
FXColor result;
VALUE vresult = Qnil;
if ((argc < 0) || (argc > 0)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
}
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXColorItem, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXColorItem const *","getColor", 1, self ));
}
arg1 = reinterpret_cast< FXColorItem * >(argp1);
result = (FXColor)((FXColorItem const *)arg1)->getColor();
vresult = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
return vresult;
fail:
return Qnil;
}
Item color {FXColor}
Source
SWIGINTERN VALUE
_wrap_FXColorItem_colore___(int argc, VALUE *argv, VALUE self) {
FXColorItem *arg1 = (FXColorItem *) 0 ;
FXColor arg2 ;
void *argp1 = 0 ;
int res1 = 0 ;
if ((argc < 1) || (argc > 1)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
}
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXColorItem, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXColorItem *","setColor", 1, self ));
}
arg1 = reinterpret_cast< FXColorItem * >(argp1);
arg2 = to_FXColor(argv[0]);
(arg1)->setColor(arg2);
return Qnil;
fail:
return Qnil;
}
Item color {FXColor}
Source
SWIGINTERN VALUE
_wrap_FXColorItem_create(int argc, VALUE *argv, VALUE self) {
FXColorItem *arg1 = (FXColorItem *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
if ((argc < 0) || (argc > 0)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
}
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXColorItem, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXColorItem *","create", 1, self ));
}
arg1 = reinterpret_cast< FXColorItem * >(argp1);
FXColorItem_create(arg1);
return Qnil;
fail:
return Qnil;
}
Source
SWIGINTERN VALUE
_wrap_FXColorItem_destroy(int argc, VALUE *argv, VALUE self) {
FXColorItem *arg1 = (FXColorItem *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
if ((argc < 0) || (argc > 0)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
}
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXColorItem, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXColorItem *","destroy", 1, self ));
}
arg1 = reinterpret_cast< FXColorItem * >(argp1);
FXColorItem_destroy(arg1);
return Qnil;
fail:
return Qnil;
}
Source
SWIGINTERN VALUE
_wrap_FXColorItem_detach(int argc, VALUE *argv, VALUE self) {
FXColorItem *arg1 = (FXColorItem *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
if ((argc < 0) || (argc > 0)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
}
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXColorItem, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXColorItem *","detach", 1, self ));
}
arg1 = reinterpret_cast< FXColorItem * >(argp1);
FXColorItem_detach(arg1);
return Qnil;
fail:
return Qnil;
}
Source
SWIGINTERN VALUE
_wrap_FXColorItem_getHeight(int argc, VALUE *argv, VALUE self) {
FXColorItem *arg1 = (FXColorItem *) 0 ;
FXList *arg2 = (FXList *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
void *argp2 = 0 ;
int res2 = 0 ;
FXint result;
VALUE vresult = Qnil;
if ((argc < 1) || (argc > 1)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
}
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXColorItem, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXColorItem const *","getHeight", 1, self ));
}
arg1 = reinterpret_cast< FXColorItem * >(argp1);
res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_FXList, 0 | 0 );
if (!SWIG_IsOK(res2)) {
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "FXList const *","getHeight", 2, argv[0] ));
}
arg2 = reinterpret_cast< FXList * >(argp2);
result = (FXint)FXColorItem_getHeight((FXColorItem const *)arg1,(FXList const *)arg2);
vresult = SWIG_From_int(static_cast< int >(result));
return vresult;
fail:
return Qnil;
}
Source
SWIGINTERN VALUE
_wrap_FXColorItem_getWidth(int argc, VALUE *argv, VALUE self) {
FXColorItem *arg1 = (FXColorItem *) 0 ;
FXList *arg2 = (FXList *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
void *argp2 = 0 ;
int res2 = 0 ;
FXint result;
VALUE vresult = Qnil;
if ((argc < 1) || (argc > 1)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
}
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXColorItem, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXColorItem const *","getWidth", 1, self ));
}
arg1 = reinterpret_cast< FXColorItem * >(argp1);
res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_FXList, 0 | 0 );
if (!SWIG_IsOK(res2)) {
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "FXList const *","getWidth", 2, argv[0] ));
}
arg2 = reinterpret_cast< FXList * >(argp2);
result = (FXint)FXColorItem_getWidth((FXColorItem const *)arg1,(FXList const *)arg2);
vresult = SWIG_From_int(static_cast< int >(result));
return vresult;
fail:
return Qnil;
}
Source
SWIGINTERN VALUE
_wrap_FXColorItem_load(int argc, VALUE *argv, VALUE self) {
FXColorItem *arg1 = (FXColorItem *) 0 ;
FXStream *arg2 = 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
void *argp2 = 0 ;
int res2 = 0 ;
if ((argc < 1) || (argc > 1)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
}
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXColorItem, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXColorItem *","load", 1, self ));
}
arg1 = reinterpret_cast< FXColorItem * >(argp1);
res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_FXStream, 0 );
if (!SWIG_IsOK(res2)) {
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "FXStream &","load", 2, argv[0] ));
}
if (!argp2) {
SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "FXStream &","load", 2, argv[0]));
}
arg2 = reinterpret_cast< FXStream * >(argp2);
FXColorItem_load(arg1,*arg2);
return Qnil;
fail:
return Qnil;
}
Source
SWIGINTERN VALUE
_wrap_FXColorItem_save(int argc, VALUE *argv, VALUE self) {
FXColorItem *arg1 = (FXColorItem *) 0 ;
FXStream *arg2 = 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
void *argp2 = 0 ;
int res2 = 0 ;
if ((argc < 1) || (argc > 1)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
}
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXColorItem, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXColorItem const *","save", 1, self ));
}
arg1 = reinterpret_cast< FXColorItem * >(argp1);
res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_FXStream, 0 );
if (!SWIG_IsOK(res2)) {
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "FXStream &","save", 2, argv[0] ));
}
if (!argp2) {
SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "FXStream &","save", 2, argv[0]));
}
arg2 = reinterpret_cast< FXStream * >(argp2);
FXColorItem_save((FXColorItem const *)arg1,*arg2);
return Qnil;
fail:
return Qnil;
}
Source
SWIGINTERN VALUE
_wrap_FXColorItem_setDraggable(int argc, VALUE *argv, VALUE self) {
FXColorItem *arg1 = (FXColorItem *) 0 ;
FXbool arg2 ;
void *argp1 = 0 ;
int res1 = 0 ;
if ((argc < 1) || (argc > 1)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
}
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXColorItem, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXColorItem *","setDraggable", 1, self ));
}
arg1 = reinterpret_cast< FXColorItem * >(argp1);
arg2 = to_FXbool(argv[0]);
FXColorItem_setDraggable(arg1,arg2);
return Qnil;
fail:
return Qnil;
}
Source
SWIGINTERN VALUE
_wrap_FXColorItem_setEnabled(int argc, VALUE *argv, VALUE self) {
FXColorItem *arg1 = (FXColorItem *) 0 ;
FXbool arg2 ;
void *argp1 = 0 ;
int res1 = 0 ;
if ((argc < 1) || (argc > 1)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
}
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXColorItem, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXColorItem *","setEnabled", 1, self ));
}
arg1 = reinterpret_cast< FXColorItem * >(argp1);
arg2 = to_FXbool(argv[0]);
FXColorItem_setEnabled(arg1,arg2);
return Qnil;
fail:
return Qnil;
}
Source
SWIGINTERN VALUE
_wrap_FXColorItem_setFocus(int argc, VALUE *argv, VALUE self) {
FXColorItem *arg1 = (FXColorItem *) 0 ;
FXbool arg2 ;
void *argp1 = 0 ;
int res1 = 0 ;
if ((argc < 1) || (argc > 1)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
}
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXColorItem, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXColorItem *","setFocus", 1, self ));
}
arg1 = reinterpret_cast< FXColorItem * >(argp1);
arg2 = to_FXbool(argv[0]);
FXColorItem_setFocus(arg1,arg2);
return Qnil;
fail:
return Qnil;
}
Source
SWIGINTERN VALUE
_wrap_FXColorItem_setIcon(int argc, VALUE *argv, VALUE self) {
FXColorItem *arg1 = (FXColorItem *) 0 ;
FXIcon *arg2 = (FXIcon *) 0 ;
FXbool arg3 = (FXbool) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
void *argp2 = 0 ;
int res2 = 0 ;
if ((argc < 1) || (argc > 2)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
}
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXColorItem, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXColorItem *","setIcon", 1, self ));
}
arg1 = reinterpret_cast< FXColorItem * >(argp1);
res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_FXIcon, 0 | 0 );
if (!SWIG_IsOK(res2)) {
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "FXIcon *","setIcon", 2, argv[0] ));
}
arg2 = reinterpret_cast< FXIcon * >(argp2);
if (argc > 1) {
arg3 = to_FXbool(argv[1]);
}
FXColorItem_setIcon(arg1,arg2,arg3);
return Qnil;
fail:
return Qnil;
}
Source
SWIGINTERN VALUE
_wrap_FXColorItem_setSelected(int argc, VALUE *argv, VALUE self) {
FXColorItem *arg1 = (FXColorItem *) 0 ;
FXbool arg2 ;
void *argp1 = 0 ;
int res1 = 0 ;
if ((argc < 1) || (argc > 1)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
}
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXColorItem, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXColorItem *","setSelected", 1, self ));
}
arg1 = reinterpret_cast< FXColorItem * >(argp1);
arg2 = to_FXbool(argv[0]);
FXColorItem_setSelected(arg1,arg2);
return Qnil;
fail:
return Qnil;
}
Source
SWIGINTERN VALUE
_wrap_FXColorItem_setText(int argc, VALUE *argv, VALUE self) {
FXColorItem *arg1 = (FXColorItem *) 0 ;
FXString *arg2 = 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
SwigValueWrapper< FXString > p2 ;
if ((argc < 1) || (argc > 1)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
}
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXColorItem, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXColorItem *","setText", 1, self ));
}
arg1 = reinterpret_cast< FXColorItem * >(argp1);
p2 = to_FXString(argv[0]); arg2 = &p2;
FXColorItem_setText(arg1,(FXString const &)*arg2);
return Qnil;
fail:
return Qnil;
}