Class: Newt::Scale

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, width, fullValue) ⇒ Object



1660
1661
1662
1663
1664
1665
1666
1667
# File 'ext/ruby_newt/ruby_newt.c', line 1660

static VALUE rb_ext_Scale_new(VALUE self, VALUE left, VALUE top, VALUE width, VALUE fullValue)
{
  newtComponent co;

  INIT_GUARD();
  co = newtScale(NUM2INT(left), NUM2INT(top), NUM2INT(width), NUM2INT(fullValue));
  return Make_Widget(self, co);
}

Instance Method Details

#set(amount) ⇒ Object



1669
1670
1671
1672
1673
1674
1675
1676
# File 'ext/ruby_newt/ruby_newt.c', line 1669

static VALUE rb_ext_Scale_Set(VALUE self, VALUE amount)
{
  newtComponent co;

  Get_newtComponent(self, co);
  newtScaleSet(co, NUM2INT(amount));
  return Qnil;
}

#set_colors(empty, full) ⇒ Object



1678
1679
1680
1681
1682
1683
1684
1685
# File 'ext/ruby_newt/ruby_newt.c', line 1678

static VALUE rb_ext_Scale_SetColors(VALUE self, VALUE empty, VALUE full)
{
  newtComponent co;

  Get_newtComponent(self, co);
  newtScaleSetColors(co, NUM2INT(empty), NUM2INT(full));
  return Qnil;
}