class Newt::Textbox

Public Class Methods

new(p1, p2, p3, p4, p5) click to toggle source
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);
}

Public Instance Methods

get_num_lines() click to toggle source
static VALUE rb_ext_Textbox_GetNumLines(VALUE self)
{
  newtComponent co;

  Data_Get_Struct(self, struct newtComponent_struct, co);
  return INT2NUM(newtTextboxGetNumLines(co));
}
set_colors(p1, p2) click to toggle source
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(p1) click to toggle source
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(p1) click to toggle source
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;
}