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/ptupdown.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/ptupdown.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/ptupdown.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/ptupdown.html on line 8

PtUpDown

Vertical or horizontal increment/decrement buttons

Class hierarchy:

PtWidgetPtBasicPtUpDown

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

PhAB icon:

PtUpDown button in PhAB

Public header:

<photon/PtUpDown.h>

Description:

The PtUpDown widget creates vertical or horizontal increment/decrement buttons. It lets you increase or decrease a value.


PtUpDown


A PtUpDown widget.

By default, the buttons display images of arrows, but you can use other images if necessary. You can also specify the armed data, the image displayed when the user presses one of the buttons.

The Pt_CB_ACTIVATE,Pt_CB_ARM, Pt_CB_DISARM, and Pt_CB_REPEAT callbacks for the buttons have a subtype that indicates which button was pressed.

New resources:

Resource C type Pt type Default
Pt_ARG_ARM_COLOR PgColor_t Scalar PgGray(170)
Pt_ARG_ORIENTATION int Boolean Pt_VERTICAL
Pt_ARG_SPACING unsigned short Scalar 0
Pt_ARG_UPDOWN_ARM_DATA_DECREMENT PhImage_t * Image NULL
Pt_ARG_UPDOWN_ARM_DATA_INCREMENT PhImage_t * Image NULL
Pt_ARG_UPDOWN_BORDER_WIDTH unsigned short Scalar 1
Pt_ARG_UPDOWN_DATA_DECREMENT PhImage_t * Image NULL
Pt_ARG_UPDOWN_DATA_INCREMENT PhImage_t * Image NULL
Pt_ARG_UPDOWN_FLAGS signed short Flag See below
Pt_ARG_UPDOWN_INDICATOR_MARGIN unsigned short Scalar 0

Pt_ARG_ARM_COLOR

C type Pt type Default
PgColor_t Scalar Pg_GRAY

The background color used when the button is armed (pressed in). See PgColor_t in the Photon Library Reference.

This resource is used only if Pt_ARG_UPDOWN_FLAGS has Pt_UPDOWN_FILL_ON_ARM set.

Pt_ARG_ORIENTATION

C type Pt type Default
int Boolean Pt_VERTICAL

The direction the arrows are pointing:

Pt_ARG_SPACING

C type Pt type Default
unsigned short Scalar 0

The spacing between the increment and decrement buttons, in pixels.

Pt_ARG_UPDOWN_ARM_DATA_DECREMENT

C type Pt type Default
PhImage_t * Image NULL

The image for the armed decrement button. This resource is used only if Pt_UPDOWN_ARM_DECREMENT is set in Pt_ARG_UPDOWN_FLAGS.

Pt_ARG_UPDOWN_ARM_DATA_INCREMENT

C type Pt type Default
PhImage_t * Image NULL

The image for the armed increment button. This resource is used only if Pt_UPDOWN_ARM_INCREMENT is set in Pt_ARG_UPDOWN_FLAGS.

Pt_ARG_UPDOWN_BORDER_WIDTH

C type Pt type Default
unsigned short Scalar 1

The width of the widget's border, in pixels.

Pt_ARG_UPDOWN_DATA_DECREMENT

C type Pt type Default
PhImage_t * Image NULL

The image for the unarmed decrement button. This resource is used only if Pt_UPDOWN_DECREMENT is set in Pt_ARG_UPDOWN_FLAGS.

Pt_ARG_UPDOWN_DATA_INCREMENT

C type Pt type Default
PhImage_t * Image NULL

The image for the unarmed increment button. This resource is used only if Pt_UPDOWN_INCREMENT is set in Pt_ARG_UPDOWN_FLAGS.

Pt_ARG_UPDOWN_FLAGS

C type Pt type Default
signed short Flag Pt_FILL_ON_ARM

Pt_UPDOWN_INCREMENT_IMAGE
Use the Pt_ARG_UPDOWN_DATA_INCREMENT resource as the image for the unarmed increment button.
Pt_UPDOWN_DECREMENT_IMAGE
Use the Pt_ARG_UPDOWN_DATA_DECREMENT resource as the image for the unarmed decrement button.
Pt_UPDOWN_INCREMENT_ARM_IMAGE
Use the Pt_ARG_UPDOWN_ARM_DATA_INCREMENT resource as the image for the armed increment button.
Pt_UPDOWN_DECREMENT_ARM_IMAGE
Use the Pt_ARG_UPDOWN_ARM_DATA_DECREMENT resource as the image for the armed decrement button.
Pt_UPDOWN_ROTATE_INDICATORS
Rotate the arrow indicators on the increment and decrement buttons by ninety degrees. This flag only applies to arrow indicators; it doesn't rotate images when images are used.
Pt_UPDOWN_FILL_ON_ARM
Not currently used.

Pt_ARG_UPDOWN_INDICATOR_MARGIN

C type Pt type Default
unsigned Scalar 0

The distance, in pixels, around the button image.

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_BASIC_FLAGS PtBasic
Pt_ARG_BEVEL_COLOR PtBasic
Pt_ARG_BEVEL_CONTRAST PtBasic
Pt_ARG_BEVEL_WIDTH PtWidget 0
Pt_ARG_BITMAP_CURSOR PtWidget
Pt_ARG_COLOR PtBasic Not used by this class.
Pt_ARG_CONTRAST PtBasic
Pt_ARG_CURSOR_COLOR PtWidget
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 Not used by this class.
Pt_ARG_FILL_PATTERN PtBasic Not used by this class.
Pt_ARG_FLAGS PtWidget
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 Not used by this class.
Pt_ARG_MARGIN_WIDTH PtBasic Not used by this class.
Pt_ARG_MAXIMUM_DIM PtWidget
Pt_ARG_MINIMUM_DIM PtWidget
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_TRANS_PATTERN PtBasic
Pt_ARG_USER_DATA PtWidget
Pt_ARG_WIDTH PtWidget 5
Pt_CB_ACTIVATE PtBasic See below
Pt_CB_ARM PtBasic See below
Pt_CB_BLOCKED PtWidget
Pt_CB_DESTROYED PtWidget
Pt_CB_DISARM PtBasic See below
Pt_CB_DND PtWidget
Pt_CB_FILTER PtWidget Not used by this class.
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 See below
Pt_CB_UNREALIZED PtWidget

Pt_CB_ACTIVATE, Pt_CB_ARM, Pt_CB_DISARM, Pt_CB_REPEAT

These callbacks are passed a PtCallbackInfo_t structure that contains at least the following members:

    unsigned long reason;
    unsigned long reason_subtype;
    PhEvent_t *event;
    void *cbdata;
    

The callbacks are similar to those for PtButton, except the reason_subtype indicates which button was pressed:


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/ptupdown.html on line 1097

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/ptupdown.html on line 1097