Class: JLDrill::Gtk::ProgressBar
- Inherits:
-
Gtk::HBox
- Object
- Gtk::HBox
- JLDrill::Gtk::ProgressBar
- Includes:
- Context::Gtk::Widget
- Defined in:
- lib/jldrill/views/gtk/widgets/ProgressBar.rb
Instance Attribute Summary collapse
-
#progress ⇒ Object
readonly
Returns the value of attribute progress.
Attributes included from Context::Gtk::Widget
Instance Method Summary collapse
-
#initialize(view) ⇒ ProgressBar
constructor
A new instance of ProgressBar.
- #update(fraction) ⇒ 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) ⇒ ProgressBar
Returns a new instance of ProgressBar.
11 12 13 14 15 16 17 18 |
# File 'lib/jldrill/views/gtk/widgets/ProgressBar.rb', line 11 def initialize(view) super @view = view @progress = Gtk::ProgressBar.new self.add(Gtk::Label.new("Loading " + @view.filename + ":")) self.add(@progress) end |
Instance Attribute Details
#progress ⇒ Object (readonly)
Returns the value of attribute progress.
9 10 11 |
# File 'lib/jldrill/views/gtk/widgets/ProgressBar.rb', line 9 def progress @progress end |
Instance Method Details
#update(fraction) ⇒ Object
20 21 22 |
# File 'lib/jldrill/views/gtk/widgets/ProgressBar.rb', line 20 def update(fraction) @progress.fraction = fraction end |