class Newt::RadioButton

Public Class Methods

new(*args) click to toggle source
static VALUE rb_ext_RadioButton_new(int argc, VALUE *argv, VALUE self)
{
  newtComponent co, cco = NULL;
  int is_default = 0;

  if (argc < 3 || argc > 5)
    ARG_ERROR(argc, "3..5");

  INIT_GUARD();
  if (argc >= 4)
    is_default = NUM2INT(argv[3]);

  if (argc == 5 && argv[4] != Qnil)
    Get_newtComponent(argv[4], cco);

  co = newtRadiobutton(NUM2INT(argv[0]), NUM2INT(argv[1]), StringValuePtr(argv[2]), is_default, cco);
  return Make_Widget(self, co);
}

Public Instance Methods

get_current() click to toggle source
static VALUE rb_ext_RadioButton_GetCurrent(VALUE self)
{
  newtComponent co, cco;

  Get_newtComponent(self, co);
  cco = newtRadioGetCurrent(co);
  return Make_Widget_Ref(cRadioButton, cco);
}
set_current() click to toggle source
static VALUE rb_ext_RadioButton_SetCurrent(VALUE self)
{
  newtComponent co;

  Get_newtComponent(self, co);
  newtRadioSetCurrent(co);
  return Qnil;
}