| 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_FXEDIT_INCLUDE_FXET_LIST_H_ | 7 #ifndef FPDFSDK_FXEDIT_INCLUDE_FXET_LIST_H_ |
| 8 #define FPDFSDK_FXEDIT_INCLUDE_FXET_LIST_H_ | 8 #define FPDFSDK_FXEDIT_INCLUDE_FXET_LIST_H_ |
| 9 | 9 |
| 10 #include "fpdfsdk/fxedit/include/fx_edit.h" | 10 #include "fpdfsdk/fxedit/include/fx_edit.h" |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 private: | 135 private: |
| 136 IFX_Edit_Iterator* GetIterator() const; | 136 IFX_Edit_Iterator* GetIterator() const; |
| 137 | 137 |
| 138 IFX_Edit* m_pEdit; | 138 IFX_Edit* m_pEdit; |
| 139 FX_BOOL m_bSelected; | 139 FX_BOOL m_bSelected; |
| 140 CLST_Rect m_rcListItem; | 140 CLST_Rect m_rcListItem; |
| 141 }; | 141 }; |
| 142 | 142 |
| 143 class CFX_ListContainer { | 143 class CFX_ListContainer { |
| 144 public: | 144 public: |
| 145 CFX_ListContainer() | 145 CFX_ListContainer(); |
| 146 : m_rcPlate(0.0f, 0.0f, 0.0f, 0.0f), | 146 virtual ~CFX_ListContainer(); |
| 147 m_rcContent(0.0f, 0.0f, 0.0f, 0.0f) {} | 147 virtual void SetPlateRect(const CFX_FloatRect& rect); |
| 148 virtual ~CFX_ListContainer() {} | 148 |
| 149 virtual void SetPlateRect(const CFX_FloatRect& rect) { m_rcPlate = rect; } | |
| 150 CFX_FloatRect GetPlateRect() const { return m_rcPlate; } | 149 CFX_FloatRect GetPlateRect() const { return m_rcPlate; } |
| 151 void SetContentRect(const CLST_Rect& rect) { m_rcContent = rect; } | 150 void SetContentRect(const CLST_Rect& rect) { m_rcContent = rect; } |
| 152 CLST_Rect GetContentRect() const { return m_rcContent; } | 151 CLST_Rect GetContentRect() const { return m_rcContent; } |
| 153 CFX_FloatPoint GetBTPoint() const { | 152 CFX_FloatPoint GetBTPoint() const { |
| 154 return CFX_FloatPoint(m_rcPlate.left, m_rcPlate.top); | 153 return CFX_FloatPoint(m_rcPlate.left, m_rcPlate.top); |
| 155 } | 154 } |
| 156 CFX_FloatPoint GetETPoint() const { | 155 CFX_FloatPoint GetETPoint() const { |
| 157 return CFX_FloatPoint(m_rcPlate.right, m_rcPlate.bottom); | 156 return CFX_FloatPoint(m_rcPlate.right, m_rcPlate.bottom); |
| 158 } | 157 } |
| 159 | 158 |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 290 void OnVK_LEFT(FX_BOOL bShift, FX_BOOL bCtrl) override; | 289 void OnVK_LEFT(FX_BOOL bShift, FX_BOOL bCtrl) override; |
| 291 void OnVK_RIGHT(FX_BOOL bShift, FX_BOOL bCtrl) override; | 290 void OnVK_RIGHT(FX_BOOL bShift, FX_BOOL bCtrl) override; |
| 292 void OnVK_HOME(FX_BOOL bShift, FX_BOOL bCtrl) override; | 291 void OnVK_HOME(FX_BOOL bShift, FX_BOOL bCtrl) override; |
| 293 void OnVK_END(FX_BOOL bShift, FX_BOOL bCtrl) override; | 292 void OnVK_END(FX_BOOL bShift, FX_BOOL bCtrl) override; |
| 294 void OnVK(int32_t nItemIndex, FX_BOOL bShift, FX_BOOL bCtrl) override; | 293 void OnVK(int32_t nItemIndex, FX_BOOL bShift, FX_BOOL bCtrl) override; |
| 295 FX_BOOL OnChar(uint16_t nChar, FX_BOOL bShift, FX_BOOL bCtrl) override; | 294 FX_BOOL OnChar(uint16_t nChar, FX_BOOL bShift, FX_BOOL bCtrl) override; |
| 296 void SetPlateRect(const CFX_FloatRect& rect) override; | 295 void SetPlateRect(const CFX_FloatRect& rect) override; |
| 297 void SetScrollPos(const CFX_FloatPoint& point) override; | 296 void SetScrollPos(const CFX_FloatPoint& point) override; |
| 298 void ScrollToListItem(int32_t nItemIndex) override; | 297 void ScrollToListItem(int32_t nItemIndex) override; |
| 299 CFX_FloatRect GetItemRect(int32_t nIndex) const override; | 298 CFX_FloatRect GetItemRect(int32_t nIndex) const override; |
| 300 int32_t GetCaret() const override { return m_nCaretIndex; } | 299 int32_t GetCaret() const override; |
| 301 int32_t GetSelect() const override { return m_nSelItem; } | 300 int32_t GetSelect() const override; |
| 302 int32_t GetTopItem() const override; | 301 int32_t GetTopItem() const override; |
| 303 CFX_FloatRect GetContentRect() const override; | 302 CFX_FloatRect GetContentRect() const override; |
| 304 int32_t GetItemIndex(const CFX_FloatPoint& point) const override; | 303 int32_t GetItemIndex(const CFX_FloatPoint& point) const override; |
| 305 void AddString(const FX_WCHAR* str) override; | 304 void AddString(const FX_WCHAR* str) override; |
| 306 void SetTopItem(int32_t nIndex) override; | 305 void SetTopItem(int32_t nIndex) override; |
| 307 void Select(int32_t nItemIndex) override; | 306 void Select(int32_t nItemIndex) override; |
| 308 void SetCaret(int32_t nItemIndex) override; | 307 void SetCaret(int32_t nItemIndex) override; |
| 309 void Empty() override; | 308 void Empty() override; |
| 310 void Cancel() override; | 309 void Cancel() override; |
| 311 CFX_WideString GetText() const override; | 310 CFX_WideString GetText() const override; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 330 FX_BOOL m_bNotifyFlag; | 329 FX_BOOL m_bNotifyFlag; |
| 331 CFX_FloatPoint m_ptScrollPos; | 330 CFX_FloatPoint m_ptScrollPos; |
| 332 CPLST_Select m_aSelItems; // for multiple | 331 CPLST_Select m_aSelItems; // for multiple |
| 333 int32_t m_nSelItem; // for single | 332 int32_t m_nSelItem; // for single |
| 334 int32_t m_nFootIndex; // for multiple | 333 int32_t m_nFootIndex; // for multiple |
| 335 FX_BOOL m_bCtrlSel; // for multiple | 334 FX_BOOL m_bCtrlSel; // for multiple |
| 336 int32_t m_nCaretIndex; // for multiple | 335 int32_t m_nCaretIndex; // for multiple |
| 337 }; | 336 }; |
| 338 | 337 |
| 339 #endif // FPDFSDK_FXEDIT_INCLUDE_FXET_LIST_H_ | 338 #endif // FPDFSDK_FXEDIT_INCLUDE_FXET_LIST_H_ |
| OLD | NEW |