- // event handlers
-
- // Renders the hyperlink.
- void OnPaint(wxPaintEvent& event);
-
- // If the click originates inside the bounding box of the label,
- // a flag is set so that an event will be fired when the left
- // button is released.
- void OnLeftDown(wxMouseEvent& event);
-
- // If the click both originated and finished inside the bounding box
- // of the label, a HyperlinkEvent is fired.
- void OnLeftUp(wxMouseEvent& event);
- void OnRightUp(wxMouseEvent& event);
-
- // Changes the cursor to a hand, if the mouse is inside the label's
- // bounding box.
- void OnEnterWindow(wxMouseEvent& event);
-
- // Changes the cursor back to the default, if necessary.
- void OnLeaveWindow(wxMouseEvent& event);
-
- // handles "Copy URL" menuitem
- void OnPopUpCopy(wxCommandEvent& event);
-
-
- // overridden base class virtuals
-
- // Returns the best size for the window, which is the size needed
- // to display the text label.
- virtual void DoGetSize(int *width, int *height) const;
- virtual wxSize DoGetBestSize() const;
-
- // creates a context menu with "Copy URL" menuitem
- virtual void DoContextMenu(const wxPoint &);
-
-private:
- // URL associated with the link. This is transmitted inside
- // the HyperlinkEvent fired when the user clicks on the label.
- wxString m_url;
-
- // Foreground colours for various link types.
- // NOTE: wxWindow::m_backgroundColour is used for background,
- // wxWindow::m_foregroundColour is used to render non-visited links
- wxColour m_hoverColour;
- wxColour m_normalColour;
- wxColour m_visitedColour;