wxWindow::SetFont, wxWindow::SetCursor, wxWindow::SetLabel can be used to customize appearance of the hyperlink.
@beginStyleTable
- @style{wxHL_ALIGN_LEFT}:
+ @style{wxHL_ALIGN_LEFT}
Align the text to the left.
- @style{wxHL_ALIGN_RIGHT}:
+ @style{wxHL_ALIGN_RIGHT}
Align the text to the right.
- @style{wxHL_ALIGN_CENTRE}:
+ @style{wxHL_ALIGN_CENTRE}
Center the text (horizontally).
- @style{wxHL_CONTEXTMENU}:
+ @style{wxHL_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.
- @style{wxHL_DEFAULT_STYLE}:
+ @style{wxHL_DEFAULT_STYLE}
The default style for wxHyperlinkCtrl:
wxBORDER_NONE|wxHL_CONTEXTMENU|wxHL_ALIGN_CENTRE.
@endStyleTable
class wxHyperlinkCtrl : public wxControl
{
public:
+ /**
+ Constructor. See Create() for more info.
+ */
+ wxHyperLink(wxWindow* parent, wxWindowID id,
+ const wxString& label,
+ const wxString& url,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxHL_DEFAULT_STYLE,
+ const wxString& name = "hyperlink");
+
/**
Creates the hyperlink control.
-
+
@param parent
Parent window. Must not be @NULL.
@param id
const wxString& url,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
- long style,
+ long style = wxHL_DEFAULT_STYLE,
const wxString& name = "hyperlink");
/**
Returns @true if the hyperlink has already been clicked by the user at least
one time.
*/
- bool GetVisited() const;
+ virtual bool GetVisited() const = 0;
/**
Returns the colour used to print the label when the mouse is not over the
/**
Marks the hyperlink as visited (see wxHyperlinkCtrl::SetVisitedColour).
*/
- void SetVisited(bool visited = true);
+ virtual void SetVisited(bool visited = true) = 0;
/**
Sets the colour used to print the label when the mouse is not over the control
visited).
*/
void SetVisitedColour(const wxColour& colour);
-
- /**
- Constructor. See Create() for more info.
- */
- wxHyperLink(wxWindow* parent, wxWindowID id,
- const wxString& label,
- const wxString& url,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style,
- const wxString& name = "hyperlink");
};