1 #ifndef DALI_TOOLKIT_TEXT_ENUMERATIONS_DEVEL_H
2 #define DALI_TOOLKIT_TEXT_ENUMERATIONS_DEVEL_H
5 * Copyright (c) 2021 Samsung Electronics Co., Ltd.
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
27 namespace TextDirection
35 } // namespace TextDirection
37 namespace VerticalLineAlignment
46 } // namespace VerticalLineAlignment
53 HYPHENATION, // HYPHENATION mode will add hyphen and move part of the word to the next line.
54 MIXED // MIXEd mode will apply WORD mode, if failed try HYPHENATION mode, if failed try CHARACTER.
57 } // namespace LineWrap
60 * A enum for defining text layout directions.
61 * It can also be inherited (from a parent) or deduced from the default language script of a locale.
62 * And it can be the direction of the text ifself.
64 enum class MatchLayoutDirection
66 INHERIT, // The text layout direction is inherited. If you change the layout direction, it will be aligned with the changed layout direction.
67 LOCALE, // The text layout direction is determined by the locale of the system language.
68 CONTENTS // The text layout direction is determined by the text itself.
72 * @brief Contains types which specify where the text is truncated and replaced by Ellipsis glyph.
74 * If the text cannot fit into layout size then truncate text and replace it by Ellipsis glyph.
76 * Ellipsis works after layouting text normally according to LineWrap mode.
78 * Ellipsis glyph is three dots "...".
80 * The Ellipsis property should be enabled.
83 * Example: "Hello here is test goodbye."
85 * Assume LineWrap is CHARACTER.
87 * EllipsisPosition::END type in single line, truncate tail of line then add Ellipsis:
94 * EllipsisPosition::END type in multi-lines, truncate tail of the last appeared line then add Ellipsis:
102 * EllipsisPosition::START type in single line, truncate head of line then add Ellipsis:
109 * EllipsisPosition::START type in multi-lines, truncate head of the first appeared line then add Ellipsis:
117 * EllipsisPosition::MIDDLE type in single line, truncate middle of line then add Ellipsis:
124 * EllipsisPosition::MIDDLE type in multi-lines, truncate middle lines. In the end of the last appeared line before removed lines add Ellipsis:
133 namespace EllipsisPosition
136 * @brief Enumerations specifying where to position the ellipsis glyph.
137 * @see EllipsisPosition
141 END = 0, ///< END position will truncate tail of text that exceeds the layout size then replace it by Ellipsis glyph in the end of the last appeared line.
142 START, ///< START position will truncate head of text that exceeds the layout size then replace it by Ellipsis glyph in the start of the first appeared line. In multilines, the lines are removed from top until the text fit into layout height.
143 MIDDLE ///< MIDDLE position will truncate middle of text that exceeds the layout size then replace it by Ellipsis glyph in the middle of line. In multilines, the lines are removed from middle until the text fit into layout height then add ellipsis glyph in the end of the last line appeared before removed lines.
146 } // namespace EllipsisPosition
148 } // namespace DevelText
150 } // namespace Toolkit
154 #endif //DALI_TOOLKIT_TEXT_ENUMERATIONS_DEVEL_H