TextView - Rename Line to Paragraph.
[platform/core/uifw/dali-toolkit.git] / base / dali-toolkit / internal / controls / text-view / text-view-character-processor.cpp
1 /*
2  * Copyright (c) 2014 Samsung Electronics Co., Ltd.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */
17
18 // INTERNAL INCLUDES
19 #include <dali-toolkit/internal/controls/text-view/text-view-processor-types.h>
20
21 namespace Dali
22 {
23
24 namespace Toolkit
25 {
26
27 namespace Internal
28 {
29
30 namespace TextViewProcessor
31 {
32
33 /////////////////////
34 // Layout info.
35 /////////////////////
36
37 CharacterLayoutInfo::CharacterLayoutInfo()
38 : mHeight( 0.f ),
39   mAdvance( 0.f ),
40   mBearing( 0.f ),
41   mPosition(),
42   mOffset(),
43   mSize(),
44   mAscender( 0.f ),
45   mUnderlineThickness( 0.f ),
46   mUnderlinePosition( 0.f ),
47   mGlyphActor(),
48   mStyledText(),
49   mColorAlpha( 1.f ),
50   mGradientColor(),
51   mStartPoint(),
52   mEndPoint(),
53   mIsVisible( true ),
54   mSetText( true ),
55   mSetStyle( true ),
56   mIsColorGlyph( false )
57 {
58 }
59
60 CharacterLayoutInfo::~CharacterLayoutInfo()
61 {
62 }
63
64 CharacterLayoutInfo::CharacterLayoutInfo( const CharacterLayoutInfo& character )
65 : mHeight( character.mHeight ),
66   mAdvance( character.mAdvance ),
67   mBearing( character.mBearing ),
68   mPosition( character.mPosition ),
69   mOffset( character.mOffset ),
70   mSize( character.mSize ),
71   mAscender( character.mAscender ),
72   mUnderlineThickness( character.mUnderlineThickness ),
73   mUnderlinePosition( character.mUnderlinePosition ),
74   mGlyphActor( character.mGlyphActor ),
75   mStyledText( character.mStyledText ),
76   mColorAlpha( character.mColorAlpha ),
77   mGradientColor( character.mGradientColor ),
78   mStartPoint( character.mStartPoint ),
79   mEndPoint( character.mEndPoint ),
80   mIsVisible( character.mIsVisible ),
81   mSetText( character.mSetText ),
82   mSetStyle( character.mSetStyle ),
83   mIsColorGlyph( character.mIsColorGlyph )
84 {
85 }
86
87 CharacterLayoutInfo& CharacterLayoutInfo::operator=( const CharacterLayoutInfo& character )
88 {
89   mHeight = character.mHeight;
90   mAdvance = character.mAdvance;
91   mBearing = character.mBearing;
92
93   mPosition = character.mPosition;
94   mOffset = character.mOffset;
95   mSize = character.mSize;
96   mAscender = character.mAscender;
97   mUnderlineThickness = character.mUnderlineThickness;
98   mUnderlinePosition = character.mUnderlinePosition;
99
100   mStyledText = character.mStyledText;
101   mColorAlpha = character.mColorAlpha;
102   mGradientColor = character.mGradientColor;
103   mStartPoint = character.mStartPoint;
104   mEndPoint = character.mEndPoint;
105   mIsVisible = character.mIsVisible;
106   mSetText = character.mSetText;
107   mSetStyle = character.mSetStyle;
108   mIsColorGlyph = character.mIsColorGlyph;
109
110   mGlyphActor = character.mGlyphActor;
111
112   return *this;
113 }
114
115 } //namespace TextViewProcessor
116
117 } //namespace Internal
118
119 } //namespace Toolkit
120
121 } //namespace Dali