#ifndef __DALI_TOOLKIT_INTERNAL_TEXT_VIEW_PROCESSOR_TYPES_H__
#define __DALI_TOOLKIT_INTERNAL_TEXT_VIEW_PROCESSOR_TYPES_H__
-//
-// Copyright (c) 2014 Samsung Electronics Co., Ltd.
-//
-// Licensed under the Flora License, Version 1.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://floralicense.org/license/
-//
-// 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.
-//
+/*
+ * Copyright (c) 2014 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/dali.h>
+#include <dali/public-api/actors/renderable-actor.h>
#include <dali-toolkit/public-api/markup-processor/markup-processor.h>
namespace Dali
{
/**
- * Whether the direction is Right To Left or Left To Right.
- */
-enum Direction
-{
- LTR, ///< Left To Right direction.
- RTL ///< Right To Left direction.
-};
-
-/**
* Whether the text is a new line character, a white space or normal text.
*/
enum TextSeparatorType
* Constructor.
*/
TextInfoIndices( std::size_t lineIndex,
- std::size_t groupIndex,
std::size_t wordIndex,
std::size_t characterIndex );
bool operator==( const TextInfoIndices& indices ) const;
std::size_t mLineIndex;
- std::size_t mGroupIndex;
std::size_t mWordIndex;
std::size_t mCharacterIndex;
};
typedef std::vector<WordLayoutInfo> WordLayoutInfoContainer;
/**
- * Layout information for a group of words.
- */
-struct WordGroupLayoutInfo
-{
- /**
- * Default constructor.
- *
- * Initializes all members to their default values.
- */
- WordGroupLayoutInfo();
-
- /**
- * Copy constructor.
- */
- WordGroupLayoutInfo( const WordGroupLayoutInfo& group );
-
- /**
- * Assignment operator.
- */
- WordGroupLayoutInfo& operator=( const WordGroupLayoutInfo& group );
-
- Size mSize; ///< Size of the group of words.
- float mAscender; ///< Max of all ascenders of all words.
- Direction mDirection; ///< Whether this group of words is Right To Left or Left To Right.
- WordLayoutInfoContainer mWordsLayoutInfo; ///< Layout info for all words.
- std::size_t mNumberOfCharacters; ///< Stores the number of characters.
-};
-typedef std::vector<WordGroupLayoutInfo> WordGroupLayoutInfoContainer;
-
-/**
* Layout information for a line.
*/
struct LineLayoutInfo
*/
LineLayoutInfo& operator=( const LineLayoutInfo& line );
- Size mSize; ///< Size of the line.
- float mAscender; ///< Max of all ascenders of all groups of words.
- float mLineHeightOffset; ///< Line height offset.
- WordGroupLayoutInfoContainer mWordGroupsLayoutInfo; ///< Layout info for all groups of words.
- std::size_t mNumberOfCharacters; ///< Stores the number of characters.
+ Size mSize; ///< Size of the line.
+ float mAscender; ///< Max of all ascenders of all words.
+ float mLineHeightOffset; ///< Line height offset.
+ WordLayoutInfoContainer mWordsLayoutInfo; ///< Layout info for all words.
+ std::size_t mNumberOfCharacters; ///< Stores the number of characters.
};
typedef std::vector<LineLayoutInfo> LineLayoutInfoContainer;