| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_VIEWS_MODEL_H_ | 5 #ifndef UI_VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_VIEWS_MODEL_H_ |
| 6 #define UI_VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_VIEWS_MODEL_H_ | 6 #define UI_VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_VIEWS_MODEL_H_ |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 // the range's start position, and ends with the range's end position, | 144 // the range's start position, and ends with the range's end position, |
| 145 // therefore the cursor position becomes the end position. | 145 // therefore the cursor position becomes the end position. |
| 146 void SelectRange(const ui::Range& range); | 146 void SelectRange(const ui::Range& range); |
| 147 | 147 |
| 148 void GetSelectionModel(gfx::SelectionModel* sel) const; | 148 void GetSelectionModel(gfx::SelectionModel* sel) const; |
| 149 | 149 |
| 150 // The current composition text will be confirmed. | 150 // The current composition text will be confirmed. |
| 151 // render_text_'s selection model is set to |sel|. | 151 // render_text_'s selection model is set to |sel|. |
| 152 void SelectSelectionModel(const gfx::SelectionModel& sel); | 152 void SelectSelectionModel(const gfx::SelectionModel& sel); |
| 153 | 153 |
| 154 // Selects all text. | 154 // Select the entire text range. If |reversed| is true, the range will end at |
| 155 // the logical beginning of the text; this generally shows the leading portion |
| 156 // of text that overflows its display area. |
| 155 // The current composition text will be confirmed. | 157 // The current composition text will be confirmed. |
| 156 void SelectAll(); | 158 void SelectAll(bool reversed); |
| 157 | 159 |
| 158 // Selects the word at which the cursor is currently positioned. | 160 // Selects the word at which the cursor is currently positioned. |
| 159 // The current composition text will be confirmed. | 161 // The current composition text will be confirmed. |
| 160 void SelectWord(); | 162 void SelectWord(); |
| 161 | 163 |
| 162 // Clears selection. | 164 // Clears selection. |
| 163 // The current composition text will be confirmed. | 165 // The current composition text will be confirmed. |
| 164 void ClearSelection(); | 166 void ClearSelection(); |
| 165 | 167 |
| 166 // Returns true if there is an undoable edit. | 168 // Returns true if there is an undoable edit. |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 304 // 2) new edit is added. (redo history is cleared) | 306 // 2) new edit is added. (redo history is cleared) |
| 305 // 3) redone all undone edits. | 307 // 3) redone all undone edits. |
| 306 EditHistory::iterator current_edit_; | 308 EditHistory::iterator current_edit_; |
| 307 | 309 |
| 308 DISALLOW_COPY_AND_ASSIGN(TextfieldViewsModel); | 310 DISALLOW_COPY_AND_ASSIGN(TextfieldViewsModel); |
| 309 }; | 311 }; |
| 310 | 312 |
| 311 } // namespace views | 313 } // namespace views |
| 312 | 314 |
| 313 #endif // UI_VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_VIEWS_MODEL_H_ | 315 #endif // UI_VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_VIEWS_MODEL_H_ |
| OLD | NEW |