Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(287)

Side by Side Diff: fpdfsdk/include/pdfwindow/PWL_Note.h

Issue 1737593006: Re-land "Replace CPDF_Rect and CPDF_Point with CFX types." (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Ooops. Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « fpdfsdk/include/pdfwindow/PWL_ListCtrl.h ('k') | fpdfsdk/include/pdfwindow/PWL_ScrollBar.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "fpdfsdk/include/pdfwindow/PWL_Button.h" 10 #include "fpdfsdk/include/pdfwindow/PWL_Button.h"
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 97
98 class CPWL_Note_CloseBox : public CPWL_Button { 98 class CPWL_Note_CloseBox : public CPWL_Button {
99 public: 99 public:
100 CPWL_Note_CloseBox(); 100 CPWL_Note_CloseBox();
101 ~CPWL_Note_CloseBox() override; 101 ~CPWL_Note_CloseBox() override;
102 102
103 protected: 103 protected:
104 // CPWL_Button 104 // CPWL_Button
105 void DrawThisAppearance(CFX_RenderDevice* pDevice, 105 void DrawThisAppearance(CFX_RenderDevice* pDevice,
106 CFX_Matrix* pUser2Device) override; 106 CFX_Matrix* pUser2Device) override;
107 FX_BOOL OnLButtonDown(const CPDF_Point& point, FX_DWORD nFlag) override; 107 FX_BOOL OnLButtonDown(const CFX_FloatPoint& point, FX_DWORD nFlag) override;
108 FX_BOOL OnLButtonUp(const CPDF_Point& point, FX_DWORD nFlag) override; 108 FX_BOOL OnLButtonUp(const CFX_FloatPoint& point, FX_DWORD nFlag) override;
109 109
110 private: 110 private:
111 FX_BOOL m_bMouseDown; 111 FX_BOOL m_bMouseDown;
112 }; 112 };
113 113
114 class CPWL_Note_LBBox : public CPWL_Wnd { 114 class CPWL_Note_LBBox : public CPWL_Wnd {
115 public: 115 public:
116 CPWL_Note_LBBox(); 116 CPWL_Note_LBBox();
117 ~CPWL_Note_LBBox() override; 117 ~CPWL_Note_LBBox() override;
118 118
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 FX_BOOL m_bSizeChanged; 159 FX_BOOL m_bSizeChanged;
160 FX_FLOAT m_fOldMin; 160 FX_FLOAT m_fOldMin;
161 FX_FLOAT m_fOldMax; 161 FX_FLOAT m_fOldMax;
162 }; 162 };
163 163
164 class CPWL_Note_Options : public CPWL_Wnd { 164 class CPWL_Note_Options : public CPWL_Wnd {
165 public: 165 public:
166 CPWL_Note_Options(); 166 CPWL_Note_Options();
167 ~CPWL_Note_Options() override; 167 ~CPWL_Note_Options() override;
168 168
169 CPDF_Rect GetContentRect() const; 169 CFX_FloatRect GetContentRect() const;
170 void SetText(const CFX_WideString& sText); 170 void SetText(const CFX_WideString& sText);
171 171
172 // CPWL_Wnd 172 // CPWL_Wnd
173 void RePosChildWnd() override; 173 void RePosChildWnd() override;
174 void CreateChildWnd(const PWL_CREATEPARAM& cp) override; 174 void CreateChildWnd(const PWL_CREATEPARAM& cp) override;
175 void DrawThisAppearance(CFX_RenderDevice* pDevice, 175 void DrawThisAppearance(CFX_RenderDevice* pDevice,
176 CFX_Matrix* pUser2Device) override; 176 CFX_Matrix* pUser2Device) override;
177 void SetTextColor(const CPWL_Color& color) override; 177 void SetTextColor(const CPWL_Color& color) override;
178 178
179 private: 179 private:
180 CPWL_Label* m_pText; 180 CPWL_Label* m_pText;
181 }; 181 };
182 182
183 class CPWL_Note_Contents : public CPWL_ListCtrl { 183 class CPWL_Note_Contents : public CPWL_ListCtrl {
184 public: 184 public:
185 CPWL_Note_Contents(); 185 CPWL_Note_Contents();
186 ~CPWL_Note_Contents() override; 186 ~CPWL_Note_Contents() override;
187 187
188 void SetEditFocus(FX_BOOL bLast); 188 void SetEditFocus(FX_BOOL bLast);
189 CPWL_Edit* GetEdit() const; 189 CPWL_Edit* GetEdit() const;
190 190
191 void SetText(const CFX_WideString& sText); 191 void SetText(const CFX_WideString& sText);
192 CFX_WideString GetText() const; 192 CFX_WideString GetText() const;
193 193
194 CPWL_NoteItem* CreateSubItem(); 194 CPWL_NoteItem* CreateSubItem();
195 void DeleteSubItem(IPWL_NoteItem* pNoteItem); 195 void DeleteSubItem(IPWL_NoteItem* pNoteItem);
196 int32_t CountSubItems() const; 196 int32_t CountSubItems() const;
197 IPWL_NoteItem* GetSubItems(int32_t index) const; 197 IPWL_NoteItem* GetSubItems(int32_t index) const;
198 198
199 virtual IPWL_NoteItem* GetHitNoteItem(const CPDF_Point& point); 199 virtual IPWL_NoteItem* GetHitNoteItem(const CFX_FloatPoint& point);
200 void EnableRead(FX_BOOL bEnabled); 200 void EnableRead(FX_BOOL bEnabled);
201 void EnableModify(FX_BOOL bEnabled); 201 void EnableModify(FX_BOOL bEnabled);
202 202
203 // CPWL_ListCtrl 203 // CPWL_ListCtrl
204 CFX_ByteString GetClassName() const override; 204 CFX_ByteString GetClassName() const override;
205 void OnNotify(CPWL_Wnd* pWnd, 205 void OnNotify(CPWL_Wnd* pWnd,
206 FX_DWORD msg, 206 FX_DWORD msg,
207 intptr_t wParam = 0, 207 intptr_t wParam = 0,
208 intptr_t lParam = 0) override; 208 intptr_t lParam = 0) override;
209 FX_BOOL OnLButtonDown(const CPDF_Point& point, FX_DWORD nFlag) override; 209 FX_BOOL OnLButtonDown(const CFX_FloatPoint& point, FX_DWORD nFlag) override;
210 void CreateChildWnd(const PWL_CREATEPARAM& cp) override; 210 void CreateChildWnd(const PWL_CREATEPARAM& cp) override;
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 public: 217 public:
218 CPWL_NoteItem(); 218 CPWL_NoteItem();
219 ~CPWL_NoteItem() override; 219 ~CPWL_NoteItem() override;
220 220
221 virtual IPWL_NoteItem* GetHitNoteItem(const CPDF_Point& point); 221 virtual IPWL_NoteItem* GetHitNoteItem(const CFX_FloatPoint& point);
222 virtual IPWL_NoteItem* GetFocusedNoteItem() const; 222 virtual IPWL_NoteItem* GetFocusedNoteItem() const;
223 223
224 virtual FX_BOOL IsTopItem() const { return FALSE; } 224 virtual FX_BOOL IsTopItem() const { return FALSE; }
225 225
226 virtual void ResetSubjectName(int32_t nItemIndex); 226 virtual void ResetSubjectName(int32_t nItemIndex);
227 void EnableRead(FX_BOOL bEnabled); 227 void EnableRead(FX_BOOL bEnabled);
228 void EnableModify(FX_BOOL bEnabled); 228 void EnableModify(FX_BOOL bEnabled);
229 229
230 void OnContentsValidate(); 230 void OnContentsValidate();
231 void OnCreateNoteItem(); 231 void OnCreateNoteItem();
(...skipping 14 matching lines...) Expand all
246 void* GetPrivateData() const override; 246 void* GetPrivateData() const override;
247 CFX_WideString GetAuthorName() const override; 247 CFX_WideString GetAuthorName() const override;
248 CPWL_Color GetBkColor() const override; 248 CPWL_Color GetBkColor() const override;
249 CFX_WideString GetContents() const override; 249 CFX_WideString GetContents() const override;
250 FX_SYSTEMTIME GetDateTime() const override; 250 FX_SYSTEMTIME GetDateTime() const override;
251 CFX_WideString GetSubjectName() const override; 251 CFX_WideString GetSubjectName() const override;
252 CPWL_Edit* GetEdit() const override; 252 CPWL_Edit* GetEdit() const override;
253 253
254 protected: 254 protected:
255 // CPWL_Wnd 255 // CPWL_Wnd
256 FX_BOOL OnLButtonDown(const CPDF_Point& point, FX_DWORD nFlag) override; 256 FX_BOOL OnLButtonDown(const CFX_FloatPoint& point, FX_DWORD nFlag) override;
257 FX_BOOL OnRButtonUp(const CPDF_Point& point, FX_DWORD nFlag) override; 257 FX_BOOL OnRButtonUp(const CFX_FloatPoint& point, FX_DWORD nFlag) override;
258 CFX_ByteString GetClassName() const override; 258 CFX_ByteString GetClassName() const override;
259 void RePosChildWnd() override; 259 void RePosChildWnd() override;
260 void CreateChildWnd(const PWL_CREATEPARAM& cp) override; 260 void CreateChildWnd(const PWL_CREATEPARAM& cp) override;
261 void OnNotify(CPWL_Wnd* pWnd, 261 void OnNotify(CPWL_Wnd* pWnd,
262 FX_DWORD msg, 262 FX_DWORD msg,
263 intptr_t wParam = 0, 263 intptr_t wParam = 0,
264 intptr_t lParam = 0) override; 264 intptr_t lParam = 0) override;
265 FX_FLOAT GetItemHeight(FX_FLOAT fLimitWidth) override; 265 FX_FLOAT GetItemHeight(FX_FLOAT fLimitWidth) override;
266 FX_FLOAT GetItemLeftMargin() override; 266 FX_FLOAT GetItemLeftMargin() override;
267 FX_FLOAT GetItemRightMargin() override; 267 FX_FLOAT GetItemRightMargin() override;
268 268
269 CPWL_NoteItem* CreateNoteItem(); 269 CPWL_NoteItem* CreateNoteItem();
270 CPWL_NoteItem* GetParentNoteItem() const; 270 CPWL_NoteItem* GetParentNoteItem() const;
271 271
272 void SetNoteFocus(FX_BOOL bLast); 272 void SetNoteFocus(FX_BOOL bLast);
273 void PopupNoteItemMenu(const CPDF_Point& point); 273 void PopupNoteItemMenu(const CFX_FloatPoint& point);
274 274
275 virtual const CPWL_Note* GetNote() const; 275 virtual const CPWL_Note* GetNote() const;
276 virtual IPWL_NoteNotify* GetNoteNotify() const; 276 virtual IPWL_NoteNotify* GetNoteNotify() const;
277 277
278 protected: 278 protected:
279 CPWL_Label* m_pSubject; 279 CPWL_Label* m_pSubject;
280 CPWL_Label* m_pDateTime; 280 CPWL_Label* m_pDateTime;
281 CPWL_Note_Contents* m_pContents; 281 CPWL_Note_Contents* m_pContents;
282 282
283 private: 283 private:
(...skipping 25 matching lines...) Expand all
309 309
310 // CPWL_NoteItem 310 // CPWL_NoteItem
311 void SetSubjectName(const CFX_WideString& sName) override; 311 void SetSubjectName(const CFX_WideString& sName) override;
312 void SetAuthorName(const CFX_WideString& sName) override; 312 void SetAuthorName(const CFX_WideString& sName) override;
313 CFX_WideString GetAuthorName() const override; 313 CFX_WideString GetAuthorName() const override;
314 void SetBkColor(const CPWL_Color& color) override; 314 void SetBkColor(const CPWL_Color& color) override;
315 void ResetSubjectName(int32_t nItemIndex) override {} 315 void ResetSubjectName(int32_t nItemIndex) override {}
316 FX_BOOL IsTopItem() const override { return TRUE; } 316 FX_BOOL IsTopItem() const override { return TRUE; }
317 const CPWL_Note* GetNote() const override; 317 const CPWL_Note* GetNote() const override;
318 IPWL_NoteNotify* GetNoteNotify() const override; 318 IPWL_NoteNotify* GetNoteNotify() const override;
319 FX_BOOL OnLButtonDown(const CPDF_Point& point, FX_DWORD nFlag) override; 319 FX_BOOL OnLButtonDown(const CFX_FloatPoint& point, FX_DWORD nFlag) override;
320 FX_BOOL OnRButtonUp(const CPDF_Point& point, FX_DWORD nFlag) override; 320 FX_BOOL OnRButtonUp(const CFX_FloatPoint& point, FX_DWORD nFlag) override;
321 FX_BOOL OnMouseWheel(short zDelta, 321 FX_BOOL OnMouseWheel(short zDelta,
322 const CPDF_Point& point, 322 const CFX_FloatPoint& point,
323 FX_DWORD nFlag) override; 323 FX_DWORD nFlag) override;
324 void RePosChildWnd() override; 324 void RePosChildWnd() override;
325 void CreateChildWnd(const PWL_CREATEPARAM& cp) override; 325 void CreateChildWnd(const PWL_CREATEPARAM& cp) override;
326 void OnNotify(CPWL_Wnd* pWnd, 326 void OnNotify(CPWL_Wnd* pWnd,
327 FX_DWORD msg, 327 FX_DWORD msg,
328 intptr_t wParam = 0, 328 intptr_t wParam = 0,
329 intptr_t lParam = 0) override; 329 intptr_t lParam = 0) override;
330 330
331 protected: 331 protected:
332 FX_BOOL ResetScrollBar(); 332 FX_BOOL ResetScrollBar();
333 void RePosNoteChildren(); 333 void RePosNoteChildren();
334 FX_BOOL ScrollBarShouldVisible(); 334 FX_BOOL ScrollBarShouldVisible();
335 335
336 private: 336 private:
337 CPWL_Label* m_pAuthor; 337 CPWL_Label* m_pAuthor;
338 CPWL_Note_Icon* m_pIcon; 338 CPWL_Note_Icon* m_pIcon;
339 CPWL_Note_CloseBox* m_pCloseBox; 339 CPWL_Note_CloseBox* m_pCloseBox;
340 CPWL_Note_LBBox* m_pLBBox; 340 CPWL_Note_LBBox* m_pLBBox;
341 CPWL_Note_RBBox* m_pRBBox; 341 CPWL_Note_RBBox* m_pRBBox;
342 CPWL_ScrollBar* m_pContentsBar; 342 CPWL_ScrollBar* m_pContentsBar;
343 CPWL_Note_Options* m_pOptions; 343 CPWL_Note_Options* m_pOptions;
344 IPWL_NoteNotify* m_pNoteNotify; 344 IPWL_NoteNotify* m_pNoteNotify;
345 FX_BOOL m_bResizing; 345 FX_BOOL m_bResizing;
346 PWL_SCROLL_INFO m_OldScrollInfo; 346 PWL_SCROLL_INFO m_OldScrollInfo;
347 FX_BOOL m_bEnableNotify; 347 FX_BOOL m_bEnableNotify;
348 CFX_WideString m_sReplyString; 348 CFX_WideString m_sReplyString;
349 }; 349 };
350 350
351 #endif // FPDFSDK_INCLUDE_PDFWINDOW_PWL_NOTE_H_ 351 #endif // FPDFSDK_INCLUDE_PDFWINDOW_PWL_NOTE_H_
OLDNEW
« no previous file with comments | « fpdfsdk/include/pdfwindow/PWL_ListCtrl.h ('k') | fpdfsdk/include/pdfwindow/PWL_ScrollBar.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698