| 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_LISTBOX_H_ | 7 #ifndef FPDFSDK_PDFWINDOW_PWL_LISTBOX_H_ |
| 8 #define FPDFSDK_PDFWINDOW_PWL_LISTBOX_H_ | 8 #define FPDFSDK_PDFWINDOW_PWL_LISTBOX_H_ |
| 9 | 9 |
| 10 #include "fpdfsdk/fxedit/include/fx_edit.h" | 10 #include "fpdfsdk/fxedit/include/fx_edit.h" |
| 11 #include "fpdfsdk/pdfwindow/PWL_Wnd.h" | 11 #include "fpdfsdk/pdfwindow/PWL_Wnd.h" |
| 12 | 12 |
| 13 class CFX_ListCtrl; |
| 13 class CPWL_List_Notify; | 14 class CPWL_List_Notify; |
| 14 class CPWL_ListBox; | 15 class CPWL_ListBox; |
| 15 class IPWL_Filler_Notify; | 16 class IPWL_Filler_Notify; |
| 17 struct CPVT_SecProps; |
| 18 struct CPVT_WordPlace; |
| 19 struct CPVT_WordProps; |
| 16 | 20 |
| 17 class CPWL_List_Notify : public IFX_List_Notify { | 21 class CPWL_List_Notify { |
| 18 public: | 22 public: |
| 19 CPWL_List_Notify(CPWL_ListBox* pList); | 23 CPWL_List_Notify(CPWL_ListBox* pList); |
| 20 ~CPWL_List_Notify() override; | 24 ~CPWL_List_Notify(); |
| 21 | 25 |
| 22 // IFX_List_Notify | |
| 23 void IOnSetScrollInfoX(FX_FLOAT fPlateMin, | |
| 24 FX_FLOAT fPlateMax, | |
| 25 FX_FLOAT fContentMin, | |
| 26 FX_FLOAT fContentMax, | |
| 27 FX_FLOAT fSmallStep, | |
| 28 FX_FLOAT fBigStep) override {} | |
| 29 void IOnSetScrollInfoY(FX_FLOAT fPlateMin, | 26 void IOnSetScrollInfoY(FX_FLOAT fPlateMin, |
| 30 FX_FLOAT fPlateMax, | 27 FX_FLOAT fPlateMax, |
| 31 FX_FLOAT fContentMin, | 28 FX_FLOAT fContentMin, |
| 32 FX_FLOAT fContentMax, | 29 FX_FLOAT fContentMax, |
| 33 FX_FLOAT fSmallStep, | 30 FX_FLOAT fSmallStep, |
| 34 FX_FLOAT fBigStep) override; | 31 FX_FLOAT fBigStep); |
| 35 void IOnSetScrollPosX(FX_FLOAT fx) override {} | 32 void IOnSetScrollPosY(FX_FLOAT fy); |
| 36 void IOnSetScrollPosY(FX_FLOAT fy) override; | 33 void IOnInvalidateRect(CFX_FloatRect* pRect); |
| 37 void IOnInvalidateRect(CFX_FloatRect* pRect) override; | |
| 38 | 34 |
| 39 void IOnSetCaret(FX_BOOL bVisible, | 35 void IOnSetCaret(FX_BOOL bVisible, |
| 40 const CFX_FloatPoint& ptHead, | 36 const CFX_FloatPoint& ptHead, |
| 41 const CFX_FloatPoint& ptFoot, | 37 const CFX_FloatPoint& ptFoot, |
| 42 const CPVT_WordPlace& place); | 38 const CPVT_WordPlace& place); |
| 43 | 39 |
| 44 private: | 40 private: |
| 45 CPWL_ListBox* m_pList; | 41 CPWL_ListBox* m_pList; |
| 46 }; | 42 }; |
| 47 | 43 |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 int32_t FindNext(int32_t nIndex, FX_WCHAR nChar) const; | 93 int32_t FindNext(int32_t nIndex, FX_WCHAR nChar) const; |
| 98 CFX_FloatRect GetContentRect() const; | 94 CFX_FloatRect GetContentRect() const; |
| 99 FX_FLOAT GetFirstHeight() const; | 95 FX_FLOAT GetFirstHeight() const; |
| 100 CFX_FloatRect GetListRect() const; | 96 CFX_FloatRect GetListRect() const; |
| 101 | 97 |
| 102 void SetFillerNotify(IPWL_Filler_Notify* pNotify) { | 98 void SetFillerNotify(IPWL_Filler_Notify* pNotify) { |
| 103 m_pFillerNotify = pNotify; | 99 m_pFillerNotify = pNotify; |
| 104 } | 100 } |
| 105 | 101 |
| 106 protected: | 102 protected: |
| 107 IFX_List* m_pList; | 103 std::unique_ptr<CFX_ListCtrl> m_pList; |
| 108 CPWL_List_Notify* m_pListNotify; | 104 std::unique_ptr<CPWL_List_Notify> m_pListNotify; |
| 109 FX_BOOL m_bMouseDown; | 105 FX_BOOL m_bMouseDown; |
| 110 FX_BOOL m_bHoverSel; | 106 FX_BOOL m_bHoverSel; |
| 111 IPWL_Filler_Notify* m_pFillerNotify; | 107 IPWL_Filler_Notify* m_pFillerNotify; |
| 112 | 108 |
| 113 public: | 109 public: |
| 114 void AttachFFLData(void* pData) { m_pFormFiller = pData; } | 110 void AttachFFLData(void* pData) { m_pFormFiller = pData; } |
| 115 | 111 |
| 116 private: | 112 private: |
| 117 void* m_pFormFiller; | 113 void* m_pFormFiller; |
| 118 }; | 114 }; |
| 119 | 115 |
| 120 #endif // FPDFSDK_PDFWINDOW_PWL_LISTBOX_H_ | 116 #endif // FPDFSDK_PDFWINDOW_PWL_LISTBOX_H_ |
| OLD | NEW |