|
Geogram Version 1.9.7
A programming library of geometric algorithms
|
StatusBar displays the progress bar. More...
#include <geogram_gfx/gui/status_bar.h>
Public Member Functions | |
| StatusBar () | |
| StatusBar constructor. | |
| void | begin () override |
| Starts listening progress. | |
| void | progress (GEO::index_t step, GEO::index_t percent) override |
| Tracks progress. | |
| void | end (bool canceled) override |
| Stops listening progress. | |
| void | draw () |
| Draws the status bar and handles the GUI. | |
| bool | active () const |
| Tests whether this status bar should be displayed. | |
| virtual void | update () |
| Redraws the GUI. | |
| float | get_window_height () const |
| Gets the height of the status bar window. | |
Public Member Functions inherited from GEO::Counted | |
| void | ref () const |
| Increments the reference count. | |
| void | unref () const |
| Decrements the reference count. | |
| bool | is_shared () const |
| Check if the object is shared. | |
| int | nb_refs () const |
| Gets the number of references that point to this object. | |
Additional Inherited Members | |
Static Public Member Functions inherited from GEO::Counted | |
| static void | ref (const Counted *counted) |
| Increments the reference count. | |
| static void | unref (const Counted *counted) |
| Decrements the reference count. | |
Protected Member Functions inherited from GEO::ProgressClient | |
| ~ProgressClient () override | |
Protected Member Functions inherited from GEO::Counted | |
| Counted () | |
| Creates a reference counted object. | |
| virtual | ~Counted () |
| Destroys a reference counted object. | |
StatusBar displays the progress bar.
Definition at line 56 of file status_bar.h.
|
inline |
Tests whether this status bar should be displayed.
The status bar is displayed whenever there is an active progress bar.
Definition at line 89 of file status_bar.h.
|
overridevirtual |
Starts listening progress.
This function is called by the ProgressTask to start tracking the execution of a new task. Clients are free to do whatever is appropriate (show a progress bar, a progress dialog, ...)
Implements GEO::ProgressClient.
|
overridevirtual |
Stops listening progress.
This function is called by the ProgressTask to stop tracking the execution of the task. Clients are free to do whatever is appropriate (hide a progress bar, a progress dialog, log the elapsed time, ...). If the task was not terminated normally (i.e., canceled() then parameter canceled is set to true.
| [in] | canceled | set to true if the task was canceled, false otherwise. |
Implements GEO::ProgressClient.
|
inline |
Gets the height of the status bar window.
Needs to have drawn the window at least once, else it returns 0.
Definition at line 104 of file status_bar.h.
|
overridevirtual |
Tracks progress.
This function is called by the ProgressTask repeatedly during the execution of the task. Clients are free to do whatever is appropriate (update a progress bar, log the current values, ...).
| [in] | step | the current progress step |
| [in] | percent | the percentage of completion of the task |
Implements GEO::ProgressClient.