Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(877)

Side by Side Diff: fpdfsdk/fxedit/include/fxet_list.h

Issue 2338553002: Stop converting widestring -> c_str -> widestring in several places. (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « fpdfsdk/fxedit/fxet_list.cpp ('k') | fpdfsdk/pdfwindow/PWL_ComboBox.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "core/fxcrt/include/fx_coordinates.h" 10 #include "core/fxcrt/include/fx_coordinates.h"
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 class CFX_ListItem final { 98 class CFX_ListItem final {
99 public: 99 public:
100 CFX_ListItem(); 100 CFX_ListItem();
101 ~CFX_ListItem(); 101 ~CFX_ListItem();
102 102
103 void SetFontMap(IPVT_FontMap* pFontMap); 103 void SetFontMap(IPVT_FontMap* pFontMap);
104 CFX_Edit* GetEdit() const; 104 CFX_Edit* GetEdit() const;
105 105
106 void SetRect(const CLST_Rect& rect); 106 void SetRect(const CLST_Rect& rect);
107 void SetSelect(FX_BOOL bSelected); 107 void SetSelect(FX_BOOL bSelected);
108 void SetText(const FX_WCHAR* text); 108 void SetText(const CFX_WideString& text);
109 void SetFontSize(FX_FLOAT fFontSize); 109 void SetFontSize(FX_FLOAT fFontSize);
110 CFX_WideString GetText() const; 110 CFX_WideString GetText() const;
111 111
112 CLST_Rect GetRect() const; 112 CLST_Rect GetRect() const;
113 FX_BOOL IsSelected() const; 113 FX_BOOL IsSelected() const;
114 FX_FLOAT GetItemHeight() const; 114 FX_FLOAT GetItemHeight() const;
115 uint16_t GetFirstChar() const; 115 uint16_t GetFirstChar() const;
116 116
117 private: 117 private:
118 CFX_Edit_Iterator* GetIterator() const; 118 CFX_Edit_Iterator* GetIterator() const;
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 FX_BOOL OnChar(uint16_t nChar, FX_BOOL bShift, FX_BOOL bCtrl); 236 FX_BOOL OnChar(uint16_t nChar, FX_BOOL bShift, FX_BOOL bCtrl);
237 237
238 void SetScrollPos(const CFX_FloatPoint& point); 238 void SetScrollPos(const CFX_FloatPoint& point);
239 void ScrollToListItem(int32_t nItemIndex); 239 void ScrollToListItem(int32_t nItemIndex);
240 CFX_FloatRect GetItemRect(int32_t nIndex) const; 240 CFX_FloatRect GetItemRect(int32_t nIndex) const;
241 int32_t GetCaret() const; 241 int32_t GetCaret() const;
242 int32_t GetSelect() const; 242 int32_t GetSelect() const;
243 int32_t GetTopItem() const; 243 int32_t GetTopItem() const;
244 CFX_FloatRect GetContentRect() const; 244 CFX_FloatRect GetContentRect() const;
245 int32_t GetItemIndex(const CFX_FloatPoint& point) const; 245 int32_t GetItemIndex(const CFX_FloatPoint& point) const;
246 void AddString(const FX_WCHAR* str); 246 void AddString(const CFX_WideString& str);
247 void SetTopItem(int32_t nIndex); 247 void SetTopItem(int32_t nIndex);
248 void Select(int32_t nItemIndex); 248 void Select(int32_t nItemIndex);
249 void SetCaret(int32_t nItemIndex); 249 void SetCaret(int32_t nItemIndex);
250 void Empty(); 250 void Empty();
251 void Cancel(); 251 void Cancel();
252 CFX_WideString GetText() const; 252 CFX_WideString GetText() const;
253 253
254 void SetFontMap(IPVT_FontMap* pFontMap); 254 void SetFontMap(IPVT_FontMap* pFontMap);
255 void SetFontSize(FX_FLOAT fFontSize); 255 void SetFontSize(FX_FLOAT fFontSize);
256 CFX_FloatRect GetPlateRect() const; 256 CFX_FloatRect GetPlateRect() const;
(...skipping 17 matching lines...) Expand all
274 void ReArrange(int32_t nItemIndex); 274 void ReArrange(int32_t nItemIndex);
275 CFX_FloatRect GetItemRectInternal(int32_t nIndex) const; 275 CFX_FloatRect GetItemRectInternal(int32_t nIndex) const;
276 CFX_FloatRect GetContentRectInternal() const; 276 CFX_FloatRect GetContentRectInternal() const;
277 void SetMultipleSelect(int32_t nItemIndex, FX_BOOL bSelected); 277 void SetMultipleSelect(int32_t nItemIndex, FX_BOOL bSelected);
278 void SetSingleSelect(int32_t nItemIndex); 278 void SetSingleSelect(int32_t nItemIndex);
279 void InvalidateItem(int32_t nItemIndex); 279 void InvalidateItem(int32_t nItemIndex);
280 void SelectItems(); 280 void SelectItems();
281 FX_BOOL IsItemVisible(int32_t nItemIndex) const; 281 FX_BOOL IsItemVisible(int32_t nItemIndex) const;
282 void SetScrollInfo(); 282 void SetScrollInfo();
283 void SetScrollPosY(FX_FLOAT fy); 283 void SetScrollPosY(FX_FLOAT fy);
284 void AddItem(const FX_WCHAR* str); 284 void AddItem(const CFX_WideString& str);
285 CFX_WideString GetItemText(int32_t nIndex) const; 285 CFX_WideString GetItemText(int32_t nIndex) const;
286 void SetItemSelect(int32_t nItemIndex, FX_BOOL bSelected); 286 void SetItemSelect(int32_t nItemIndex, FX_BOOL bSelected);
287 int32_t GetLastSelected() const; 287 int32_t GetLastSelected() const;
288 FX_WCHAR Toupper(FX_WCHAR c) const; 288 FX_WCHAR Toupper(FX_WCHAR c) const;
289 289
290 CPWL_List_Notify* m_pNotify; 290 CPWL_List_Notify* m_pNotify;
291 FX_BOOL m_bNotifyFlag; 291 FX_BOOL m_bNotifyFlag;
292 CFX_FloatPoint m_ptScrollPos; 292 CFX_FloatPoint m_ptScrollPos;
293 CPLST_Select m_aSelItems; // for multiple 293 CPLST_Select m_aSelItems; // for multiple
294 int32_t m_nSelItem; // for single 294 int32_t m_nSelItem; // for single
295 int32_t m_nFootIndex; // for multiple 295 int32_t m_nFootIndex; // for multiple
296 FX_BOOL m_bCtrlSel; // for multiple 296 FX_BOOL m_bCtrlSel; // for multiple
297 int32_t m_nCaretIndex; // for multiple 297 int32_t m_nCaretIndex; // for multiple
298 CLST_ArrayTemplate<CFX_ListItem*> m_aListItems; 298 CLST_ArrayTemplate<CFX_ListItem*> m_aListItems;
299 FX_FLOAT m_fFontSize; 299 FX_FLOAT m_fFontSize;
300 IPVT_FontMap* m_pFontMap; 300 IPVT_FontMap* m_pFontMap;
301 FX_BOOL m_bMultiple; 301 FX_BOOL m_bMultiple;
302 }; 302 };
303 303
304 #endif // FPDFSDK_FXEDIT_INCLUDE_FXET_LIST_H_ 304 #endif // FPDFSDK_FXEDIT_INCLUDE_FXET_LIST_H_
OLDNEW
« no previous file with comments | « fpdfsdk/fxedit/fxet_list.cpp ('k') | fpdfsdk/pdfwindow/PWL_ComboBox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698