OLD | NEW |
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_GFX_RENDER_TEXT_H_ | 5 #ifndef UI_GFX_RENDER_TEXT_H_ |
6 #define UI_GFX_RENDER_TEXT_H_ | 6 #define UI_GFX_RENDER_TEXT_H_ |
7 | 7 |
8 #include <algorithm> | 8 #include <algorithm> |
9 #include <cstring> | 9 #include <cstring> |
10 #include <string> | 10 #include <string> |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 void SetText(const base::string16& text); | 165 void SetText(const base::string16& text); |
166 | 166 |
167 HorizontalAlignment horizontal_alignment() const { | 167 HorizontalAlignment horizontal_alignment() const { |
168 return horizontal_alignment_; | 168 return horizontal_alignment_; |
169 } | 169 } |
170 void SetHorizontalAlignment(HorizontalAlignment alignment); | 170 void SetHorizontalAlignment(HorizontalAlignment alignment); |
171 | 171 |
172 const FontList& font_list() const { return font_list_; } | 172 const FontList& font_list() const { return font_list_; } |
173 void SetFontList(const FontList& font_list); | 173 void SetFontList(const FontList& font_list); |
174 | 174 |
175 // Set the font size to |size| in pixels. | |
176 void SetFontSize(int size); | |
177 | |
178 bool cursor_enabled() const { return cursor_enabled_; } | 175 bool cursor_enabled() const { return cursor_enabled_; } |
179 void SetCursorEnabled(bool cursor_enabled); | 176 void SetCursorEnabled(bool cursor_enabled); |
180 | 177 |
181 bool cursor_visible() const { return cursor_visible_; } | 178 bool cursor_visible() const { return cursor_visible_; } |
182 void set_cursor_visible(bool visible) { cursor_visible_ = visible; } | 179 void set_cursor_visible(bool visible) { cursor_visible_ = visible; } |
183 | 180 |
184 bool insert_mode() const { return insert_mode_; } | 181 bool insert_mode() const { return insert_mode_; } |
185 void ToggleInsertMode(); | 182 void ToggleInsertMode(); |
186 | 183 |
187 SkColor cursor_color() const { return cursor_color_; } | 184 SkColor cursor_color() const { return cursor_color_; } |
(...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
685 // Lines computed by EnsureLayout. These should be invalidated with | 682 // Lines computed by EnsureLayout. These should be invalidated with |
686 // ResetLayout and on |display_rect_| changes. | 683 // ResetLayout and on |display_rect_| changes. |
687 std::vector<internal::Line> lines_; | 684 std::vector<internal::Line> lines_; |
688 | 685 |
689 DISALLOW_COPY_AND_ASSIGN(RenderText); | 686 DISALLOW_COPY_AND_ASSIGN(RenderText); |
690 }; | 687 }; |
691 | 688 |
692 } // namespace gfx | 689 } // namespace gfx |
693 | 690 |
694 #endif // UI_GFX_RENDER_TEXT_H_ | 691 #endif // UI_GFX_RENDER_TEXT_H_ |
OLD | NEW |