Class: Newt::Textbox
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Widget
#==, #callback, #takesFocus
Class Method Details
.new(left, top, width, height, flags) ⇒ Object
950
951
952
953
954
955
956
|
# File 'ext/ruby_newt/ruby_newt.c', line 950
static VALUE rb_ext_Textbox_new(VALUE self, VALUE left, VALUE top, VALUE width, VALUE height, VALUE flags)
{
newtComponent co;
co = newtTextbox(NUM2INT(left), NUM2INT(top), NUM2INT(width), NUM2INT(height), NUM2INT(flags));
return Data_Wrap_Struct(self, 0, 0, co);
}
|
Instance Method Details
#get_num_lines ⇒ Object
976
977
978
979
980
981
982
|
# File 'ext/ruby_newt/ruby_newt.c', line 976
static VALUE rb_ext_Textbox_GetNumLines(VALUE self)
{
newtComponent co;
Data_Get_Struct(self, struct newtComponent_struct, co);
return INT2NUM(newtTextboxGetNumLines(co));
}
|
#set_colors(normal, active) ⇒ Object
984
985
986
987
988
989
990
991
|
# File 'ext/ruby_newt/ruby_newt.c', line 984
static VALUE rb_ext_Textbox_SetColors(VALUE self, VALUE normal, VALUE active)
{
newtComponent co;
Data_Get_Struct(self, struct newtComponent_struct, co);
newtTextboxSetColors(co, NUM2INT(normal), NUM2INT(active));
return Qnil;
}
|
#set_height(height) ⇒ Object
967
968
969
970
971
972
973
974
|
# File 'ext/ruby_newt/ruby_newt.c', line 967
static VALUE rb_ext_Textbox_SetHeight(VALUE self, VALUE height)
{
newtComponent co;
Data_Get_Struct(self, struct newtComponent_struct, co);
newtTextboxSetHeight(co, NUM2INT(height));
return Qnil;
}
|
#set_text(text) ⇒ Object
958
959
960
961
962
963
964
965
|
# File 'ext/ruby_newt/ruby_newt.c', line 958
static VALUE rb_ext_Textbox_SetText(VALUE self, VALUE text)
{
newtComponent co;
Data_Get_Struct(self, struct newtComponent_struct, co);
newtTextboxSetText(co, StringValuePtr(text));
return Qnil;
}
|