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

Side by Side Diff: ui/views/controls/textfield/textfield.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
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_VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_ 5 #ifndef UI_VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_
6 #define UI_VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_ 6 #define UI_VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 // new text's range, or moves the cursor to the end if the cursor is 81 // new text's range, or moves the cursor to the end if the cursor is
82 // out of the new text's range. 82 // out of the new text's range.
83 void SetText(const string16& text); 83 void SetText(const string16& text);
84 84
85 // Appends the given string to the previously-existing text in the field. 85 // Appends the given string to the previously-existing text in the field.
86 void AppendText(const string16& text); 86 void AppendText(const string16& text);
87 87
88 // Returns the text that is currently selected. 88 // Returns the text that is currently selected.
89 string16 GetSelectedText() const; 89 string16 GetSelectedText() const;
90 90
91 // Causes the edit field to be fully selected. 91 // Select the entire text range. If |reversed| is true, the range will end at
92 void SelectAll(); 92 // the logical beginning of the text; this generally shows the leading portion
93 // of text that overflows its display area.
94 void SelectAll(bool reversed);
93 95
94 // Clears the selection within the edit field and sets the caret to the end. 96 // Clears the selection within the edit field and sets the caret to the end.
95 void ClearSelection() const; 97 void ClearSelection() const;
96 98
97 // Checks if there is any selected text. 99 // Checks if there is any selected text.
98 bool HasSelection() const; 100 bool HasSelection() const;
99 101
100 // Accessor for |style_|. 102 // Accessor for |style_|.
101 StyleFlags style() const { return style_; } 103 StyleFlags style() const { return style_; }
102 104
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 321
320 // The input type of this text field. 322 // The input type of this text field.
321 ui::TextInputType text_input_type_; 323 ui::TextInputType text_input_type_;
322 324
323 DISALLOW_COPY_AND_ASSIGN(Textfield); 325 DISALLOW_COPY_AND_ASSIGN(Textfield);
324 }; 326 };
325 327
326 } // namespace views 328 } // namespace views
327 329
328 #endif // UI_VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_ 330 #endif // UI_VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_
OLDNEW
« no previous file with comments | « ui/views/controls/textfield/native_textfield_wrapper.h ('k') | ui/views/controls/textfield/textfield.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698