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

Side by Side Diff: ui/gfx/render_text.h

Issue 10693160: Add and specify Views::Textfield::SelectAll |reversed| flag, etc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove redundant comments. Created 8 years, 5 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
« no previous file with comments | « chrome/browser/ui/views/omnibox/omnibox_view_views.cc ('k') | ui/gfx/render_text.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_GFX_RENDER_TEXT_H_ 5 #ifndef UI_GFX_RENDER_TEXT_H_
6 #define UI_GFX_RENDER_TEXT_H_ 6 #define UI_GFX_RENDER_TEXT_H_
7 7
8 #include <algorithm> 8 #include <algorithm>
9 #include <cstring> 9 #include <cstring>
10 #include <string> 10 #include <string>
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 // Set the selection_model_ based on |range|. 219 // Set the selection_model_ based on |range|.
220 // If the |range| start or end is greater than text length, it is modified 220 // If the |range| start or end is greater than text length, it is modified
221 // to be the text length. 221 // to be the text length.
222 // If the |range| start or end is not a cursorable position (not on grapheme 222 // If the |range| start or end is not a cursorable position (not on grapheme
223 // boundary), it is a NO-OP and returns false. Otherwise, returns true. 223 // boundary), it is a NO-OP and returns false. Otherwise, returns true.
224 bool SelectRange(const ui::Range& range); 224 bool SelectRange(const ui::Range& range);
225 225
226 // Returns true if the local point is over selected text. 226 // Returns true if the local point is over selected text.
227 bool IsPointInSelection(const Point& point); 227 bool IsPointInSelection(const Point& point);
228 228
229 // Selects no text, all text, or the word at the current cursor position. 229 // Selects no text, keeping the current cursor position and caret affinity.
230 void ClearSelection(); 230 void ClearSelection();
231 void SelectAll(); 231
232 // Select the entire text range. If |reversed| is true, the range will end at
233 // the logical beginning of the text; this generally shows the leading portion
234 // of text that overflows its display area.
235 void SelectAll(bool reversed);
236
237 // Selects the word at the current cursor position.
232 void SelectWord(); 238 void SelectWord();
233 239
234 const ui::Range& GetCompositionRange() const; 240 const ui::Range& GetCompositionRange() const;
235 void SetCompositionRange(const ui::Range& composition_range); 241 void SetCompositionRange(const ui::Range& composition_range);
236 242
237 // Apply |style_range| to the internal style model. 243 // Apply |style_range| to the internal style model.
238 void ApplyStyleRange(const StyleRange& style_range); 244 void ApplyStyleRange(const StyleRange& style_range);
239 245
240 // Apply |default_style_| over the entire text range. 246 // Apply |default_style_| over the entire text range.
241 void ApplyDefaultStyle(); 247 void ApplyDefaultStyle();
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
502 508
503 // Text shadows to be drawn. 509 // Text shadows to be drawn.
504 ShadowValues text_shadows_; 510 ShadowValues text_shadows_;
505 511
506 DISALLOW_COPY_AND_ASSIGN(RenderText); 512 DISALLOW_COPY_AND_ASSIGN(RenderText);
507 }; 513 };
508 514
509 } // namespace gfx 515 } // namespace gfx
510 516
511 #endif // UI_GFX_RENDER_TEXT_H_ 517 #endif // UI_GFX_RENDER_TEXT_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/omnibox/omnibox_view_views.cc ('k') | ui/gfx/render_text.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698