PtGroup

PtGroup — groups widgets and manages their geometry.

Synopsis

class PtGroup PtContainer
{
    group_flags;          // flag  (Pt_ARG_GROUP_FLAGS)    
    group_horz_align;     // unsigned short  (Pt_ARG_GROUP_HORZ_ALIGN)    
    group_orientation;    // unsigned short  (Pt_ARG_GROUP_ORIENTATION)    
    group_rows_cols;      // unsigned short  (Pt_ARG_GROUP_ROWS_COLS)    
    group_spacing;        // unsigned short  (Pt_ARG_GROUP_SPACING)    
    group_vert_align;     // unsigned short  (Pt_ARG_GROUP_VERT_ALIGN)    
}
		

Base Classes

PtWidget <-- PtBasic <-- PtContainer <-- PtGroup

Derived Classes

PtMenu, PtMenuBar

Description

This widget is an invisible container that groups widgets into columns, rows, or a matrix, and manages their geometry. It permits exclusive or group selection of widgets.

[Note]

For detailed information, please refer to PtGroup in the Photon documentation.

Instance Variables

group_flags

This instance variable controls the behavior of the group, and may be a combination of zero or more of the following flags:

ConstantDescription
Pt_GROUP_EXCLUSIVEOnly one child can be selected at a time.
Pt_GROUP_EQUAL_SIZEAll children are forced to be the same height and width.
Pt_GROUP_NO_SELECT_ALLOWEDAllows unselecting a child (click on it) without selecting another child.
Pt_GROUP_NO_KEYSBlocks any group use of keys.
Pt_GROUP_NO_KEY_WRAP_HORIZONTALBlocks keys for horizontal wrap.
Pt_GROUP_NO_KEY_WRAP_VERTICALBlocks keys for vertical wrap.
Pt_GROUP_NO_KEY_WRAPBlocks keys for horizontal and vertical wrap.

[Note]

Among the next 4 flags, you should not set EQUAL_SIZE and STRETCH flags for the same direction.

Pt_GROUP_EQUAL_SIZE_HORIZONTALKeeps all children in the group the same width.
Pt_GROUP_EQUAL_SIZE_VERTICALKeeps all children in the group the same height.
Pt_GROUP_STRETCH_HORIZONTALFills the group canvas horizontally by stretching right-hand children.
Pt_GROUP_STRETCH_VERTICALFills the group canvas vertically by stretching bottom children.
Pt_GROUP_STRETCHFills the canvas in the orientation direction by stretching the widgets of that edge.
Pt_GROUP_STRETCH_FILLStretch Fill

group_horz_align

This instance variable specifies horizontal alignment of the group as a whole, and may have one of the following values:

ConstantDescription
Pt_GROUP_HORZ_NONENo horizontal repositioning for the group.
Pt_GROUP_HORZ_CENTERThe group is centered horizontally.
Pt_GROUP_HORZ_LEFTThe group is aligned to the left.
Pt_GROUP_HORZ_RIGHTThe group is aligned to the right.

group_orientation

This instance variable re-aligns child widgets into rows or columns, and may have one of the following values:

ConstantDescription
Pt_GROUP_HORIZONTALChildren of group are aligned in a row.
Pt_GROUP_VERTICALChildren of group are aligned in a column.
Pt_GROUP_ASISChildren of group are not aligned.

group_rows_cols

A number specifying the number of rows or columns that the children are arranged into, for the relevant group_orientation chosen.

group_spacing

A number specifying the number of pixels to separate each child of the group in both the x and y directions.

group_vert_align

This instance variable specifies vertical alignment of the group as a whole, and may have one of the following values:

ConstantDescription
Pt_GROUP_VERT_NONENo vertical repositioning of the group.
Pt_GROUP_VERT_CENTERThe group is centered vertically.
Pt_GROUP_VERT_TOPThe group is aligned to the top.
Pt_GROUP_VERT_BOTTOMThe group is aligned to the bottom.