
functions
files
intro
|
|
yast2 |
modules/Progress.ycp |
Progress bar |
|
|
Functions for progress bar.
Example of progress bar usage (note that I can not use underscore (not to confuse gettext here...):
Progress bar supposes main wizard dialog is created.
Progress::Simple ("Some progress bar", "Progress runs here...", 5, "");
Progress::NextStep ();
Progress::NextStep ();
Progress::NextStep ();
Progress::NextStep ();
Another example:
Progress::New ("Complex progress bar", " ", 100, [
"Stage1", "Stage2", "Stage3",
], [
"Stage 1 ...", "Stage 2 ...", "Stage 3 ...", "Finished",
], "Help text");
Progress::NextStage ();
Progress::NextStageStep (20);
Progress::Stage (0, "I am back", 2);
Progress::Title ("Still in stage 0");
Progress::NextStageStep (90);
Progress::Finish ();
See also hand made documentation.
Progress.html
Imports
Global Functions
- CloseSuperior ()
- Finish ()
- New (string window_title, string progress_title, integer length, list<string> stg, list tits, string help_text)
- NextStage ()
- NextStageStep (integer st)
- NextStep ()
- OpenSuperior (string title, list<string> stages)
- Simple (string window_title, string progress_title, integer length, string help_text)
- Stage (integer st, string title, integer step)
- Step (integer st)
- StepSuperior ()
- Title (string t)
- off ()
- on ()
|
|
|
Turns progress bar off. All Progress:: calls return immediatelly.
Turns progress bar on after calling Progress::off.
global Simple (string window_title, string progress_title, integer length, string help_text) -> void
|
|
Create simple progress bar with no stages, only with progress bar.
- Parameters:
window_title |
Title of the window. |
progress_title |
Title of the progress bar. |
length |
Number of steps. |
help_text |
Help text. |
global New (string window_title, string progress_title, integer length, list<string> stg, list tits, string help_text) -> void
|
|
New complex progress bar with stages.
- Parameters:
window_title |
title of the window |
progress_title |
title of the progress bar. Pass at least " "
(one space) if you want some progress bar title. |
length |
number of steps. If 0, no progress bar is created,
there are only stages and bottom title. THIS IS NOT
NUMBER OF STAGES! |
stg |
list of strings - stage names. If it is nil, then there
are no stages. |
tits |
Titles corresponding to stages. When stage changes,
progress bar title changes to one of these titles. May
be nil/empty. |
help_text |
help text |
global NextStep () -> void
|
|
Some people say it is the best operating system ever. But now to the
function. Advances progress bar value by 1.
global NextStage () -> void
|
|
Advance stage, advance step by 1 and set progress bar caption to
that defined in New.
global Step (integer st) -> void
|
|
Changes progress bar value to st.
- Parameters:
global Stage (integer st, string title, integer step) -> void
|
|
Go to stage st, change progress bar title to title and set progress
bar step to step.
- Parameters:
st |
New stage. |
title |
New title for progress bar. If nil, title specified in
New is used. |
step |
New step or -1 if step should not change. |
global NextStageStep (integer st) -> void
|
|
Jumps to the next stage and sets step to st.
- Parameters:
st |
new progress bar value |
global Title (string t) -> void
|
|
Change progress bar title.
- Parameters:
t |
new title. Use ""(empty string) if you want an empty progress bar. |
Moves progress bar to the end and marks all stages as completed.
global OpenSuperior (string title, list<string> stages) -> void
|
|
Creates a higher-level progress bar made of stages. Currently it is
placed instead of help text.
- Parameters:
title |
title of the progress... |
stages |
list of stage descriptions |
global CloseSuperior () -> void
|
|
Replaces stages of superior progress by an empty help text.
global StepSuperior () -> void
|
|
Make one step in a superior progress bar.
|