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