Control not always rendering background image depending on add order
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / public-api / controls / control-impl.h
index b8ae6bb..c6b3b5e 100644 (file)
@@ -36,7 +36,7 @@ namespace Dali
 namespace Toolkit
 {
 /**
- * @addtogroup dali-toolkit-controls
+ * @addtogroup dali_toolkit_controls
  * @{
  */
 
@@ -102,6 +102,13 @@ public:
   void SetBackgroundImage( Image image );
 
   /**
+   * @brief Set the background with a property map.
+   *
+   * @param[in] map The background property map.
+   */
+  void SetBackground(const Property::Map& map);
+
+  /**
    * @copydoc Dali::Toolkit::Control::ClearBackground
    */
   void ClearBackground();
@@ -261,6 +268,15 @@ public:
    */
   DALI_INTERNAL bool EmitKeyEventSignal( const KeyEvent& event );
 
+private:
+
+  /**
+   * Sets up the background image/color based on the current state.
+   * This will set the depth index (always), and add to stage if the control is on stage.
+   *
+   */
+  void UpdateBackgroundState();
+
 protected: // For derived classes to call
 
   /**