PtSeparator
![]() |
![]() |
![]() |
![]() |
PtSeparator
Separator for organizing widgets
Class hierarchy:
PtWidget --> PtBasic --> PtSeparator
For more information, see the diagram of the widget hierarchy.
PhAB icon:
Public header:
<photon/PtSeparator.h>
Description:
PtSeparator provides a separator line with various styles. You should find it handy when creating menus, or for organizing areas that hold a lot of widgets.

PtSeparator widgets, as used to organize the items in a menu.
New resources:
| Resource | C type | Pt type | Default |
|---|---|---|---|
| Pt_ARG_SEP_ARM_BITMAP_CURSOR | PhBitmapCursorDescription_t * | Alloc | NULL |
| Pt_ARG_SEP_ARM_CURSOR_COLOR | PgColor_t | Scalar | Ph_CURSOR_ DEFAULT_COLOR |
| Pt_ARG_SEP_ARM_CURSOR_TYPE | unsigned short | Scalar | Ph_CURSOR_ INHERIT |
| Pt_ARG_SEP_DRAG_BOUNDS | PhRect_t | Struct | NULL |
| Pt_ARG_SEP_FLAGS | short | Flag | Pt_SEP_ HORIZONTAL |
| Pt_ARG_SEP_IMAGE | PhImage_t * | Image | NULL |
| Pt_ARG_SEP_IMAGE_H_ALIGN | unsigned char | Scalar | Pt_LEFT |
| Pt_ARG_SEP_IMAGE_V_ALIGN | unsigned char | Scalar | Pt_TOP |
| Pt_ARG_SEP_TYPE | unsigned short | Scalar | Pt_SINGLE_ LINE |
| Pt_CB_SEP_DRAG | PtCallback_t * | Link | NULL |
Pt_ARG_SEP_ARM_BITMAP_CURSOR
| C type | Pt type | Default |
|---|---|---|
| PhBitmapCursorDescription_t * | Alloc | NULL |
A pointer to a PhBitmapCursorDescription_t, which represents the cursor which is used when the separator is armed and being dragged.
You can't edit this resource in PhAB.
The widget automatically sets the hdr member of the PhBitmapCursorDescription_t and PhBitmapCursorData_t structures.
The PhBitmapCursorDescription_t contains at least these members:
- hdr
- A PhCursorDescription_t structure that is automatically filled in by the widget.
- bmp
- A PhBitmapCursorData_t structure that describes the bitmap.
The PhCharacterCursorDescription_t contains at least these members:
- hdr
- A PhCursorDescription_t structure.
- color
- A PgColor_t structure that describes the background colour of the bitmap.
The PhBitmapCursorData_t contains at least these members:
- hdr
- A pointer to a PhRegionDataHdr_t structure that defines the region data header.
- size1
- The dimensions of the first bitmap plane, in pixels.
- offset1
- The position of the upper-left corner of the first plane of the bitmap, relative to the hot spot.
- color1
- The color of the first bitmap plane.
- bytesperline1
- The number of bytes per line for the first bitmap plane.
- size2
- The dimensions of the second bitmap plane, in pixels.
- offset2
- The position of the upper-left corner of the second plane of the bitmap, relative to the hot spot.
- color2
- The color of the second bitplane. You can have more than two bitplanes.
- bytesperline2
- The number of bytes per line for the second bitmap plane.
- images
- The bitmap image data, as a series of 1-bit-per-pixel planes.
Pt_ARG_SEP_ARM_CURSOR_COLOR
| C type | Pt type | Default |
|---|---|---|
| PgColor_t | Scalar | Ph_CURSOR_DEFAULT_COLOR |
A PgColor_t structure that defines the color for the cursor specified by the Pt_ARG_SEP_ARM_CURSOR_TYPE, which is used when the separator is armed and being dragged. For more information, see PgColor_t in the Photon Library Reference.
Pt_ARG_SEP_ARM_CURSOR_TYPE
| C type | Pt type | Default |
|---|---|---|
| unsigned short | Scalar | Ph_CURSOR_INHERIT |
The cursor type which is used when the separator is armed and being dragged. It can be:
- Ph_CURSOR_INHERIT
- Inherit the cursor, not from the class hierarchy, but from the family hierarchy; that is, from the way your application nests the widgets. The cursor might even be inherited from the Photon server itself.
- Ph_CURSOR_BITMAP
- Use the bitmap stored in Pt_ARG_SETP_ARM_BITMAP_CURSOR for the cursor.
Pt_ARG_SEP_DRAG_BOUNDS
| C type | Pt type | Default |
|---|---|---|
| PhRect_t | Struct | NULL |
The dragging boundary for the separator. This resource is used when dragging is initiated (see the Pt_SEP_DRAGGABLE flag). The default of this resource is the widget's parent's canvas. Set the resource to NULL to use the defaults.
Pt_ARG_SEP_FLAGS
| C type | Pt type | Default |
|---|---|---|
| short | Flag | Pt_SEP_HORIZONTAL |
Flags that control the separator's appearance. Possible values:
- Pt_SEP_ORIENTATION
- If this bit is Pt_SEP_VERTICAL, the separator is vertical. If this bit is Pt_SEP_HORIZONTAL, the separator is horizontal.
- Pt_SEP_DRAGGABLE
- The separator can be dragged within its parent's canvas, or by the bounding rectangle specified by via tthe Pt_SEP_DRAG_BOUNDS resource.
- Pt_SEP_DRAW_DRAG_BAND
- Enable rubber band drawing while dragging the widget.
Pt_ARG_SEP_IMAGE
| C type | Pt type | Default |
|---|---|---|
| PhImage_t | Image | NULL |
You can use this resource to create your own style of separator. It specifies an image to be used as the separator. Set to NULL to disable image drawing. For more information about PhImage_t, see the Photon Library Reference.
Pt_ARG_SEP_IMAGE_H_ALIGN
| C type | Pt type | Default |
|---|---|---|
| unsigned char | scalar | Pt_LEFT |
The separator's horizontal image alignment. Can be one of:
- Pt_LEFT
- Pt_CENTER
- Pt_RIGHT
Pt_ARG_SEP_IMAGE_V_ALIGN
| C type | Pt type | Default |
|---|---|---|
| unsigned char | scalar | Pt_TOP |
The separator's vertical image alignment. Can be one of:
- Pt_TOP
- Pt_CENTER
- Pt_BOTTOM
Pt_ARG_SEP_TYPE
| C type | Pt type | Default |
|---|---|---|
| unsigned short | Scalar | Pt_SINGLE_LINE |
The type of separator. Possible values:
- Pt_SINGLE_LINE
- Pt_DOUBLE_LINE
- Pt_SINGLE_DASH_LINE
- Pt_DOUBLE_DASH_LINE
- Pt_ETCHED_IN
- Pt_ETCHED_OUT
- Pt_NOLINE
Pt_CB_SEP_DRAG
| C type | Pt type | Default |
|---|---|---|
| PtCallback_t * | Link | NULL |
A list of PtCallback_t structures that define the callbacks involved when you drag the separator widget.
Each callback is passed a PtCallbackInfo_t structure that contains at least the following members:
- reason
- Pt_CB_SEP_DRAG
- reason_subtype
- One of:
- Pt_INIT -- the separator was armed
- Pt_MOVED -- the separator was dragged
- Pt_DONE -- the separator was disarmed; look the PhDragEvent_t structure of the event member to find out more details.
- event
- A pointer to a PhEvent_t structure that describes the event that caused the callback to be invoked.
- cbdata
- A pointer to a PtSeparatorCallback_t structure which contains at least contains PhRect_t, a separator rectangle relative to its parent.
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.
Pt_ARG_BANDWIDTH_THRESHOLD
Pt_ARG_BANDWIDTH_THRESHOLD defines the "graphics bandwidth" threshold over which the separator drag mode is switched to drag outline mode, as if the Pt_SEP_DRAW_DRAG_BAND flag was set. This optimizes the number of events in low bandwidth situations, such as when you are using phrelay. Note that this resource only applies when the separator is draggable.
By default this resource is set to Ph_BAUD_NETWORK.
For more information about the system bandwidth, see PtQuerySystemInfo() and PhSysInfo_t in the Photon Library Reference.
![]() |
![]() |
![]() |
![]() |
![[Previous]](prev.gif)
![[Contents]](contents.gif)
![[Index]](keyword_index.gif)
![[Next]](next.gif)