wxHyperlinkCtrlThis 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 wxHyperlinkEvent is sent but if that event is not handled (or it's skipped; see wxEvent::Skip), then a call to wxLaunchDefaultBrowser is done with the hyperlink's URL. Note that standard wxWindow functions like SetBackgroundColour, SetFont, SetCursor, SetLabel can be used to customize appearance of the hyperlink. Derived from
wxControl Include files <wx/hyperlink.h> Window styles
See also window styles overview. Event handling To process input from an hyperlink control, use these event handler macros to direct input to member functions that take a wxHyperlinkEvent argument.
See also Members
wxHyperlinkCtrl::wxHyperLink
wxHyperlinkCtrl::wxHyperLinkwxHyperLink(wxWindow* parent, wxWindowID id, const wxString & label, const wxString & url, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style, const wxString& name = "hyperlink") Constructor. See Create for more info.
wxHyperlinkCtrl::Createbool Create(wxWindow* parent, wxWindowID id, const wxString & label, const wxString & url, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style, const wxString& name = "hyperlink") Creates the hyperlink control. Parameters parent
id
label
url
pos
size
style
validator
name
wxHyperlinkCtrl::GetHoverColourwxColour GetHoverColour() const Returns the colour used to print the label of the hyperlink when the mouse is over the control.
wxHyperlinkCtrl::SetHoverColourvoid SetHoverColour(const wxColour & colour) Sets the colour used to print the label of the hyperlink when the mouse is over the control.
wxHyperlinkCtrl::GetNormalColourwxColour GetNormalColour() const 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.
wxHyperlinkCtrl::SetNormalColourvoid SetNormalColour(const wxColour & colour) 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.
wxHyperlinkCtrl::GetVisitedColourwxColour GetVisitedColour() const 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).
wxHyperlinkCtrl::SetVisitedColourvoid SetVisitedColour(const wxColour & colour) 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).
wxHyperlinkCtrl::GetVisitedbool GetVisited() const Returns true if the hyperlink has already been clicked by the user at least one time.
wxHyperlinkCtrl::SetVisitedvoid SetVisited(bool visited = true) Marks the hyperlink as visited (see SetVisitedColour).
wxHyperlinkCtrl::GetURLwxString GetURL() const Returns the URL associated with the hyperlink.
wxHyperlinkCtrl::SetURLvoid SetURL(const wxString & url) Sets the URL associated with the hyperlink.
|