Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(184)

Side by Side Diff: ui/gfx/render_text.h

Issue 10933129: Add RenderText::SetFont() function to simplify some call sites. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/gfx/canvas_skia.cc ('k') | ui/gfx/render_text.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 const string16& text() const { return text_; } 106 const string16& text() const { return text_; }
107 void SetText(const string16& text); 107 void SetText(const string16& text);
108 108
109 HorizontalAlignment horizontal_alignment() const { 109 HorizontalAlignment horizontal_alignment() const {
110 return horizontal_alignment_; 110 return horizontal_alignment_;
111 } 111 }
112 void SetHorizontalAlignment(HorizontalAlignment alignment); 112 void SetHorizontalAlignment(HorizontalAlignment alignment);
113 113
114 const FontList& font_list() const { return font_list_; } 114 const FontList& font_list() const { return font_list_; }
115 void SetFontList(const FontList& font_list); 115 void SetFontList(const FontList& font_list);
116 void SetFont(const Font& font);
116 117
117 // Set the font size to |size| in pixels. 118 // Set the font size to |size| in pixels.
118 void SetFontSize(int size); 119 void SetFontSize(int size);
119 120
120 // Get the first font in |font_list_|. 121 // Get the first font in |font_list_|.
121 const Font& GetFont() const; 122 const Font& GetFont() const;
122 123
123 bool cursor_enabled() const { return cursor_enabled_; } 124 bool cursor_enabled() const { return cursor_enabled_; }
124 void SetCursorEnabled(bool cursor_enabled); 125 void SetCursorEnabled(bool cursor_enabled);
125 126
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
501 502
502 // Text shadows to be drawn. 503 // Text shadows to be drawn.
503 ShadowValues text_shadows_; 504 ShadowValues text_shadows_;
504 505
505 DISALLOW_COPY_AND_ASSIGN(RenderText); 506 DISALLOW_COPY_AND_ASSIGN(RenderText);
506 }; 507 };
507 508
508 } // namespace gfx 509 } // namespace gfx
509 510
510 #endif // UI_GFX_RENDER_TEXT_H_ 511 #endif // UI_GFX_RENDER_TEXT_H_
OLDNEW
« no previous file with comments | « ui/gfx/canvas_skia.cc ('k') | ui/gfx/render_text.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698