IUP::Zbox - [GUI element] container for composing elements in hidden layers with only one layer visible
Creates a void container for composing elements in hidden layers with only one layer visible. It is a box that piles up the children it contains, only the one child is visible.
It does not have a native representation.
Zbox works by changing the VISIBLE attribute of its children, so if any of the grand children has its VISIBLE attribute directly defined then Zbox will NOT change its state.
CREATION - new() method
#standard way my $zbox = IUP::Zbox->new( child=>[$elem1, $elem2], ANYATTRIBUTE=>'any value' ); #or with just a single child my $zbox = IUP::Zbox->new( child=>$elem, ANYATTRIBUTE=>'any value' ); #or with just 1 parameter (arrayref) my $zbox = IUP::Zbox->new( [$elem1, $elem2] ); #or with just 1 parameter (reference to child elements) my $zbox = IUP::Zbox->new( $elem );
child: (named parameter) List of the references to elements (or just a single element) that will be placed in the box. Can be
Returns: the identifier of the created element, or
undef if an error occurs.
NOTE: You can pass to
CALLBACKNAME=>\&func pairs relevant to this element - see IUP::Manual::02_Elements.
For more info about concept of attributes (setting/getting values etc.) see IUP::Manual::03_Attributes. Attributes specific to this element:
Defines the alignment of the visible child. Possible values:
"NORTH", "SOUTH", "WEST", "EAST", "NE", "SE", "NW", "SW", "ACENTER".
The default value is "YES".
(non inheritable, at children only)
If a child has FLOATING=YES then its size and position will be ignored by the layout processing. Default: "NO".
The visible child. The value passed must be the perl reference or name of one of the children contained in the zbox.
When the value is changed the selected child is made visible and all other children are made invisible, regardless their previous visible state.
The visible child accessed by its handle. The value passed must be the handle of a child contained in the zbox. When the zbox is created, the first element inserted is set as the visible child.
The visible child accessed by its position. The value passed must be the index of a child contained in the zbox, starting at 0. When the zbox is created, the first element inserted is set as the visible child.
- SIZE / RASTERSIZE (non inheritable)
The default size is the smallest size that fits its largest child. All child elements are considered even invisible ones, except when FLOATING=YES in a child.
Returns -1 if mapped.
The following common attributes are also accepted:
The element IUP::Zbox is used in the following sample scripts:
0-basic/zbox.pl - IUP::Zbox example
The original doc: iupzbox.html