X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fstyling%2Fstyle-manager-impl.h;h=283cf9621f2e2445f361ff7e626edefba1273a88;hb=10213ff7b9185fbb7fd444c72c12dd4595b35204;hp=86c6d4c3e341c30bd26228a70adeea6ac82afd02;hpb=a8bc013df97fad9f1cc2d95c37248464ac553e6e;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/internal/styling/style-manager-impl.h b/dali-toolkit/internal/styling/style-manager-impl.h index 86c6d4c..283cf96 100644 --- a/dali-toolkit/internal/styling/style-manager-impl.h +++ b/dali-toolkit/internal/styling/style-manager-impl.h @@ -47,7 +47,6 @@ class FeedbackStyle; class StyleManager : public Dali::BaseObject, public ConnectionTracker { public: - /** * Singleton access * @@ -60,6 +59,14 @@ public: */ StyleManager(); +protected: + /** + * @brief Destructor + */ + virtual ~StyleManager(); + +public: // Public API + /** * @copydoc Toolkit::StyleManager::SetOrientationValue */ @@ -81,6 +88,11 @@ public: Orientation GetOrientation(); /** + * @copydoc Toolkit::StyleManager::GetDefaultFontFamily + */ + std::string GetDefaultFontFamily() const; + + /** * @copydoc Toolkit::StyleManager::SetStyleConstant */ void SetStyleConstant( const std::string& key, const Property::Value& value ); @@ -101,12 +113,6 @@ public: void RequestDefaultTheme(); /** - * Determine if a theme change has been requested - * @return Whether a theme request is pending - */ - bool IsThemeRequestPending(); - - /** * @brief Apply the theme style to a control. * * @param[in] control The control to apply style. @@ -130,27 +136,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(); - -protected: + Toolkit::StyleManager::StyleChangedSignalType& StyleChangedSignal(); /** - * @brief Destructor + * This signal is sent to the controls following a style change. + * It should not be exposed in the public API */ - virtual ~StyleManager(); + Toolkit::StyleManager::StyleChangedSignalType& ControlStyleChangeSignal(); - -public: +private: + typedef std::vector 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(); - -private: - - typedef std::vector StringList; + void SetTheme( const std::string& themeFile ); /** * @brief Internal helper method to read a file from file system. @@ -236,6 +240,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&); @@ -253,7 +263,7 @@ private: 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 @@ -264,7 +274,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 @@ -292,4 +303,3 @@ inline const Internal::StyleManager& GetImpl( const Dali::Toolkit::StyleManager& } // namespace Dali #endif // __DALI_TOOLKIT_INTERNAL_STYLE_MANAGER_H__ -