Class: Window
- Inherits:
-
Gtk::Window
- Object
- Gtk::Window
- Window
- Includes:
- Singleton
- Defined in:
- lib/gui/window.rb
Instance Attribute Summary collapse
-
#panel ⇒ Object
readonly
Returns the value of attribute panel.
Instance Method Summary collapse
-
#initialize(title = "Pomo-ruby") ⇒ Window
constructor
A new instance of Window.
- #pop_up ⇒ Object
- #show_warning_dialog(message) ⇒ Object
Constructor Details
#initialize(title = "Pomo-ruby") ⇒ Window
Returns a new instance of Window.
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/gui/window.rb', line 7 def initialize title = "Pomo-ruby" super @panel = Panel.new self.add panel self.show_all self.title = title self.allow_grow = false self.window_position = Gtk::Window::POS_CENTER_ALWAYS icon_path = File.dirname(__FILE__)+"/../images/tomato.png" self.icon = Gdk::Pixbuf.new icon_path add_close_event end |
Instance Attribute Details
#panel ⇒ Object (readonly)
Returns the value of attribute panel.
5 6 7 |
# File 'lib/gui/window.rb', line 5 def panel @panel end |
Instance Method Details
#pop_up ⇒ Object
25 26 27 28 |
# File 'lib/gui/window.rb', line 25 def pop_up self.keep_above = true self.keep_above = false end |
#show_warning_dialog(message) ⇒ Object
30 31 32 33 34 |
# File 'lib/gui/window.rb', line 30 def show_warning_dialog dialog = create_warning_dialog dialog.run dialog.destroy end |