Added New methods to cater for second step initialization
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / visuals / text / text-visual.cpp
index e9278f9..3f9dd1e 100644 (file)
@@ -154,18 +154,11 @@ Geometry CreateGeometry( VisualFactoryCache& factoryCache, ImageDimensions gridS
   return geometry;
 }
 
-} // namespace
+} // unnamed namespace
 
-TextVisual::TextVisual( VisualFactoryCache& factoryCache )
-: Visual::Base( factoryCache ),
-  mController( Text::Controller::New() ),
-  mRenderingBackend( Toolkit::Text::DEFAULT_RENDERING_BACKEND ),
-  mHasBeenStaged( false )
-{
-}
-
-TextVisual::~TextVisual()
+TextVisualPtr TextVisual::New( VisualFactoryCache& factoryCache )
 {
+  return new TextVisual( factoryCache );
 }
 
 void TextVisual::SetTextControlInterface( Text::ControlInterface* controlInterface )
@@ -254,6 +247,18 @@ void TextVisual::DoCreatePropertyMap( Property::Map& map ) const
   map.Insert( Toolkit::TextVisual::Property::BATCHING_ENABLED, false ); // TODO
 }
 
+TextVisual::TextVisual( VisualFactoryCache& factoryCache )
+: Visual::Base( factoryCache ),
+  mController( Text::Controller::New() ),
+  mRenderingBackend( Toolkit::Text::DEFAULT_RENDERING_BACKEND ),
+  mHasBeenStaged( false )
+{
+}
+
+TextVisual::~TextVisual()
+{
+}
+
 void TextVisual::DoInitialize( Actor& actor, const Property::Map& propertyMap )
 {
   mSelf = actor;