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
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
|
# File 'ext/ruby_newt/ruby_newt.c', line 1327
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
1360
1361
1362
1363
1364
1365
1366
|
# File 'ext/ruby_newt/ruby_newt.c', line 1360
static VALUE rb_ext_Textbox_GetNumLines(VALUE self)
{
newtComponent co;
Get_newtComponent(self, co);
return INT2NUM(newtTextboxGetNumLines(co));
}
|
#set_colors(normal, active) ⇒ Object
1368
1369
1370
1371
1372
1373
1374
1375
|
# File 'ext/ruby_newt/ruby_newt.c', line 1368
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
1351
1352
1353
1354
1355
1356
1357
1358
|
# File 'ext/ruby_newt/ruby_newt.c', line 1351
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
1342
1343
1344
1345
1346
1347
1348
1349
|
# File 'ext/ruby_newt/ruby_newt.c', line 1342
static VALUE rb_ext_Textbox_SetText(VALUE self, VALUE text)
{
newtComponent co;
Get_newtComponent(self, co);
newtTextboxSetText(co, StringValuePtr(text));
return Qnil;
}
|