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 "../../../core/include/fpdfapi/fpdf_parser.h" // For CPDF_Point. | 10 #include "../../../core/include/fpdfapi/fpdf_parser.h" // For CPDF_Point. |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 virtual ~CFX_ListItem(); | 156 virtual ~CFX_ListItem(); |
157 | 157 |
158 void SetFontMap(IFX_E
dit_FontMap * pFontMap); | 158 void SetFontMap(IFX_E
dit_FontMap * pFontMap); |
159 IFX_Edit_Iterator* GetIterator() const; | 159 IFX_Edit_Iterator* GetIterator() const; |
160 IFX_Edit* GetEdit() const; | 160 IFX_Edit* GetEdit() const; |
161 | 161 |
162 public: | 162 public: |
163 void SetRect(const CL
ST_Rect & rect); | 163 void SetRect(const CL
ST_Rect & rect); |
164 void SetSelect(FX_BOO
L bSelected); | 164 void SetSelect(FX_BOO
L bSelected); |
165 void SetCaret(FX_BOOL
bCaret); | 165 void SetCaret(FX_BOOL
bCaret); |
166 » void» » » » » » » SetText(FX_LPCWS
TR text); | 166 » void» » » » » » » SetText(const FX
_WCHAR* text); |
167 void SetFontSize(FX_F
LOAT fFontSize); | 167 void SetFontSize(FX_F
LOAT fFontSize); |
168 CFX_WideString GetText() const; | 168 CFX_WideString GetText() const; |
169 | 169 |
170 CLST_Rect GetRect() const; | 170 CLST_Rect GetRect() const; |
171 FX_BOOL IsSelected() con
st; | 171 FX_BOOL IsSelected() con
st; |
172 FX_BOOL IsCaret() const; | 172 FX_BOOL IsCaret() const; |
173 FX_FLOAT GetItemHeight()
const; | 173 FX_FLOAT GetItemHeight()
const; |
174 FX_WORD GetFirstChar() c
onst; | 174 FX_WORD GetFirstChar() c
onst; |
175 | 175 |
176 private: | 176 private: |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
233 virtual FX_FLOAT GetFirstHeight() const; | 233 virtual FX_FLOAT GetFirstHeight() const; |
234 | 234 |
235 virtual void SetMultipleSel(FX_BOOL b
Multiple); | 235 virtual void SetMultipleSel(FX_BOOL b
Multiple); |
236 virtual FX_BOOL IsMultipleSel() const; | 236 virtual FX_BOOL IsMultipleSel() const; |
237 virtual FX_BOOL IsValid(int32_t nItemInd
ex) const; | 237 virtual FX_BOOL IsValid(int32_t nItemInd
ex) const; |
238 virtual int32_t FindNext(int32_t nIndex,FX_WCHAR
nChar) const; | 238 virtual int32_t FindNext(int32_t nIndex,FX_WCHAR
nChar) const; |
239 | 239 |
240 protected: | 240 protected: |
241 virtual void Empty(); | 241 virtual void Empty(); |
242 | 242 |
243 » void» » » » » » » AddItem(FX_LPCWS
TR str); | 243 » void» » » » » » » AddItem(const FX
_WCHAR* str); |
244 virtual void ReArrange(int32_t nItemI
ndex); | 244 virtual void ReArrange(int32_t nItemI
ndex); |
245 | 245 |
246 virtual CPDF_Rect GetItemRect(int32_t nInd
ex) const; | 246 virtual CPDF_Rect GetItemRect(int32_t nInd
ex) const; |
247 CFX_WideString GetItemText(int32_t nInd
ex) const; | 247 CFX_WideString GetItemText(int32_t nInd
ex) const; |
248 | 248 |
249 void SetItemSelect(in
t32_t nItemIndex, FX_BOOL bSelected); | 249 void SetItemSelect(in
t32_t nItemIndex, FX_BOOL bSelected); |
250 void SetItemCaret(int
32_t nItemIndex, FX_BOOL bCaret); | 250 void SetItemCaret(int
32_t nItemIndex, FX_BOOL bCaret); |
251 | 251 |
252 virtual int32_t GetItemIndex(const CPDF_Point &
point) const; | 252 virtual int32_t GetItemIndex(const CPDF_Point &
point) const; |
253 int32_t GetFirstSelected() const
; | 253 int32_t GetFirstSelected() const
; |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
324 virtual void SetPlateRect(const CPDF_
Rect & rect); | 324 virtual void SetPlateRect(const CPDF_
Rect & rect); |
325 void SetScrollPos(con
st CPDF_Point & point); | 325 void SetScrollPos(con
st CPDF_Point & point); |
326 void ScrollToListItem
(int32_t nItemIndex); | 326 void ScrollToListItem
(int32_t nItemIndex); |
327 virtual CPDF_Rect GetItemRect(int32_t nInd
ex) const; | 327 virtual CPDF_Rect GetItemRect(int32_t nInd
ex) const; |
328 int32_t GetCaret() const {return
m_nCaretIndex;} | 328 int32_t GetCaret() const {return
m_nCaretIndex;} |
329 int32_t GetSelect() const {retur
n m_nSelItem;} | 329 int32_t GetSelect() const {retur
n m_nSelItem;} |
330 int32_t GetTopItem() const; | 330 int32_t GetTopItem() const; |
331 virtual CPDF_Rect GetContentRect() const; | 331 virtual CPDF_Rect GetContentRect() const; |
332 virtual int32_t GetItemIndex(const CPDF_Point &
point) const; | 332 virtual int32_t GetItemIndex(const CPDF_Point &
point) const; |
333 | 333 |
334 » void» » » » » » » AddString(FX_LPC
WSTR string); | 334 » void» » » » » » » AddString(const
FX_WCHAR* string); |
335 void SetTopItem(int32
_t nIndex); | 335 void SetTopItem(int32
_t nIndex); |
336 void Select(int32_t n
ItemIndex); | 336 void Select(int32_t n
ItemIndex); |
337 virtual void SetCaret(int32_t nItemIn
dex); | 337 virtual void SetCaret(int32_t nItemIn
dex); |
338 virtual void Empty(); | 338 virtual void Empty(); |
339 virtual void Cancel(); | 339 virtual void Cancel(); |
340 CFX_WideString GetText() const; | 340 CFX_WideString GetText() const; |
341 | 341 |
342 private: | 342 private: |
343 void SetMultipleSelec
t(int32_t nItemIndex, FX_BOOL bSelected); | 343 void SetMultipleSelec
t(int32_t nItemIndex, FX_BOOL bSelected); |
344 void SetSingleSelect(
int32_t nItemIndex); | 344 void SetSingleSelect(
int32_t nItemIndex); |
345 void InvalidateItem(i
nt32_t nItemIndex); | 345 void InvalidateItem(i
nt32_t nItemIndex); |
346 void SelectItems(); | 346 void SelectItems(); |
347 FX_BOOL IsItemVisible(in
t32_t nItemIndex) const; | 347 FX_BOOL IsItemVisible(in
t32_t nItemIndex) const; |
348 void SetScrollInfo(); | 348 void SetScrollInfo(); |
349 void SetScrollPosY(FX
_FLOAT fy); | 349 void SetScrollPosY(FX
_FLOAT fy); |
350 virtual void ReArrange(int32_t nItemI
ndex); | 350 virtual void ReArrange(int32_t nItemI
ndex); |
351 | 351 |
352 private: | 352 private: |
353 IFX_List_Notify* m_pNotify; | 353 IFX_List_Notify* m_pNotify; |
354 FX_BOOL m_bNotifyFlag; | 354 FX_BOOL m_bNotifyFlag; |
355 CPDF_Point m_ptScrollPos; | 355 CPDF_Point m_ptScrollPos; |
356 CPLST_Select m_aSelItems; //for mu
ltiple | 356 CPLST_Select m_aSelItems; //for mu
ltiple |
357 int32_t m_nSelItem;
//for single | 357 int32_t m_nSelItem;
//for single |
358 int32_t m_nFootIndex; //for mu
ltiple | 358 int32_t m_nFootIndex; //for mu
ltiple |
359 FX_BOOL m_bCtrlSel;
//for multiple | 359 FX_BOOL m_bCtrlSel;
//for multiple |
360 int32_t m_nCaretIndex; //for mu
ltiple | 360 int32_t m_nCaretIndex; //for mu
ltiple |
361 }; | 361 }; |
362 | 362 |
363 #endif // FPDFSDK_INCLUDE_FXEDIT_FXET_LIST_H_ | 363 #endif // FPDFSDK_INCLUDE_FXEDIT_FXET_LIST_H_ |
OLD | NEW |