Class: Newt::Textbox
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Widget
#==, #callback, #get_position, #get_size, #inspect, #takes_focus
Class Method Details
.new(*args) ⇒ Object
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
|
# File 'ext/ruby_newt/ruby_newt.c', line 1334
static VALUE rb_ext_Textbox_new(int argc, VALUE *argv, VALUE self)
{
newtComponent co;
int flags;
if (argc < 4 || argc > 5)
ARG_ERROR(argc, "4..5");
INIT_GUARD();
flags = (argc == 5) ? NUM2INT(argv[4]) : 0;
co = newtTextbox(NUM2INT(argv[0]), NUM2INT(argv[1]), NUM2INT(argv[2]), NUM2INT(argv[3]), flags);
return Make_Widget(self, co);
}
|
Instance Method Details
#get_num_lines ⇒ Object
1367
1368
1369
1370
1371
1372
1373
|
# File 'ext/ruby_newt/ruby_newt.c', line 1367
static VALUE rb_ext_Textbox_GetNumLines(VALUE self)
{
newtComponent co;
Get_newtComponent(self, co);
return INT2NUM(newtTextboxGetNumLines(co));
}
|
#set_colors(normal, active) ⇒ Object
1375
1376
1377
1378
1379
1380
1381
1382
|
# File 'ext/ruby_newt/ruby_newt.c', line 1375
static VALUE rb_ext_Textbox_SetColors(VALUE self, VALUE normal, VALUE active)
{
newtComponent co;
Get_newtComponent(self, co);
newtTextboxSetColors(co, NUM2INT(normal), NUM2INT(active));
return Qnil;
}
|
#set_height(height) ⇒ Object
1358
1359
1360
1361
1362
1363
1364
1365
|
# File 'ext/ruby_newt/ruby_newt.c', line 1358
static VALUE rb_ext_Textbox_SetHeight(VALUE self, VALUE height)
{
newtComponent co;
Get_newtComponent(self, co);
newtTextboxSetHeight(co, NUM2INT(height));
return Qnil;
}
|
#set_text(text) ⇒ Object
1349
1350
1351
1352
1353
1354
1355
1356
|
# File 'ext/ruby_newt/ruby_newt.c', line 1349
static VALUE rb_ext_Textbox_SetText(VALUE self, VALUE text)
{
newtComponent co;
Get_newtComponent(self, co);
newtTextboxSetText(co, StringValuePtr(text));
return Qnil;
}
|