Chromium Code Reviews| Index: ui/views/controls/textfield/textfield.h |
| diff --git a/ui/views/controls/textfield/textfield.h b/ui/views/controls/textfield/textfield.h |
| index 57509ea64781631823bf7cf243fa8d738d5f073b..13c99aafd95a7b067466416f136fd6b8e2f9d874 100644 |
| --- a/ui/views/controls/textfield/textfield.h |
| +++ b/ui/views/controls/textfield/textfield.h |
| @@ -16,6 +16,7 @@ |
| #include "ui/base/keycodes/keyboard_codes.h" |
| #include "ui/gfx/font.h" |
| #include "ui/gfx/native_widget_types.h" |
| +#include "ui/gfx/text_constants.h" |
| #include "ui/views/controls/textfield/native_textfield_wrapper.h" |
| #include "ui/views/view.h" |
| @@ -23,10 +24,6 @@ |
| #include "base/logging.h" |
| #endif |
| -namespace gfx { |
| -struct StyleRange; |
| -} // namespace gfx |
| - |
| namespace ui { |
| class Range; |
| class TextInputClient; |
| @@ -209,14 +206,17 @@ class VIEWS_EXPORT Textfield : public View { |
| // only and has to be called after the wrapper is created. |
| size_t GetCursorPosition() const; |
| - // Applies |style| to the text specified by its range. The style will be |
| - // ignored if range is empty or invalid. This is views-implementation only and |
| + // Set the text color over the entire text or a logical character range. |
| + // Empty and invalid ranges are ignored. This is views-implementation only and |
| // has to be called after the wrapper is created. |
| - void ApplyStyleRange(const gfx::StyleRange& style); |
| + void SetColor(SkColor value); |
| + void ApplyColor(SkColor value, const ui::Range& range); |
| - // Applies the default style to the textfield. This is views-implementation |
| - // only and has to be called after the wrapper is created. |
| - void ApplyDefaultStyle(); |
| + // Set various text styles over the entire text or a logical character range. |
| + // Empty and invalid ranges are ignored. This is views-implementation only and |
| + // has to be called after the wrapper is created. |
| + void SetStyle(gfx::TextStyle style, bool value); |
|
Alexei Svitkine (slow)
2013/01/22 19:20:21
Please document the |value| parameter better. It w
msw
2013/01/22 22:27:24
Done.
|
| + void ApplyStyle(gfx::TextStyle style, bool value, const ui::Range& range); |
| // Clears Edit history. |
| void ClearEditHistory(); |