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