A superclass for numeric widgets
PtWidget --> PtBasic --> PtContainer --> PtCompound --> PtNumeric
For more information, see the diagram of the widget hierarchy.
None - not normally instantiated.
<photon/PtNumeric.h>
PtNumeric is a parent class for all numeric widgets. It creates a PtText widget and a PtUpDown widget to allow the user to interact with the widget. It also creates some of the base functionality of numeric widgets.
Resource | C type | Pt type | Default |
---|---|---|---|
Pt_ARG_NUMERIC_FLAGS | long | Flag | See below |
Pt_ARG_NUMERIC_PREFIX | char * | String | NULL |
Pt_ARG_NUMERIC_SPACING | int | Scalar | 1 |
Pt_ARG_NUMERIC_SUFFIX | char * | String | NULL |
Pt_ARG_NUMERIC_TEXT_BORDER | int | Scalar | 2 |
Pt_ARG_NUMERIC_TEXT_BOT_BORDER_COLOR | PgColor_t | Scalar | Pg_DGREY |
Pt_ARG_NUMERIC_TEXT_COLOR | PgColor_t | Scalar | Pg_BLACK |
Pt_ARG_NUMERIC_TEXT_FILL_COLOR | PgColor_t | Scalar | Pg_GREY |
Pt_ARG_NUMERIC_TEXT_FONT | char * | String | "helv12" |
Pt_ARG_NUMERIC_TEXT_TOP_BORDER_COLOR | PgColor_t | Scalar | Pg_WHITE |
Pt_ARG_NUMERIC_UPDOWN_BORDER_WIDTH | int | Scalar | 2 |
Pt_ARG_NUMERIC_UPDOWN_WIDTH | int | Scalar | 17 |
C type | Pt type | Default |
---|---|---|
long | Flag | Pt_NUMERIC_ENABLE_UPDOWN | Pt_NUMERIC_WRAP | Pt_NUMERIC_AUTO_HIGHLIGHT |
Flags that control the widget's appearance and behavior:
C type | Pt type | Default |
---|---|---|
char * | String | NULL |
A prefix string to be added to all entered values.
C type | Pt type | Default |
---|---|---|
int | Scalar | 1 |
The spacing, in pixels, between the text field and the up/down buttons.
C type | Pt type | Default |
---|---|---|
char * | String | NULL |
A suffix string to be added to all entered values.
C type | Pt type | Default |
---|---|---|
int | Scalar | 2 |
The border width of the PtText widget.
C type | Pt type | Default |
---|---|---|
PgColor_t | Scalar | Pg_DGREY |
The bottom border color of the PtText widget.
C type | Pt type | Default |
---|---|---|
PgColor_t | Scalar | Pg_BLACK |
The color of the entered text.
C type | Pt type | Default |
---|---|---|
PgColor_t | Scalar | Pg_GREY |
The fill color of the PtText widget.
C type | Pt type | Default |
---|---|---|
char * | String | "helv12" |
The font of the entered text.
C type | Pt type | Default |
---|---|---|
PgColor_t | Scalar | Pg_WHITE |
The top border color of the PtText widget.
C type | Pt type | Default |
---|---|---|
int | Scalar | 2 |
The width, in pixels, of the borders of the up/down buttons.
C type | Pt type | Default |
---|---|---|
int | Scalar | 17 |
The width, in pixels, of the PtUpDown widget.
Unless the resources are already defined in PtNumeric, the PtNumeric class uses the resources of its exported subordinate child, PtUpDown.
The PtNumeric class "inherits" all the resources of its exported subordinate child. Where PtNumeric and its exported subordinate child both define resources having the same name, the resource defined in PtNumeric takes precedence.
If the widget modifies an inherited resource, the "Default override" column indicates the new value. This modification affects any subclasses of the widget.