Class: JLDrill::FileProgressContext::FileProgress
- Inherits:
-
Context::View
- Object
- Context::View
- JLDrill::FileProgressContext::FileProgress
- Defined in:
- lib/jldrill/contexts/FileProgressContext.rb
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from Context::View
Instance Method Summary collapse
-
#idle_add(&block) ⇒ Object
File loading is done during the idle times in the UI.
-
#initialize(context) ⇒ FileProgress
constructor
A new instance of FileProgress.
-
#update(fraction) ⇒ Object
Update the progress display to the fraction.
Methods inherited from Context::View
#addView, #getWidget, #removeView, #removingViewFrom, #viewAddedTo
Constructor Details
#initialize(context) ⇒ FileProgress
Returns a new instance of FileProgress.
9 10 11 |
# File 'lib/jldrill/contexts/FileProgressContext.rb', line 9 def initialize(context) super(context) end |
Instance Method Details
#idle_add(&block) ⇒ Object
File loading is done during the idle times in the UI. This method must add a block to the idle loop in the UI. The block will return true when the file is finished loading. At that time the concrete class should call exit on the context.
23 24 25 |
# File 'lib/jldrill/contexts/FileProgressContext.rb', line 23 def idle_add(&block) # Define in the concrete class end |
#update(fraction) ⇒ Object
Update the progress display to the fraction
14 15 16 |
# File 'lib/jldrill/contexts/FileProgressContext.rb', line 14 def update(fraction) # Define in the concrete class end |