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

Side by Side Diff: xfa/fwl/basewidget/ifwl_edit.h

Issue 2070583003: Make code compile with clang_use_chrome_plugin (part VI) (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: clean up Created 4 years, 6 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
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 XFA_FWL_BASEWIDGET_IFWL_EDIT_H_ 7 #ifndef XFA_FWL_BASEWIDGET_IFWL_EDIT_H_
8 #define XFA_FWL_BASEWIDGET_IFWL_EDIT_H_ 8 #define XFA_FWL_BASEWIDGET_IFWL_EDIT_H_
9 9
10 #include <vector> 10 #include <vector>
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 #define FWL_STYLEEXT_EDT_ShowScrollbarFocus (1L << 25) 47 #define FWL_STYLEEXT_EDT_ShowScrollbarFocus (1L << 25)
48 #define FWL_STYLEEXT_EDT_OuterScrollbar (1L << 26) 48 #define FWL_STYLEEXT_EDT_OuterScrollbar (1L << 26)
49 #define FWL_STYLEEXT_EDT_LastLineHeight (1L << 27) 49 #define FWL_STYLEEXT_EDT_LastLineHeight (1L << 27)
50 50
51 enum FWL_EDT_TEXTCHANGED { 51 enum FWL_EDT_TEXTCHANGED {
52 FWL_EDT_TEXTCHANGED_Insert = 0, 52 FWL_EDT_TEXTCHANGED_Insert = 0,
53 FWL_EDT_TEXTCHANGED_Delete, 53 FWL_EDT_TEXTCHANGED_Delete,
54 FWL_EDT_TEXTCHANGED_Replace, 54 FWL_EDT_TEXTCHANGED_Replace,
55 }; 55 };
56 56
57 BEGIN_FWL_EVENT_DEF(CFWL_EvtEdtTextChanged, CFWL_EventType::TextChanged) 57 FWL_EVENT_DEF(CFWL_EvtEdtTextChanged,
58 int32_t nChangeType; 58 CFWL_EventType::TextChanged,
59 CFX_WideString wsInsert; 59 int32_t nChangeType;
60 CFX_WideString wsDelete; 60 CFX_WideString wsInsert;
61 CFX_WideString wsPrevText; 61 CFX_WideString wsDelete;
62 END_FWL_EVENT_DEF 62 CFX_WideString wsPrevText;)
63 FWL_EVENT_FUNCTION_DEF(CFWL_EvtEdtTextChanged, CFWL_EventType::TextChanged)
63 64
64 BEGIN_FWL_EVENT_DEF(CFWL_EvtEdtTextFull, CFWL_EventType::TextFull) 65 FWL_EVENT_DEF(CFWL_EvtEdtTextFull, CFWL_EventType::TextFull)
65 END_FWL_EVENT_DEF 66 FWL_EVENT_FUNCTION_DEF(CFWL_EvtEdtTextFull, CFWL_EventType::TextFull)
66 67
67 BEGIN_FWL_EVENT_DEF(CFWL_EvtEdtPreSelfAdaption, CFWL_EventType::PreSelfAdaption) 68 FWL_EVENT_DEF(CFWL_EvtEdtPreSelfAdaption,
68 FX_BOOL bHSelfAdaption; 69 CFWL_EventType::PreSelfAdaption,
69 FX_BOOL bVSelfAdaption; 70 FX_BOOL bHSelfAdaption;
70 CFX_RectF rtAfterChange; 71 FX_BOOL bVSelfAdaption;
71 END_FWL_EVENT_DEF 72 CFX_RectF rtAfterChange;)
73 FWL_EVENT_FUNCTION_DEF(CFWL_EvtEdtPreSelfAdaption,
74 CFWL_EventType::PreSelfAdaption)
72 75
73 BEGIN_FWL_EVENT_DEF(CFWL_EvtEdtValidate, CFWL_EventType::Validate) 76 FWL_EVENT_DEF(CFWL_EvtEdtValidate,
74 IFWL_Widget* pDstWidget; 77 CFWL_EventType::Validate,
75 CFX_WideString wsInsert; 78 IFWL_Widget* pDstWidget;
76 FX_BOOL bValidate; 79 CFX_WideString wsInsert;
77 END_FWL_EVENT_DEF 80 FX_BOOL bValidate;)
81 FWL_EVENT_FUNCTION_DEF(CFWL_EvtEdtValidate, CFWL_EventType::Validate)
78 82
79 BEGIN_FWL_EVENT_DEF(CFWL_EvtEdtCheckWord, CFWL_EventType::CheckWord) 83 FWL_EVENT_DEF(CFWL_EvtEdtCheckWord,
80 CFX_ByteString bsWord; 84 CFWL_EventType::CheckWord,
81 FX_BOOL bCheckWord; 85 CFX_ByteString bsWord;
82 END_FWL_EVENT_DEF 86 FX_BOOL bCheckWord;)
87 FWL_EVENT_FUNCTION_DEF(CFWL_EvtEdtCheckWord, CFWL_EventType::CheckWord)
83 88
84 BEGIN_FWL_EVENT_DEF(CFWL_EvtEdtGetSuggestWords, 89 FWL_EVENT_DEF(CFWL_EvtEdtGetSuggestWords,
85 CFWL_EventType::GetSuggestedWords) 90 CFWL_EventType::GetSuggestedWords,
86 FX_BOOL bSuggestWords; 91 FX_BOOL bSuggestWords;
87 CFX_ByteString bsWord; 92 CFX_ByteString bsWord;
88 std::vector<CFX_ByteString> bsArraySuggestWords; 93 std::vector<CFX_ByteString> bsArraySuggestWords;)
89 END_FWL_EVENT_DEF 94 FWL_EVENT_FUNCTION_DEF(CFWL_EvtEdtGetSuggestWords,
95 CFWL_EventType::GetSuggestedWords)
90 96
91 class CFWL_WidgetImpProperties; 97 class CFWL_WidgetImpProperties;
92 class IFDE_TxtEdtDoRecord; 98 class IFDE_TxtEdtDoRecord;
93 99
94 class IFWL_EditDP : public IFWL_DataProvider {}; 100 class IFWL_EditDP : public IFWL_DataProvider {};
95 101
96 class IFWL_Edit : public IFWL_Widget { 102 class IFWL_Edit : public IFWL_Widget {
97 public: 103 public:
98 static IFWL_Edit* Create(const CFWL_WidgetImpProperties& properties, 104 static IFWL_Edit* Create(const CFWL_WidgetImpProperties& properties,
99 IFWL_Widget* pOuter); 105 IFWL_Widget* pOuter);
100 static IFWL_Edit* CreateComboEdit(const CFWL_WidgetImpProperties& properties, 106 static IFWL_Edit* CreateComboEdit(const CFWL_WidgetImpProperties& properties,
101 IFWL_Widget* pOuter); 107 IFWL_Widget* pOuter);
102 108
103 FWL_Error SetText(const CFX_WideString& wsText); 109 FWL_Error SetText(const CFX_WideString& wsText);
104 int32_t GetTextLength() const; 110 int32_t GetTextLength() const;
105 FWL_Error GetText(CFX_WideString& wsText, 111 FWL_Error GetText(CFX_WideString& wsText,
106 int32_t nStart = 0, 112 int32_t nStart = 0,
107 int32_t nCount = -1) const; 113 int32_t nCount = -1) const;
108 FWL_Error ClearText(); 114 FWL_Error ClearText();
109 int32_t GetCaretPos() const; 115 int32_t GetCaretPos() const;
110 int32_t SetCaretPos(int32_t nIndex, FX_BOOL bBefore = TRUE); 116 int32_t SetCaretPos(int32_t nIndex, FX_BOOL bBefore = TRUE);
111 FWL_Error AddSelRange(int32_t nStart, int32_t nCount = -1); 117 FWL_Error AddSelRange(int32_t nStart, int32_t nCount = -1);
112 int32_t CountSelRanges(); 118 int32_t CountSelRanges();
113 int32_t GetSelRange(int32_t nIndex, int32_t& nStart); 119 int32_t GetSelRange(int32_t nIndex, int32_t& nStart);
114 FWL_Error ClearSelections(); 120 FWL_Error ClearSelections();
115 int32_t GetLimit(); 121 int32_t GetLimit();
116 FWL_Error SetLimit(int32_t nLimit); 122 FWL_Error SetLimit(int32_t nLimit);
117 FWL_Error SetAliasChar(FX_WCHAR wAlias); 123 FWL_Error SetAliasChar(FX_WCHAR wAlias);
118 FWL_Error SetFormatString(const CFX_WideString& wsFormat);
119 FWL_Error Insert(int32_t nStart, const FX_WCHAR* lpText, int32_t nLen); 124 FWL_Error Insert(int32_t nStart, const FX_WCHAR* lpText, int32_t nLen);
120 FWL_Error DeleteSelections(); 125 FWL_Error DeleteSelections();
121 FWL_Error DeleteRange(int32_t nStart, int32_t nCount = -1); 126 FWL_Error DeleteRange(int32_t nStart, int32_t nCount = -1);
122 FWL_Error Replace(int32_t nStart, 127 FWL_Error Replace(int32_t nStart,
123 int32_t nLen, 128 int32_t nLen,
124 const CFX_WideStringC& wsReplace); 129 const CFX_WideStringC& wsReplace);
125 FWL_Error DoClipboard(int32_t iCmd); 130 FWL_Error DoClipboard(int32_t iCmd);
126 FX_BOOL Copy(CFX_WideString& wsCopy); 131 FX_BOOL Copy(CFX_WideString& wsCopy);
127 FX_BOOL Cut(CFX_WideString& wsCut); 132 FX_BOOL Cut(CFX_WideString& wsCut);
128 FX_BOOL Paste(const CFX_WideString& wsPaste); 133 FX_BOOL Paste(const CFX_WideString& wsPaste);
(...skipping 13 matching lines...) Expand all
142 FX_BOOL GetSuggestWords(CFX_PointF pointf, 147 FX_BOOL GetSuggestWords(CFX_PointF pointf,
143 std::vector<CFX_ByteString>& sSuggest); 148 std::vector<CFX_ByteString>& sSuggest);
144 FX_BOOL ReplaceSpellCheckWord(CFX_PointF pointf, 149 FX_BOOL ReplaceSpellCheckWord(CFX_PointF pointf,
145 const CFX_ByteStringC& bsReplace); 150 const CFX_ByteStringC& bsReplace);
146 151
147 protected: 152 protected:
148 IFWL_Edit(); 153 IFWL_Edit();
149 }; 154 };
150 155
151 #endif // XFA_FWL_BASEWIDGET_IFWL_EDIT_H_ 156 #endif // XFA_FWL_BASEWIDGET_IFWL_EDIT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698