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 <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
243 return horizontal_alignment_; | 243 return horizontal_alignment_; |
244 } | 244 } |
245 void SetHorizontalAlignment(HorizontalAlignment alignment); | 245 void SetHorizontalAlignment(HorizontalAlignment alignment); |
246 | 246 |
247 const FontList& font_list() const { return font_list_; } | 247 const FontList& font_list() const { return font_list_; } |
248 void SetFontList(const FontList& font_list); | 248 void SetFontList(const FontList& font_list); |
249 | 249 |
250 bool cursor_enabled() const { return cursor_enabled_; } | 250 bool cursor_enabled() const { return cursor_enabled_; } |
251 void SetCursorEnabled(bool cursor_enabled); | 251 void SetCursorEnabled(bool cursor_enabled); |
252 | 252 |
253 bool cursor_visible() const { return cursor_visible_; } | |
254 void set_cursor_visible(bool visible) { cursor_visible_ = visible; } | |
255 | |
256 SkColor cursor_color() const { return cursor_color_; } | 253 SkColor cursor_color() const { return cursor_color_; } |
257 void set_cursor_color(SkColor color) { cursor_color_ = color; } | 254 void set_cursor_color(SkColor color) { cursor_color_ = color; } |
258 | 255 |
259 SkColor selection_color() const { return selection_color_; } | 256 SkColor selection_color() const { return selection_color_; } |
260 void set_selection_color(SkColor color) { selection_color_ = color; } | 257 void set_selection_color(SkColor color) { selection_color_ = color; } |
261 | 258 |
262 SkColor selection_background_focused_color() const { | 259 SkColor selection_background_focused_color() const { |
263 return selection_background_focused_color_; | 260 return selection_background_focused_color_; |
264 } | 261 } |
265 void set_selection_background_focused_color(SkColor color) { | 262 void set_selection_background_focused_color(SkColor color) { |
(...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
758 // Logical selection range and visual cursor position. | 755 // Logical selection range and visual cursor position. |
759 SelectionModel selection_model_; | 756 SelectionModel selection_model_; |
760 | 757 |
761 // The cached cursor bounds; get these bounds with GetUpdatedCursorBounds. | 758 // The cached cursor bounds; get these bounds with GetUpdatedCursorBounds. |
762 Rect cursor_bounds_; | 759 Rect cursor_bounds_; |
763 | 760 |
764 // Specifies whether the cursor is enabled. If disabled, no space is reserved | 761 // Specifies whether the cursor is enabled. If disabled, no space is reserved |
765 // for the cursor when positioning text. | 762 // for the cursor when positioning text. |
766 bool cursor_enabled_; | 763 bool cursor_enabled_; |
767 | 764 |
768 // The cursor visibility. | |
769 bool cursor_visible_; | |
770 | |
771 // The color used for the cursor. | 765 // The color used for the cursor. |
772 SkColor cursor_color_; | 766 SkColor cursor_color_; |
sadrul
2017/02/02 17:15:31
Remove this too?
yiyix
2017/02/06 21:36:17
This is used in DrawCursor. I will remove this var
| |
773 | 767 |
774 // The color used for drawing selected text. | 768 // The color used for drawing selected text. |
775 SkColor selection_color_; | 769 SkColor selection_color_; |
776 | 770 |
777 // The background color used for drawing the selection when focused. | 771 // The background color used for drawing the selection when focused. |
778 SkColor selection_background_focused_color_; | 772 SkColor selection_background_focused_color_; |
779 | 773 |
780 // The focus state of the text. | 774 // The focus state of the text. |
781 bool focused_; | 775 bool focused_; |
782 | 776 |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
875 // Lines computed by EnsureLayout. These should be invalidated upon | 869 // Lines computed by EnsureLayout. These should be invalidated upon |
876 // OnLayoutTextAttributeChanged and OnDisplayTextAttributeChanged calls. | 870 // OnLayoutTextAttributeChanged and OnDisplayTextAttributeChanged calls. |
877 std::vector<internal::Line> lines_; | 871 std::vector<internal::Line> lines_; |
878 | 872 |
879 DISALLOW_COPY_AND_ASSIGN(RenderText); | 873 DISALLOW_COPY_AND_ASSIGN(RenderText); |
880 }; | 874 }; |
881 | 875 |
882 } // namespace gfx | 876 } // namespace gfx |
883 | 877 |
884 #endif // UI_GFX_RENDER_TEXT_H_ | 878 #endif // UI_GFX_RENDER_TEXT_H_ |
OLD | NEW |