Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 bool HasSelection() const; | |
|
oshima
2011/03/21 21:11:43
Comment
James Su
2011/03/21 22:05:23
Done.
| |
| 93 | |
| 92 // Accessor for |style_|. | 94 // Accessor for |style_|. |
| 93 StyleFlags style() const { return style_; } | 95 StyleFlags style() const { return style_; } |
| 94 | 96 |
| 95 // Gets/Sets the text color to be used when painting the Textfield. | 97 // Gets/Sets the text color to be used when painting the Textfield. |
| 96 // Call |UseDefaultTextColor| to return to the system default colors. | 98 // Call |UseDefaultTextColor| to return to the system default colors. |
| 97 SkColor text_color() const { return text_color_; } | 99 SkColor text_color() const { return text_color_; } |
| 98 void SetTextColor(SkColor color); | 100 void SetTextColor(SkColor color); |
| 99 | 101 |
| 100 // Gets/Sets whether the default text color should be used when painting the | 102 // Gets/Sets whether the default text color should be used when painting the |
| 101 // Textfield. | 103 // Textfield. |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 281 | 283 |
| 282 // The accessible name of the text field. | 284 // The accessible name of the text field. |
| 283 string16 accessible_name_; | 285 string16 accessible_name_; |
| 284 | 286 |
| 285 DISALLOW_COPY_AND_ASSIGN(Textfield); | 287 DISALLOW_COPY_AND_ASSIGN(Textfield); |
| 286 }; | 288 }; |
| 287 | 289 |
| 288 } // namespace views | 290 } // namespace views |
| 289 | 291 |
| 290 #endif // VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_ | 292 #endif // VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_ |
| OLD | NEW |