Merge "Updated @since tags for APIs added since 1.2.0 that are required for Tizen...
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / styling / style-manager-impl.h
index 0eec891..f0c217c 100644 (file)
@@ -27,7 +27,7 @@
 #include <dali/public-api/signals/connection-tracker.h>
 
 // INTERNAL INCLUDES
-#include <dali-toolkit/devel-api/styling/style-manager.h>
+#include <dali-toolkit/public-api/styling/style-manager.h>
 #include <dali-toolkit/devel-api/builder/builder.h>
 
 namespace Dali
@@ -67,30 +67,20 @@ protected:
 
 public: // Public API
 
-  /**
-   * @copydoc Toolkit::StyleManager::SetOrientationValue
-   */
-  void SetOrientationValue( int orientation );
-
-  /**
-   * @copydoc Toolkit::StyleManager::GetOrientationValue
-   */
-  int GetOrientationValue();
-
-  /**
-   * @copydoc Toolkit::StyleManager::SetOrientation( Orientation orientation )
+/**
+   * @copydoc Toolkit::StyleManager::ApplyTheme
    */
-  void SetOrientation( Orientation orientation );
+  void ApplyTheme( const std::string& themeFile );
 
   /**
-   * @copydoc Toolkit::StyleManager::GetOrientation
+   * @copydoc Toolkit::StyleManager::ApplyDefaultTheme
    */
-  Orientation GetOrientation();
+  void ApplyDefaultTheme();
 
   /**
    * @copydoc Toolkit::StyleManager::GetDefaultFontFamily
    */
-  std::string GetDefaultFontFamily() const;
+  const std::string& GetDefaultFontFamily() const;
 
   /**
    * @copydoc Toolkit::StyleManager::SetStyleConstant
@@ -103,16 +93,6 @@ public: // Public API
   bool GetStyleConstant( const std::string& key, Property::Value& valueOut );
 
   /**
-   * @copydoc Toolkit::StyleManager::RequestThemeChange
-   */
-  void RequestThemeChange( const std::string& themeFile );
-
-  /**
-   * @copydoc Toolkit::StyleManager::RequestDefaultTheme
-   */
-  void RequestDefaultTheme();
-
-  /**
    * @brief Apply the theme style to a control.
    *
    * @param[in] control The control to apply style.
@@ -136,16 +116,25 @@ public:
 
   /**
    * @copydoc Toolkit::StyleManager::StyleChangeSignal
+   * This signal is sent after all the controls have been updated
+   * due to style change
    */
-  Toolkit::StyleManager::StyleChangeSignalType& StyleChangeSignal();
+  Toolkit::StyleManager::StyleChangedSignalType& StyleChangedSignal();
+
+  /**
+   * This signal is sent to the controls following a style change.
+   * It should not be exposed in the public API
+   */
+  Toolkit::StyleManager::StyleChangedSignalType& ControlStyleChangeSignal();
 
 private:
   typedef std::vector<std::string> StringList;
 
   /**
    * @brief Set the current theme. Called only once per event processing cycle.
+   * @param[in] themeFile The name of the theme file to read.
    */
-  void SetTheme();
+  void SetTheme( const std::string& themeFile );
 
   /**
    * @brief Internal helper method to read a file from file system.
@@ -201,13 +190,6 @@ private:
   void ApplyStyle( Toolkit::Builder builder, Toolkit::Control control );
 
   /**
-   * @brief Callback for orientation changes
-   *
-   * @param[in] orientation The orientation object
-   */
-  void OnOrientationChanged( Orientation orientation );
-
-  /**
    * Search for a builder in the cache
    *
    * @param[in] key The key the builder was cached under
@@ -231,6 +213,12 @@ private:
    */
   void StyleMonitorChange( StyleMonitor styleMonitor, StyleChange::Type styleChange );
 
+  /**
+   * Emit signals to controls first, app second
+   */
+  void EmitStyleChangeSignals( StyleChange::Type styleChange );
+
+
   // Undefined
   StyleManager(const StyleManager&);
 
@@ -244,13 +232,8 @@ private:
   Toolkit::Builder mThemeBuilder;     ///< Builder for all default theme properties
   StyleMonitor mStyleMonitor;         ///< Style monitor handle
 
-  Orientation mOrientation;           ///< Handle to application orientation object
-  int mOrientationDegrees;            ///< Directly set value of orientation
-
   int mDefaultFontSize;               ///< Logical size, not a point-size
-
   std::string mDefaultFontFamily;
-
   std::string mThemeFile;             ///< The full path of the current theme file
 
   Property::Map mThemeBuilderConstants;   ///< Contants to give the theme builder
@@ -261,7 +244,8 @@ private:
   Toolkit::Internal::FeedbackStyle* mFeedbackStyle; ///< Feedback style
 
   // Signals
-  Toolkit::StyleManager::StyleChangeSignalType       mStyleChangeSignal;         ///< Emitted when the style( theme/font ) changes
+  Toolkit::StyleManager::StyleChangedSignalType mControlStyleChangeSignal; ///< Emitted when the style( theme/font ) changes for the controls to style themselves
+  Toolkit::StyleManager::StyleChangedSignalType mStyleChangedSignal; ///< Emitted after the controls have been styled
 };
 
 } // namespace Internal