class Newt::Textbox

Public Class Methods

new(*args) click to toggle source
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);
}

Public Instance Methods

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

  Get_newtComponent(self, 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;

  Get_newtComponent(self, 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;

  Get_newtComponent(self, 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;

  Get_newtComponent(self, co);
  newtTextboxSetText(co, StringValuePtr(text));
  return Qnil;
}