Reduce Cyclomatic Complexity of some methods in text-typesetter, transtion-data ...
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / controls / text-controls / text-label-impl.h
index bdbdbbc..a863c9c 100644 (file)
@@ -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.
@@ -142,6 +142,19 @@ private:
    */
   void SetUpAutoScrolling();
 
+  /**
+   * Creates a text-scroller if one has not been created.
+   * @return The text scroller.
+   */
+  Text::TextScrollerPtr GetTextScroller()
+  {
+    if( !mTextScroller )
+    {
+      mTextScroller = Text::TextScroller::New( *this );
+    }
+    return mTextScroller;
+  }
+
 private: // Data
 
   Text::ControllerPtr mController;