Common resources for gauge-type widgets
Immediate subclasses:
For more information, see the diagram of the widget hierarchy.
None — not normally instantiated.
<photon/PtGauge.h>
The PtGauge superclass provides common resources for gauge-like widgets, which are capable of displaying a range of values.
Resource | C type | Pt type | Default |
---|---|---|---|
Pt_ARG_GAUGE_FLAGS | short int | Flag | 0 |
Pt_ARG_GAUGE_FONT | char * | String | "TextFont09" |
Pt_ARG_GAUGE_H_ALIGN | unsigned char | Scalar | Pt_CENTER |
Pt_ARG_GAUGE_V_ALIGN | unsigned char | Scalar | Pt_CENTER |
Pt_ARG_GAUGE_VALUE | long | Scalar | 0 |
Pt_ARG_GAUGE_VALUE_PREFIX | char * | String | NULL |
Pt_ARG_GAUGE_VALUE_SUFFIX | char * | String | NULL |
Pt_ARG_MAXIMUM | long | Scalar | 100 |
Pt_ARG_MINIMUM | long | Scalar | 0 |
Pt_ARG_ORIENTATION | char | Boolean | Pt_HORIZONTAL |
Pt_CB_GAUGE_VALUE_CHANGED | PtCallback_t * | Link | NULL |
C type | Pt type | Default |
---|---|---|
short int | Flag | 0 |
Flags that affect the appearance and behavior of the gauge. Possible values:
Any subclass of PtGauge may observe this bit, but the only widget that currently does is PtProgress.
Any subclass of PtGauge may observe this bit, but the only widget that currently does is PtProgress.
Any subclass of PtGauge may observe this bit, but the only widget that currently does is PtProgress.
The default setting for this resource is 0; that is, no flags have been set.
C type | Pt type | Default |
---|---|---|
char * | String | "TextFont09" |
The font used for displaying the value, title, and any other text.
C type | Pt type | Default |
---|---|---|
unsigned char | Scalar | Pt_CENTER |
Controls horizontal alignment. Possible values are:
C type | Pt type | Default |
---|---|---|
unsigned char | Scalar | Pt_CENTER |
Controls vertical alignment. Possible values are:
C type | Pt type | Default |
---|---|---|
long | Scalar | 0 |
The gauge's current value.
C type | Pt type | Default |
---|---|---|
char * | String | NULL |
Text prefixed to the value displayed. For example, a value of Red: results in Red:35.
C type | Pt type | Default |
---|---|---|
char * | String | NULL |
Text appended to the value displayed. For example, a value of % results in 35%.
C type | Pt type | Default |
---|---|---|
long | Scalar | 100 |
The maximum value of the gauge.
C type | Pt type | Default |
---|---|---|
long | Scalar | 0 |
The minimum value of the gauge.
C type | Pt type | Default |
---|---|---|
char | Boolean | Pt_HORIZONTAL |
The orientation of the gauge; one of:
C type | Pt type | Default |
---|---|---|
PtCallback_t * | Link | NULL |
A list of PtCallback_t structures that define the callbacks that are invoked when the user changes the value of an interactive gauge (i.e. one that has the Pt_GAUGE_INTERACTIVE bit set in its Pt_ARG_GAUGE_FLAGS).
If the widget has the Pt_CALLBACKS_ACTIVE bit set in its Pt_ARG_FLAGS resource, these callbacks are also invoked when your application changes the value by calling PtSetResource() or PtSetResources().
Each callback is passed a PtCallbackInfo_t structure that contains at least the following members:
These callbacks should return Pt_CONTINUE.
If the widget modifies an inherited resource, the “Default override” column indicates the new value. This modification affects any subclasses of the widget.