AG_Pane *
AG_PaneNewHoriz
(AG_Widget
*parent, Uint flags);
AG_Pane *
AG_PaneNewVert
(AG_Widget
*parent, Uint
flags);
void
AG_PaneAttachBox
(AG_Pane
*pane, int which,
AG_Box *box);
void
AG_PaneAttachBoxes
(AG_Pane
*pane, AG_Box
*box1, AG_Box
*box2);
void
AG_PaneSetDividerWidth
(AG_Pane
*pane, int
pixels);
void
AG_PaneSetDivisionMin
(AG_Pane
*pane, int which,
int min_w,
int min_h);
int
AG_PaneMoveDivider
(AG_Pane
*pane, int x);
int
AG_PaneMoveDividerPct
(AG_Pane
*pane, int
pct);
void
AG_PaneResizeAction
(AG_Pane
*pane, enum
ag_pane_resize_action resizeAction);
The AG_PaneNewHoriz
() and
AG_PaneNewVert
() functions allocate, initialize, and
attach a new AG_Pane
container, dividing space in
the specified orientation.
Acceptable flags include:
- AG_PANE_DIV1FILL
- By default, the size of the first (left or top) division is computed from
its child widgets, and the second division is sized to use the remaining
space. This flag arranges for the first division to be sized from the
remaining space instead.
- AG_PANE_FRAME
- Render decorative frames.
- AG_PANE_UNMOVABLE
- Do not allow the user to move the divider.
- AG_PANE_HFILL
- Expand horizontally in parent (equivalent to invoking
AG_ExpandHoriz(3)).
- AG_PANE_VFILL
- Expand vertically in parent (equivalent to invoking
AG_ExpandVert(3)).
- AG_PANE_EXPAND
- Shorthand for
AG_PANE_HFILL|AG_PANE_VFILL
.
If AG_PANE_FRAME
is set, the depth of the
frame can be adjusted by invoking
AG_BoxSetDepth(3)
on the partitions.
By default, the two
AG_Box(3)
sub-containers of AG_Pane
are created automatically.
AG_PaneAttachBox
() allows existing boxes to be
attached and re-used. which must be 0 or 1.
AG_PaneAttachBoxes
() is a variant that accepts two
box arguments.
AG_PaneSetDividerWidth
() sets the width of
the divider widget in pixels. If an argument of 0 is given, no divider is
drawn.
By default, the user is allowed to move the separator such that
one of the two partitions can be shrunk to zero.
AG_PaneSetDivisionMin
() prevents this by setting a
minimal geometry in pixels for the given partition
which (which must be either 0 or 1). If the value -1
is given, no minimum is set.
The separator can also be moved programmatically with the
AG_PaneMoveDivider
() function.
AG_PaneMoveDivider
() tries to move the divider to
the specified position x (in pixels) and returns the
actual new position. Note that AG_PaneMoveDivider
()
will not have any effect if any of the
AG_PANE_FORCE_*
options are set.
The AG_PaneMoveDividerPct
() variant
accepts an argument in % of total available size. If
AG_PaneResizeAction
() is used with
AG_PANE_DIVIDE_PCT
, this percentage is preserved
through resizing.
AG_PaneResizeAction
() specifies the
behavior of AG_Pane
following a resize of the parent
container widget. Possible arguments include:
- AG_PANE_EXPAND_DIV1
- Expand or shrink the left/upper division (default).
- AG_PANE_EXPAND_DIV2
- Expand or shrink the right/lower division.
- AG_PANE_DIVIDE_EVEN
- Divide the space evenly in two.
- AG_PANE_DIVIDE_PCT
- Divide the space by the percentage value specified in
AG_PaneMoveDividerPct
().