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

Side by Side Diff: views/controls/textfield/textfield_views_model.h

Issue 7461102: modification to RenderText for inheritance/SelectionModel (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 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 | Annotate | Revision Log
OLDNEW
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_VIEWS_MODEL_H_ 5 #ifndef VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_VIEWS_MODEL_H_
6 #define VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_VIEWS_MODEL_H_ 6 #define VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_VIEWS_MODEL_H_
7 #pragma once 7 #pragma once
8 8
9 #include <list> 9 #include <list>
10 #include <vector> 10 #include <vector>
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 // Cursor related methods. 126 // Cursor related methods.
127 127
128 // Returns the current cursor position. 128 // Returns the current cursor position.
129 size_t GetCursorPosition() const; 129 size_t GetCursorPosition() const;
130 130
131 // Moves the cursor, see RenderText for additional details. 131 // Moves the cursor, see RenderText for additional details.
132 // The current composition text will be confirmed. 132 // The current composition text will be confirmed.
133 void MoveCursorLeft(gfx::BreakType break_type, bool select); 133 void MoveCursorLeft(gfx::BreakType break_type, bool select);
134 void MoveCursorRight(gfx::BreakType break_type, bool select); 134 void MoveCursorRight(gfx::BreakType break_type, bool select);
135 135
136 // Moves the cursor to the specified |position|. 136 // Moves the cursor to the specified |position|.
msw 2011/08/01 05:02:23 Comment needs updating at the very least.
137 // If |select| is true, it updates the selection accordingly. 137 // If |select| is true, it updates the selection accordingly.
138 // The current composition text will be confirmed. 138 // The current composition text will be confirmed.
139 bool MoveCursorTo(size_t position, bool select); 139 bool MoveCursorTo(const gfx::SelectionModel& selection, bool select);
140 140
141 // Helper function to call MoveCursorTo on the TextfieldViewsModel. 141 // Helper function to call MoveCursorTo on the TextfieldViewsModel.
142 bool MoveCursorTo(const gfx::Point& point, bool select); 142 bool MoveCursorTo(const gfx::Point& point, bool select);
143 143
144 // Returns the bounds of selected text. 144 // Returns the bounds of selected text.
145 std::vector<gfx::Rect> GetSelectionBounds() const; 145 std::vector<gfx::Rect> GetSelectionBounds() const;
146 146
147 // Selection related method 147 // Selection related method
148 148
149 // Returns the selected text. 149 // Returns the selected text.
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 // 2) new edit is added. (redo history is cleared) 319 // 2) new edit is added. (redo history is cleared)
320 // 3) redone all undone edits. 320 // 3) redone all undone edits.
321 EditHistory::iterator current_edit_; 321 EditHistory::iterator current_edit_;
322 322
323 DISALLOW_COPY_AND_ASSIGN(TextfieldViewsModel); 323 DISALLOW_COPY_AND_ASSIGN(TextfieldViewsModel);
324 }; 324 };
325 325
326 } // namespace views 326 } // namespace views
327 327
328 #endif // VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_VIEWS_MODEL_H_ 328 #endif // VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_VIEWS_MODEL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698