Add null check for mTextureSet.
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / text / text-controller-impl.h
index 5dd231a..981e498 100755 (executable)
@@ -21,6 +21,7 @@
 // EXTERNAL INCLUDES
 #include <dali/devel-api/adaptor-framework/clipboard.h>
 #include <dali/devel-api/text-abstraction/font-client.h>
+#include <dali/public-api/rendering/shader.h>
 
 // INTERNAL INCLUDES
 #include <dali-toolkit/internal/text/input-style.h>
@@ -60,7 +61,8 @@ struct Event
     LEFT_SELECTION_HANDLE_EVENT,
     RIGHT_SELECTION_HANDLE_EVENT,
     SELECT,
-    SELECT_ALL
+    SELECT_ALL,
+    SELECT_NONE,
   };
 
   union Param
@@ -618,6 +620,8 @@ struct Controller::Impl
 
   void OnSelectAllEvent();
 
+  void OnSelectNoneEvent();
+
   /**
    * @brief Retrieves the selected text. It removes the text if the @p deleteAfterRetrieval parameter is @e true.
    *
@@ -724,6 +728,13 @@ struct Controller::Impl
    */
   void ScrollTextToMatchCursor( const CursorInfo& cursorInfo );
 
+  /**
+   * @brief Create an actor that renders the text background color
+   *
+   * @return the created actor or an empty handle if no background color needs to be rendered.
+   */
+  Actor CreateBackgroundActor();
+
 public:
 
   /**
@@ -780,6 +791,8 @@ public:
   bool mShouldClearFocusOnEscape:1;        ///< Whether text control should clear key input focus
   LayoutDirection::Type mLayoutDirection;  ///< Current system language direction
 
+  Shader mShaderBackground;                ///< The shader for text background.
+
   float mTextFitMinSize;                   ///< Minimum Font Size for text fit. Default 10
   float mTextFitMaxSize;                   ///< Maximum Font Size for text fit. Default 100
   float mTextFitStepSize;                  ///< Step Size for font intervalse. Default 1