1 #ifndef __DALI_INTERNAL_CHARACTER_H__
2 #define __DALI_INTERNAL_CHARACTER_H__
5 * Copyright (c) 2014 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.
25 #include <dali/public-api/text/character.h>
34 * Implementation class for Dali::Character.
35 * @see Dali::Character.
41 typedef Dali::Character::CharacterDirection CharacterDirection;
47 * Creates a Character with the given UTF-32 encoded character.
48 * @param character A UTF-32 encoded character.
50 Character( uint32_t character );
53 * Non virtual destructor.
58 * Returns character direction
59 * @param[in] character The unicode character to determine direction of.
60 * @return The character's direction is returned.
62 static CharacterDirection GetCharacterDirection(uint32_t character);
65 * @copydoc Dali::Character::GetCharacterDirection()
67 CharacterDirection GetCharacterDirection() const;
70 * Returns the character's script.
72 * @param[in] character The unicode value of the character.
74 * @return The script of the character.
76 static Dali::Character::Script GetScript( uint32_t character );
79 * @copydoc Dali::Character::GetScript()
81 Dali::Character::Script GetScript() const;
84 * @copydoc Dali::Character::IsLeftToRight()
86 bool IsLeftToRight() const;
89 * @copydoc Dali::Character::IsWhiteSpace()
91 bool IsWhiteSpace() const;
94 * @copydoc Dali::Character::IsNewLine()
96 bool IsNewLine() const;
99 * Retrieves the encapsulated UTF-32 encoded character.
100 * @return A UTF-32 encoded character.
102 uint32_t GetCharacter() const;
105 * Sets a encapsulated UTF-32 encoded character.
106 * @param character A UTF-32 encoded character.
108 void SetCharacter( uint32_t character );
111 * Whether the given character is a white space.
113 * @param[in] character The character.
115 * @return \e true the given character is a white space.
117 static bool IsWhiteSpace( uint32_t character );
120 * Whether the given character is a new line character.
122 * @param[in] character The character.
124 * @return \e true the given character is a new line character.
126 static bool IsNewLine( uint32_t character );
130 // Undefined constructor.
133 // Undefined copy constructor.
134 Character( const Character& character );
136 // Undefined assignment operator
137 Character& operator=( const Character& character );
141 uint32_t mCharacter; ///< Stores the unicode of the character.
144 } // namespace Internal
148 #endif // __DALI_INTERNAL_CHARACTER_H__