PtToolbar

Superclass for toolbar widgets

Class hierarchy:

PtWidgetPtBasicPtContainerPtToolbar

Immediate subclasses:

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

PhAB icon:

PtToolbar button in PhAB

Public header:

<photon/PtToolbar.h>

Description:

A PtToolbar is a container that organizes its children as a horizontal (by default) or vertical toolbar.


PhAB's toolbar


A PtToolbar as used in PhAB.

The children of a PtToolbar can be any type of widget. They're center-aligned within the toolbar, and can optionally be separated from each other with etched lines:

A toolbar

New resources:

Resource C type Pt type Default
Pt_ARG_ORIENTATION char Boolean Pt_HORIZONTAL
Pt_ARG_TOOLBAR_FLAGS uint16_t Flag Pt_TOOLBAR_DRAGGABLE | Pt_TOOLBAR_END_SEPARATOR | Pt_TOOLBAR_FOLLOW_FOCUS
Pt_ARG_TOOLBAR_LAYOUT_FLAGS uint8_t Flag 0
Pt_ARG_TOOLBAR_SPACING uint8_t Scalar 2

Pt_ARG_ORIENTATION

C type Pt type Default
char Boolean Pt_HORIZONTAL

Indicates whether the toolbar is to be drawn vertically or horizontally. Possible values:

Pt_ARG_TOOLBAR_FLAGS

C type Pt type Default
uint16_t Flag Pt_TOOLBAR_DRAGGABLE | Pt_TOOLBAR_END_SEPARATOR | Pt_TOOLBAR_FOLLOW_FOCUS

Flags that control the behavior of the widget. Any combination of:

Pt_TOOLBAR_DRAGGABLE
Enable dragging operations.
Pt_TOOLBAR_REVERSE_LAST_ITEM
Right- or bottom-align the frontmost (i.e. last) item.
Pt_TOOLBAR_FOLLOW_FOCUS
Pan the toolbar as focus changes within it.
Pt_TOOLBAR_LOCK_ORIENTATION
Don't let the orientation change.
Pt_TOOLBAR_ITEM_SEPARATORS
Render separators between all items.
Pt_TOOLBAR_END_SEPARATOR
Render a separator after the last item.

Pt_ARG_TOOLBAR_LAYOUT_FLAGS

C type Pt type Default
uint8_t Flag 0

Flags that PtToolbarGroup uses to record the toolbar's layout:

Pt_TOOLBAR_FROM_LINE_START
Start the toolbar on a new line.
Pt_TOOLBAR_TO_LINE_END
Run the toolbar to the end of the line.

Pt_ARG_TOOLBAR_SPACING

C type Pt type Default
uint8_t Scalar 2

The spacing, in pixels, between items in the toolbar.

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_FLAT_FILL) | Pt_REVERSE_GRADIENT
Pt_ARG_BEVEL_WIDTH PtWidget 1
Pt_ARG_BITMAP_CURSOR PtWidget
Pt_ARG_BEVEL_COLOR PtBasic
Pt_ARG_BEVEL_CONTRAST PtBasic 65
Pt_ARG_COLOR PtBasic
Pt_ARG_CONTAINER_FLAGS PtContainer |= Pt_AUTO_EXTENT
Pt_ARG_CONTRAST PtBasic 10
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_HIGHLIGHTED
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_AS_REQUIRED
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