PtRegion

A Photon region

Class hierarchy:

PtWidgetPtBasicPtContainerPtRegion

Immediate subclasses:

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

PhAB icon:

None — instantiate it by calling PtCreateWidget().

Public header:

<photon/PtRegion.h>

Description:

PtRegion is ideal for controlling a region without foregoing the convenience of the Photon widget library interface. With PtRegion, you can control a region without having to modify the standard main loop function.


Note: For more information about regions, see PhRegion_t in the Photon Library Reference, and the Regions chapter of the Photon Programmer's Guide.

New resources:

Resource C type Pt type Default
Pt_ARG_REGION_FIELDS long Flag 0
Pt_ARG_REGION_FLAGS long Flag 0
Pt_ARG_REGION_INFRONT long Scalar 0
Pt_ARG_REGION_INPUT_GROUP short Scalar 0
Pt_ARG_REGION_OPAQUE long Flag 0
Pt_ARG_REGION_PARENT long Scalar 0
Pt_ARG_REGION_RECTANGLES PhRect_t *, unsigned short Array NULL
Pt_ARG_REGION_SENSE long Flag 0

Pt_ARG_REGION_FIELDS

C type Pt type Default
long Flag 0

This resource indicates which portions of the region were changed the last time that you set any resources, including the flags, sensitivity, opacity, origin, and position.

The following bits can be used to define a field in a region change (PhRegionChange()) or open (PhRegionOpen()). For more information, see <PhT.h>.


Note: The Ph_REGION_HANDLE, Ph_REGION_ORIGIN, and Ph_REGION_RECT bits are set up automatically when the widget is initialized.

Bit Corresponding resource
Ph_REGION_FLAGS Pt_ARG_REGION_FLAGS
Ph_REGION_EV_OPAQUE Pt_ARG_REGION_OPAQUE
Ph_REGION_EV_SENSE Pt_ARG_REGION_SENSE
Ph_REGION_STATE Read-only. Don't modify.
Ph_REGION_ORIGIN See below.
Ph_REGION_PARENT Pt_ARG_REGION_PARENT
Ph_REGION_IN_FRONT Pt_ARG_REGION_INFRONT
Ph_REGION_BEHIND See below.
Ph_REGION_RECT See below.
Ph_REGION_INPUT_GROUP Pt_ARG_REGION_INPUT_GROUP

Any time you change PtRegion's Pt_ARG_POS or Pt_ARG_AREA resource, the Ph_REGION_ORIGIN bit is changed automatically.

The Ph_REGION_BEHIND bit defines which region this region will be opened in front of. The specified region becomes the brother in behind. A value of 0 makes the region the rearmost child of its parent when created.

Any time you change PtRegion's Pt_ARG_AREA or Pt_ARG_DIM resource, the Ph_REGION_RECT bit is changed automatically.

Pt_ARG_REGION_FLAGS

C type Pt type Default
long Flag 0

Defines the region type and behavior:

Pt_ARG_REGION_INFRONT

C type Pt type Default
long Scalar 0

Defines which region (rid) this region will be opened behind. The specified region becomes the brother in front. A value of 0 makes the region the frontmost child of its parent when created.

Pt_ARG_REGION_INPUT_GROUP

C type Pt type Default
short Scalar 0

Associates the region with the specified input group.

Pt_ARG_REGION_OPAQUE

C type Pt type Default
long Flag 0

A bitmask that defines which events this region is opaque to. For a list of event types, see PhEvent_t in the Photon Library Reference.

Pt_ARG_REGION_PARENT

C type Pt type Default
long Scalar 0

Specifies the ID (rid) of the region that will be this region's parent.

Pt_ARG_REGION_RECTANGLES

C type Pt type Default
PhRect_t *, unsigned short Array NULL

This resource allows you to create a region with more than one rectangle. When this array has at least one element, the widget uses the rectangle(s) in the array rather than its own extent for the rectangle set of its region.

Pt_ARG_REGION_SENSE

C type Pt type Default
long Flag 0

A bitmask that defines which events this region is sensitive to. For a list of event types, see PhEvent_t in the Photon Library Reference.

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
Pt_ARG_CONTAINER_FLAGS PtContainer
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
Pt_ARG_FILL_LAYOUT_INFO PtContainer
Pt_ARG_FILL_PATTERN PtBasic
Pt_ARG_FLAGS PtWidget
Pt_ARG_GRID_LAYOUT_DATA PtWidget
Pt_ARG_GRID_LAYOUT_INFO PtContainer
Pt_ARG_HEIGHT PtWidget
Pt_ARG_HELP_TOPIC PtWidget
Pt_ARG_HIGHLIGHT_ROUNDNESS PtBasic
Pt_ARG_INLINE_COLOR PtBasic
Pt_ARG_LAYOUT PtContainer
Pt_ARG_LAYOUT_DATA PtWidget
Pt_ARG_LAYOUT_INFO PtContainer
Pt_ARG_LAYOUT_TYPE PtContainer
Pt_ARG_LIGHT_BEVEL_COLOR PtBasic
Pt_ARG_LIGHT_FILL_COLOR PtBasic
Pt_ARG_MARGIN_HEIGHT PtBasic
Pt_ARG_MARGIN_WIDTH PtBasic
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_RESIZE_XY_AS_REQUIRED
Pt_ARG_ROW_LAYOUT_DATA PtWidget
Pt_ARG_ROW_LAYOUT_INFO PtContainer
Pt_ARG_STYLE PtBasic
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
Pt_CB_ARM PtBasic
Pt_CB_BALLOONS PtContainer
Pt_CB_BLOCKED PtWidget
Pt_CB_CHILD_ADDED_REMOVED PtContainer
Pt_CB_CHILD_GETTING_FOCUS PtContainer
Pt_CB_CHILD_LOSING_FOCUS 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_LAYOUT PtContainer
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