SYNOPSIS
#include <agar/core.h> #include <agar/gui.h>
DESCRIPTION
The
AG_MPane widget divides space into a set of
AG_Box(3) partitions much like the
AG_Pane(3) widget, except that up to 4 partitions are allowed.
It is possible to switch during different partition layouts at runtime,
making
AG_MPane useful for 3D modeling applications.
INHERITANCE HIERARCHY
AG_Object(3)-> AG_Widget(3)-> AG_MPane.
INITIALIZATION
AG_MPane * AG_MPaneNew (AG_Widget *parent, enum ag_mpane_layout layout, Uint flags)
void AG_MPaneSetLayout (AG_MPane *mpane, enum ag_mpane_layout layout)
The AG_MPaneNew() function allocates, initializes, and attaches a new AG_MPane widget. Acceptable values for the layout argument include:
enum ag_mpane_layout { AG_MPANE1, /* Single view */ AG_MPANE2V, /* Dual views (left/right) */ AG_MPANE2H, /* Dual views (top/bottom) */ AG_MPANE2L1R, /* Two views left, one view right */ AG_MPANE1L2R, /* One view left, two views right */ AG_MPANE2T1B, /* Two views top, one view bottom */ AG_MPANE1T2B, /* One view top, two views bottom */ AG_MPANE3L1R, /* Three views left, one view right */ AG_MPANE1L3R, /* One view left, three views right */ AG_MPANE3T1B, /* Three views top, one view bottom */ AG_MPANE1T3B, /* One view top, three views bottom */ AG_MPANE4 /* Four views */ };
Acceptable flags include:
AG_MPANE_FRAMES | Render decorative frames. |
AG_MPANE_FORCE_DIV | Don't allow the user to move the dividers. |
AG_MPANE_HFILL | Expand horizontally in parent container. |
AG_MPANE_VFILL | Expand vertically in parent container. |
AG_MPANE_EXPAND | Shorthand for AG_MPANE_HFILL AG_MPANE_VFILL|. |
The AG_MPaneSetLayout() function changes the current layout, recreating all the AG_Box(3) partitions from scratch.
EVENTS
The
AG_MPane widget does not generate any event.
STRUCTURE DATA
For the
AG_MPane object:
enum ag_mpane_layout layout | Layout as set by AG_MPaneSetLayout(). |
AG_Box *panes[] | The container widgets |
Uint npanes | Number of containers for current layout. |
SEE ALSO
HISTORY
The
AG_MPane widget first appeared in
Agar 1.0.
BUGS
Unlike with
AG_Pane(3), it is impossible to reuse existing containers.