View on
MetaCPAN is shutting down
For details read Perl NOC. After June 25th this page will redirect to
kmx > IUP-0.101 > IUP::Normalizer



Annotate this POD


New  2
Open  1
View/Report Bugs
Source   Latest Release: IUP-0.305


IUP::Normalizer - [special] normalizes all controls from a list to be the biggest natural size


Normalizes all controls from a list so their natural size to be the biggest natural size among them. All natural width will be set to the biggest width, and all natural height will be set to the biggest height according to is value.

 my $normalizer = IUP::Normalizer->new( child=>[$elem1, $elem2, $elem3], NORMALIZE=>"HORIZONTAL" );
 #at his point $elem1 ... $elem3 are normalized, IUP::Normalizer instance can be destroyed
 undef $normalizer;


CREATION - new() method

 #standard way
 $normalizer = IUP::Normalizer->new( child=>[$elem1, $elem2], NORMALIZE=>"HORIZONTAL" );
 #or with just a single child
 $normalizer = IUP::Normalizer->new( child=>$elem1, NORMALIZE=>"HORIZONTAL" );
 #or with just 1 parameter (arrayref)
 $normalizer = IUP::Normalizer->new( [$elem1, $elem2] );
 #or with just 1 parameter (reference to child elements)
 $normalizer = IUP::Normalizer->new( $elem1 );

child: (named parameter) List of the references to elements (or just a single element) that will be normalized.

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.


For more info about concept of attributes (setting/getting values etc.) see IUP::Manual::03_Attributes. Attributes specific to this element:


It is NOT necessary to add the normalizer to a dialog hierarchy. Every time the NORMALIZE attribute is set a normalization occurs. If the normalizer is added to a dialog hierarchy, then whenever the Natural size is calculated a normalization occurs, so add it to the hierarchy before the elements you want to normalize or its normalization will be not used.

The elements do NOT need to be children of the same parent, do NOT need to be mapped, and do NOT need to be in a complete hierarchy of a dialog.

The elements are NOT children of the normalizer. To remove or add other elements, the normalizer must be destroyed and created a new one.

Has the same effect of the NORMALIZESIZE attribute of the IUP::Vbox and IUP::Hbox controls, but it can be used for elements with different parents, it changes the User size of the elements.


Unfortunately there are no sample scripts using this element.


IUP::Hbox, IUP::Vbox

The original doc: iupnormalizer.html

syntax highlighting: