Class: Gtk2CheckBoxes::YesNo
- Inherits:
-
Such::Dialog
- Object
- Such::Dialog
- Gtk2CheckBoxes::YesNo
- Defined in:
- lib/gtk2checkboxes/gtk2checkboxes.rb
Instance Method Summary collapse
-
#initialize(key) ⇒ YesNo
constructor
A new instance of YesNo.
- #label(key) ⇒ Object
- #yes? ⇒ Boolean
Constructor Details
#initialize(key) ⇒ YesNo
Returns a new instance of YesNo.
3 4 5 6 7 |
# File 'lib/gtk2checkboxes/gtk2checkboxes.rb', line 3 def initialize(key) super(key) Gtk::Stock::NO, Gtk::ResponseType::CANCEL Gtk::Stock::YES, Gtk::ResponseType::OK end |
Instance Method Details
#label(key) ⇒ Object
9 10 11 |
# File 'lib/gtk2checkboxes/gtk2checkboxes.rb', line 9 def label(key) Such::Label.new child, key end |
#yes? ⇒ Boolean
13 14 15 16 17 18 |
# File 'lib/gtk2checkboxes/gtk2checkboxes.rb', line 13 def yes? show_all response = run destroy response == Gtk::ResponseType::OK end |