Class: Newt::Form
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Widget
#==, #callback, #takesFocus
Class Method Details
.new(left, top, text) ⇒ Object
832
833
834
835
836
837
838
839
|
# File 'ext/ruby_newt/ruby_newt.c', line 832
static VALUE rb_ext_Form_new(VALUE self, VALUE left, VALUE top, VALUE text)
{
newtComponent co;
co = newtForm(NULL, NULL, 0);
return Data_Wrap_Struct(self, 0, 0, co);
//return Data_Wrap_Struct(self, 0, rb_ext_Form_Destroy, co);
}
|
Instance Method Details
#add(co) ⇒ Object
rb_define_method(cForm, “addComponent”, rb_ext_Form_AddComponent, 1);
862
863
864
865
866
867
868
869
870
871
872
873
874
|
# File 'ext/ruby_newt/ruby_newt.c', line 862
static VALUE rb_ext_Form_AddComponents(VALUE self, VALUE co)
{
int i;
newtComponent form, cco;
Data_Get_Struct(self, struct newtComponent_struct, form);
for (i = 0; i < RARRAY_LEN(co); i++) {
Data_Get_Struct(RARRAY_PTR(co)[i], struct newtComponent_struct, cco);
newtFormAddComponent(form, cco);
}
return Qnil;
}
|
#add_hotkey(key) ⇒ Object
912
913
914
915
916
917
918
919
|
# File 'ext/ruby_newt/ruby_newt.c', line 912
static VALUE rb_ext_Form_AddHotKey(VALUE self, VALUE key)
{
newtComponent form;
Data_Get_Struct(self, struct newtComponent_struct, form);
newtFormAddHotKey(form, NUM2INT(key));
return Qnil;
}
|
#draw ⇒ Object
903
904
905
906
907
908
909
910
|
# File 'ext/ruby_newt/ruby_newt.c', line 903
static VALUE rb_ext_Form_DrawForm(VALUE self)
{
newtComponent form;
Data_Get_Struct(self, struct newtComponent_struct, form);
newtDrawForm(form);
return Qnil;
}
|
#run ⇒ Object
894
895
896
897
898
899
900
901
|
# File 'ext/ruby_newt/ruby_newt.c', line 894
static VALUE rb_ext_Run_Form(VALUE self)
{
newtComponent form, co;
Data_Get_Struct(self, struct newtComponent_struct, form);
co = newtRunForm(form);
return Data_Wrap_Struct(cWidget, 0, 0, co);
}
|
#set_background(color) ⇒ Object
return Data_Wrap_Struct(self, 0, rb_ext_Form_Destroy, co);
841
842
843
844
845
846
847
848
|
# File 'ext/ruby_newt/ruby_newt.c', line 841
static VALUE rb_ext_Form_SetBackground(VALUE self, VALUE color)
{
newtComponent form;
Data_Get_Struct(self, struct newtComponent_struct, form);
newtFormSetBackground(form, NUM2INT(color));
return Qnil;
}
|
#set_height(height) ⇒ Object
876
877
878
879
880
881
882
883
|
# File 'ext/ruby_newt/ruby_newt.c', line 876
static VALUE rb_ext_Form_SetHeight(VALUE self, VALUE height)
{
newtComponent form;
Data_Get_Struct(self, struct newtComponent_struct, form);
newtFormSetHeight(form, NUM2INT(height));
return Qnil;
}
|
#set_width(width) ⇒ Object
885
886
887
888
889
890
891
892
|
# File 'ext/ruby_newt/ruby_newt.c', line 885
static VALUE rb_ext_Form_SetWidth(VALUE self, VALUE width)
{
newtComponent form;
Data_Get_Struct(self, struct newtComponent_struct, form);
newtFormSetWidth(form, NUM2INT(width));
return Qnil;
}
|