Class: JLDrill::Gtk::QuizStatusBar
- Inherits:
-
Gtk::Statusbar
- Object
- Gtk::Statusbar
- JLDrill::Gtk::QuizStatusBar
- Includes:
- Context::Gtk::Widget
- Defined in:
- lib/jldrill/views/gtk/widgets/QuizStatusBar.rb
Instance Attribute Summary collapse
-
#text ⇒ Object
readonly
Returns the value of attribute text.
Attributes included from Context::Gtk::Widget
Instance Method Summary collapse
-
#initialize(view) ⇒ QuizStatusBar
constructor
A new instance of QuizStatusBar.
- #update(string) ⇒ Object
Methods included from Context::Gtk::Widget
#addToThisWidget, #afterWidgetIsAdded, #afterWidgetIsRemoved, #expandWidgetHeight, #expandWidgetHeight?, #expandWidgetWidth, #expandWidgetWidth?, #gtkAddWidget, #gtkRemoveWidget, #isAMainWindow, #isInTests?, #removeFromThisWidget, #setupWidget, #widgetWasAddedTo, #widgetWasRemovedFrom
Constructor Details
#initialize(view) ⇒ QuizStatusBar
Returns a new instance of QuizStatusBar.
11 12 13 14 15 16 |
# File 'lib/jldrill/views/gtk/widgets/QuizStatusBar.rb', line 11 def initialize(view) super() @view = view @text = "" @id = get_context_id("Update quiz status") end |
Instance Attribute Details
#text ⇒ Object (readonly)
Returns the value of attribute text.
9 10 11 |
# File 'lib/jldrill/views/gtk/widgets/QuizStatusBar.rb', line 9 def text @text end |
Instance Method Details
#update(string) ⇒ Object
18 19 20 21 22 |
# File 'lib/jldrill/views/gtk/widgets/QuizStatusBar.rb', line 18 def update(string) @text = string pop(@id) push(@id, string) end |