The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

IUP::Link - [GUI element] label that displays an underlined clickable text

DESCRIPTION

Creates a label that displays an underlined clickable text. It is derived from IUP::Label.

USAGE

CREATION - new() method

 $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.

NOTE: You can pass to new() other ATTRIBUTE=>'value' or CALLBACKNAME=>\&func pairs relevant to this element - see IUP::Manual::02_Elements.

ATTRIBUTES

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.

FGCOLOR

Text color. Default: the global attribute LINKFGCOLOR.

URL

URL Address or a special values "NO" (= not clickable).

CALLBACKS

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.

NOTES

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.

EXAMPLES

The element IUP::Link is used in the following sample scripts:

SEE ALSO

IUP::Label

The original doc: iuplink.html