OLD | NEW |
(Empty) | |
| 1 |
| 2 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 3 // Use of this source code is governed by a BSD-style license that can be |
| 4 // found in the LICENSE file. |
| 5 |
| 6 #ifndef UI_GFX_TEXT_CONSTANTS_H_ |
| 7 #define UI_GFX_TEXT_CONSTANTS_H_ |
| 8 |
| 9 namespace gfx { |
| 10 |
| 11 // TODO(msw): Distinguish between logical character stops and glyph stops? |
| 12 // TODO(msw): Merge with base::i18n::BreakIterator::BreakType. |
| 13 enum BreakType { |
| 14 // Stop cursor movement on neighboring characters. |
| 15 CHARACTER_BREAK = 0, |
| 16 // Stop cursor movement on nearest word boundaries. |
| 17 WORD_BREAK, |
| 18 // Stop cursor movement on line ends as shown on screen. |
| 19 LINE_BREAK, |
| 20 }; |
| 21 |
| 22 // Horizontal text alignment modes. |
| 23 enum HorizontalAlignment { |
| 24 // Align the text's left edge with that of its display area. |
| 25 ALIGN_LEFT = 0, |
| 26 // Align the text's center with that of its display area. |
| 27 ALIGN_CENTER, |
| 28 // Align the text's right edge with that of its display area. |
| 29 ALIGN_RIGHT, |
| 30 }; |
| 31 |
| 32 // The directionality modes used to determine the base text direction. |
| 33 enum DirectionalityMode { |
| 34 // Use the first strong character's direction. |
| 35 DIRECTIONALITY_FROM_TEXT = 0, |
| 36 // Use the UI locale's text reading direction. |
| 37 DIRECTIONALITY_FROM_UI, |
| 38 // Use LTR regardless of content or UI locale. |
| 39 DIRECTIONALITY_FORCE_LTR, |
| 40 // Use RTL regardless of content or UI locale. |
| 41 DIRECTIONALITY_FORCE_RTL, |
| 42 }; |
| 43 |
| 44 } // namespace gfx |
| 45 |
| 46 #endif // UI_GFX_TEXT_CONSTANTS_H_ |
OLD | NEW |