A progress bar
PtWidget → PtBasic → PtGauge → PtProgress
For more information, see the diagram of the widget hierarchy.
<photon/PtProgress.h>
The PtProgress widget draws a progress bar and (optionally) the corresponding value.
The bar can be either a single bar, growing continuously as the value is changed, or it can consist of a number of divisions of equal size.
The following bits of the Pt_ARG_GAUGE_FLAGS resource defined by PtGauge are of particular interest to PtProgress:
Resource | C type | Pt type | Default |
---|---|---|---|
Pt_ARG_PROGRESS_BAR_COLOR | PgColor_t | Scalar | Pg_RED |
Pt_ARG_PROGRESS_DIVISIONS | unsigned short | Scalar | 1 |
Pt_ARG_PROGRESS_GAP | unsigned short | Scalar | 4 |
Pt_ARG_PROGRESS_SPACING | unsigned short | Scalar | 0 |
C type | Pt type | Default |
---|---|---|
PgColor_t | Scalar | Pg_RED |
The color of the progress bar. See PgColor_t in the Photon Library Reference.
C type | Pt type | Default |
---|---|---|
unsigned short | Scalar | 1 |
The number of divisions (1 means continuous).
PtProgress doesn't use this resource, but any subclasses can.
C type | Pt type | Default |
---|---|---|
unsigned short | Scalar | 4 |
The gap (in pixels) between the progress bar and the text (if the text isn't on top of the bar).
PtProgress doesn't use this resource, but any subclasses can.
C type | Pt type | Default |
---|---|---|
unsigned short | Scalar | 0 |
The spacing (in pixels) between divisions (see Pt_ARG_PROGRESS_DIVISIONS).
If the widget modifies an inherited resource, the “Default override” column indicates the new value. This modification affects any subclasses of the widget.
PtProgress defines the following convenience functions:
These functions are useful only if you create subclasses of PtProgress. |