Class: Myform::MyFormHolder::EmbeddedFormHolder
- Inherits:
-
Gtk::VBox
- Object
- Gtk::VBox
- Myform::MyFormHolder::EmbeddedFormHolder
- Defined in:
- lib/FormHolder.rb
Instance Method Summary collapse
- #form ⇒ Object
- #holder ⇒ Object
-
#initialize(form_holder) ⇒ EmbeddedFormHolder
constructor
A new instance of EmbeddedFormHolder.
- #update(notifier, pid) ⇒ Object
Constructor Details
#initialize(form_holder) ⇒ EmbeddedFormHolder
Returns a new instance of EmbeddedFormHolder.
12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/FormHolder.rb', line 12 def initialize(form_holder) @form_holder=form_holder super() =Gtk::HButtonBox.new okButton=Gtk::Button.new() okButton.set_relief(Gtk::ReliefStyle::NONE) okButton.set_image(Gtk::Image.new(Gtk::Stock::APPLY,Gtk::IconSize::SMALL_TOOLBAR)).set_label('ok').signal_connect('clicked'){|c| @form_holder.form.apply_changes(@form_holder) } .pack_start(okButton) .set_layout_style(Gtk::ButtonBox::SPREAD) pack_start(@form_holder.form,true,true) pack_end(,false,true) unless @form_holder.info? || @form_holder.runmode == "dry" || @form_holder.form.gtk_attribute("ok_button")=="false" end |
Instance Method Details
#form ⇒ Object
26 27 28 |
# File 'lib/FormHolder.rb', line 26 def form @form_holder.form end |
#holder ⇒ Object
29 30 31 |
# File 'lib/FormHolder.rb', line 29 def holder @form_holder end |
#update(notifier, pid) ⇒ Object
33 34 35 |
# File 'lib/FormHolder.rb', line 33 def update(notifier,pid) @form_holder.form.update(notifier,pid) end |