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_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? |
(...skipping 15 matching lines...) Expand all Loading... |
26 }; | 26 }; |
27 | 27 |
28 // Horizontal text alignment modes. | 28 // Horizontal text alignment modes. |
29 enum HorizontalAlignment { | 29 enum HorizontalAlignment { |
30 ALIGN_LEFT = 0, // Align the text's left edge with that of its display area. | 30 ALIGN_LEFT = 0, // Align the text's left edge with that of its display area. |
31 ALIGN_CENTER, // Align the text's center with that of its display area. | 31 ALIGN_CENTER, // Align the text's center with that of its display area. |
32 ALIGN_RIGHT, // Align the text's right edge with that of its display area. | 32 ALIGN_RIGHT, // Align the text's right edge with that of its display area. |
33 ALIGN_TO_HEAD, // Align the text to its first strong character's direction. | 33 ALIGN_TO_HEAD, // Align the text to its first strong character's direction. |
34 }; | 34 }; |
35 | 35 |
| 36 // Vertical text alignment modes. |
| 37 enum VerticalAlignment { |
| 38 VALIGN_TOP = 0, // Align the text's top edge with that of its display area. |
| 39 VALIGN_MIDDLE, // Align the text's middle with that of its display area. |
| 40 VALIGN_BOTTOM, // Align the text's bottom edge with that of its display area. |
| 41 }; |
| 42 |
36 // The directionality modes used to determine the base text direction. | 43 // The directionality modes used to determine the base text direction. |
37 enum DirectionalityMode { | 44 enum DirectionalityMode { |
38 DIRECTIONALITY_FROM_TEXT = 0, // Use the first strong character's direction. | 45 DIRECTIONALITY_FROM_TEXT = 0, // Use the first strong character's direction. |
39 DIRECTIONALITY_FROM_UI, // Use the UI locale's text reading direction. | 46 DIRECTIONALITY_FROM_UI, // Use the UI locale's text reading direction. |
40 DIRECTIONALITY_FORCE_LTR, // Use LTR regardless of content or UI locale. | 47 DIRECTIONALITY_FORCE_LTR, // Use LTR regardless of content or UI locale. |
41 DIRECTIONALITY_FORCE_RTL, // Use RTL regardless of content or UI locale. | 48 DIRECTIONALITY_FORCE_RTL, // Use RTL regardless of content or UI locale. |
42 }; | 49 }; |
43 | 50 |
44 // Text styles and adornments. | 51 // Text styles and adornments. |
45 // TODO(msw): Merge with gfx::Font::FontStyle. | 52 // TODO(msw): Merge with gfx::Font::FontStyle. |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 ELIDE_HEAD, // Add an ellipsis at the start of the string. | 85 ELIDE_HEAD, // Add an ellipsis at the start of the string. |
79 ELIDE_MIDDLE, // Add an ellipsis in the middle of the string. | 86 ELIDE_MIDDLE, // Add an ellipsis in the middle of the string. |
80 ELIDE_TAIL, // Add an ellipsis at the end of the string. | 87 ELIDE_TAIL, // Add an ellipsis at the end of the string. |
81 ELIDE_EMAIL, // Add ellipses to username and domain substrings. | 88 ELIDE_EMAIL, // Add ellipses to username and domain substrings. |
82 FADE_TAIL, // Fade the string's end opposite of its horizontal alignment. | 89 FADE_TAIL, // Fade the string's end opposite of its horizontal alignment. |
83 }; | 90 }; |
84 | 91 |
85 } // namespace gfx | 92 } // namespace gfx |
86 | 93 |
87 #endif // UI_GFX_TEXT_CONSTANTS_H_ | 94 #endif // UI_GFX_TEXT_CONSTANTS_H_ |
OLD | NEW |