X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fcontrols%2Ftext-controls%2Ftext-label-impl.cpp;h=094e755f175372e2bdf64648025c614496d66be8;hp=037a3ce0675fe9af4bfa0f63ef480168ef2c6b60;hb=406208364fe0ee31f31f475ba7ee7709e56d3e27;hpb=260c832bfaa0294e74a4f96d321f149adf09a3ce 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 037a3ce..094e755 100644 --- a/dali-toolkit/internal/controls/text-controls/text-label-impl.cpp +++ b/dali-toolkit/internal/controls/text-controls/text-label-impl.cpp @@ -34,7 +34,6 @@ #include using Dali::Toolkit::Text::LayoutEngine; -using Dali::Toolkit::Text::Backend; namespace Dali { @@ -85,7 +84,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 ) @@ -102,15 +101,13 @@ 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() - - } // namespace Toolkit::TextLabel TextLabel::New() @@ -644,7 +641,7 @@ void TextLabel::OnInitialize() { Actor self = Self(); - mController = Text::Controller::New( *this ); + mController = Text::Controller::New( this ); // When using the vector-based rendering, the size of the GLyphs are different TextAbstraction::GlyphType glyphType = (Text::RENDERING_VECTOR_BASED == mRenderingBackend) ? TextAbstraction::VECTOR_GLYPH : TextAbstraction::BITMAP_GLYPH; @@ -677,7 +674,6 @@ void TextLabel::OnStyleChange( Toolkit::StyleManager styleManager, StyleChange:: mController->UpdateAfterFontChange( newFont ); break; } - case StyleChange::DEFAULT_FONT_SIZE_CHANGE: { GetImpl( styleManager ).ApplyThemeStyle( Toolkit::Control( GetOwner() ) ); @@ -712,7 +708,7 @@ void TextLabel::OnRelayout( const Vector2& size, RelayoutContainer& container ) { if( !mRenderer ) { - mRenderer = Backend::Get().NewRenderer( mRenderingBackend ); + mRenderer = Text::Backend::Get().NewRenderer( mRenderingBackend ); } RenderText(); } @@ -791,11 +787,6 @@ void TextLabel::OnStageConnect( Dali::Actor actor ) } } -void TextLabel::AddDecoration( Actor& actor, bool needsClipping ) -{ - // TextLabel does not show decorations -} - void TextLabel::OnStageConnection( int depth ) { // Call the Control::OnStageConnection() to set the depth of the background. @@ -804,21 +795,6 @@ void TextLabel::OnStageConnection( int depth ) // The depth of the text renderer is set in the RenderText() called from OnRelayout(). } -void TextLabel::TextChanged() -{ - // TextLabel does not provide a signal for this. -} - -void TextLabel::MaxLengthReached() -{ - // Pure Virtual from TextController Interface, only needed when inputting text -} - -void TextLabel::InputStyleChanged( Text::InputStyle::Mask inputStyleMask ) -{ - // TextLabel does not provide a signal for this. -} - void TextLabel::ScrollingFinished() { // Pure Virtual from TextScroller Interface @@ -829,7 +805,7 @@ void TextLabel::ScrollingFinished() } TextLabel::TextLabel() -: Control( ControlBehaviour( REQUIRES_STYLE_CHANGE_SIGNALS ) ), +: Control( ControlBehaviour( CONTROL_BEHAVIOUR_DEFAULT ) ), mRenderingBackend( DEFAULT_RENDERING_BACKEND ), mHasBeenStaged( false ) {