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.h;h=a863c9cccbdaa07863a079fe13a5ac8b34d43922;hp=f15acbf70c5874f52e30dc18019e3f207e3c3ad5;hb=583538010c34b92f80989021201484fdf9e590a9;hpb=8e381f95668a543ac1e97dde1c640054e1ebbba3 diff --git a/dali-toolkit/internal/controls/text-controls/text-label-impl.h b/dali-toolkit/internal/controls/text-controls/text-label-impl.h index f15acbf..a863c9c 100644 --- a/dali-toolkit/internal/controls/text-controls/text-label-impl.h +++ b/dali-toolkit/internal/controls/text-controls/text-label-impl.h @@ -2,7 +2,7 @@ #define DALI_TOOLKIT_INTERNAL_TEXT_LABEL_H /* - * Copyright (c) 2017 Samsung Electronics Co., Ltd. + * Copyright (c) 2020 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. @@ -18,6 +18,9 @@ * */ +// EXTERNAL INCLUDES +#include + // INTERNAL INCLUDES #include #include @@ -26,6 +29,8 @@ #include #include #include +#include + namespace Dali { @@ -73,46 +78,46 @@ private: // From Control /** * @copydoc Control::OnInitialize() */ - virtual void OnInitialize() override ; + void OnInitialize() override; /** * @copydoc Control::OnStyleChange() */ - virtual void OnStyleChange( Toolkit::StyleManager styleManager, StyleChange::Type change ) override ; + void OnStyleChange( Toolkit::StyleManager styleManager, StyleChange::Type change ) override; /** * @copydoc Control::OnRelayout() */ - virtual void OnRelayout( const Vector2& size, RelayoutContainer& container ) override ; + void OnRelayout( const Vector2& size, RelayoutContainer& container ) override; /** * @copydoc Control::GetNaturalSize() */ - virtual Vector3 GetNaturalSize() override ; + Vector3 GetNaturalSize() override; /** * @copydoc Control::GetHeightForWidth() */ - virtual float GetHeightForWidth( float width ) override ; + float GetHeightForWidth( float width ) override; /** * @copydoc Control::OnPropertySet() */ - virtual void OnPropertySet( Property::Index index, Property::Value propertyValue ) override ; + void OnPropertySet( Property::Index index, const Property::Value& propertyValue ) override ; // From ControlInterface /** * @copydoc Text::ControlInterface::RequestTextRelayout() */ - virtual void RequestTextRelayout() override ; + void RequestTextRelayout() override; private: // from TextScroller /** * @copydoc Text::ScrollerInterface::ScrollingFinished() */ - virtual void ScrollingFinished(); + void ScrollingFinished() override; private: // Implementation @@ -132,27 +137,33 @@ private: TextLabel(const TextLabel&); TextLabel& operator=(const TextLabel& rhs); - // Connection needed to re-render text, when a Text Label returns to the stage - void OnStageConnect( Dali::Actor actor ); - /** - * @brief Render view, create and attach actor(s) to this Text Label + * @brief Set up Autoscrolling */ - void RenderText(); + void SetUpAutoScrolling(); /** - * @brief Set up Autoscrolling + * Creates a text-scroller if one has not been created. + * @return The text scroller. */ - void SetUpAutoScrolling(); + Text::TextScrollerPtr GetTextScroller() + { + if( !mTextScroller ) + { + mTextScroller = Text::TextScroller::New( *this ); + } + return mTextScroller; + } private: // Data Text::ControllerPtr mController; - Text::RendererPtr mRenderer; Text::TextScrollerPtr mTextScroller; - Actor mRenderableActor; + + Toolkit::Visual::Base mVisual; + int mRenderingBackend; - bool mHasBeenStaged:1; + bool mTextUpdateNeeded:1; }; } // namespace Internal