Class: Panel
- Inherits:
-
Gtk::VBox
- Object
- Gtk::VBox
- Panel
- Defined in:
- lib/gui/panel.rb
Instance Attribute Summary collapse
-
#button_start ⇒ Object
readonly
Returns the value of attribute button_start.
-
#hb_start ⇒ Object
readonly
Returns the value of attribute hb_start.
-
#progress_bar ⇒ Object
readonly
Returns the value of attribute progress_bar.
-
#tf_break ⇒ Object
readonly
Returns the value of attribute tf_break.
-
#tf_cycles ⇒ Object
readonly
Returns the value of attribute tf_cycles.
-
#tf_pause ⇒ Object
readonly
Returns the value of attribute tf_pause.
-
#tf_pomodoro ⇒ Object
readonly
Returns the value of attribute tf_pomodoro.
Instance Method Summary collapse
-
#initialize ⇒ Panel
constructor
A new instance of Panel.
Constructor Details
#initialize ⇒ Panel
Returns a new instance of Panel.
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/gui/panel.rb', line 6 def initialize super true, 2 @tf_pomodoro = TextField.new "Pomodoro time: ", "25" @tf_pause = TextField.new "Pause time: ", "5" @tf_break = TextField.new "Break time: ", "30" @tf_cycles = TextField.new "How many pomodoros until break? ", "2" @hb_buttons = Gtk::HBox.new true, 10 @button_start = ButtonStart.new "Start!" @button_cancel = ButtonCancel.new "Cancel" @progress_bar = ProgressBar.new @hb_buttons.add @button_start @hb_buttons.add @button_cancel self.add @tf_pomodoro self.add @tf_pause self.add @tf_break self.add @tf_cycles self.add @hb_buttons self.add @progress_bar end |
Instance Attribute Details
#button_start ⇒ Object (readonly)
Returns the value of attribute button_start.
3 4 5 |
# File 'lib/gui/panel.rb', line 3 def @button_start end |
#hb_start ⇒ Object (readonly)
Returns the value of attribute hb_start.
3 4 5 |
# File 'lib/gui/panel.rb', line 3 def hb_start @hb_start end |
#progress_bar ⇒ Object (readonly)
Returns the value of attribute progress_bar.
3 4 5 |
# File 'lib/gui/panel.rb', line 3 def @progress_bar end |
#tf_break ⇒ Object (readonly)
Returns the value of attribute tf_break.
3 4 5 |
# File 'lib/gui/panel.rb', line 3 def tf_break @tf_break end |
#tf_cycles ⇒ Object (readonly)
Returns the value of attribute tf_cycles.
3 4 5 |
# File 'lib/gui/panel.rb', line 3 def tf_cycles @tf_cycles end |
#tf_pause ⇒ Object (readonly)
Returns the value of attribute tf_pause.
3 4 5 |
# File 'lib/gui/panel.rb', line 3 def tf_pause @tf_pause end |
#tf_pomodoro ⇒ Object (readonly)
Returns the value of attribute tf_pomodoro.
3 4 5 |
# File 'lib/gui/panel.rb', line 3 def tf_pomodoro @tf_pomodoro end |