Home | History | Annotate | Download | only in gfx
      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
      3 // found in the LICENSE file.
      4 
      5 #ifndef UI_GFX_TEXT_CONSTANTS_H_
      6 #define UI_GFX_TEXT_CONSTANTS_H_
      7 
      8 namespace gfx {
      9 
     10 // TODO(msw): Distinguish between logical character stops and glyph stops?
     11 // TODO(msw): Merge with base::i18n::BreakIterator::BreakType.
     12 enum BreakType {
     13   // Stop cursor movement on neighboring characters.
     14   CHARACTER_BREAK = 0,
     15   // Stop cursor movement on nearest word boundaries.
     16   WORD_BREAK,
     17   // Stop cursor movement on line ends as shown on screen.
     18   LINE_BREAK,
     19 };
     20 
     21 // Horizontal text alignment modes.
     22 enum HorizontalAlignment {
     23   // Align the text's left edge with that of its display area.
     24   ALIGN_LEFT = 0,
     25   // Align the text's center with that of its display area.
     26   ALIGN_CENTER,
     27   // Align the text's right edge with that of its display area.
     28   ALIGN_RIGHT,
     29 };
     30 
     31 // The directionality modes used to determine the base text direction.
     32 enum DirectionalityMode {
     33   // Use the first strong character's direction.
     34   DIRECTIONALITY_FROM_TEXT = 0,
     35   // Use the UI locale's text reading direction.
     36   DIRECTIONALITY_FROM_UI,
     37   // Use LTR regardless of content or UI locale.
     38   DIRECTIONALITY_FORCE_LTR,
     39   // Use RTL regardless of content or UI locale.
     40   DIRECTIONALITY_FORCE_RTL,
     41 };
     42 
     43 // Text styles and adornments.
     44 // TODO(msw): Merge with gfx::Font::FontStyle.
     45 enum TextStyle {
     46   BOLD = 0,
     47   ITALIC,
     48   STRIKE,
     49   DIAGONAL_STRIKE,
     50   UNDERLINE,
     51   NUM_TEXT_STYLES,
     52 };
     53 
     54 }  // namespace gfx
     55 
     56 #endif  // UI_GFX_TEXT_CONSTANTS_H_
     57