PtToolbar
![]() |
![]() |
![]() |
![]() |
PtToolbar
Superclass for toolbar widgets
Class hierarchy:
PtWidget --> PtBasic --> PtContainer --> PtToolbar
Immediate subclasses:
For more information, see the diagram of the widget hierarchy.
PhAB icon:
Public header:
<photon/PtToolbar.h>
Description:
A PtToolbar is a container that organizes its children as a horizontal (by default) or vertical 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:
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_HORIZONTAL
- Pt_VERTICAL
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.
![]() |
![]() |
![]() |
![]() |
![[Previous]](prev.gif)
![[Contents]](contents.gif)
![[Index]](keyword_index.gif)
![[Next]](next.gif)