X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fcontrols%2Ftext-controls%2Ftext-label-impl.cpp;h=1d6af0fd3b0c18a660de944c94885a31e09d6607;hb=refs%2Fchanges%2F73%2F94873%2F2;hp=955e0f23400f225ee9c61ceb6c1fa6a3bb8a5c6a;hpb=754246a1c8812496ac70cdef21c122069ad21640;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/internal/controls/text-controls/text-label-impl.cpp b/dali-toolkit/internal/controls/text-controls/text-label-impl.cpp index 955e0f2..1d6af0f 100644 --- a/dali-toolkit/internal/controls/text-controls/text-label-impl.cpp +++ b/dali-toolkit/internal/controls/text-controls/text-label-impl.cpp @@ -25,6 +25,7 @@ // INTERNAL INCLUDES #include #include +#include #include #include @@ -63,7 +64,7 @@ DALI_TYPE_REGISTRATION_BEGIN( Toolkit::TextLabel, Toolkit::Control, Create ); DALI_PROPERTY_REGISTRATION( Toolkit, TextLabel, "renderingBackend", INTEGER, RENDERING_BACKEND ) DALI_PROPERTY_REGISTRATION( Toolkit, TextLabel, "text", STRING, TEXT ) DALI_PROPERTY_REGISTRATION( Toolkit, TextLabel, "fontFamily", STRING, FONT_FAMILY ) -DALI_PROPERTY_REGISTRATION( Toolkit, TextLabel, "fontStyle", STRING, FONT_STYLE ) +DALI_PROPERTY_REGISTRATION( Toolkit, TextLabel, "fontStyle", MAP, FONT_STYLE ) DALI_PROPERTY_REGISTRATION( Toolkit, TextLabel, "pointSize", FLOAT, POINT_SIZE ) DALI_PROPERTY_REGISTRATION( Toolkit, TextLabel, "multiLine", BOOLEAN, MULTI_LINE ) DALI_PROPERTY_REGISTRATION( Toolkit, TextLabel, "horizontalAlignment", STRING, HORIZONTAL_ALIGNMENT ) @@ -80,10 +81,10 @@ DALI_PROPERTY_REGISTRATION( Toolkit, TextLabel, "autoScrollSpeed", INTEGER, DALI_PROPERTY_REGISTRATION( Toolkit, TextLabel, "autoScrollLoopCount", INTEGER, AUTO_SCROLL_LOOP_COUNT ) DALI_PROPERTY_REGISTRATION( Toolkit, TextLabel, "autoScrollGap", FLOAT, AUTO_SCROLL_GAP ) DALI_PROPERTY_REGISTRATION( Toolkit, TextLabel, "lineSpacing", FLOAT, LINE_SPACING ) -DALI_PROPERTY_REGISTRATION( Toolkit, TextLabel, "underline", STRING, UNDERLINE ) -DALI_PROPERTY_REGISTRATION( Toolkit, TextLabel, "shadow", STRING, SHADOW ) -DALI_PROPERTY_REGISTRATION( Toolkit, TextLabel, "emboss", STRING, EMBOSS ) -DALI_PROPERTY_REGISTRATION( Toolkit, TextLabel, "outline", STRING, OUTLINE ) +DALI_PROPERTY_REGISTRATION( Toolkit, TextLabel, "underline", MAP, UNDERLINE ) +DALI_PROPERTY_REGISTRATION( Toolkit, TextLabel, "shadow", MAP, SHADOW ) +DALI_PROPERTY_REGISTRATION( Toolkit, TextLabel, "emboss", MAP, EMBOSS ) +DALI_PROPERTY_REGISTRATION( Toolkit, TextLabel, "outline", MAP, OUTLINE ) DALI_TYPE_REGISTRATION_END() @@ -172,11 +173,11 @@ Property::Value TextLabel::GetProperty( BaseObject* object, Property::Index inde Vector4 color; bool offsetDefined = false; Vector2 offset; - const bool empty = Text::ParseProperties( value.Get(), - colorDefined, - color, - offsetDefined, - offset ); + const bool empty = Text::ParseShadowProperties( value.Get(), + colorDefined, + color, + offsetDefined, + offset ); if( !empty ) { @@ -190,11 +191,11 @@ Property::Value TextLabel::GetProperty( BaseObject* object, Property::Index inde Vector4 color; bool offsetDefined = false; Vector2 offset; - const bool empty = Text::ParseProperties( value.Get(), - colorDefined, - color, - offsetDefined, - offset ); + const bool empty = Text::ParseShadowProperties( value.Get(), + colorDefined, + color, + offsetDefined, + offset ); if( !empty ) { @@ -209,12 +210,12 @@ Property::Value TextLabel::GetProperty( BaseObject* object, Property::Index inde Vector4 color; bool heightDefined = false; float height = 0.f; - const bool empty = Text::ParseProperties( value.Get(), - enabled, - colorDefined, - color, - heightDefined, - height ); + const bool empty = Text::ParseUnderlineProperties( value.Get(), + enabled, + colorDefined, + color, + heightDefined, + height ); if( !empty ) { @@ -229,12 +230,12 @@ Property::Value TextLabel::GetProperty( BaseObject* object, Property::Index inde Vector4 color; bool heightDefined = false; float height = 0.f; - const bool empty = Text::ParseProperties( value.Get(), - enabled, - colorDefined, - color, - heightDefined, - height ); + const bool empty = Text::ParseUnderlineProperties( value.Get(), + enabled, + colorDefined, + color, + heightDefined, + height ); if( !empty && colorDefined ) { @@ -249,12 +250,12 @@ Property::Value TextLabel::GetProperty( BaseObject* object, Property::Index inde Vector4 color; bool heightDefined = false; float height = 0.f; - const bool empty = Text::ParseProperties( value.Get(), - enabled, - colorDefined, - color, - heightDefined, - height ); + const bool empty = Text::ParseUnderlineProperties( value.Get(), + enabled, + colorDefined, + color, + heightDefined, + height ); if( !empty && heightDefined ) { @@ -285,11 +286,11 @@ void TextLabel::OnInitialize() // Creates the text's visual. Property::Map visualMap; - visualMap[Toolkit::Visual::Property::TYPE] = Toolkit::Visual::TEXT; + visualMap[Toolkit::VisualProperty::TYPE] = Toolkit::Visual::TEXT; visualMap[Toolkit::TextVisual::Property::RENDERING_BACKEND] = static_cast( DEFAULT_RENDERING_BACKEND ); mVisual = Toolkit::VisualFactory::Get().CreateVisual( visualMap ); - RegisterVisual( Toolkit::TextLabel::Property::TEXT, self, mVisual ); + RegisterVisual( Toolkit::TextLabel::Property::TEXT, mVisual ); Internal::Visual::Base& visualBase = Toolkit::GetImplementation( mVisual ); TextVisual* textVisual = static_cast( &visualBase );