wHyperlinkCtrl

This control shows a static text which links to one or more link. The label of this control can be marked-up text. For example: "<a href=\"https://github.com/khchen/wNim\">click here</A> and <a id=\"linkId\">here</a>".

Appearance:
Superclass:wControl
Styles:
StylesDescription
wHlAlignLeftAlign the text to the left.
wHlAlignRightAlign the text to the right.
Events:wHyperlinkEvent

Consts

wHlAlignLeft = 0
wHlAlignRight = 0x00000020

Procs

proc getItemCount(self: wHyperlinkCtrl): int {...}{.raises: [], tags: [].}
Returns the number of items in the hyperlink control.
proc len(self: wHyperlinkCtrl): int {...}{.inline, raises: [], tags: [].}
Returns the number of items in the hyperlink control. The same as getItemCount().
proc getFocused(self: wHyperlinkCtrl): int {...}{.raises: [], tags: [].}
Returns the index of current focused item.
proc setFocused(self: wHyperlinkCtrl; index: int) {...}{.raises: [], tags: [].}
Sets focused item.
proc getUrl(self: wHyperlinkCtrl; index = -1): string {...}{.inline, raises: [], tags: [].}
Returns the URL associated with the hyperlink. Index == -1 means the current focused item.
proc getLinkId(self: wHyperlinkCtrl; index = -1): string {...}{.inline, raises: [], tags: [].}
Returns the link ID associated with the hyperlink. Index == -1 means the current focused item.
proc getVisited(self: wHyperlinkCtrl; index = -1): bool {...}{.inline, raises: [], tags: [].}
Returns true if the hyperlink has already been clicked by the user at least one time. Index == -1 means the current focused item.
proc setUrl(self: wHyperlinkCtrl; url: string; index = -1) {...}{.raises: [IndexDefect],
    tags: [].}
Sets the URL associated with the hyperlink. Index == -1 means the current focused item.
proc setLinkId(self: wHyperlinkCtrl; linkId: string; index = -1) {...}{.
    raises: [IndexDefect], tags: [].}
Sets the link ID associated with the hyperlink. Index == -1 means the current focused item.
proc setVisited(self: wHyperlinkCtrl; flag = true; index = -1) {...}{.raises: [], tags: [].}
Marks the hyperlink as visited. Index == -1 means the current focused item.
proc init(self: wHyperlinkCtrl; parent: wWindow; id = wDefaultID; label: string = "";
         pos = wDefaultPoint; size = wDefaultSize; style: wStyle = 0) {...}{.raises: [
    wNilAccess, wWindowError, wCursorError, wBrushError, Exception, IndexDefect,
    wFontError], tags: [RootEffect].}
Initializes a hyperlink control.
proc HyperlinkCtrl(parent: wWindow; id = wDefaultID; label: string = "";
                  pos = wDefaultPoint; size = wDefaultSize; style: wStyle = 0): wHyperlinkCtrl {...}{.
    inline, discardable, raises: [wNilAccess, wWindowError, wCursorError, wBrushError,
                               Exception, IndexDefect, wFontError],
    tags: [RootEffect].}
Constructor.

Methods

method getBestSize(self: wHyperlinkCtrl): wSize {...}{.raises: [], tags: [].}
Returns the best acceptable minimal size for the control.
method getDefaultSize(self: wHyperlinkCtrl): wSize {...}{.inline, raises: [], tags: [].}
Returns the default size for the control.
method release(self: wHyperlinkCtrl) {...}{.raises: [], tags: [].}
Release all the resources during destroying. Used internally.