OLD | NEW |
1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
6 | 6 |
7 #ifndef FPDFSDK_INCLUDE_PDFWINDOW_PWL_NOTE_H_ | 7 #ifndef FPDFSDK_INCLUDE_PDFWINDOW_PWL_NOTE_H_ |
8 #define FPDFSDK_INCLUDE_PDFWINDOW_PWL_NOTE_H_ | 8 #define FPDFSDK_INCLUDE_PDFWINDOW_PWL_NOTE_H_ |
9 | 9 |
10 #include "PWL_Button.h" | 10 #include "PWL_Button.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 class CPWL_Note_Edit; | 21 class CPWL_Note_Edit; |
22 class CPWL_Note_Icon; | 22 class CPWL_Note_Icon; |
23 class CPWL_Note_LBBox; | 23 class CPWL_Note_LBBox; |
24 class CPWL_Note_Options; | 24 class CPWL_Note_Options; |
25 class CPWL_Note_RBBox; | 25 class CPWL_Note_RBBox; |
26 class IPWL_NoteHandler; | 26 class IPWL_NoteHandler; |
27 class IPWL_NoteItem; | 27 class IPWL_NoteItem; |
28 class IPWL_NoteNotify; | 28 class IPWL_NoteNotify; |
29 class IPopup_Note; | 29 class IPopup_Note; |
30 | 30 |
31 class IPWL_NoteNotify | 31 class IPWL_NoteNotify { |
32 { | 32 public: |
33 public: | 33 virtual ~IPWL_NoteNotify() {} |
34 virtual ~IPWL_NoteNotify() { } | 34 virtual void OnNoteMove(const FX_RECT& rtWin) = 0; |
35 virtual void OnNoteMove(const
FX_RECT& rtWin) = 0; | 35 virtual void OnNoteShow(FX_BOOL bShow) = 0; |
36 virtual void OnNoteShow(FX_BO
OL bShow) = 0; | 36 virtual void OnNoteActivate(FX_BOOL bActive) = 0; |
37 virtual void OnNoteActivate(F
X_BOOL bActive) = 0; | 37 virtual void OnNoteClose() = 0; |
38 virtual void OnNoteClose() =
0; | 38 virtual void OnItemCreate(IPWL_NoteItem* pItem) = 0; |
39 virtual void OnItemCreate(IPW
L_NoteItem* pItem) = 0; | 39 virtual void OnItemDelete(IPWL_NoteItem* pItem) = 0; |
40 virtual void OnItemDelete(IPW
L_NoteItem* pItem) = 0; | 40 virtual void OnSetAuthorName(IPWL_NoteItem* pItem) = 0; |
41 virtual void OnSetAuthorName(
IPWL_NoteItem* pItem) = 0; | 41 virtual void OnSetBkColor(IPWL_NoteItem* pItem) = 0; |
42 virtual void OnSetBkColor(IPW
L_NoteItem* pItem) = 0; | 42 virtual void OnSetContents(IPWL_NoteItem* pItem) = 0; |
43 virtual void OnSetContents(IP
WL_NoteItem* pItem) = 0; | 43 virtual void OnSetDateTime(IPWL_NoteItem* pItem) = 0; |
44 virtual void OnSetDateTime(IP
WL_NoteItem* pItem) = 0; | 44 virtual void OnSetSubjectName(IPWL_NoteItem* pItem) = 0; |
45 virtual void OnSetSubjectName
(IPWL_NoteItem* pItem) = 0; | 45 virtual void OnPopupMenu(int32_t x, int32_t y) = 0; |
46 virtual void OnPopupMenu(int3
2_t x, int32_t y) = 0; | 46 virtual void OnPopupMenu(IPWL_NoteItem* pItem, int32_t x, int32_t y) = 0; |
47 virtual void OnPopupMenu(IPWL
_NoteItem* pItem, int32_t x, int32_t y) = 0; | 47 }; |
48 }; | 48 |
49 | 49 class IPWL_NoteHandler { |
50 class IPWL_NoteHandler | 50 public: |
51 { | 51 virtual ~IPWL_NoteHandler() {} |
52 public: | 52 virtual void OnNoteColorChanged(const CPWL_Color& color) = 0; |
53 virtual ~IPWL_NoteHandler() { } | 53 }; |
54 virtual void OnNoteColorChang
ed(const CPWL_Color& color) = 0; | 54 |
55 }; | 55 class IPWL_NoteItem { |
56 | 56 public: |
57 class IPWL_NoteItem | 57 virtual ~IPWL_NoteItem() {} |
58 { | 58 virtual void SetPrivateData(void* pData) = 0; |
59 public: | 59 virtual void SetBkColor(const CPWL_Color& color) = 0; |
60 virtual ~IPWL_NoteItem() { } | 60 virtual void SetSubjectName(const CFX_WideString& sName) = 0; |
61 virtual void SetPrivateData(v
oid* pData) = 0; | 61 virtual void SetAuthorName(const CFX_WideString& sName) = 0; |
62 virtual void SetBkColor(const
CPWL_Color& color) = 0; | 62 virtual void SetDateTime(FX_SYSTEMTIME time) = 0; |
63 virtual void SetSubjectName(c
onst CFX_WideString& sName) = 0; | 63 virtual void SetContents(const CFX_WideString& sContents) = 0; |
64 virtual void SetAuthorName(co
nst CFX_WideString& sName) = 0; | 64 |
65 virtual void SetDateTime(FX_S
YSTEMTIME time) = 0; | 65 virtual IPWL_NoteItem* CreateSubItem() = 0; |
66 virtual void SetContents(cons
t CFX_WideString& sContents) = 0; | 66 virtual int32_t CountSubItems() const = 0; |
67 | 67 virtual IPWL_NoteItem* GetSubItems(int32_t index) const = 0; |
68 virtual IPWL_NoteItem* CreateSubItem() = 0; | 68 virtual void DeleteSubItem(IPWL_NoteItem* pNoteItem) = 0; |
69 virtual int32_t CountSubItems() const =
0; | 69 virtual void SetFocus() = 0; |
70 virtual IPWL_NoteItem* GetSubItems(int32_t inde
x) const = 0; | 70 |
71 virtual void DeleteSubItem(IP
WL_NoteItem* pNoteItem) = 0; | 71 virtual IPWL_NoteItem* GetParentItem() const = 0; |
72 virtual void SetFocus() = 0; | 72 virtual void* GetPrivateData() const = 0; |
73 | 73 virtual CFX_WideString GetAuthorName() const = 0; |
74 virtual IPWL_NoteItem* GetParentItem() const =
0; | 74 virtual CPWL_Color GetBkColor() const = 0; |
75 virtual void* GetPrivateData()
const = 0; | 75 virtual CFX_WideString GetContents() const = 0; |
76 virtual CFX_WideString GetAuthorName() const =
0; | 76 virtual FX_SYSTEMTIME GetDateTime() const = 0; |
77 virtual CPWL_Color GetBkColor() con
st = 0; | 77 virtual CFX_WideString GetSubjectName() const = 0; |
78 virtual CFX_WideString GetContents() const = 0; | 78 |
79 virtual FX_SYSTEMTIME GetDateTime() const = 0; | 79 virtual CPWL_Edit* GetEdit() const = 0; |
80 virtual CFX_WideString GetSubjectName() const =
0; | 80 }; |
81 | 81 |
82 virtual CPWL_Edit* GetEdit() const
= 0; | 82 class CPWL_Note_Icon : public CPWL_Wnd { |
83 }; | 83 public: |
84 | 84 CPWL_Note_Icon(); |
85 class CPWL_Note_Icon : public CPWL_Wnd | 85 virtual ~CPWL_Note_Icon(); |
86 { | 86 |
87 public: | 87 void SetIconType(int32_t nType); |
88 CPWL_Note_Icon(); | 88 |
89 virtual ~CPWL_Note_Icon(); | 89 public: |
90 | 90 protected: |
91 void SetIconT
ype(int32_t nType); | 91 virtual void DrawThisAppearance(CFX_RenderDevice* pDevice, |
92 | 92 CPDF_Matrix* pUser2Device); |
93 public: | 93 |
94 | 94 private: |
95 protected: | 95 int32_t m_nType; |
96 virtual void DrawThisAppearan
ce(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device); | 96 }; |
97 | 97 |
98 private: | 98 class CPWL_Note_CloseBox : public CPWL_Button { |
99 int32_t m_nType; | 99 public: |
100 }; | 100 CPWL_Note_CloseBox(); |
101 | 101 virtual ~CPWL_Note_CloseBox(); |
102 class CPWL_Note_CloseBox : public CPWL_Button | 102 |
103 { | 103 protected: |
104 public: | 104 virtual void DrawThisAppearance(CFX_RenderDevice* pDevice, |
105 CPWL_Note_CloseBox(); | 105 CPDF_Matrix* pUser2Device); |
106 virtual ~CPWL_Note_CloseBox(); | 106 virtual FX_BOOL OnLButtonDown(const CPDF_Point& point, FX_DWORD nFlag); |
107 | 107 virtual FX_BOOL OnLButtonUp(const CPDF_Point& point, FX_DWORD nFlag); |
108 protected: | 108 |
109 virtual void DrawThisAppearan
ce(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device); | 109 private: |
110 virtual FX_BOOL OnLButtonDown(co
nst CPDF_Point & point, FX_DWORD nFlag); | 110 FX_BOOL m_bMouseDown; |
111 virtual FX_BOOL OnLButtonUp(cons
t CPDF_Point & point, FX_DWORD nFlag); | 111 }; |
112 | 112 |
113 private: | 113 class CPWL_Note_LBBox : public CPWL_Wnd { |
114 FX_BOOL m_bMouse
Down; | 114 public: |
115 }; | 115 CPWL_Note_LBBox(); |
116 | 116 virtual ~CPWL_Note_LBBox(); |
117 class CPWL_Note_LBBox : public CPWL_Wnd | 117 |
118 { | 118 protected: |
119 public: | 119 virtual void DrawThisAppearance(CFX_RenderDevice* pDevice, |
120 CPWL_Note_LBBox(); | 120 CPDF_Matrix* pUser2Device); |
121 virtual ~CPWL_Note_LBBox(); | 121 }; |
122 | 122 |
123 protected: | 123 class CPWL_Note_RBBox : public CPWL_Wnd { |
124 virtual void DrawThisAppearan
ce(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device); | 124 public: |
125 }; | 125 CPWL_Note_RBBox(); |
126 | 126 virtual ~CPWL_Note_RBBox(); |
127 class CPWL_Note_RBBox : public CPWL_Wnd | 127 |
128 { | 128 protected: |
129 public: | 129 virtual void DrawThisAppearance(CFX_RenderDevice* pDevice, |
130 CPWL_Note_RBBox(); | 130 CPDF_Matrix* pUser2Device); |
131 virtual ~CPWL_Note_RBBox(); | 131 }; |
132 | 132 |
133 protected: | 133 class CPWL_Note_Edit : public CPWL_Edit { |
134 virtual void DrawThisAppearan
ce(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device); | 134 public: |
135 }; | 135 CPWL_Note_Edit(); |
136 | 136 virtual ~CPWL_Note_Edit(); |
137 class CPWL_Note_Edit : public CPWL_Edit | 137 |
138 { | 138 void EnableNotify(FX_BOOL bEnable) { m_bEnableNotify = bEnable; } |
139 public: | 139 virtual FX_FLOAT GetItemHeight(FX_FLOAT fLimitWidth); |
140 CPWL_Note_Edit(); | 140 FX_FLOAT GetItemLeftMargin(); |
141 virtual ~CPWL_Note_Edit(); | 141 FX_FLOAT GetItemRightMargin(); |
142 | 142 |
143 void EnableNo
tify(FX_BOOL bEnable) {m_bEnableNotify = bEnable;} | 143 virtual void SetText(const FX_WCHAR* csText); |
144 virtual FX_FLOAT GetItemHeight(FX
_FLOAT fLimitWidth); | 144 |
145 FX_FLOAT GetItemL
eftMargin(); | 145 protected: |
146 FX_FLOAT GetItemR
ightMargin(); | 146 virtual void OnNotify(CPWL_Wnd* pWnd, |
147 | 147 FX_DWORD msg, |
148 virtual void SetText(const FX
_WCHAR* csText); | 148 intptr_t wParam = 0, |
149 | 149 intptr_t lParam = 0); |
150 protected: | 150 virtual void RePosChildWnd(); |
151 virtual void OnNotify(CPWL_Wn
d* pWnd, FX_DWORD msg, intptr_t wParam = 0, intptr_t lParam = 0); | 151 virtual void OnSetFocus(); |
152 virtual void RePosChildWnd(); | 152 virtual void OnKillFocus(); |
153 virtual void OnSetFocus(); | 153 |
154 virtual void OnKillFocus(); | 154 private: |
155 | 155 FX_BOOL m_bEnableNotify; |
156 private: | 156 FX_FLOAT m_fOldItemHeight; |
157 FX_BOOL m_bEnabl
eNotify; | 157 FX_BOOL m_bSizeChanged; |
158 FX_FLOAT m_fOldIt
emHeight; | 158 FX_FLOAT m_fOldMin; |
159 FX_BOOL m_bSizeC
hanged; | 159 FX_FLOAT m_fOldMax; |
160 FX_FLOAT m_fOldMi
n; | 160 }; |
161 FX_FLOAT m_fOldMa
x; | 161 |
162 }; | 162 class CPWL_Note_Options : public CPWL_Wnd { |
163 | 163 public: |
164 class CPWL_Note_Options : public CPWL_Wnd | 164 CPWL_Note_Options(); |
165 { | 165 virtual ~CPWL_Note_Options(); |
166 public: | 166 |
167 CPWL_Note_Options(); | 167 CPDF_Rect GetContentRect() const; |
168 virtual ~CPWL_Note_Options(); | 168 virtual void SetTextColor(const CPWL_Color& color); |
169 | 169 void SetText(const CFX_WideString& sText); |
170 CPDF_Rect GetConte
ntRect() const; | 170 |
171 virtual void SetTextColor(con
st CPWL_Color & color); | 171 protected: |
172 void SetText(
const CFX_WideString& sText); | 172 virtual void RePosChildWnd(); |
173 | 173 virtual void CreateChildWnd(const PWL_CREATEPARAM& cp); |
174 protected: | 174 virtual void DrawThisAppearance(CFX_RenderDevice* pDevice, |
175 virtual void RePosChildWnd(); | 175 CPDF_Matrix* pUser2Device); |
176 virtual void CreateChildWnd(c
onst PWL_CREATEPARAM & cp); | 176 |
177 virtual void DrawThisAppearan
ce(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device); | 177 private: |
178 | 178 CPWL_Label* m_pText; |
179 private: | 179 }; |
180 CPWL_Label* m_pText; | 180 |
181 }; | 181 class CPWL_Note_Contents : public CPWL_ListCtrl { |
182 | 182 public: |
183 class CPWL_Note_Contents : public CPWL_ListCtrl | 183 CPWL_Note_Contents(); |
184 { | 184 virtual ~CPWL_Note_Contents(); |
185 public: | 185 |
186 CPWL_Note_Contents(); | 186 virtual CFX_ByteString GetClassName() const; |
187 virtual ~CPWL_Note_Contents(); | 187 virtual void OnNotify(CPWL_Wnd* pWnd, |
188 | 188 FX_DWORD msg, |
189 virtual CFX_ByteString GetClassName() const; | 189 intptr_t wParam = 0, |
190 virtual void OnNotify(CPWL_Wn
d* pWnd, FX_DWORD msg, intptr_t wParam = 0, intptr_t lParam = 0); | 190 intptr_t lParam = 0); |
191 virtual FX_BOOL OnLButtonDown(co
nst CPDF_Point& point, FX_DWORD nFlag); | 191 virtual FX_BOOL OnLButtonDown(const CPDF_Point& point, FX_DWORD nFlag); |
192 | 192 |
193 void SetEditF
ocus(FX_BOOL bLast); | 193 void SetEditFocus(FX_BOOL bLast); |
194 CPWL_Edit* GetEdit(
) const; | 194 CPWL_Edit* GetEdit() const; |
195 | 195 |
196 public: | 196 public: |
197 void SetText(
const CFX_WideString& sText); | 197 void SetText(const CFX_WideString& sText); |
198 CFX_WideString GetText() const; | 198 CFX_WideString GetText() const; |
199 | 199 |
200 CPWL_NoteItem* CreateSubItem(); | 200 CPWL_NoteItem* CreateSubItem(); |
201 void DeleteSu
bItem(IPWL_NoteItem* pNoteItem); | 201 void DeleteSubItem(IPWL_NoteItem* pNoteItem); |
202 int32_t CountSubItems()
const; | 202 int32_t CountSubItems() const; |
203 IPWL_NoteItem* GetSubItems(int3
2_t index) const; | 203 IPWL_NoteItem* GetSubItems(int32_t index) const; |
204 | 204 |
205 virtual IPWL_NoteItem* GetHitNoteItem(const CPD
F_Point& point); | 205 virtual IPWL_NoteItem* GetHitNoteItem(const CPDF_Point& point); |
206 void EnableRe
ad(FX_BOOL bEnabled); | 206 void EnableRead(FX_BOOL bEnabled); |
207 void EnableMo
dify(FX_BOOL bEnabled); | 207 void EnableModify(FX_BOOL bEnabled); |
208 | 208 |
209 protected: | 209 protected: |
210 virtual void CreateChildWnd(c
onst PWL_CREATEPARAM & cp); | 210 virtual void CreateChildWnd(const PWL_CREATEPARAM& cp); |
211 | 211 |
212 private: | 212 private: |
213 CPWL_Note_Edit* m_pEdit; | 213 CPWL_Note_Edit* m_pEdit; |
214 }; | 214 }; |
215 | 215 |
216 class CPWL_NoteItem : public CPWL_Wnd, public IPWL_NoteItem | 216 class CPWL_NoteItem : public CPWL_Wnd, public IPWL_NoteItem { |
217 { | 217 public: |
218 public: | 218 CPWL_NoteItem(); |
219 CPWL_NoteItem(); | 219 virtual ~CPWL_NoteItem(); |
220 virtual ~CPWL_NoteItem(); | 220 |
221 | 221 public: |
222 public: | 222 virtual void SetPrivateData(void* pData); |
223 virtual void SetPrivateData(v
oid* pData); | 223 virtual void SetBkColor(const CPWL_Color& color); |
224 virtual void SetBkColor(const
CPWL_Color& color); | 224 virtual void SetSubjectName(const CFX_WideString& sName); |
225 virtual void SetSubjectName(c
onst CFX_WideString& sName); | 225 virtual void SetAuthorName(const CFX_WideString& sName); |
226 virtual void SetAuthorName(co
nst CFX_WideString& sName); | 226 virtual void SetDateTime(FX_SYSTEMTIME time); |
227 virtual void SetDateTime(FX_S
YSTEMTIME time); | 227 virtual void SetContents(const CFX_WideString& sContents); |
228 virtual void SetContents(cons
t CFX_WideString& sContents); | 228 |
229 | 229 virtual IPWL_NoteItem* CreateSubItem(); |
230 virtual IPWL_NoteItem* CreateSubItem(); | 230 virtual int32_t CountSubItems() const; |
231 virtual int32_t CountSubItems() const; | 231 virtual IPWL_NoteItem* GetSubItems(int32_t index) const; |
232 virtual IPWL_NoteItem* GetSubItems(int32_t inde
x) const; | 232 virtual void DeleteSubItem(IPWL_NoteItem* pNoteItem); |
233 virtual void DeleteSubItem(IP
WL_NoteItem* pNoteItem); | 233 virtual void SetFocus() { SetNoteFocus(FALSE); } |
234 virtual void SetFocus(){SetNo
teFocus(FALSE);} | 234 |
235 | 235 virtual IPWL_NoteItem* GetParentItem() const; |
236 virtual IPWL_NoteItem* GetParentItem() const; | 236 virtual void* GetPrivateData() const; |
237 virtual void* GetPrivateData()
const; | 237 virtual CFX_WideString GetAuthorName() const; |
238 virtual CFX_WideString GetAuthorName() const; | 238 virtual CPWL_Color GetBkColor() const; |
239 virtual CPWL_Color GetBkColor() con
st; | 239 virtual CFX_WideString GetContents() const; |
240 virtual CFX_WideString GetContents() const; | 240 virtual FX_SYSTEMTIME GetDateTime() const; |
241 virtual FX_SYSTEMTIME GetDateTime() const; | 241 virtual CFX_WideString GetSubjectName() const; |
242 virtual CFX_WideString GetSubjectName() const; | 242 virtual FX_BOOL IsTopItem() const { return FALSE; } |
243 virtual FX_BOOL IsTopItem() cons
t { return FALSE;} | 243 virtual CPWL_Edit* GetEdit() const; |
244 virtual CPWL_Edit* GetEdit() const; | 244 |
245 | 245 public: |
246 public: | 246 virtual FX_BOOL OnLButtonDown(const CPDF_Point& point, FX_DWORD nFlag); |
247 virtual FX_BOOL OnLButtonDown(co
nst CPDF_Point& point, FX_DWORD nFlag); | 247 virtual FX_BOOL OnRButtonUp(const CPDF_Point& point, FX_DWORD nFlag); |
248 virtual FX_BOOL OnRButtonUp(cons
t CPDF_Point & point, FX_DWORD nFlag); | 248 virtual CFX_ByteString GetClassName() const; |
249 virtual CFX_ByteString GetClassName() const; | 249 virtual IPWL_NoteItem* GetHitNoteItem(const CPDF_Point& point); |
250 virtual IPWL_NoteItem* GetHitNoteItem(const CPD
F_Point& point); | 250 virtual IPWL_NoteItem* GetFocusedNoteItem() const; |
251 virtual IPWL_NoteItem* GetFocusedNoteItem() con
st; | 251 |
252 | 252 virtual void ResetSubjectName(int32_t nItemIndex); |
253 virtual void ResetSubjectName
(int32_t nItemIndex); | 253 void EnableRead(FX_BOOL bEnabled); |
254 void EnableRe
ad(FX_BOOL bEnabled); | 254 void EnableModify(FX_BOOL bEnabled); |
255 void EnableMo
dify(FX_BOOL bEnabled); | 255 |
256 | 256 protected: |
257 protected: | 257 virtual void RePosChildWnd(); |
258 virtual void RePosChildWnd(); | 258 virtual void CreateChildWnd(const PWL_CREATEPARAM& cp); |
259 virtual void CreateChildWnd(c
onst PWL_CREATEPARAM & cp); | 259 |
260 | 260 virtual void OnNotify(CPWL_Wnd* pWnd, |
261 virtual void OnNotify(CPWL_Wn
d* pWnd, FX_DWORD msg, intptr_t wParam = 0, intptr_t lParam = 0); | 261 FX_DWORD msg, |
262 | 262 intptr_t wParam = 0, |
263 public: | 263 intptr_t lParam = 0); |
264 virtual FX_FLOAT GetItemHeight(FX
_FLOAT fLimitWidth); | 264 |
265 virtual FX_FLOAT GetItemLeftMargi
n(); | 265 public: |
266 virtual FX_FLOAT GetItemRightMarg
in(); | 266 virtual FX_FLOAT GetItemHeight(FX_FLOAT fLimitWidth); |
267 CPWL_NoteItem* CreateNoteItem()
; | 267 virtual FX_FLOAT GetItemLeftMargin(); |
268 CPWL_NoteItem* GetParentNoteIte
m() const; | 268 virtual FX_FLOAT GetItemRightMargin(); |
269 | 269 CPWL_NoteItem* CreateNoteItem(); |
270 void SetNoteF
ocus(FX_BOOL bLast); | 270 CPWL_NoteItem* GetParentNoteItem() const; |
271 void OnConten
tsValidate(); | 271 |
272 | 272 void SetNoteFocus(FX_BOOL bLast); |
273 void OnCreate
NoteItem(); | 273 void OnContentsValidate(); |
274 | 274 |
275 protected: | 275 void OnCreateNoteItem(); |
276 void PopupNot
eItemMenu(const CPDF_Point& point); | 276 |
277 | 277 protected: |
278 virtual const CPWL_Note* GetNote() const; | 278 void PopupNoteItemMenu(const CPDF_Point& point); |
279 virtual IPWL_NoteNotify* GetNoteNotify() const; | 279 |
280 | 280 virtual const CPWL_Note* GetNote() const; |
281 protected: | 281 virtual IPWL_NoteNotify* GetNoteNotify() const; |
282 CPWL_Label* m_pSubje
ct; | 282 |
283 CPWL_Label* m_pDateT
ime; | 283 protected: |
284 CPWL_Note_Contents* m_pContents; | 284 CPWL_Label* m_pSubject; |
285 | 285 CPWL_Label* m_pDateTime; |
286 private: | 286 CPWL_Note_Contents* m_pContents; |
287 void* m_pPriva
teData; | 287 |
288 FX_SYSTEMTIME m_dtNote; | 288 private: |
289 CFX_WideString m_sAuthor; | 289 void* m_pPrivateData; |
290 | 290 FX_SYSTEMTIME m_dtNote; |
291 FX_FLOAT m_fOldIt
emHeight; | 291 CFX_WideString m_sAuthor; |
292 FX_BOOL m_bSizeC
hanged; | 292 |
293 FX_BOOL m_bAllow
Modify; | 293 FX_FLOAT m_fOldItemHeight; |
294 }; | 294 FX_BOOL m_bSizeChanged; |
295 | 295 FX_BOOL m_bAllowModify; |
296 class CPWL_Note : public CPWL_NoteItem | 296 }; |
297 { | 297 |
298 public: | 298 class CPWL_Note : public CPWL_NoteItem { |
299 CPWL_Note(IPopup_Note* pPopupNote, IPWL_NoteNotify* pNoteNotify, IPWL_No
teHandler* pNoteHandler); | 299 public: |
300 virtual ~CPWL_Note(); | 300 CPWL_Note(IPopup_Note* pPopupNote, |
301 | 301 IPWL_NoteNotify* pNoteNotify, |
302 public: | 302 IPWL_NoteHandler* pNoteHandler); |
303 virtual void SetSubjectName(c
onst CFX_WideString& sName); | 303 virtual ~CPWL_Note(); |
304 virtual void SetAuthorName(co
nst CFX_WideString& sName); | 304 |
305 virtual CFX_WideString GetAuthorName() const; | 305 public: |
306 virtual void SetBkColor(const
CPWL_Color& color); | 306 virtual void SetSubjectName(const CFX_WideString& sName); |
307 virtual void ResetSubjectName
(int32_t nItemIndex){} | 307 virtual void SetAuthorName(const CFX_WideString& sName); |
308 virtual FX_BOOL IsTopItem() cons
t {return TRUE;} | 308 virtual CFX_WideString GetAuthorName() const; |
309 virtual const CPWL_Note* GetNote() const; | 309 virtual void SetBkColor(const CPWL_Color& color); |
310 virtual IPWL_NoteNotify* GetNoteNotify() const; | 310 virtual void ResetSubjectName(int32_t nItemIndex) {} |
311 | 311 virtual FX_BOOL IsTopItem() const { return TRUE; } |
312 public: | 312 virtual const CPWL_Note* GetNote() const; |
313 IPWL_NoteItem* Reply(); | 313 virtual IPWL_NoteNotify* GetNoteNotify() const; |
314 void EnableNo
tify(FX_BOOL bEnabled); | 314 |
315 void SetIconT
ype(int32_t nType); | 315 public: |
316 void SetOptio
nsText(const CFX_WideString& sText); | 316 IPWL_NoteItem* Reply(); |
317 void EnableRe
ad(FX_BOOL bEnabled); | 317 void EnableNotify(FX_BOOL bEnabled); |
318 void EnableMo
dify(FX_BOOL bEnabled); | 318 void SetIconType(int32_t nType); |
319 | 319 void SetOptionsText(const CFX_WideString& sText); |
320 CFX_WideString GetReplyString()
const; | 320 void EnableRead(FX_BOOL bEnabled); |
321 void SetReply
String(const CFX_WideString& string); | 321 void EnableModify(FX_BOOL bEnabled); |
322 | 322 |
323 //0-normal / 1-caption / 2-leftbottom corner / 3-rightbottom corner / 4-
close / 5-options | 323 CFX_WideString GetReplyString() const; |
324 int32_t NoteHitTest(cons
t CPDF_Point& point) const; | 324 void SetReplyString(const CFX_WideString& string); |
325 CPDF_Rect GetCapti
onRect() const {return m_rcCaption;} | 325 |
326 IPopup_Note* GetPopupNote() c
onst {return m_pPopupNote;} | 326 // 0-normal / 1-caption / 2-leftbottom corner / 3-rightbottom corner / 4-close |
327 | 327 // / 5-options |
328 public: | 328 int32_t NoteHitTest(const CPDF_Point& point) const; |
329 virtual FX_BOOL OnLButtonDown(co
nst CPDF_Point & point, FX_DWORD nFlag); | 329 CPDF_Rect GetCaptionRect() const { return m_rcCaption; } |
330 virtual FX_BOOL OnRButtonUp(cons
t CPDF_Point & point, FX_DWORD nFlag); | 330 IPopup_Note* GetPopupNote() const { return m_pPopupNote; } |
331 virtual FX_BOOL OnMouseWheel(sho
rt zDelta, const CPDF_Point & point, FX_DWORD nFlag); | 331 |
332 | 332 public: |
333 protected: | 333 virtual FX_BOOL OnLButtonDown(const CPDF_Point& point, FX_DWORD nFlag); |
334 virtual void RePosChildWnd(); | 334 virtual FX_BOOL OnRButtonUp(const CPDF_Point& point, FX_DWORD nFlag); |
335 virtual void CreateChildWnd(c
onst PWL_CREATEPARAM & cp); | 335 virtual FX_BOOL OnMouseWheel(short zDelta, |
336 | 336 const CPDF_Point& point, |
337 virtual void OnNotify(CPWL_Wn
d* pWnd, FX_DWORD msg, intptr_t wParam = 0, intptr_t lParam = 0); | 337 FX_DWORD nFlag); |
338 | 338 |
339 FX_BOOL ResetScr
ollBar(); | 339 protected: |
340 void RePosNot
eChildren(); | 340 virtual void RePosChildWnd(); |
341 FX_BOOL ScrollBa
rShouldVisible(); | 341 virtual void CreateChildWnd(const PWL_CREATEPARAM& cp); |
342 | 342 |
343 private: | 343 virtual void OnNotify(CPWL_Wnd* pWnd, |
344 CPWL_Label* m_pAutho
r; | 344 FX_DWORD msg, |
345 CPWL_Note_Icon* m_pIcon; | 345 intptr_t wParam = 0, |
346 CPWL_Note_CloseBox* m_pCloseBox; | 346 intptr_t lParam = 0); |
347 CPWL_Note_LBBox* m_pLBBox; | 347 |
348 CPWL_Note_RBBox* m_pRBBox; | 348 FX_BOOL ResetScrollBar(); |
349 CPWL_ScrollBar* m_pContentsBar; | 349 void RePosNoteChildren(); |
350 CPWL_Note_Options* m_pOptions; | 350 FX_BOOL ScrollBarShouldVisible(); |
351 IPWL_NoteNotify* m_pNoteNotify; | 351 |
352 FX_BOOL m_bResiz
ing; | 352 private: |
353 PWL_SCROLL_INFO m_OldScrollInfo; | 353 CPWL_Label* m_pAuthor; |
354 CPDF_Rect m_rcCapt
ion; | 354 CPWL_Note_Icon* m_pIcon; |
355 FX_BOOL m_bEnalb
leNotify; | 355 CPWL_Note_CloseBox* m_pCloseBox; |
356 IPopup_Note* m_pPopupNote; | 356 CPWL_Note_LBBox* m_pLBBox; |
357 CFX_WideString m_sReplyString; | 357 CPWL_Note_RBBox* m_pRBBox; |
| 358 CPWL_ScrollBar* m_pContentsBar; |
| 359 CPWL_Note_Options* m_pOptions; |
| 360 IPWL_NoteNotify* m_pNoteNotify; |
| 361 FX_BOOL m_bResizing; |
| 362 PWL_SCROLL_INFO m_OldScrollInfo; |
| 363 CPDF_Rect m_rcCaption; |
| 364 FX_BOOL m_bEnalbleNotify; |
| 365 IPopup_Note* m_pPopupNote; |
| 366 CFX_WideString m_sReplyString; |
358 }; | 367 }; |
359 | 368 |
360 #endif // FPDFSDK_INCLUDE_PDFWINDOW_PWL_NOTE_H_ | 369 #endif // FPDFSDK_INCLUDE_PDFWINDOW_PWL_NOTE_H_ |
OLD | NEW |