Class: MittensUi::Checkbox
Instance Attribute Summary collapse
-
#value ⇒ Object
Returns the value of attribute value.
Attributes inherited from Core
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Checkbox
constructor
A new instance of Checkbox.
- #toggle ⇒ Object
Methods inherited from Core
#hidden?, #hide, #remove, #show
Methods included from Helpers
#icon_map, #list_system_icons, #set_margin_from_opts_for
Constructor Details
#initialize(options = {}) ⇒ Checkbox
Returns a new instance of Checkbox.
7 8 9 10 11 12 13 14 15 16 |
# File 'lib/mittens_ui/checkbox.rb', line 7 def initialize(={}) label = [:label] || "Checkbox" @value = nil @checkbox = Gtk::CheckButton.new(label) $vertical_box.pack_start(@checkbox) super(@checkbox, ) end |
Instance Attribute Details
#value ⇒ Object
Returns the value of attribute value.
5 6 7 |
# File 'lib/mittens_ui/checkbox.rb', line 5 def value @value end |
Instance Method Details
#toggle ⇒ Object
18 19 20 21 22 |
# File 'lib/mittens_ui/checkbox.rb', line 18 def toggle @checkbox.signal_connect "toggled" do yield end end |