X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7c913512a4c9f36e11e07ea707002fab1608d324..e333075415c35d2e869ea585fa41f01a2c938897:/interface/hyperlink.h diff --git a/interface/hyperlink.h b/interface/hyperlink.h index 0e7b171f38..5421ca0e0c 100644 --- a/interface/hyperlink.h +++ b/interface/hyperlink.h @@ -1,6 +1,6 @@ ///////////////////////////////////////////////////////////////////////////// // Name: hyperlink.h -// Purpose: documentation for wxHyperlinkEvent class +// Purpose: interface of wxHyperlinkEvent // Author: wxWidgets team // RCS-ID: $Id$ // Licence: wxWindows license @@ -22,21 +22,22 @@ public: /** The constructor is not normally used by the user code. */ - wxHyperlinkEvent(wxObject * generator, int id, - const wxString & url); + wxHyperlinkEvent(wxObject* generator, int id, + const wxString& url); /** Returns the URL of the hyperlink where the user has just clicked. */ -#define wxString GetURL() /* implementation is private */ + wxString GetURL() const; /** Sets the URL associated with the event. */ -#define void SetURL(const wxString & url) /* implementation is private */ + void SetURL(const wxString& url); }; + /** @class wxHyperlinkCtrl @wxheader{hyperlink.h} @@ -46,7 +47,7 @@ public: 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 + wxLaunchDefaultBrowser() is done with the hyperlink's URL. Note that standard wxWindow functions like wxWindow::SetBackgroundColour, @@ -73,46 +74,37 @@ public: @category{ctrl} @appearance{hyperlinkctrl.png} - @seealso - wxURL, wxHyperlinkEvent + @see wxURL, wxHyperlinkEvent */ class wxHyperlinkCtrl : public wxControl { public: /** Creates the hyperlink control. - + @param parent - Parent window. Must not be @NULL. - + Parent window. Must not be @NULL. @param id - Window identifier. A value of wxID_ANY indicates a default value. - + Window identifier. A value of wxID_ANY indicates a default value. @param label - The label of the hyperlink. - + The label of the hyperlink. @param url - The URL associated with the given label. - + The URL associated with the given label. @param pos - Window position. - + Window position. @param size - Window size. If the wxDefaultSize is specified then the window is sized - appropriately. - + Window size. If the wxDefaultSize is specified then the window is sized + appropriately. @param style - Window style. See wxHyperlinkCtrl. - + Window style. See wxHyperlinkCtrl. @param validator - Window validator. - + Window validator. @param name - Window name. + Window name. */ bool Create(wxWindow* parent, wxWindowID id, - const wxString & label, - const wxString & url, + const wxString& label, + const wxString& url, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style, @@ -122,25 +114,25 @@ public: Returns the colour used to print the label of the hyperlink when the mouse is over the control. */ - wxColour GetHoverColour(); + wxColour GetHoverColour() const; /** Returns the colour used to print the label when the link has never been clicked before (i.e. the link has not been @e visited) and the mouse is not over the control. */ - wxColour GetNormalColour(); + wxColour GetNormalColour() const; /** Returns the URL associated with the hyperlink. */ -#define wxString GetURL() /* implementation is private */ + wxString GetURL() const; /** Returns @true if the hyperlink has already been clicked by the user at least one time. */ - bool GetVisited(); + bool GetVisited() const; /** Returns the colour used to print the label when the mouse is not over the @@ -148,46 +140,47 @@ public: and the link has already been clicked before (i.e. the link has been @e visited). */ - wxColour GetVisitedColour(); + wxColour GetVisitedColour() const; /** Sets the colour used to print the label of the hyperlink when the mouse is over the control. */ - void SetHoverColour(const wxColour & colour); + void SetHoverColour(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 @e visited) and the mouse is not over the control. */ - void SetNormalColour(const wxColour & colour); + void SetNormalColour(const wxColour& colour); /** Sets the URL associated with the hyperlink. */ -#define void SetURL(const wxString & url) /* implementation is private */ + void SetURL(const wxString& url); /** Marks the hyperlink as visited (see wxHyperlinkCtrl::SetVisitedColour). */ - void SetVisited(bool visited = @true); + void SetVisited(bool visited = true); /** 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 @e visited). */ - void SetVisitedColour(const wxColour & colour); + void SetVisitedColour(const wxColour& colour); /** Constructor. See Create() for more info. */ wxHyperLink(wxWindow* parent, wxWindowID id, - const wxString & label, - const wxString & url, + const wxString& label, + const wxString& url, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style, const wxString& name = "hyperlink"); }; +