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 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 CLST_Rect m_rcContent; // positive forever! | 186 CLST_Rect m_rcContent; // positive forever! |
187 }; | 187 }; |
188 | 188 |
189 template <class TYPE> | 189 template <class TYPE> |
190 class CLST_ArrayTemplate : public CFX_ArrayTemplate<TYPE> { | 190 class CLST_ArrayTemplate : public CFX_ArrayTemplate<TYPE> { |
191 public: | 191 public: |
192 FX_BOOL IsEmpty() { return CFX_ArrayTemplate<TYPE>::GetSize() <= 0; } | 192 FX_BOOL IsEmpty() { return CFX_ArrayTemplate<TYPE>::GetSize() <= 0; } |
193 TYPE GetAt(int32_t nIndex) const { | 193 TYPE GetAt(int32_t nIndex) const { |
194 if (nIndex >= 0 && nIndex < CFX_ArrayTemplate<TYPE>::GetSize()) | 194 if (nIndex >= 0 && nIndex < CFX_ArrayTemplate<TYPE>::GetSize()) |
195 return CFX_ArrayTemplate<TYPE>::GetAt(nIndex); | 195 return CFX_ArrayTemplate<TYPE>::GetAt(nIndex); |
196 return NULL; | 196 return nullptr; |
197 } | 197 } |
198 void RemoveAt(int32_t nIndex) { | 198 void RemoveAt(int32_t nIndex) { |
199 if (nIndex >= 0 && nIndex < CFX_ArrayTemplate<TYPE>::GetSize()) | 199 if (nIndex >= 0 && nIndex < CFX_ArrayTemplate<TYPE>::GetSize()) |
200 CFX_ArrayTemplate<TYPE>::RemoveAt(nIndex); | 200 CFX_ArrayTemplate<TYPE>::RemoveAt(nIndex); |
201 } | 201 } |
202 }; | 202 }; |
203 | 203 |
204 class CFX_List : protected CFX_ListContainer, public IFX_List { | 204 class CFX_List : protected CFX_ListContainer, public IFX_List { |
205 public: | 205 public: |
206 CFX_List(); | 206 CFX_List(); |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
330 FX_BOOL m_bNotifyFlag; | 330 FX_BOOL m_bNotifyFlag; |
331 CFX_FloatPoint m_ptScrollPos; | 331 CFX_FloatPoint m_ptScrollPos; |
332 CPLST_Select m_aSelItems; // for multiple | 332 CPLST_Select m_aSelItems; // for multiple |
333 int32_t m_nSelItem; // for single | 333 int32_t m_nSelItem; // for single |
334 int32_t m_nFootIndex; // for multiple | 334 int32_t m_nFootIndex; // for multiple |
335 FX_BOOL m_bCtrlSel; // for multiple | 335 FX_BOOL m_bCtrlSel; // for multiple |
336 int32_t m_nCaretIndex; // for multiple | 336 int32_t m_nCaretIndex; // for multiple |
337 }; | 337 }; |
338 | 338 |
339 #endif // FPDFSDK_FXEDIT_INCLUDE_FXET_LIST_H_ | 339 #endif // FPDFSDK_FXEDIT_INCLUDE_FXET_LIST_H_ |
OLD | NEW |