*
*/
+// EXTERNAL INCLUDES
+#include <dali/devel-api/object/weak-handle.h>
+#include <dali/public-api/common/intrusive-ptr.h>
+
// INTERNAL INCLUDES
#include <dali-toolkit/internal/visuals/visual-base-impl.h>
#include <dali-toolkit/internal/text/rendering/text-renderer.h>
#include <dali-toolkit/internal/text/text-controller.h>
-#include <dali-toolkit/internal/text/text-scroller.h>
namespace Dali
{
public:
/**
- * @brief Constructor.
- *
- * @param[in] factoryCache The VisualFactoryCache object
- */
- TextVisual( VisualFactoryCache& factoryCache );
-
- /**
- * @brief A reference counted object may only be deleted by calling Unreference().
- */
- ~TextVisual();
-
- /**
+ * @brief Create a new text visual.
*
+ * @param[in] factoryCache A pointer pointing to the VisualFactoryCache object
+ * @return A smart-pointer to the newly allocated visual.
*/
- void SetTextControlInterface( Text::ControlInterface* controlInterface );
+ static TextVisualPtr New( VisualFactoryCache& factoryCache );
public: // from Visual::Base
*/
virtual void DoCreatePropertyMap( Property::Map& map ) const;
-protected: // from Visual::Base
+protected:
+
/**
- * @copydoc Visual::Base::DoInitialize()
+ * @brief Constructor.
+ *
+ * @param[in] factoryCache The VisualFactoryCache object
*/
- virtual void DoInitialize( Actor& actor, const Property::Map& propertyMap );
+ TextVisual( VisualFactoryCache& factoryCache );
+
+ /**
+ * @brief A reference counted object may only be deleted by calling Unreference().
+ */
+ virtual ~TextVisual();
+
+ // from Visual::Base
+
+ /**
+ * @copydoc Visual::Base::DoSetProperties()
+ */
+ virtual void DoSetProperties( const Property::Map& propertyMap );
/**
* @copydoc Visual::Base::DoSetOnStage()
*/
void RenderText();
- /**
- * @brief Stops the text auto scroll.
- */
- void StopTextAutoScrolling();
-
- /**
- * @brief Set up Autoscrolling.
- */
- void SetUpAutoScrolling();
-
private:
Text::ControllerPtr mController; ///< The text's controller.
- Actor mSelf;
+ WeakHandle<Actor> mSelf;
Text::RendererPtr mRenderer;
- Text::TextScrollerPtr mTextScroller;
Actor mRenderableActor;
int mRenderingBackend;