IUP::Link - [GUI element] label that displays an underlined clickable text
Creates a label that displays an underlined clickable text. It is derived from IUP::Label.
$link = IUP::Link->new( TITLE=>"Clickable text", URL=>'http://server.com/path/file.html' );
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:
Inherits all attributes of the IUP::Label, but redefines a few attributes.
Text color. Default: the global attribute LINKFGCOLOR.
URL Address or a special values "NO" (= not clickable).
For more info about concept of callbacks (setting callback handlers etc.) see IUP::Manual::04_Callbacks. Callbacks specific to this element:
Inherits all callbacks of the IUP::Label.
ACTION
Action generated when the link is activated.
Callback handler prototype:
sub action_handler { my ($self, $url) = @_; #... }
$self: reference to the element (IUP::Link) that activated the event
$url: the destination address of the link
Returns: IUP_CLOSE will be processed. If returns IUP_DEFAULT or it is not defined, the Help function will be called.
When the cursor is over the text, it is changed to the HAND cursor.
If the callback is not defined the Help function is called with the given URL.
The IUP::Label callbacks BUTTON_CB, ENTERWINDOW_CB and LEAVEWINDOW_CB are used internally.
The element IUP::Link is used in the following sample scripts:
0-basic/label.pl - IUP::Label and IUP::Link example
IUP::Label
The original doc: iuplink.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.