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

Class Method Details

.new(left, top, width, fullValue) ⇒ Object



1159
1160
1161
1162
1163
1164
1165
# File 'ext/ruby_newt/ruby_newt.c', line 1159

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

  co = newtScale(NUM2INT(left), NUM2INT(top), NUM2INT(width), NUM2INT(fullValue));
  return Data_Wrap_Struct(self, 0, 0, co);
}

Instance Method Details

#set(amount) ⇒ Object



1167
1168
1169
1170
1171
1172
1173
1174
# File 'ext/ruby_newt/ruby_newt.c', line 1167

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

  Data_Get_Struct(self, struct newtComponent_struct, co);
  newtScaleSet(co, NUM2INT(amount));
  return Qnil;
}