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_FXEDIT_FXET_LIST_H_ | 7 #ifndef FPDFSDK_INCLUDE_FXEDIT_FXET_LIST_H_ |
8 #define FPDFSDK_INCLUDE_FXEDIT_FXET_LIST_H_ | 8 #define FPDFSDK_INCLUDE_FXEDIT_FXET_LIST_H_ |
9 | 9 |
10 #include "fpdfsdk/include/fxedit/fx_edit.h" | 10 #include "fpdfsdk/include/fxedit/fx_edit.h" |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 void SetSelect(FX_BOOL bSelected); | 127 void SetSelect(FX_BOOL bSelected); |
128 void SetCaret(FX_BOOL bCaret); | 128 void SetCaret(FX_BOOL bCaret); |
129 void SetText(const FX_WCHAR* text); | 129 void SetText(const FX_WCHAR* text); |
130 void SetFontSize(FX_FLOAT fFontSize); | 130 void SetFontSize(FX_FLOAT fFontSize); |
131 CFX_WideString GetText() const; | 131 CFX_WideString GetText() const; |
132 | 132 |
133 CLST_Rect GetRect() const; | 133 CLST_Rect GetRect() const; |
134 FX_BOOL IsSelected() const; | 134 FX_BOOL IsSelected() const; |
135 FX_BOOL IsCaret() const; | 135 FX_BOOL IsCaret() const; |
136 FX_FLOAT GetItemHeight() const; | 136 FX_FLOAT GetItemHeight() const; |
137 FX_WORD GetFirstChar() const; | 137 uint16_t GetFirstChar() const; |
138 | 138 |
139 private: | 139 private: |
140 IFX_Edit* m_pEdit; | 140 IFX_Edit* m_pEdit; |
141 FX_BOOL m_bSelected; | 141 FX_BOOL m_bSelected; |
142 FX_BOOL m_bCaret; | 142 FX_BOOL m_bCaret; |
143 CLST_Rect m_rcListItem; | 143 CLST_Rect m_rcListItem; |
144 }; | 144 }; |
145 | 145 |
146 class CFX_ListContainer { | 146 class CFX_ListContainer { |
147 public: | 147 public: |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
289 void OnMouseMove(const CFX_FloatPoint& point, | 289 void OnMouseMove(const CFX_FloatPoint& point, |
290 FX_BOOL bShift, | 290 FX_BOOL bShift, |
291 FX_BOOL bCtrl) override; | 291 FX_BOOL bCtrl) override; |
292 void OnVK_UP(FX_BOOL bShift, FX_BOOL bCtrl) override; | 292 void OnVK_UP(FX_BOOL bShift, FX_BOOL bCtrl) override; |
293 void OnVK_DOWN(FX_BOOL bShift, FX_BOOL bCtrl) override; | 293 void OnVK_DOWN(FX_BOOL bShift, FX_BOOL bCtrl) override; |
294 void OnVK_LEFT(FX_BOOL bShift, FX_BOOL bCtrl) override; | 294 void OnVK_LEFT(FX_BOOL bShift, FX_BOOL bCtrl) override; |
295 void OnVK_RIGHT(FX_BOOL bShift, FX_BOOL bCtrl) override; | 295 void OnVK_RIGHT(FX_BOOL bShift, FX_BOOL bCtrl) override; |
296 void OnVK_HOME(FX_BOOL bShift, FX_BOOL bCtrl) override; | 296 void OnVK_HOME(FX_BOOL bShift, FX_BOOL bCtrl) override; |
297 void OnVK_END(FX_BOOL bShift, FX_BOOL bCtrl) override; | 297 void OnVK_END(FX_BOOL bShift, FX_BOOL bCtrl) override; |
298 void OnVK(int32_t nItemIndex, FX_BOOL bShift, FX_BOOL bCtrl) override; | 298 void OnVK(int32_t nItemIndex, FX_BOOL bShift, FX_BOOL bCtrl) override; |
299 FX_BOOL OnChar(FX_WORD nChar, FX_BOOL bShift, FX_BOOL bCtrl) override; | 299 FX_BOOL OnChar(uint16_t nChar, FX_BOOL bShift, FX_BOOL bCtrl) override; |
300 void SetPlateRect(const CFX_FloatRect& rect) override; | 300 void SetPlateRect(const CFX_FloatRect& rect) override; |
301 void SetScrollPos(const CFX_FloatPoint& point) override; | 301 void SetScrollPos(const CFX_FloatPoint& point) override; |
302 void ScrollToListItem(int32_t nItemIndex) override; | 302 void ScrollToListItem(int32_t nItemIndex) override; |
303 CFX_FloatRect GetItemRect(int32_t nIndex) const override; | 303 CFX_FloatRect GetItemRect(int32_t nIndex) const override; |
304 int32_t GetCaret() const override { return m_nCaretIndex; } | 304 int32_t GetCaret() const override { return m_nCaretIndex; } |
305 int32_t GetSelect() const override { return m_nSelItem; } | 305 int32_t GetSelect() const override { return m_nSelItem; } |
306 int32_t GetTopItem() const override; | 306 int32_t GetTopItem() const override; |
307 CFX_FloatRect GetContentRect() const override; | 307 CFX_FloatRect GetContentRect() const override; |
308 int32_t GetItemIndex(const CFX_FloatPoint& point) const override; | 308 int32_t GetItemIndex(const CFX_FloatPoint& point) const override; |
309 void AddString(const FX_WCHAR* str) override; | 309 void AddString(const FX_WCHAR* str) override; |
(...skipping 24 matching lines...) Expand all Loading... |
334 FX_BOOL m_bNotifyFlag; | 334 FX_BOOL m_bNotifyFlag; |
335 CFX_FloatPoint m_ptScrollPos; | 335 CFX_FloatPoint m_ptScrollPos; |
336 CPLST_Select m_aSelItems; // for multiple | 336 CPLST_Select m_aSelItems; // for multiple |
337 int32_t m_nSelItem; // for single | 337 int32_t m_nSelItem; // for single |
338 int32_t m_nFootIndex; // for multiple | 338 int32_t m_nFootIndex; // for multiple |
339 FX_BOOL m_bCtrlSel; // for multiple | 339 FX_BOOL m_bCtrlSel; // for multiple |
340 int32_t m_nCaretIndex; // for multiple | 340 int32_t m_nCaretIndex; // for multiple |
341 }; | 341 }; |
342 | 342 |
343 #endif // FPDFSDK_INCLUDE_FXEDIT_FXET_LIST_H_ | 343 #endif // FPDFSDK_INCLUDE_FXEDIT_FXET_LIST_H_ |
OLD | NEW |