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

Side by Side Diff: ui/views/controls/textfield/native_textfield_wrapper.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_NATIVE_TEXTFIELD_WRAPPER_H_ 5 #ifndef UI_VIEWS_CONTROLS_TEXTFIELD_NATIVE_TEXTFIELD_WRAPPER_H_
6 #define UI_VIEWS_CONTROLS_TEXTFIELD_NATIVE_TEXTFIELD_WRAPPER_H_ 6 #define UI_VIEWS_CONTROLS_TEXTFIELD_NATIVE_TEXTFIELD_WRAPPER_H_
7 7
8 #include "base/string16.h" 8 #include "base/string16.h"
9 #include "ui/gfx/native_widget_types.h" 9 #include "ui/gfx/native_widget_types.h"
10 #include "ui/views/views_export.h" 10 #include "ui/views/views_export.h"
(...skipping 29 matching lines...) Expand all
40 // Updates the text displayed with the text held by the Textfield. 40 // Updates the text displayed with the text held by the Textfield.
41 virtual void UpdateText() = 0; 41 virtual void UpdateText() = 0;
42 42
43 // Adds the specified text to the text already displayed by the wrapped native 43 // Adds the specified text to the text already displayed by the wrapped native
44 // text field. 44 // text field.
45 virtual void AppendText(const string16& text) = 0; 45 virtual void AppendText(const string16& text) = 0;
46 46
47 // Gets the text that is selected in the wrapped native text field. 47 // Gets the text that is selected in the wrapped native text field.
48 virtual string16 GetSelectedText() const = 0; 48 virtual string16 GetSelectedText() const = 0;
49 49
50 // Selects all the text in the edit. Use this in place of SetSelAll() to 50 // Select the entire text range. If |reversed| is true, the range will end at
51 // avoid selecting the "phantom newline" at the end of the edit. 51 // the logical beginning of the text; this generally shows the leading portion
52 virtual void SelectAll() = 0; 52 // of text that overflows its display area.
53 virtual void SelectAll(bool reversed) = 0;
53 54
54 // Clears the selection within the edit field and sets the caret to the end. 55 // Clears the selection within the edit field and sets the caret to the end.
55 virtual void ClearSelection() = 0; 56 virtual void ClearSelection() = 0;
56 57
57 // Updates the border display for the native text field with the state desired 58 // Updates the border display for the native text field with the state desired
58 // by the Textfield. 59 // by the Textfield.
59 virtual void UpdateBorder() = 0; 60 virtual void UpdateBorder() = 0;
60 61
61 // Updates the text color used when painting the native text field. 62 // Updates the text color used when painting the native text field.
62 virtual void UpdateTextColor() = 0; 63 virtual void UpdateTextColor() = 0;
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 // Get the height in pixels of the first font used in this textfield. 150 // Get the height in pixels of the first font used in this textfield.
150 virtual int GetFontHeight() = 0; 151 virtual int GetFontHeight() = 0;
151 152
152 // Creates an appropriate NativeTextfieldWrapper for the platform. 153 // Creates an appropriate NativeTextfieldWrapper for the platform.
153 static NativeTextfieldWrapper* CreateWrapper(Textfield* field); 154 static NativeTextfieldWrapper* CreateWrapper(Textfield* field);
154 }; 155 };
155 156
156 } // namespace views 157 } // namespace views
157 158
158 #endif // UI_VIEWS_CONTROLS_TEXTFIELD_NATIVE_TEXTFIELD_WRAPPER_H_ 159 #endif // UI_VIEWS_CONTROLS_TEXTFIELD_NATIVE_TEXTFIELD_WRAPPER_H_
OLDNEW
« no previous file with comments | « ui/views/controls/textfield/native_textfield_win.cc ('k') | ui/views/controls/textfield/textfield.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698