| 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_PDFWINDOW_PWL_NOTE_H_ | 7 #ifndef FPDFSDK_PDFWINDOW_PWL_NOTE_H_ |
| 8 #define FPDFSDK_PDFWINDOW_PWL_NOTE_H_ | 8 #define FPDFSDK_PDFWINDOW_PWL_NOTE_H_ |
| 9 | 9 |
| 10 #include "fpdfsdk/pdfwindow/PWL_Button.h" | 10 #include "fpdfsdk/pdfwindow/PWL_Button.h" |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 CFX_FloatPoint& point, FX_DWORD nFlag) override; | 107 FX_BOOL OnLButtonDown(const CFX_FloatPoint& point, uint32_t nFlag) override; |
| 108 FX_BOOL OnLButtonUp(const CFX_FloatPoint& point, FX_DWORD nFlag) override; | 108 FX_BOOL OnLButtonUp(const CFX_FloatPoint& point, uint32_t 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 20 matching lines...) Expand all Loading... |
| 139 ~CPWL_Note_Edit() override; | 139 ~CPWL_Note_Edit() override; |
| 140 | 140 |
| 141 void EnableNotify(FX_BOOL bEnable) { m_bEnableNotify = bEnable; } | 141 void EnableNotify(FX_BOOL bEnable) { m_bEnableNotify = bEnable; } |
| 142 | 142 |
| 143 // CPWL_Edit | 143 // CPWL_Edit |
| 144 FX_FLOAT GetItemLeftMargin() override; | 144 FX_FLOAT GetItemLeftMargin() override; |
| 145 FX_FLOAT GetItemRightMargin() override; | 145 FX_FLOAT GetItemRightMargin() override; |
| 146 FX_FLOAT GetItemHeight(FX_FLOAT fLimitWidth) override; | 146 FX_FLOAT GetItemHeight(FX_FLOAT fLimitWidth) override; |
| 147 void SetText(const FX_WCHAR* csText) override; | 147 void SetText(const FX_WCHAR* csText) override; |
| 148 void OnNotify(CPWL_Wnd* pWnd, | 148 void OnNotify(CPWL_Wnd* pWnd, |
| 149 FX_DWORD msg, | 149 uint32_t msg, |
| 150 intptr_t wParam = 0, | 150 intptr_t wParam = 0, |
| 151 intptr_t lParam = 0) override; | 151 intptr_t lParam = 0) override; |
| 152 void RePosChildWnd() override; | 152 void RePosChildWnd() override; |
| 153 void OnSetFocus() override; | 153 void OnSetFocus() override; |
| 154 void OnKillFocus() override; | 154 void OnKillFocus() override; |
| 155 | 155 |
| 156 private: | 156 private: |
| 157 FX_BOOL m_bEnableNotify; | 157 FX_BOOL m_bEnableNotify; |
| 158 FX_FLOAT m_fOldItemHeight; | 158 FX_FLOAT m_fOldItemHeight; |
| 159 FX_BOOL m_bSizeChanged; | 159 FX_BOOL m_bSizeChanged; |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 CFX_FloatPoint& 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 uint32_t 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 CFX_FloatPoint& point, FX_DWORD nFlag) override; | 209 FX_BOOL OnLButtonDown(const CFX_FloatPoint& point, uint32_t 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; |
| (...skipping 26 matching lines...) Expand all Loading... |
| 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 CFX_FloatPoint& point, FX_DWORD nFlag) override; | 256 FX_BOOL OnLButtonDown(const CFX_FloatPoint& point, uint32_t nFlag) override; |
| 257 FX_BOOL OnRButtonUp(const CFX_FloatPoint& point, FX_DWORD nFlag) override; | 257 FX_BOOL OnRButtonUp(const CFX_FloatPoint& point, uint32_t 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 uint32_t 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); |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 CFX_FloatPoint& point, FX_DWORD nFlag) override; | 319 FX_BOOL OnLButtonDown(const CFX_FloatPoint& point, uint32_t nFlag) override; |
| 320 FX_BOOL OnRButtonUp(const CFX_FloatPoint& point, FX_DWORD nFlag) override; | 320 FX_BOOL OnRButtonUp(const CFX_FloatPoint& point, uint32_t nFlag) override; |
| 321 FX_BOOL OnMouseWheel(short zDelta, | 321 FX_BOOL OnMouseWheel(short zDelta, |
| 322 const CFX_FloatPoint& point, | 322 const CFX_FloatPoint& point, |
| 323 FX_DWORD nFlag) override; | 323 uint32_t 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 uint32_t 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_PDFWINDOW_PWL_NOTE_H_ | 351 #endif // FPDFSDK_PDFWINDOW_PWL_NOTE_H_ |
| OLD | NEW |