Class: Gtk2CheckBoxes::EntryDialog
- Inherits:
-
Such::Dialog
- Object
- Such::Dialog
- Gtk2CheckBoxes::EntryDialog
- Defined in:
- lib/gtk2checkboxes/gtk2checkboxes.rb
Instance Method Summary collapse
- #entry(key) ⇒ Object
-
#initialize(key) ⇒ EntryDialog
constructor
A new instance of EntryDialog.
- #text ⇒ Object
Constructor Details
#initialize(key) ⇒ EntryDialog
Returns a new instance of EntryDialog.
22 23 24 25 26 |
# File 'lib/gtk2checkboxes/gtk2checkboxes.rb', line 22 def initialize(key) super(key) Gtk::Stock::CANCEL, Gtk::ResponseType::CANCEL @ok = Gtk::Stock::OK, Gtk::ResponseType::OK end |
Instance Method Details
#entry(key) ⇒ Object
28 29 30 |
# File 'lib/gtk2checkboxes/gtk2checkboxes.rb', line 28 def entry(key) @entry = Such::Entry.new(child, key){@ok.clicked} end |
#text ⇒ Object
32 33 34 35 36 37 |
# File 'lib/gtk2checkboxes/gtk2checkboxes.rb', line 32 def text show_all text = (run == Gtk::ResponseType::OK)? @entry.text : nil destroy text end |