forked from sabrogden/Ditto
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathToolTipEx.h
159 lines (140 loc) · 4.73 KB
/
ToolTipEx.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
#pragma once
#include "RichEditCtrlEx.h"
#include "WndEx.h"
#include "DittoWindow.h"
#include "GdipButton.h"
#include "ImageViewer.h"
#include "GroupStatic.h"
#include "Accels.h"
#include "SnapWindow.h"
#include "SimpleBrowser.h"
class CToolTipEx : public CWnd
{
// Construction
public:
CToolTipEx();
// Attributes
public:
// Operations
public:
BOOL OnMsg(MSG* pMsg);
BOOL Create(CWnd* pParentWnd);
BOOL Show(CPoint point);
BOOL Hide();
void SetToolTipText(const CString &csText);
void SetRTFText(const CStringA &rtf);
void SetHtmlText(const CString &html);
void SetGdiplusBitmap(Gdiplus::Bitmap *gdiplusBitmap);
void SetNotifyWnd(CWnd *pNotify) { m_pNotifyWnd = pNotify; }
void HideWindowInXMilliSeconds(long lms);
CRect GetBoundsRect();
void SetClipId(int clipId) { m_clipId = clipId; }
int GetClipId() { return m_clipId; }
void SetClipRow(int clipRow) { m_clipRow = clipRow; }
int GetClipRow() { return m_clipRow; }
void SetSearchText(CString text) { m_searchText = text; }
void SetClipData(CString data) { m_clipData = data; m_originalClipData = data; }
void SetFolderPath(CString path) { m_folderPath = path; }
bool GetShowPersistant() { return m_showPersistant; }
void ToggleShowPersistant() { OnFirstAlwaysontop(); }
bool ToggleWordWrap();
void SetTooltipActions(CAccels *pToolTipActions) { m_pToolTipActions = pToolTipActions; }
void GetWindowRectEx(LPRECT lpRect);
void UpdateMenuShortCut(CMenu *subMenu, int id, DWORD action);
void DoSearch();
void MoveControls();
BOOL SetLogFont(LPLOGFONT lpLogFont, BOOL bRedraw /*=TRUE*/);
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CToolTipEx)
protected:
virtual void PostNcDestroy();
virtual BOOL PreTranslateMessage(MSG* pMsg);
//}}AFX_VIRTUAL
// Implementation
public:
virtual ~CToolTipEx();
protected:
DWORD m_dwTextStyle;
CRect m_rectMargin;
CString m_csText;
CFont m_Font;
int m_fontHeight;
CStringA m_csRTF;
CString m_html;
CRichEditCtrlEx m_RichEdit;
SimpleBrowser m_browser;
CWnd *m_pNotifyWnd;
CGdipButton m_optionsButton;
int m_clipId;
CString m_searchText;
CScrollBar m_vScroll;
CScrollBar m_hScroll;
CDittoWindow m_DittoWindow;
CImageViewer m_imageViewer;
CGroupStatic m_clipDataStatic;
CGroupStatic m_folderPathStatic;
CString m_clipData;
CString m_originalClipData;
CFont m_clipDataFont;
bool m_saveWindowLockout;
int m_clipRow;
bool m_showPersistant;
CAccels *m_pToolTipActions;
bool m_bMaxSetTimer;
int m_lDelayMaxSeconds;
SnapWindow m_snap;
CString m_folderPath;
bool m_showingText;
bool m_showingRTF;
bool m_showingHTML;
bool m_showingImage;
protected:
CString GetFieldFromString(CString ref, int nIndex, TCHAR ch);
BOOL IsCursorInToolTip();
void HighlightSearchText();
void ApplyWordWrap();
void SaveWindowSize();
CString m_mouseDownOnLink;
// Generated message map functions
protected:
//{{AFX_MSG(CToolTipEx)
afx_msg void OnSize(UINT nType, int cx, int cy);
afx_msg HITTEST_RET OnNcHitTest(CPoint point);
afx_msg void OnActivate(UINT nState, CWnd* pWndOther, BOOL bMinimized);
afx_msg void OnNcMouseMove(UINT nHitTest, CPoint point);
afx_msg void OnNcLButtonUp(UINT nHitTest, CPoint point);
afx_msg void OnNcLButtonDown(UINT nHitTest, CPoint point);
afx_msg void OnNcCalcSize(BOOL bCalcValidRects, NCCALCSIZE_PARAMS FAR* lpncsp);
afx_msg void OnNcPaint();
afx_msg void OnOptions();
afx_msg void OnWindowPosChanging(WINDOWPOS* lpwndpos);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
public:
afx_msg void OnTimer(UINT_PTR nIDEvent);
afx_msg void OnRememberwindowposition();
afx_msg void OnSizewindowtocontent();
afx_msg void OnScaleimagestofitwindow();
afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
afx_msg void OnSetFocus(CWnd* pOldWnd);
afx_msg void OnPaint();
afx_msg void OnFirstHidedescriptionwindowonm();
afx_msg void OnFirstWraptext();
afx_msg void OnNcLButtonDblClk(UINT nHitTest, CPoint point);
afx_msg void OnFirstAlwaysontop();
virtual BOOL OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult);
void OnEnMsgfilterRichedit21(NMHDR *pNMHDR, LRESULT *pResult);
afx_msg LRESULT OnDpiChanged(WPARAM wParam, LPARAM lParam);
afx_msg void OnMoving(UINT fwSide, LPRECT pRect);
afx_msg void OnEnterSizeMove();
afx_msg void OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
afx_msg LRESULT OnRefreshFooter(WPARAM wParam, LPARAM lParam);
afx_msg void OnFirstViewtext();
afx_msg void OnFirstViewrtf();
afx_msg void OnFirstViewhtml();
afx_msg void OnFirstViewImage();
afx_msg void OnUpdateFirstViewtext(CCmdUI* pCmdUI);
afx_msg void OnUpdateFirstViewrtf(CCmdUI* pCmdUI);
afx_msg void OnUpdateFirstViewhtml(CCmdUI* pCmdUI);
};