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

PtGroup

A container that can arrange its children in rows and columns

Class hierarchy:

PtWidgetPtBasicPtContainerPtGroup

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

PhAB icon:

None — use the Group button in PhAB's toolbar:

Group button in PhAB

Public header:

<photon/PtGroup.h>

Description:

The PtGroup class inherits the functionality of a container and actively manages the geometry of its children: the children are arranged in rows, columns, or a matrix. You can use PtGroup to make the children mutually exclusive, so that the user can set only one child at a time.


PtGroup


A group of buttons.

PhAB has a Group command that creates a PtGroup widget. See Aligning widgets using groups in the Geometry Management chapter of the Programmer's Guide.

New resources:

Resource C type Pt type Default
Pt_ARG_CELL_HORZ_ALIGN unsigned short Scalar Pt_GROUP_HORZ_LEFT
Pt_ARG_CELL_VERT_ALIGN unsigned short Scalar Pt_GROUP_VERT_TOP
Pt_ARG_GROUP_FLAGS unsigned long Flag 0
Pt_ARG_GROUP_HORZ_ALIGN unsigned short Scalar Pt_GROUP_HORZ_CENTER
Pt_ARG_GROUP_ORIENTATION unsigned short Scalar Pt_GROUP_HORIZONTAL
Pt_ARG_GROUP_ROWS_COLS unsigned short Scalar 0
Pt_ARG_GROUP_SPACING unsigned short Scalar 0
Pt_ARG_GROUP_SPACING_X unsigned short Scalar 0
Pt_ARG_GROUP_SPACING_Y unsigned short Scalar 0
Pt_ARG_GROUP_VERT_ALIGN unsigned short Scalar Pt_GROUP_VERT_CENTER

Pt_ARG_CELL_HORZ_ALIGN

C type Pt type Default
unsigned short Scalar Pt_GROUP_HORZ_LEFT

Determines how the children are aligned horizontally within the cells. Possible values:

Pt_ARG_CELL_VERT_ALIGN

C type Pt type Default
unsigned short Scalar Pt_GROUP_VERT_TOP

Determines how the children are aligned vertically within the cells. Possible values:

Pt_ARG_GROUP_FLAGS

C type Pt type Default
unsigned long Flag 0

Possible values:

Pt_GROUP_EQUAL_SIZE
Force all children to be the same height and width.
Pt_GROUP_EXCLUSIVE
Allow only one child to be set at a time.
Pt_GROUP_NO_SELECT_ALLOWED
Allow any exclusive group to have no selected item. If this flag is set, you can deselect the currently selected child without having to select another child. To do this, click on the currently selected child.
Pt_GROUP_NO_KEYS
Prevent the group from using any keys (e.g. arrows).
Pt_GROUP_NO_KEY_WRAP_HORIZONTAL
Don't use keys that would cause horizontal wrap.
Pt_GROUP_NO_KEY_WRAP_VERTICAL
Don't use keys that would cause vertical wrap.
Pt_GROUP_NO_KEY_WRAP
Don't use keys that would cause horizontal or vertical wrap.
Pt_GROUP_EQUAL_SIZE_HORIZONTAL
Make the children in the group the same width.
Pt_GROUP_EQUAL_SIZE_VERTICAL
Make the children in the group the same height.
Pt_GROUP_STRETCH_HORIZONTAL
Stretch the rightmost children in the group horizontally to fill its canvas.
Pt_GROUP_STRETCH_VERTICAL
Stretch the bottommost children in the group vertically to fill its canvas.
Pt_GROUP_STRETCH_FILL
Stretch the last widget(s) to fill the available space in the direction indicated by the orientation.

The default setting of this resource is 0; that is, no flags have been set.


Note: Don't set the Pt_GROUP_EQUAL_SIZE_... and Pt_GROUP_STRETCH_... flags for the same direction — the group will expand every time its extent is calculated.

Pt_ARG_GROUP_HORZ_ALIGN

C type Pt type Default
unsigned short Scalar Pt_GROUP_HORZ_CENTER

How the children are aligned horizontally within the group. The children retain their relative positions to each other. Possible values:

Pt_ARG_GROUP_ORIENTATION

C type Pt type Default
unsigned short Scalar Pt_GROUP_HORIZONTAL

The orientation of the group; one of:

Pt_GROUP_ASIS
Don't align children.
Pt_GROUP_HORIZONTAL
Align children in a row.
Pt_GROUP_VERTICAL
Align children in a column.

Pt_ARG_GROUP_ROWS_COLS

C type Pt type Default
unsigned short Scalar 0

For a horizontally aligned group, this resource indicates the number of columns to distribute children into. For a vertically aligned group, this resource indicates the number of rows to distribute children into. Not used for an “as is” group; see Pt_ARG_GROUP_ORIENTATION, above.

Pt_ARG_GROUP_SPACING

C type Pt type Default
unsigned short Scalar 0

If alignment is in effect, this resource defines how many pixels separate each child of the group.


Note: If you set this resource, you automatically set Pt_ARG_GROUP_SPACING_X and Pt_ARG_GROUP_SPACING_Y to the same value.

Pt_ARG_GROUP_SPACING_X

C type Pt type Default
unsigned short Scalar 0

If alignment is in effect, this resource defines how many pixels separate each child of the group horizontally. Setting Pt_ARG_GROUP_SPACING automatically sets this resource.

Pt_ARG_GROUP_SPACING_Y

C type Pt type Default
unsigned short Scalar 0

If alignment is in effect, this resource defines how many pixels separate each child of the group vertically. Setting Pt_ARG_GROUP_SPACING automatically sets this resource.

Pt_ARG_GROUP_VERT_ALIGN

C type Pt type Default
unsigned short Scalar Pt_GROUP_VERT_CENTER

Determines how the children are aligned within the group. The children retain their relative positions to each other. Possible values:

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
Pt_ARG_ANCHOR_OFFSETS PtWidget
Pt_ARG_AREA PtWidget
Pt_ARG_BANDWIDTH_THRESHOLD PtBasic Not used by this class.
Pt_ARG_BASIC_FLAGS PtBasic
Pt_ARG_BEVEL_WIDTH PtWidget 0
Pt_ARG_BITMAP_CURSOR PtWidget
Pt_ARG_BEVEL_COLOR PtBasic
Pt_ARG_BEVEL_CONTRAST PtBasic
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 Pg_TRANSPARENT
Pt_ARG_FILL_PATTERN PtBasic
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 0
Pt_ARG_MARGIN_WIDTH PtBasic 0
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_ALWAYS
Pt_ARG_ROW_LAYOUT_DATA PtWidget
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_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

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/ptgroup.html on line 1298

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/ptgroup.html on line 1298