IUP::Gauge - [GUI element] shows a percent value that can be updated to simulate a progression
Creates a Gauge control. Shows a percent value that can be updated to simulate a progression. It inherits from IUP::Canvas.
It is recommended that new applications use the IUP::ProgressBar control.
$gauge = IUP::Gauge->new( MIN=>0, MAX=>100 );
Returns: the identifier of the created element, or undef if an error occurs.
undef
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:
Changes the style of the gauge for a dashed pattern. Default is "NO".
Controls the gauge and text color. The default is "64 96 192".
(non inheritable) Contains the maximum value. Default is "1".
(non inheritable) Contains the minimum value. Default is "0".
internal margin. Works just like the MARGIN attribute of the IUP::Hbox and IUP::Vbox containers, but uses a different name to avoid inheritance problems. Default value: "0x0".
Indicates if the text inside the Gauge is to be shown or not. If the gauge is dashed the text is never shown. Possible values: "YES" or "NO". Default: "YES".
(non inheritable) The initial size is "120x14". Set to undef to allow the automatic layout use smaller values.
(non inheritable) Contains a text to be shown inside the Gauge when SHOW_TEXT=YES. If it is undef, the percentage calculated from VALUE will be used. If the gauge is dashed the text is never shown.
(non inheritable) Contains a number between "MIN" and "MAX", controlling the current position.
The following common attributes are also accepted:
ACTIVE, BGCOLOR, EXPAND, FONT, SCREENPOSITION, POSITION, MINSIZE, MAXSIZE, WID, TIP, RASTERSIZE, ZORDER, VISIBLE
For more info about concept of callbacks (setting callback handlers etc.) see IUP::Manual::04_Callbacks. Callbacks specific to this element:
common callbacks are supported: MAP_CB, UNMAP_CB
The element IUP::Gauge is used in the following sample scripts:
0-basic/gauge.pl - IUP::Gauge example
IUP::Canvas
The original doc: iupgauge.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.