IUP::Cbox - [GUI element] container for position elements in absolute coordinates
Creates a void container for position elements in absolute coordinates. It is a concrete layout container.
It does not have a native representation.
The IUP::Cbox is equivalent of a IUP::Vbox or IUP::Hbox where all the children have the FLOATING attribute set to YES, but children must use CX and CY attributes instead of the POSITION attribute.
#standard way my $cbox = IUP::Cbox->new( child=>[$elem1, $elem2], ANYATTRIBUTE=>'XXX' ); #or with just a single child my $cbox = IUP::Cbox->new( child=>$elem, ANYATTRIBUTE=>'XXX' ); #or with just 1 parameter (arrayref) my $cbox = IUP::Cbox->new( [$elem1, $elem2] ); #or with just 1 parameter (reference to child elements) my $cbox = IUP::Cbox->new( $elem );
child: (named parameter) List of the references to elements (or just a single element) that will be placed in the box. It can be ommited (see note below).
Returns: The reference to the created element, or udnef if an error occurs.
udnef
NOTE: You can pass to new() other ATTRIBUTE=>'value' or CALLBACKNAME=>\&func pairs relevant to this element - see IUP::Manual::02_Elements.
new()
ATTRIBUTE=>'value'
CALLBACKNAME=>\&func
NOTE: IUP::Cbox can be created with no elements (no child params passed to new() constructor) and be dynamic filled later using $element->Append() and/or $element->Insert() methods.
$element->Append()
$element->Insert()
For more info about concept of attributes (setting/getting values etc.) see IUP::Manual::03_Attributes. Attributes specific to this element:
CX, CY (non inheritable) (at children only)
Position in pixels of the child relative to the top-left corner of the box. Must be set for each child inside the box.
EXPAND (non inheritable)
The default value is "YES".
SIZE / RASTERSIZE (non inheritable)
Must be defined for each child. If not defined for the box, then it will be the bounding box that includes all children in their position.
WID (read-only)
returns -1 if mapped.
The following common attributes are also accepted:
FONT, CLIENTSIZE, CLIENTOFFSET, POSITION, MINSIZE, MAXSIZE
The element IUP::Cbox is used in the following sample scripts:
0-basic/cbox.pl - IUP::Cbox example
IUP::Vbox, IUP::Hbox
The original doc: iupcbox.html
1 POD Error
The following errors were encountered while parsing the POD:
alternative text '0-basic/cbox.pl' contains non-escaped | or /
To install IUP, copy and paste the appropriate command in to your terminal.
cpanm
cpanm IUP
CPAN shell
perl -MCPAN -e shell install IUP
For more information on module installation, please visit the detailed CPAN module installation guide.