Class: Newt::Label

Inherits:
Widget show all
Defined in:
ext/ruby_newt/ruby_newt.c

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Widget

#==, #callback, #get_position, #get_size, #inspect, #takes_focus

Class Method Details

.new(left, top, text) ⇒ Object



859
860
861
862
863
864
865
866
# File 'ext/ruby_newt/ruby_newt.c', line 859

static VALUE rb_ext_Label_new(VALUE self, VALUE left, VALUE top, VALUE text)
{
  newtComponent co;

  INIT_GUARD();
  co = newtLabel(NUM2INT(left), NUM2INT(top), StringValuePtr(text));
  return Make_Widget(self, co);
}

Instance Method Details

#set_colors(colorset) ⇒ Object



877
878
879
880
881
882
883
884
# File 'ext/ruby_newt/ruby_newt.c', line 877

static VALUE rb_ext_Label_SetColors(VALUE self, VALUE colorset)
{
  newtComponent co;

  Get_newtComponent(self, co);
  newtLabelSetColors(co, NUM2INT(colorset));
  return Qnil;
}

#set_text(text) ⇒ Object



868
869
870
871
872
873
874
875
# File 'ext/ruby_newt/ruby_newt.c', line 868

static VALUE rb_ext_Label_SetText(VALUE self, VALUE text)
{
  newtComponent co;

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