OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 UI_VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_MODEL_H_ | 5 #ifndef UI_VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_MODEL_H_ |
6 #define UI_VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_MODEL_H_ | 6 #define UI_VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_MODEL_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <list> | 10 #include <list> |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 | 113 |
114 // Cursor related methods. | 114 // Cursor related methods. |
115 | 115 |
116 // Returns the current cursor position. | 116 // Returns the current cursor position. |
117 size_t GetCursorPosition() const; | 117 size_t GetCursorPosition() const; |
118 | 118 |
119 // Moves the cursor, see RenderText for additional details. | 119 // Moves the cursor, see RenderText for additional details. |
120 // The current composition text will be confirmed. | 120 // The current composition text will be confirmed. |
121 void MoveCursor(gfx::BreakType break_type, | 121 void MoveCursor(gfx::BreakType break_type, |
122 gfx::VisualCursorDirection direction, | 122 gfx::VisualCursorDirection direction, |
123 bool select); | 123 gfx::SelectionBehavior selection_behavior); |
124 | 124 |
125 // Updates the cursor to the specified selection model. Any composition text | 125 // Updates the cursor to the specified selection model. Any composition text |
126 // will be confirmed, which may alter the specified selection range start. | 126 // will be confirmed, which may alter the specified selection range start. |
127 bool MoveCursorTo(const gfx::SelectionModel& cursor); | 127 bool MoveCursorTo(const gfx::SelectionModel& cursor); |
128 | 128 |
129 // Helper function to call MoveCursorTo on the TextfieldModel. | 129 // Helper function to call MoveCursorTo on the TextfieldModel. |
130 bool MoveCursorTo(const gfx::Point& point, bool select); | 130 bool MoveCursorTo(const gfx::Point& point, bool select); |
131 | 131 |
132 // Selection related methods. | 132 // Selection related methods. |
133 | 133 |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
310 // 2) new edit is added. (redo history is cleared) | 310 // 2) new edit is added. (redo history is cleared) |
311 // 3) redone all undone edits. | 311 // 3) redone all undone edits. |
312 EditHistory::iterator current_edit_; | 312 EditHistory::iterator current_edit_; |
313 | 313 |
314 DISALLOW_COPY_AND_ASSIGN(TextfieldModel); | 314 DISALLOW_COPY_AND_ASSIGN(TextfieldModel); |
315 }; | 315 }; |
316 | 316 |
317 } // namespace views | 317 } // namespace views |
318 | 318 |
319 #endif // UI_VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_MODEL_H_ | 319 #endif // UI_VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_MODEL_H_ |
OLD | NEW |