| 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 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 249 | 249 |
| 250 bool cursor_visible() const { return cursor_visible_; } | 250 bool cursor_visible() const { return cursor_visible_; } |
| 251 void set_cursor_visible(bool visible) { cursor_visible_ = visible; } | 251 void set_cursor_visible(bool visible) { cursor_visible_ = visible; } |
| 252 | 252 |
| 253 SkColor cursor_color() const { return cursor_color_; } | 253 SkColor cursor_color() const { return cursor_color_; } |
| 254 void set_cursor_color(SkColor color) { cursor_color_ = color; } | 254 void set_cursor_color(SkColor color) { cursor_color_ = color; } |
| 255 | 255 |
| 256 SkColor selection_color() const { return selection_color_; } | 256 SkColor selection_color() const { return selection_color_; } |
| 257 void set_selection_color(SkColor color) { selection_color_ = color; } | 257 void set_selection_color(SkColor color) { selection_color_ = color; } |
| 258 | 258 |
| 259 SkColor selection_background_focused_color() const { | 259 SkColor selection_background_color() const { |
| 260 return selection_background_focused_color_; | 260 return selection_background_color_; |
| 261 } | 261 } |
| 262 void set_selection_background_focused_color(SkColor color) { | 262 void set_selection_background_color(SkColor color) { |
| 263 selection_background_focused_color_ = color; | 263 selection_background_color_ = color; |
| 264 } | 264 } |
| 265 | 265 |
| 266 void set_draw_text_selection(bool draw) { draw_text_selection_ = draw; } |
| 267 |
| 266 bool focused() const { return focused_; } | 268 bool focused() const { return focused_; } |
| 267 void set_focused(bool focused) { focused_ = focused; } | 269 void set_focused(bool focused) { focused_ = focused; } |
| 268 | 270 |
| 269 bool clip_to_display_rect() const { return clip_to_display_rect_; } | 271 bool clip_to_display_rect() const { return clip_to_display_rect_; } |
| 270 void set_clip_to_display_rect(bool clip) { clip_to_display_rect_ = clip; } | 272 void set_clip_to_display_rect(bool clip) { clip_to_display_rect_ = clip; } |
| 271 | 273 |
| 272 // In an obscured (password) field, all text is drawn as asterisks or bullets. | 274 // In an obscured (password) field, all text is drawn as asterisks or bullets. |
| 273 bool obscured() const { return obscured_; } | 275 bool obscured() const { return obscured_; } |
| 274 void SetObscured(bool obscured); | 276 void SetObscured(bool obscured); |
| 275 | 277 |
| (...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 753 | 755 |
| 754 // The cursor visibility. | 756 // The cursor visibility. |
| 755 bool cursor_visible_; | 757 bool cursor_visible_; |
| 756 | 758 |
| 757 // The color used for the cursor. | 759 // The color used for the cursor. |
| 758 SkColor cursor_color_; | 760 SkColor cursor_color_; |
| 759 | 761 |
| 760 // The color used for drawing selected text. | 762 // The color used for drawing selected text. |
| 761 SkColor selection_color_; | 763 SkColor selection_color_; |
| 762 | 764 |
| 763 // The background color used for drawing the selection when focused. | 765 // The background color used for drawing the selection. |
| 764 SkColor selection_background_focused_color_; | 766 SkColor selection_background_color_; |
| 767 |
| 768 // Whether to draw the background of the selected text. |
| 769 bool draw_text_selection_; |
| 765 | 770 |
| 766 // The focus state of the text. | 771 // The focus state of the text. |
| 767 bool focused_; | 772 bool focused_; |
| 768 | 773 |
| 769 // Composition text range. | 774 // Composition text range. |
| 770 Range composition_range_; | 775 Range composition_range_; |
| 771 | 776 |
| 772 // Color, baseline, and style breaks, used to modify ranges of text. | 777 // Color, baseline, and style breaks, used to modify ranges of text. |
| 773 // BreakList positions are stored with text indices, not display indices. | 778 // BreakList positions are stored with text indices, not display indices. |
| 774 // TODO(msw): Expand to support cursor, selection, background, etc. colors. | 779 // TODO(msw): Expand to support cursor, selection, background, etc. colors. |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 861 // Lines computed by EnsureLayout. These should be invalidated upon | 866 // Lines computed by EnsureLayout. These should be invalidated upon |
| 862 // OnLayoutTextAttributeChanged and OnDisplayTextAttributeChanged calls. | 867 // OnLayoutTextAttributeChanged and OnDisplayTextAttributeChanged calls. |
| 863 std::vector<internal::Line> lines_; | 868 std::vector<internal::Line> lines_; |
| 864 | 869 |
| 865 DISALLOW_COPY_AND_ASSIGN(RenderText); | 870 DISALLOW_COPY_AND_ASSIGN(RenderText); |
| 866 }; | 871 }; |
| 867 | 872 |
| 868 } // namespace gfx | 873 } // namespace gfx |
| 869 | 874 |
| 870 #endif // UI_GFX_RENDER_TEXT_H_ | 875 #endif // UI_GFX_RENDER_TEXT_H_ |
| OLD | NEW |