Class: JLDrill::Gtk::ItemHintView
- Inherits:
-
DisplayProblemContext::ProblemView::ItemHintView
- Object
- Context::View
- DisplayProblemContext::ProblemView::ItemHintView
- JLDrill::Gtk::ItemHintView
- Defined in:
- lib/jldrill/views/gtk/ItemHintView.rb
Instance Attribute Summary collapse
-
#hintBox ⇒ Object
readonly
Returns the value of attribute hintBox.
Attributes inherited from Context::View
Instance Method Summary collapse
- #getWidget ⇒ Object
-
#initialize(context) ⇒ ItemHintView
constructor
A new instance of ItemHintView.
- #mainWindow ⇒ Object
- #newProblem(problem) ⇒ Object
-
#update(problem) ⇒ Object
Update the indicators.
- #updateProblem(problem) ⇒ Object
Methods inherited from DisplayProblemContext::ProblemView::ItemHintView
Methods inherited from Context::View
#addView, #removeView, #removingViewFrom, #viewAddedTo
Constructor Details
#initialize(context) ⇒ ItemHintView
Returns a new instance of ItemHintView.
12 13 14 15 |
# File 'lib/jldrill/views/gtk/ItemHintView.rb', line 12 def initialize(context) super(context) @hintBox = VocabularyHintBox.new end |
Instance Attribute Details
#hintBox ⇒ Object (readonly)
Returns the value of attribute hintBox.
10 11 12 |
# File 'lib/jldrill/views/gtk/ItemHintView.rb', line 10 def hintBox @hintBox end |
Instance Method Details
#getWidget ⇒ Object
17 18 19 |
# File 'lib/jldrill/views/gtk/ItemHintView.rb', line 17 def getWidget @hintBox end |
#mainWindow ⇒ Object
21 22 23 |
# File 'lib/jldrill/views/gtk/ItemHintView.rb', line 21 def mainWindow getWidget.gtkWidgetMainWindow end |
#newProblem(problem) ⇒ Object
34 35 36 37 |
# File 'lib/jldrill/views/gtk/ItemHintView.rb', line 34 def newProblem(problem) super(problem) update(problem) end |
#update(problem) ⇒ Object
Update the indicators
26 27 28 29 30 31 32 |
# File 'lib/jldrill/views/gtk/ItemHintView.rb', line 26 def update(problem) if !problem.nil? && !problem.item.nil? hintBox.set(problem.item.to_o, @context.differs?(problem)) else hintBox.clear end end |
#updateProblem(problem) ⇒ Object
39 40 41 42 |
# File 'lib/jldrill/views/gtk/ItemHintView.rb', line 39 def updateProblem(problem) super(problem) update(problem) end |