// Copyright 2012 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef UI_GFX_TEXT_CONSTANTS_H_ #define UI_GFX_TEXT_CONSTANTS_H_ namespace gfx { // TODO(msw): Distinguish between logical character stops and glyph stops? // TODO(msw): Merge with base::i18n::BreakIterator::BreakType. enum BreakType { … }; // Specifies the selection behavior for a move/move-and-select command. For // example consider the state "ab|cd|e", i.e. cd is selected. Assume the // selection direction is from left to right. If we move to the beginning of the // line (LINE_BREAK, CURSOR_LEFT), the resultant state is: // "|ab|cde" for SELECTION_RETAIN, selection direction from right to left. // "|abcd|e" for SELECTION_EXTEND, selection direction from right to left. // "ab|cde" for SELECTION_CARET. // "|abcde" for SELECTION_NONE. enum SelectionBehavior { … }; // Specifies the word wrapping behavior when a word would exceed the available // display width. All words that are too wide will be put on a new line, and // then: enum WordWrapBehavior { … }; // Horizontal text alignment modes. enum HorizontalAlignment { … }; // Vertical text alignment modes for multiline text. enum VerticalAlignment { … }; // The directionality modes used to determine the base text direction. enum DirectionalityMode { … }; // Text styles and adornments. // TODO(msw): Merge with gfx::Font::FontStyle. enum TextStyle { … }; // Text baseline offset types. // Figure of font metrics: // +--------+--------+------------------------+-------------+ // | | | internal leading | SUPERSCRIPT | // | | +------------+-----------| | // | | ascent | | SUPERIOR |-------------+ // | height | | cap height |-----------| // | | | | INFERIOR |-------------+ // | |--------+------------+-----------| | // | | descent | SUBSCRIPT | // +--------+---------------------------------+-------------+ enum class BaselineStyle { … }; // Elision behaviors of text that exceeds constrained dimensions. enum ElideBehavior { … }; } // namespace gfx #endif // UI_GFX_TEXT_CONSTANTS_H_