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

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

Issue 1013543006: [RenderText] Adding vertical alignment options (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Testing adjustment to vertical alignment test Created 5 years, 8 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
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_TEXT_CONSTANTS_H_ 5 #ifndef UI_GFX_TEXT_CONSTANTS_H_
6 #define UI_GFX_TEXT_CONSTANTS_H_ 6 #define UI_GFX_TEXT_CONSTANTS_H_
7 7
8 namespace gfx { 8 namespace gfx {
9 9
10 // TODO(msw): Distinguish between logical character stops and glyph stops? 10 // TODO(msw): Distinguish between logical character stops and glyph stops?
11 // TODO(msw): Merge with base::i18n::BreakIterator::BreakType. 11 // TODO(msw): Merge with base::i18n::BreakIterator::BreakType.
12 enum BreakType { 12 enum BreakType {
13 CHARACTER_BREAK = 0, // Stop cursor movement on neighboring characters. 13 CHARACTER_BREAK = 0, // Stop cursor movement on neighboring characters.
14 WORD_BREAK, // Stop cursor movement on nearest word boundaries. 14 WORD_BREAK, // Stop cursor movement on nearest word boundaries.
15 LINE_BREAK, // Stop cursor movement on line ends as shown on screen. 15 LINE_BREAK, // Stop cursor movement on line ends as shown on screen.
16 }; 16 };
17 17
18 // Horizontal text alignment modes. 18 // Horizontal text alignment modes.
19 enum HorizontalAlignment { 19 enum HorizontalAlignment {
20 ALIGN_LEFT = 0, // Align the text's left edge with that of its display area. 20 ALIGN_LEFT = 0, // Align the text's left edge with that of its display area.
21 ALIGN_CENTER, // Align the text's center with that of its display area. 21 ALIGN_CENTER, // Align the text's center with that of its display area.
22 ALIGN_RIGHT, // Align the text's right edge with that of its display area. 22 ALIGN_RIGHT, // Align the text's right edge with that of its display area.
23 ALIGN_TO_HEAD, // Align the text to its first strong character's direction. 23 ALIGN_TO_HEAD, // Align the text to its first strong character's direction.
24 }; 24 };
25 25
26 // Vertical text alignment modes.
27 enum VerticalAlignment {
28 VALIGN_TOP = 0, // Align the text's top edge with that of its display area.
msw 2015/03/30 19:19:12 nit: one fewer space before the comments on this l
dschuyler 2015/03/31 18:38:14 git cl format insists on adding the spaces back.
msw 2015/04/01 15:07:17 I'd force the spacing tighter (like many other enu
29 VALIGN_MIDDLE, // Align the text's middle with that of its display area.
30 VALIGN_BOTTOM, // Align the text's bottom edge with that of its display area.
31 };
32
26 // The directionality modes used to determine the base text direction. 33 // The directionality modes used to determine the base text direction.
27 enum DirectionalityMode { 34 enum DirectionalityMode {
28 DIRECTIONALITY_FROM_TEXT = 0, // Use the first strong character's direction. 35 DIRECTIONALITY_FROM_TEXT = 0, // Use the first strong character's direction.
29 DIRECTIONALITY_FROM_UI, // Use the UI locale's text reading direction. 36 DIRECTIONALITY_FROM_UI, // Use the UI locale's text reading direction.
30 DIRECTIONALITY_FORCE_LTR, // Use LTR regardless of content or UI locale. 37 DIRECTIONALITY_FORCE_LTR, // Use LTR regardless of content or UI locale.
31 DIRECTIONALITY_FORCE_RTL, // Use RTL regardless of content or UI locale. 38 DIRECTIONALITY_FORCE_RTL, // Use RTL regardless of content or UI locale.
32 }; 39 };
33 40
34 // Text styles and adornments. 41 // Text styles and adornments.
35 // TODO(msw): Merge with gfx::Font::FontStyle. 42 // TODO(msw): Merge with gfx::Font::FontStyle.
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 ELIDE_HEAD, // Add an ellipsis at the start of the string. 75 ELIDE_HEAD, // Add an ellipsis at the start of the string.
69 ELIDE_MIDDLE, // Add an ellipsis in the middle of the string. 76 ELIDE_MIDDLE, // Add an ellipsis in the middle of the string.
70 ELIDE_TAIL, // Add an ellipsis at the end of the string. 77 ELIDE_TAIL, // Add an ellipsis at the end of the string.
71 ELIDE_EMAIL, // Add ellipses to username and domain substrings. 78 ELIDE_EMAIL, // Add ellipses to username and domain substrings.
72 FADE_TAIL, // Fade the string's end opposite of its horizontal alignment. 79 FADE_TAIL, // Fade the string's end opposite of its horizontal alignment.
73 }; 80 };
74 81
75 } // namespace gfx 82 } // namespace gfx
76 83
77 #endif // UI_GFX_TEXT_CONSTANTS_H_ 84 #endif // UI_GFX_TEXT_CONSTANTS_H_
OLDNEW
« ui/gfx/render_text_unittest.cc ('K') | « ui/gfx/render_text_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698