Class: CWM::DynamicProgressBar
- Inherits:
-
ProgressBar
- Object
- AbstractWidget
- CustomWidget
- ProgressBar
- CWM::DynamicProgressBar
- Defined in:
- library/cwm/src/lib/cwm/dynamic_progress_bar.rb
Overview
Widget for a dynamic progress bar, where the label can be set for every step.
This progress bar is useful when steps are not known in advance or part of them are dynamically generated.
Instance Attribute Summary
Attributes inherited from AbstractWidget
#handle_all_events, #widget_id
Instance Method Summary collapse
-
#forward(step = nil) ⇒ Object
Moves the progress forward and sets the given step as label.
-
#label ⇒ String
Label for the progress bar when no step is given, see #forward.
-
#steps_count ⇒ Integer
Number of steps.
Methods inherited from ProgressBar
Methods inherited from CustomWidget
#contents, #cwm_contents, #cwm_definition, #find_ids, #ids_in_contents
Methods inherited from AbstractWidget
#cleanup, #cwm_definition, #disable, #displayed?, #enable, #enabled?, #focus, #fun_ref, #handle, #help, #init, #my_event?, #opt, #refresh_help, #store, #validate, widget_type=
Constructor Details
This class inherits a constructor from CWM::ProgressBar
Instance Method Details
#forward(step = nil) ⇒ Object
Moves the progress forward and sets the given step as label
50 51 52 53 54 |
# File 'library/cwm/src/lib/cwm/dynamic_progress_bar.rb', line 50 def forward(step = nil) next_step(step) if step super() end |
#label ⇒ String
Label for the progress bar when no step is given, see #forward.
61 |
# File 'library/cwm/src/lib/cwm/dynamic_progress_bar.rb', line 61 abstract_method :label |
#steps_count ⇒ Integer
Number of steps
68 |
# File 'library/cwm/src/lib/cwm/dynamic_progress_bar.rb', line 68 abstract_method :steps_count |