1 // TortoiseSVN - a Windows shell extension for easy version control
\r
3 // Copyright (C) 2003-2007,2008 - TortoiseSVN
\r
5 // This program is free software; you can redistribute it and/or
\r
6 // modify it under the terms of the GNU General Public License
\r
7 // as published by the Free Software Foundation; either version 2
\r
8 // of the License, or (at your option) any later version.
\r
10 // This program is distributed in the hope that it will be useful,
\r
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\r
13 // GNU General Public License for more details.
\r
15 // You should have received a copy of the GNU General Public License
\r
16 // along with this program; if not, write to the Free Software Foundation,
\r
17 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
\r
25 class CHyperLink : public CStatic
\r
29 virtual ~CHyperLink();
\r
32 enum UnderLineOptions
\r
40 void SetURL(CString strURL);
\r
41 CString GetURL() const;
\r
43 void SetColors(COLORREF crLinkColor, COLORREF crHoverColor = -1);
\r
44 COLORREF GetLinkColor() const;
\r
45 COLORREF GetHoverColor() const;
\r
47 void SetUnderline(int nUnderline = ulHover);
\r
48 int GetUnderline() const;
\r
51 virtual BOOL PreTranslateMessage(MSG* pMsg);
\r
52 virtual BOOL DestroyWindow();
\r
54 virtual void PreSubclassWindow();
\r
57 HINSTANCE GotoURL(LPCTSTR url);
\r
58 void SetDefaultCursor();
\r
61 COLORREF m_crLinkColor; ///< Hyperlink color
\r
62 COLORREF m_crHoverColor; ///< Hover color
\r
63 BOOL m_bOverControl; ///< cursor over control?
\r
64 int m_nUnderline; ///< underline hyperlink?
\r
65 CString m_strURL; ///< hyperlink URL
\r
66 CFont m_UnderlineFont; ///< Font for underline display
\r
67 CFont m_StdFont; ///< Standard font
\r
68 HCURSOR m_hLinkCursor; ///< Cursor for hyperlink
\r
69 CToolTipCtrl m_ToolTip; ///< The tooltip
\r
73 afx_msg HBRUSH CtlColor(CDC* pDC, UINT nCtlColor);
\r
74 afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
\r
75 afx_msg void OnMouseMove(UINT nFlags, CPoint point);
\r
76 afx_msg void OnTimer(UINT_PTR nIDEvent);
\r
77 afx_msg BOOL OnEraseBkgnd(CDC* pDC);
\r
78 afx_msg void OnClicked();
\r
79 DECLARE_MESSAGE_MAP()
\r