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, #takesFocus

Class Method Details

.new(left, top, text) ⇒ Object



390
391
392
393
394
395
396
# File 'ext/ruby_newt/ruby_newt.c', line 390

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

  co = newtLabel(NUM2INT(left), NUM2INT(top), StringValuePtr(text));
  return Data_Wrap_Struct(self, 0, 0, co);
}

Instance Method Details

#set_text(text) ⇒ Object



398
399
400
401
402
403
404
405
# File 'ext/ruby_newt/ruby_newt.c', line 398

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

  Data_Get_Struct(self, struct newtComponent_struct, co);
  newtLabelSetText(co, StringValuePtr(text));
  return Qnil;
}