Class: Newt::RadioButton
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Widget
Class Method Details
.new(left, top, text, isDefault, prevButton) ⇒ Object
479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 |
# File 'ext/ruby_newt/ruby_newt.c', line 479 static VALUE rb_ext_RadioButton_new(VALUE self, VALUE left, VALUE top, VALUE text, VALUE isDefault, VALUE prevButton) { newtComponent co, cco; if (NIL_P(prevButton)) { co = (NUM2INT(left), NUM2INT(top), StringValuePtr(text), NUM2INT(isDefault), NULL); } else { Data_Get_Struct(prevButton, struct newtComponent_struct, cco); co = (NUM2INT(left), NUM2INT(top), StringValuePtr(text), NUM2INT(isDefault), cco); } return Data_Wrap_Struct(self, 0, 0, co); } |
Instance Method Details
#get ⇒ Object
438 439 440 441 442 443 444 445 446 447 |
# File 'ext/ruby_newt/ruby_newt.c', line 438 static VALUE rb_ext_Checkbox_GetValue(VALUE self) { newtComponent co; char value[10]; Data_Get_Struct(self, struct newtComponent_struct, co); value[0] = newtCheckboxGetValue(co); value[1] = '\0'; return rb_str_new2(value); } |
#set(value) ⇒ Object
449 450 451 452 453 454 455 456 457 458 |
# File 'ext/ruby_newt/ruby_newt.c', line 449 static VALUE rb_ext_Checkbox_SetValue(VALUE self, VALUE value) { newtComponent co; Data_Get_Struct(self, struct newtComponent_struct, co); if (RSTRING_LEN(value) > 0) { newtCheckboxSetValue(co, StringValuePtr(value)[0]); } return Qnil; } |