Class: JLDrill::Gtk::QuizStatusBar

Inherits:
Gtk::Statusbar
  • Object
show all
Includes:
Context::Gtk::Widget
Defined in:
lib/jldrill/views/gtk/widgets/QuizStatusBar.rb

Instance Attribute Summary collapse

Attributes included from Context::Gtk::Widget

#gtkWidgetMainWindow

Instance Method Summary collapse

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

#textObject (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