Class: Newt::RadioButton

Inherits:
Widget
  • Object
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(*args) ⇒ Object



962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
# File 'ext/ruby_newt/ruby_newt.c', line 962

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);
}

Instance Method Details

#get_currentObject



981
982
983
984
985
986
987
988
# File 'ext/ruby_newt/ruby_newt.c', line 981

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_currentObject



990
991
992
993
994
995
996
997
# File 'ext/ruby_newt/ruby_newt.c', line 990

static VALUE rb_ext_RadioButton_SetCurrent(VALUE self)
{
  newtComponent co;

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