1
// TortoiseGit - a Windows shell extension for easy version control
3 // Copyright (C) 2023 - TortoiseGit
4 // Copyright (C) 2009, 2012, 2015-2016 - TortoiseSVN
6 // This program is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU General Public License
8 // as published by the Free Software Foundation; either version 2
9 // of the License, or (at your option) any later version.
11 // This program is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
16 // You should have received a copy of the GNU General Public License
17 // along with this program; if not, write to the Free Software Foundation,
18 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
23 class CLinkControl
: public CStatic
27 virtual ~CLinkControl();
29 static const UINT LK_LINKITEMCLICKED
;
32 void PreSubclassWindow() override
;
33 BOOL
OnWndMsg(UINT message
, WPARAM wParam
, LPARAM lParam
, LRESULT
* pResult
) override
;
36 HCURSOR m_hLinkCursor
= nullptr; // Cursor for hyperlink
37 CFont m_UnderlineFont
; // Font for underline display
38 CFont m_NormalFont
; // Font for default display
39 bool m_bOverControl
= false; // cursor over control?
42 void ClearFocusRect();
43 void NotifyParent(UINT msg
);
46 afx_msg BOOL
OnSetCursor(CWnd
* pWnd
, UINT nHitTest
, UINT message
);
47 afx_msg
void OnMouseMove(UINT nFlags
, CPoint point
);
48 afx_msg
void OnCaptureChanged(CWnd
*pWnd
);
49 afx_msg
void OnSetFocus(CWnd
* pOldWnd
);
50 afx_msg
void OnKillFocus(CWnd
* pNewWnd
);
51 afx_msg UINT
OnGetDlgCode();
52 afx_msg
void OnKeyDown(UINT nChar
, UINT nRepCnt
, UINT nFlags
);
53 afx_msg
void OnClicked();
54 afx_msg
void OnEnable(BOOL enabled
);