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

PtRegion

A Photon region

Class hierarchy:

PtWidget --> PtBasic --> PtContainer --> PtRegion

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

PhAB icon:

None - must be instantiated with 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 the data associated with a region, see PhRegion_t in the Photon Library Reference.
  • For changes to this widget's resource to take effect, you must set the corresponding bit in Pt_ARG_REGION_FIELDS.

New resources:

Resource C type Pt type Default
Pt_ARG_REGION_DATA PhRegionDataHdr_t * Alloc NULL
Pt_ARG_REGION_FIELDS long Flag 0
Pt_ARG_REGION_FLAGS long Flag 0
Pt_ARG_REGION_HANDLE long Scalar widget_pointer
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_OWNER PhConnectId_t Scalar 0
Pt_ARG_REGION_PARENT long Scalar 0
Pt_ARG_REGION_SENSE long Flag 0

Pt_ARG_REGION_DATA

C type Pt type Default
PhRegionDataHdr_t * Alloc NULL

Defines the data to be attached to the region. For changes to this resource to take effect, you must set the corresponding bit in Pt_ARG_REGION_FIELDS.

Pt_ARG_REGION_FIELDS

C type Pt type Default
long Flag 0

Indicates which portions of the region should be modified, including its flags, sensitivity, opacity, origin, position, etc. You must set these bits in addition to setting the corresponding resource; otherwise the setting of the resource will be ignored.

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_OWNER Pt_ARG_REGION_OWNER
Ph_REGION_HANDLE Pt_ARG_REGION_HANDLE
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_DATA Pt_ARG_REGION_DATA
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:

For changes to this resource to take effect, you must set the corresponding bit in Pt_ARG_REGION_FIELDS.

Pt_ARG_REGION_HANDLE

C type Pt type Default
long Scalar widget_pointer

A widget pointer normally used by the widget library to determine which widget is associated with a region. This resource should either be set to 0 or left at its default. For changes to this resource to take effect, you must set the corresponding bit in Pt_ARG_REGION_FIELDS.

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. For changes to this resource to take effect, you must set the corresponding bit in Pt_ARG_REGION_FIELDS.

Pt_ARG_REGION_INPUT_GROUP

C type Pt type Default
short Scalar 0

Associates the region with the specified input group. For changes to this resource to take effect, you must set the corresponding bit in Pt_ARG_REGION_FIELDS.

Pt_ARG_REGION_OPAQUE

C type Pt type Default
long Flag 0

Define which events this region is opaque to. For changes to this resources to take effect, you must set the corresponding bit(s) in Pt_ARG_REGION_FIELDS.

Pt_ARG_REGION_OWNER

C type Pt type Default
PhConnectId_t Scalar 0

Specifies the owner of the region. For changes to this resource to take effect, you must set the corresponding bit in Pt_ARG_REGION_FIELDS.

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. For changes to this resource to take effect, you must set the corresponding bit in Pt_ARG_REGION_FIELDS.

Pt_ARG_REGION_SENSE

C type Pt type Default
long Flag 0

Define which events this region is sensitive to. For changes to this resources to take effect, you must set the corresponding bit(s) in Pt_ARG_REGION_FIELDS.

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_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
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
Pt_ARG_FILL_PATTERN PtBasic
Pt_ARG_FLAGS PtWidget
Pt_ARG_HELP_TOPIC PtWidget
Pt_ARG_HIGHLIGHT_ROUNDNESS PtBasic
Pt_ARG_MARGIN_HEIGHT PtBasic
Pt_ARG_MARGIN_WIDTH PtBasic
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_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]