[Previous] [Contents] [Index] [Next]

PtNumeric

A superclass for numeric widgets

Class hierarchy:

PtWidget --> PtBasic --> PtContainer --> PtCompound --> PtNumeric

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 a PtUpDown widget to allow the user to 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 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

Pt_ARG_NUMERIC_FLAGS

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:

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
int 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_TEXT_BORDER

C type Pt type Default
int Scalar 2

The border width of the PtText widget.

Pt_ARG_NUMERIC_TEXT_BOT_BORDER_COLOR

C type Pt type Default
PgColor_t Scalar Pg_DGREY

The bottom border color of the PtText widget.

Pt_ARG_NUMERIC_TEXT_COLOR

C type Pt type Default
PgColor_t Scalar Pg_BLACK

The color of the entered text.

Pt_ARG_NUMERIC_TEXT_FILL_COLOR

C type Pt type Default
PgColor_t Scalar Pg_GREY

The fill color of the PtText widget.

Pt_ARG_NUMERIC_TEXT_FONT

C type Pt type Default
char * String "helv12"

The font of the entered text.

Pt_ARG_NUMERIC_TEXT_TOP_BORDER_COLOR

C type Pt type Default
PgColor_t Scalar Pg_WHITE

The top border color of the PtText widget.

Pt_ARG_NUMERIC_UPDOWN_BORDER_WIDTH

C type Pt type Default
int Scalar 2

The width, in pixels, of the borders of the up/down buttons.

Pt_ARG_NUMERIC_UPDOWN_WIDTH

C type Pt type Default
int Scalar 17

The width, in pixels, of the PtUpDown widget.

Exported subordinate children:

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.

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.

Resource Inherited from Default override
Pt_ARG_ANCHOR_FLAGS PtContainer Not used by this class.
Pt_ARG_ANCHOR_OFFSETS PtContainer Not used by this class.
Pt_ARG_AREA PtWidget
Pt_ARG_ARM_COLOR PtButton
Pt_ARG_ARM_DATA PtButton
Pt_ARG_ARM_FILL PtButton Pg_GRAY
Pt_ARG_BANDWIDTH_THRESHOLD PtBasic Not used by this class.
Pt_ARG_BITMAP_CURSOR PtWidget
Pt_ARG_BORDER_WIDTH PtWidget 0
Pt_ARG_BOT_BORDER_COLOR PtBasic
Pt_ARG_COLOR PtBasic
Pt_ARG_CONTAINER_FLAGS PtContainer Not used by this class.
Pt_ARG_CURSOR_COLOR PtWidget
Pt_ARG_CURSOR_TYPE PtWidget
Pt_ARG_DATA PtWidget
Pt_ARG_DIM PtWidget
Pt_ARG_EFLAGS PtWidget Pt_CONSUME_EVENTS
Pt_ARG_FILL_COLOR PtBasic Pg_TRANSPARENT
Pt_ARG_FILL_PATTERN PtBasic
Pt_ARG_FLAGS PtWidget 0
Pt_ARG_HELP_TOPIC PtWidget
Pt_ARG_HIGHLIGHT_ROUNDNESS PtBasic
Pt_ARG_MARGIN_HEIGHT PtBasic 0
Pt_ARG_MARGIN_WIDTH PtBasic 0
Pt_ARG_POS PtWidget
Pt_ARG_RESIZE_FLAGS PtWidget Pt_RESIZE_XY_AS_REQUIRED
Pt_ARG_TOP_BORDER_COLOR PtBasic
Pt_ARG_TRANS_PATTERN PtBasic
Pt_ARG_UPDOWN_ARM_DATA_BOTTOM PtUpDown
Pt_ARG_UPDOWN_ARM_DATA_LEFT PtUpDown
Pt_ARG_UPDOWN_ARM_DATA_RIGHT PtUpDown
Pt_ARG_UPDOWN_ARM_DATA_TOP PtUpDown
Pt_ARG_UPDOWN_BOTTOM_BORDER_COLOR PtUpDown
Pt_ARG_UPDOWN_DATA_BOTTOM PtUpDown
Pt_ARG_UPDOWN_DATA_LEFT PtUpDown
Pt_ARG_UPDOWN_DATA_RIGHT PtUpDown
Pt_ARG_UPDOWN_DATA_TOP PtUpDown
Pt_ARG_UPDOWN_FILL_COLOR PtUpDown
Pt_ARG_UPDOWN_FLAGS PtUpDown
Pt_ARG_UPDOWN_HIGHLIGHT_ROUND PtUpDown
Pt_ARG_UPDOWN_MARGIN_HEIGHT PtUpDown
Pt_ARG_UPDOWN_MARGIN_WIDTH PtUpDown
Pt_ARG_UPDOWN_ORIENTATION PtUpDown
Pt_ARG_UPDOWN_SPACING PtUpDown
Pt_ARG_UPDOWN_TOP_BORDER_COLOR PtUpDown
Pt_ARG_USER_DATA PtWidget
Pt_CB_ACTIVATE PtBasic
Pt_CB_ARM PtBasic
Pt_CB_BALLOONS PtContainer
Pt_CB_BLOCKED PtWidget
Pt_CB_DESTROYED PtWidget
Pt_CB_DISARM PtBasic
Pt_CB_FILTER PtContainer
Pt_CB_GOT_FOCUS PtBasic
Pt_CB_HOTKEY PtWidget
Pt_CB_LOST_FOCUS PtBasic
Pt_CB_MENU PtBasic
Pt_CB_RAW PtWidget
Pt_CB_REALIZED PtWidget
Pt_CB_REPEAT PtBasic
Pt_CB_RESIZE PtContainer
Pt_CB_UNREALIZED PtWidget

[Previous] [Contents] [Index] [Next]