PtNumeric
![]() |
![]() |
![]() |
![]() |
PtNumeric
A superclass for numeric widgets
Class hierarchy:
PtWidget --> PtBasic --> PtContainer --> PtCompound --> PtNumeric
Immediate subclasses:
For more information, see the diagram of the widget hierarchy.
PhAB icon:
None -- not normally instantiated.
Public header:
<photon/PtNumeric.h>
Description:
PtNumeric is a parent class for all numeric widgets. It creates a PtText widget and arrows to let you interact with the widget. It also creates some of the base functionality of numeric widgets.
New resources:
| Resource | C type | Pt type | Default |
|---|---|---|---|
| Pt_ARG_NUMERIC_FLAGS | unsigned short | Flag | See below |
| Pt_ARG_NUMERIC_PREFIX | char * | String | NULL |
| Pt_ARG_NUMERIC_SPACING | unsigned short | Scalar | 1 |
| Pt_ARG_NUMERIC_SUFFIX | char * | String | NULL |
| Pt_ARG_NUMERIC_UPDOWN_WIDTH | unsigned short | Scalar | 17 |
Pt_ARG_NUMERIC_FLAGS
| C type | Pt type | Default |
|---|---|---|
| unsigned short | Flag | Pt_NUMERIC_ENABLE_UPDOWN | Pt_NUMERIC_WRAP | Pt_NUMERIC_AUTO_HIGHLIGHT |
Flags that control the widget's appearance and behavior; any combination of:
- Pt_NUMERIC_AUTO_HIGHLIGHT
- Autohighlight text when selected.
- Pt_NUMERIC_ENABLE_UPDOWN
- Display the up/down buttons.
- Pt_NUMERIC_HEXADECIMAL
- Display the value as a hexadecimal number (applies only to PtNumericInteger).
- Pt_NUMERIC_USE_SEPARATORS
- Insert comma separators in values (e.g. 1,000).
- Pt_NUMERIC_WRAP
- Wrap numbers from minimum to maximum and from maximum to minimum.
Pt_ARG_NUMERIC_PREFIX
| C type | Pt type | Default |
|---|---|---|
| char * | String | NULL |
A prefix string to be added to all entered values.
Pt_ARG_NUMERIC_SPACING
| C type | Pt type | Default |
|---|---|---|
| unsigned short | Scalar | 1 |
The spacing, in pixels, between the text field and the up/down buttons.
Pt_ARG_NUMERIC_SUFFIX
| C type | Pt type | Default |
|---|---|---|
| char * | String | NULL |
A suffix string to be added to all entered values.
Pt_ARG_NUMERIC_UPDOWN_WIDTH
| C type | Pt type | Default |
|---|---|---|
| unsigned short | Scalar | 17 |
The width, in pixels, of the PtScrollbar widget.
Exported subordinate children:
Unless the resources are already defined in PtNumeric, the PtNumeric class uses the resources of its exported subordinate child, PtScrollbar.
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.
Inherited resources:
If the widget modifies an inherited resource, the "Default override" column indicates the new value. This modification affects any subclasses of the widget.
![]() |
![]() |
![]() |
![]() |
![[Previous]](prev.gif)
![[Contents]](contents.gif)
![[Index]](keyword_index.gif)
![[Next]](next.gif)