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

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

Issue 6685082: Refactor Textfield and AutocompleteEditViewViews. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rename IsValidChar to ShouldInsertChar. Created 9 years, 9 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_H_ 5 #ifndef VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_
6 #define VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_ 6 #define VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_
7 #pragma once 7 #pragma once
8 8
9 #include "build/build_config.h" 9 #include "build/build_config.h"
10 10
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 82
83 // Returns the text that is currently selected. 83 // Returns the text that is currently selected.
84 string16 GetSelectedText() const; 84 string16 GetSelectedText() const;
85 85
86 // Causes the edit field to be fully selected. 86 // Causes the edit field to be fully selected.
87 void SelectAll(); 87 void SelectAll();
88 88
89 // Clears the selection within the edit field and sets the caret to the end. 89 // Clears the selection within the edit field and sets the caret to the end.
90 void ClearSelection() const; 90 void ClearSelection() const;
91 91
92 // Checks if there is any selected text.
93 bool HasSelection() const;
94
92 // Accessor for |style_|. 95 // Accessor for |style_|.
93 StyleFlags style() const { return style_; } 96 StyleFlags style() const { return style_; }
94 97
95 // Gets/Sets the text color to be used when painting the Textfield. 98 // Gets/Sets the text color to be used when painting the Textfield.
96 // Call |UseDefaultTextColor| to return to the system default colors. 99 // Call |UseDefaultTextColor| to return to the system default colors.
97 SkColor text_color() const { return text_color_; } 100 SkColor text_color() const { return text_color_; }
98 void SetTextColor(SkColor color); 101 void SetTextColor(SkColor color);
99 102
100 // Gets/Sets whether the default text color should be used when painting the 103 // Gets/Sets whether the default text color should be used when painting the
101 // Textfield. 104 // Textfield.
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 284
282 // The accessible name of the text field. 285 // The accessible name of the text field.
283 string16 accessible_name_; 286 string16 accessible_name_;
284 287
285 DISALLOW_COPY_AND_ASSIGN(Textfield); 288 DISALLOW_COPY_AND_ASSIGN(Textfield);
286 }; 289 };
287 290
288 } // namespace views 291 } // namespace views
289 292
290 #endif // VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_ 293 #endif // VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698