A Photon region
PtWidget → PtBasic → PtContainer → PtRegion
Immediate subclasses:
For more information, see the diagram of the widget hierarchy.
None — instantiate it by calling PtCreateWidget().
<photon/PtRegion.h>
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.
For more information about regions, see PhRegion_t in the Photon Library Reference, and the Regions chapter of the Photon Programmer's Guide. |
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 |
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>.
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.
C type | Pt type | Default |
---|---|---|
long | Flag | 0 |
Defines the region type and behavior:
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.
C type | Pt type | Default |
---|---|---|
short | Scalar | 0 |
Associates the region with the specified input group.
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.
C type | Pt type | Default |
---|---|---|
long | Scalar | 0 |
Specifies the ID (rid) of the region that will be this region's parent.
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.
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.
If the widget modifies an inherited resource, the “Default override” column indicates the new value. This modification affects any subclasses of the widget.