Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/widget_ref/ptnumericinteger.html on line 1

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/widget_ref/ptnumericinteger.html on line 1

Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/widget_ref/ptnumericinteger.html on line 8

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/widget_ref/ptnumericinteger.html on line 8

PtNumericInteger

Integer numeric widget

Class hierarchy:

PtWidgetPtBasicPtContainerPtCompoundPtNumericPtNumericInteger

For more information, see the diagram of the widget hierarchy.

PhAB icon:

PtNumericInteger button in PhAB

Public header:

<photon/PtNumericInteger.h>

Description:

The PtNumericInteger class lets you specify integer values between given minimum and maximum values.


PtNumericInteger example


A PtNumericInteger widget.

A PtScrollbar widget is included to let you increase or decrease the value by a set amount. You can use the resources defined by PtNumeric to add prefix and suffix strings, and use comma separators (e.g. 1,000).

If you want the value to be displayed as a hexadecimal value, set Pt_NUMERIC_HEXADECIMAL in Pt_ARG_NUMERIC_FLAGS.

New resources:

Resource C type Pt type Default
Pt_ARG_NUMERIC_INCREMENT int Scalar 1
Pt_ARG_NUMERIC_MAX int Scalar INT_MAX
Pt_ARG_NUMERIC_MIN int Scalar INT_MIN
Pt_ARG_NUMERIC_VALUE int Scalar 0
Pt_CB_NUMERIC_CHANGED PtCallback_t * Link NULL

Pt_ARG_NUMERIC_INCREMENT

C type Pt type Default
int Scalar 1

The amount by which to increase or decrease the value when the up/down buttons are pressed.

Pt_ARG_NUMERIC_MAX

C type Pt type Default
int Scalar INT_MAX

The maximum value for the widget.

Pt_ARG_NUMERIC_MIN

C type Pt type Default
int Scalar INT_MIN

The minimum value for the widget.

Pt_ARG_NUMERIC_VALUE

C type Pt type Default
int Scalar 0

The current value of the widget.

Pt_CB_NUMERIC_CHANGED

C type Pt type Default
PtCallback_t * Link NULL

A list of PtCallback_t structures that define the callbacks invoked when the widget's value changes.

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 Pt_ARG_NUMERIC_VALUE with a call to PtSetResource() or PtSetResources(), or if the Pt_ARG_NUMERIC_VALUE is changed indirectly by a change to Pt_ARG_NUMERIC_MIN or Pt_ARG_NUMERIC_MAX.

Each callback is passed a PtCallbackInfo_t structure that contains at least the following members:

reason
Pt_CB_NUMERIC_CHANGED
reason_subtype
A subtype that indicates why the callback was invoked:
event
A pointer to a PhEvent_t structure that describes the event that caused the callback to be invoked, or NULL if there isn't an event.
cbdata
A pointer to a PtNumericIntegerCallback_t structure that contains at least:

These callbacks should return Pt_CONTINUE.

Exported subordinate children:

Unless the resources are already defined in PtNumericInteger, the PtNumericInteger class uses the resources of its exported subordinate child, PtScrollbar.

The PtNumericInteger class “inherits” all the resources of its exported subordinate child. Where PtNumericInteger and its exported subordinate child both define resources having the same name, the resource defined in PtNumericInteger 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 PtWidget Not used by this class.
Pt_ARG_ANCHOR_OFFSETS PtWidget Not used by this class.
Pt_ARG_AREA PtWidget
Pt_ARG_ARM_COLOR PtButton
Pt_ARG_ARM_FILL PtButton Pg_GRAY
Pt_ARG_ARM_IMAGE PtButton
Pt_ARG_BANDWIDTH_THRESHOLD PtBasic Not used by this class.
Pt_ARG_BASIC_FLAGS PtBasic
Pt_ARG_BEVEL_WIDTH PtWidget 0
Pt_ARG_BITMAP_CURSOR PtWidget
Pt_ARG_BEVEL_COLOR PtBasic
Pt_ARG_BEVEL_CONTRAST PtBasic
Pt_ARG_COLOR PtBasic
Pt_ARG_CONTAINER_FLAGS PtContainer Not used by this class.
Pt_ARG_CONTRAST PtBasic
Pt_ARG_CURSOR_COLOR PtWidget
Pt_ARG_CURSOR_OVERRIDE PtContainer
Pt_ARG_CURSOR_TYPE PtWidget
Pt_ARG_DARK_BEVEL_COLOR PtBasic
Pt_ARG_DARK_FILL_COLOR PtBasic
Pt_ARG_DATA PtWidget
Pt_ARG_DIM PtWidget
Pt_ARG_EFLAGS PtWidget
Pt_ARG_EXTENT PtWidget
Pt_ARG_FILL_COLOR PtBasic Pg_TRANSPARENT
Pt_ARG_FILL_PATTERN PtBasic
Pt_ARG_FLAGS PtWidget 0
Pt_ARG_GRID_LAYOUT_DATA PtWidget
Pt_ARG_HEIGHT PtWidget
Pt_ARG_HELP_TOPIC PtWidget
Pt_ARG_HIGHLIGHT_ROUNDNESS PtBasic
Pt_ARG_INLINE_COLOR PtBasic
Pt_ARG_LAYOUT_DATA PtWidget
Pt_ARG_LIGHT_BEVEL_COLOR PtBasic
Pt_ARG_LIGHT_FILL_COLOR PtBasic
Pt_ARG_MARGIN_HEIGHT PtBasic 0
Pt_ARG_MARGIN_WIDTH PtBasic 0
Pt_ARG_MAXIMUM_DIM PtWidget
Pt_ARG_MINIMUM_DIM PtWidget
Pt_ARG_NUMERIC_FLAGS PtNumeric
Pt_ARG_NUMERIC_PREFIX PtNumeric
Pt_ARG_NUMERIC_SPACING PtNumeric
Pt_ARG_NUMERIC_SUFFIX PtNumeric
Pt_ARG_NUMERIC_UPDOWN_WIDTH PtNumeric
Pt_ARG_OUTLINE_COLOR PtBasic
Pt_ARG_POINTER PtWidget
Pt_ARG_POS PtWidget
Pt_ARG_RESIZE_FLAGS PtWidget
Pt_ARG_ROW_LAYOUT_DATA PtWidget
Pt_ARG_STYLE PtBasic
Pt_ARG_TEXT_FLAGS PtText
Pt_ARG_TEXT_FONT PtLabel
Pt_ARG_TITLE PtContainer
Pt_ARG_TITLE_FONT PtContainer
Pt_ARG_TRANS_PATTERN PtBasic
Pt_ARG_USER_DATA PtWidget
Pt_ARG_WIDTH PtWidget
Pt_CB_ACTIVATE PtBasic See below.
Pt_CB_ARM PtBasic
Pt_CB_BALLOONS PtContainer Not used by this class.
Pt_CB_BLOCKED PtWidget
Pt_CB_CHILD_ADDED_REMOVED PtContainer
Pt_CB_DESTROYED PtWidget
Pt_CB_DISARM PtBasic
Pt_CB_DND PtWidget
Pt_CB_FILTER PtWidget
Pt_CB_GOT_FOCUS PtBasic
Pt_CB_HOTKEY PtWidget
Pt_CB_IS_DESTROYED PtWidget
Pt_CB_LOST_FOCUS PtBasic
Pt_CB_MENU PtBasic
Pt_CB_OUTBOUND PtWidget
Pt_CB_RAW PtWidget
Pt_CB_REALIZED PtWidget
Pt_CB_REPEAT PtBasic
Pt_CB_RESIZE PtContainer
Pt_CB_UNREALIZED PtWidget

Pt_CB_ACTIVATE

If cbinfo->reason_subtype is Pt_NUMERIC_ACTIVATE, the callback was invoked because you changed the value and pressed Enter while in PtNumericInteger's text field.


Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/widget_ref/ptnumericinteger.html on line 1038

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/widget_ref/ptnumericinteger.html on line 1038