$(public_api_base_src_dir)/text/character-set-conversion.cpp \
$(public_api_base_src_dir)/text/logical-model.cpp \
$(public_api_base_src_dir)/text/multi-language-support.cpp \
+ $(public_api_base_src_dir)/text/segmentation.cpp \
$(public_api_base_src_dir)/text/text-controller.cpp \
$(public_api_base_src_dir)/text/text-view.cpp \
$(public_api_base_src_dir)/text/text-view-interface.cpp \
$(public_api_base_src_dir)/controls/text-controls/text-label.h
public_api_base_text_header_files = \
+ $(public_api_base_src_dir)/text/character-run.h \
$(public_api_base_src_dir)/text/character-set-conversion.h \
+ $(public_api_base_src_dir)/text/font-run.h \
$(public_api_base_src_dir)/text/logical-model.h \
$(public_api_base_src_dir)/text/multi-language-support.h \
+ $(public_api_base_src_dir)/text/script.h \
+ $(public_api_base_src_dir)/text/segmentation.h \
$(public_api_base_src_dir)/text/text-controller.h \
$(public_api_base_src_dir)/text/text-definitions.h \
$(public_api_base_src_dir)/text/text-view.h \
return 0u;
}
+void LogicalModel::SetLineBreakInfo( const LineBreakInfo* const lineBreakInfo,
+ Length length )
+{
+}
+
+void LogicalModel::GetLineBreakInfo( LineBreakInfo* lineBreakInfo,
+ CharacterIndex characterIndex,
+ Length numberOfItems ) const
+{
+}
+
+LineBreakInfo LogicalModel::GetLineBreakInfo( CharacterIndex characterIndex ) const
+{
+ return 0;
+}
+
+void LogicalModel::SetWordBreakInfo( const WordBreakInfo* const wordBreakInfo,
+ Length length )
+{
+}
+
+void LogicalModel::GetWordBreakInfo( WordBreakInfo* wordBreakInfo,
+ CharacterIndex characterIndex,
+ Length numberOfItems ) const
+{
+}
+
+WordBreakInfo LogicalModel::GetWordBreakInfo( CharacterIndex characterIndex ) const
+{
+ return 0;
+}
+
LogicalModel::~LogicalModel()
{
delete mImpl;
*/
FontId GetFont( CharacterIndex characterIndex ) const;
+ // Break info interface.
+
+ /**
+ * Sets the line break info.
+ *
+ * See GetLineBreakInfo() to get how the line break info is encoded.
+ *
+ * Replaces any line break info previously set.
+ *
+ * @param[in] lineBreakInfo Pointer to a buffer with the line break info.
+ * @param[in] length The size of the buffer.
+ */
+ void SetLineBreakInfo( const LineBreakInfo* const lineBreakInfo,
+ Length length );
+
+ /**
+ * Retrieves the line break info in the given buffer.
+ *
+ * The size of the @p lineBreakInfo buffer needs to be big enough to copy the @p numberOfItems.
+ *
+ * Possible values for LineBreakInfo are:
+ *
+ * - 0 is a LINE_MUST_BREAK. Text must be broken into a new line.
+ * - 1 is a LINE_ALLOW_BREAK. Is possible to break the text into a new line.
+ * - 2 is a LINE_NO_BREAK. Text can't be broken into a new line.
+ *
+ @verbatim
+ i.e. Hello big\nworld produces:
+ 2222212220 22220
+ @endverbatim
+ *
+ * @param[out] lineBreakInfo Pointer to a buffer where the line break info is copied.
+ * @param[in] characterIndex Index to the first line break info item.
+ * @param[in] numberOfItems The number of items to be copied.
+ */
+ void GetLineBreakInfo( LineBreakInfo* lineBreakInfo,
+ CharacterIndex characterIndex,
+ Length numberOfItems ) const;
+
+ /**
+ * Retrieves the line break info for the given item index.
+ *
+ * @param[in] characterIndex Index to the line break info item.
+ */
+ LineBreakInfo GetLineBreakInfo( CharacterIndex characterIndex ) const;
+
+ /**
+ * Sets the word break info.
+ *
+ * See GetWordBreakInfo() to get how the word break info is encoded.
+ *
+ * Replaces any word break info previously set.
+ *
+ * @param[in] wordBreakInfo Pointer to a buffer with the word break info.
+ * @param[in] length The size of the buffer.
+ */
+ void SetWordBreakInfo( const WordBreakInfo* const wordBreakInfo,
+ Length length );
+
+ /**
+ * Retrieves the word break info in the given buffer.
+ *
+ * The size of the @p wordBreakInfo buffer needs to be big enough to copy the @p numberOfItems.
+ *
+ * The size of the buffer has to be big enough to store the whole word break info per character.
+ * Call GetNumberOfCharacters() to get the number of characters.
+ *
+ * Possible values for WordBreakInfo are:
+ *
+ * - 0 is a WORD_BREAK. Text can be broken into a new word.
+ * - 1 is a WORD_NO_BREAK. Text can't be broken into a new word.
+ *
+ @verbatim
+ i.e. Hello big\nworld produces:
+ 1111001100 11110
+ @endverbatim
+ *
+ * @param[out] wordBreakInfo Pointer to a buffer where the word break info is copied.
+ * @param[in] characterIndex Index to the first word break info item.
+ * @param[in] numberOfItems The number of items to be copied.
+ */
+ void GetWordBreakInfo( WordBreakInfo* wordBreakInfo,
+ CharacterIndex characterIndex,
+ Length numberOfItems ) const;
+
+ /**
+ * Retrieves the word break info for the given item index.
+ *
+ * @param[in] characterIndex Index to the word break info item.
+ */
+ WordBreakInfo GetWordBreakInfo( CharacterIndex characterIndex ) const;
+
protected:
/**
--- /dev/null
+/*
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+// CLASS HEADER
+#include <dali-toolkit/public-api/text/segmentation.h>
+
+namespace Dali
+{
+
+namespace Toolkit
+{
+
+namespace Text
+{
+
+void SetLineBreakInfo( LogicalModel& model )
+{
+}
+
+void SetWordBreakInfo( LogicalModel& model )
+{
+}
+
+} // namespace Text
+
+} // namespace Toolkit
+
+} // namespace Dali
--- /dev/null
+#ifndef __DALI_TOOLKIT_TEXT_SEGMENTATION_H__
+#define __DALI_TOOLKIT_TEXT_SEGMENTATION_H__
+
+/*
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+// INTERNAL INCLUDES
+#include <dali-toolkit/public-api/text/text-definitions.h>
+
+namespace Dali
+{
+
+namespace Toolkit
+{
+
+namespace Text
+{
+
+class LogicalModel;
+
+/**
+ * Sets line break info.
+ *
+ * Any line break info previously set is removed.
+ *
+ * @pre The @p model needs to have a text set.
+ *
+ * @param[in,out] model The text's logical model.
+ */
+void SetLineBreakInfo( LogicalModel& model );
+
+/**
+ * Sets word break info.
+ *
+ * Any word break info previously set is removed.
+ *
+ * @pre The @p model needs to have a text set.
+ *
+ * @param[in,out] model The text's logical model.
+ */
+void SetWordBreakInfo( LogicalModel& model );
+
+} // namespace Text
+
+} // namespace Toolkit
+
+} // namespace Dali
+
+#endif // __DALI_TOOLKIT_TEXT_SEGMENTATION_H__
typedef TextAbstraction::Length Length; ///< The length of an array
typedef TextAbstraction::BidiInfoIndex BidiInfoIndex; ///< Index to the bidirectional info for a paragraph.
typedef TextAbstraction::Script Script; ///< The character's script.
+typedef TextAbstraction::LineBreakInfo LineBreakInfo; ///< Line break info (must break, allow break, no break). Possible values are: LINE_MUST_BREAK, LINE_ALLOW_BREAK and LINE_NO_BREAK (in the TextAbstraction namespace).
+typedef TextAbstraction::WordBreakInfo WordBreakInfo; ///< Word break info (break, no break). Possible values are: WORD_BREAK and WORD_NO_BREAK (in the TextAbstraction namespace).
typedef uint32_t GlyphIndex; ///< An index into an array of glyphs
#include <dali-toolkit/public-api/shader-effects/ripple-effect.h>
#include <dali-toolkit/public-api/shader-effects/ripple2d-effect.h>
#include <dali-toolkit/public-api/shader-effects/swirl-effect.h>
+#include <dali-toolkit/public-api/text/character-run.h>
#include <dali-toolkit/public-api/text/character-set-conversion.h>
+#include <dali-toolkit/public-api/text/font-run.h>
#include <dali-toolkit/public-api/text/logical-model.h>
+#include <dali-toolkit/public-api/text/segmentation.h>
+#include <dali-toolkit/public-api/text/multi-language-support.h>
+#include <dali-toolkit/public-api/text/script.h>
#include <dali-toolkit/public-api/text/text-controller.h>
#include <dali-toolkit/public-api/text/text-definitions.h>
#include <dali-toolkit/public-api/text/text-view.h>