Class: Newt::CheckboxTreeMulti
- Inherits:
-
CheckboxTree
- Object
- Widget
- CheckboxTree
- Newt::CheckboxTreeMulti
- Defined in:
- ext/ruby_newt/ruby_newt.c
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from CheckboxTree
#add, #find, #get, #get_current, #set, #set_current, #set_entry, #set_width
Methods inherited from Widget
#==, #callback, #get_position, #get_size, #inspect, #takes_focus
Class Method Details
.new(*args) ⇒ Object
1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 |
# File 'ext/ruby_newt/ruby_newt.c', line 1296 static VALUE rb_ext_CheckboxTreeMulti_new(int argc, VALUE *argv, VALUE self) { newtComponent co; char *seq; int flags; if (argc < 3 || argc > 5) ARG_ERROR(argc, "3..5"); INIT_GUARD(); seq = NULL; if (argc >= 4 && !NIL_P(argv[3]) && RSTRING_LEN(argv[3])) seq = StringValuePtr(argv[3]); flags = (argc == 5) ? NUM2INT(argv[4]) : 0; co = newtCheckboxTreeMulti(NUM2INT(argv[0]), NUM2INT(argv[1]), NUM2INT(argv[2]), seq, flags); return Make_Widget(self, co); } |
Instance Method Details
#get_selection(seqnum) ⇒ Object
1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 |
# File 'ext/ruby_newt/ruby_newt.c', line 1316 static VALUE rb_ext_CheckboxTreeMulti_GetSelection(VALUE self, VALUE seqnum) { newtComponent co; VALUE *data; int numitems; Get_newtComponent(self, co); data = (VALUE *) newtCheckboxTreeGetMultiSelection(co, &numitems, StringValuePtr(seqnum)[0]); return checkboxtree_collect_selection(numitems, data); } |