This class shows a static text element which links to an URL.
Appearance and behaviour is completely customizable. In fact, when the user
clicks on the hyperlink, a HyperlinkEvent is
sent but if that event is not handled (or it’s skipped; see
Event#skip), then a call to
LaunchDefaultBrowser is done with the
hyperlink’s URL.
Note that standard Window functions like set_background_colour, set_font, set_cursor, set_label can be used to customize appearance of the hyperlink.
HL_ALIGN_LEFT |
Align the text to the left. | ||
HL_ALIGN_RIGHT |
Align the text to the right. | ||
HL_ALIGN_CENTRE |
Center the text (horizontally). | ||
HL_CONTEXTMENU |
Pop up a context menu when the hyperlink is right-clicked. The context menu contains a ``Copy URL" menu item which is automatically handled by the hyperlink and which just copies in the clipboard the URL (not the label) of the control. |
||
HL_DEFAULT_STYLE |
The default style for HyperlinkCtrl: @NO_BORDER | HL_CONTEXTMENU | HL_ALIGN_CENTRE@. |
See also window styles overview.
To process input from an hyperlink control, use these event handler macros to
direct input to member functions that take a
HyperlinkEvent argument.
evt_hyperlink(id) { | event | … } | The hyperlink was (left) clicked. If this event is not handled in user’s code (or it’s skipped; see Event#skip), then a call to LaunchDefaultBrowser is done with the hyperlink’s URL. |
Constructor. See Create for more info.
Creates the hyperlink control.
Returns the colour used to print the label of the hyperlink when the mouse is over the control.
Sets the colour used to print the label of the hyperlink when the mouse is over the control.
Returns the colour used to print the label when the link has never been clicked before
(i.e. the link has not been visited) and the mouse is not over the control.
Sets the colour used to print the label when the link has never been clicked before
(i.e. the link has not been visited) and the mouse is not over the control.
Returns the colour used to print the label when the mouse is not over the control
and the link has already been clicked before (i.e. the link has been visited).
Sets the colour used to print the label when the mouse is not over the control
and the link has already been clicked before (i.e. the link has been visited).
Returns if the hyperlink has already been clicked by the user at least one time.
Marks the hyperlink as visited (see set_visited_colour).
Returns the URL associated with the hyperlink.
Sets the URL associated with the hyperlink.
[This page automatically generated from the Textile source at 2023-06-13 21:31:43 +0000]