OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium 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 #ifndef VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_ | 5 #ifndef VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_ |
6 #define VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_ | 6 #define VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
10 | 10 |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 | 171 |
172 // Invoked by the edit control when the value changes. This method set | 172 // Invoked by the edit control when the value changes. This method set |
173 // the text_ member variable to the value contained in edit control. | 173 // the text_ member variable to the value contained in edit control. |
174 // This is important because the edit control can be replaced if it has | 174 // This is important because the edit control can be replaced if it has |
175 // been deleted during a window close. | 175 // been deleted during a window close. |
176 void SyncText(); | 176 void SyncText(); |
177 | 177 |
178 // Returns whether or not an IME is composing text. | 178 // Returns whether or not an IME is composing text. |
179 bool IsIMEComposing() const; | 179 bool IsIMEComposing() const; |
180 | 180 |
| 181 // Gets the selected range. This is views-implementation only and |
| 182 // has to be called after the wrapper is created. |
| 183 void GetSelectedRange(ui::Range* range) const; |
| 184 |
| 185 // Selects the text given by |range|. This is views-implementation only and |
| 186 // has to be called after the wrapper is created. |
| 187 void SelectRange(const ui::Range& range); |
| 188 |
181 // Gets the selection model. This is views-implementation only and | 189 // Gets the selection model. This is views-implementation only and |
182 // has to be called after the wrapper is created. | 190 // has to be called after the wrapper is created. |
183 void GetSelectionModel(gfx::SelectionModel* sel) const; | 191 void GetSelectionModel(gfx::SelectionModel* sel) const; |
184 | 192 |
185 // Selects the text given by |sel|. This is views-implementation only and | 193 // Selects the text given by |sel|. This is views-implementation only and |
186 // has to be called after the wrapper is created. | 194 // has to be called after the wrapper is created. |
187 void SelectSelectionModel(const gfx::SelectionModel& sel); | 195 void SelectSelectionModel(const gfx::SelectionModel& sel); |
188 | 196 |
189 // Returns the current cursor position. This is views-implementation | 197 // Returns the current cursor position. This is views-implementation |
190 // only and has to be called after the wrapper is created. | 198 // only and has to be called after the wrapper is created. |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
297 | 305 |
298 // The input type of this text field. | 306 // The input type of this text field. |
299 ui::TextInputType text_input_type_; | 307 ui::TextInputType text_input_type_; |
300 | 308 |
301 DISALLOW_COPY_AND_ASSIGN(Textfield); | 309 DISALLOW_COPY_AND_ASSIGN(Textfield); |
302 }; | 310 }; |
303 | 311 |
304 } // namespace views | 312 } // namespace views |
305 | 313 |
306 #endif // VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_ | 314 #endif // VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_ |
OLD | NEW |