IUP::Split - [GUI element] container that split its client area in two
Creates a void container that split its client area in two. Allows the provided controls to be enclosed in a box that allows expanding and contracting the element size in one direction, but when one is expanded the other is contracted.
It does not have a native representation, but it contains also a IUP::Canvas to implement the bar handler.
$split = IUP::Split->new($child1, $child2);
$child1: Identifier of an interface element that will be at left or top. It can be undef.
undef
$child2: Identifier of an interface element that will be at right or bottom. It can be undef.
Returns: the identifier of the created element, or undef if an error occurs.
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
For more info about concept of attributes (setting/getting values etc.) see IUP::Manual::03_Attributes. Attributes specific to this element:
(non inheritable)
If the child client area is smaller than the bar size, then automatically hide the child. Default: NO.
Controls the size of the bar handler. Default: 5.
Changes the color of the bar grip affordance. The value should be given in "R G B" color style. Default: "192 192 192".
(creation only)
Indicates the orientation of the bar handler. The direction of the resize is perpendicular to the orientation. Possible values are "VERTICAL" or "HORIZONTAL". Default: "VERTICAL".
The default value is "YES".
When the bar is moved automatically update the children layout. Default: YES. If set to NO then the layout will be updated only when the mouse drag is released.
Sets minimum and maximum crop values for VALUE, in the format "%d:%d" [min:max]. The min value can not be less than 0, and the max value can not be larger than 1000. This will constrain the interactive change of the bar handler. Default: "0:1000". (Since iup-3.2)
Shows the bar grip affordance. Default: YES. When set to NO, the BARSIZE is changed from 5 to 3.
The proportion of the left or top (child1) client area relative to the full available area. It is an integer between 0 and 1000. If not defined or set to undef, the Native size of the two children will define its initial size.
(read-only)
Returns -1 if mapped.
The following common attributes are also accepted:
FONT, SIZE, RASTERSIZE, CLIENTSIZE, CLIENTOFFSET, POSITION, MINSIZE, MAXSIZE
The controls that you want to be resized must have the EXPAND=YES attribute set. The control inside the split will not be resized with a size lesser than its Natural size. See the IUP::Manual::05_DialogLayout for mode details on sizes.
IUP::Split is not capable of detecting a child minimum size, so if a child has a minimum size, then manually set the MINMAX attribute to avoid invalid positioning of the IUP::Split bar.
The IUP::Canvas bar handler is always the first child of the split. It can be obtained using GetChild or GetNextChild.
The IUP::Split control looks just like the IUP::Sbox, but internally is very different. While sbox controls only one element and can push other elements outside the dialog, split balance its internal size and never push other elements outside its boundaries.
The container can be created with no elements and be dynamic filled using Append or Insert.
Unfortunately there are no sample scripts using this element.
The original doc: iupsplit.html
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.