// EXTERNAL INCLUDES
#include <string>
-#include <list>
+#include <dali/public-api/common/vector-wrapper.h>
#include <dali/devel-api/common/map-wrapper.h>
#include <dali/devel-api/adaptor-framework/style-monitor.h>
#include <dali/public-api/object/base-object.h>
#include <dali/public-api/signals/connection-tracker.h>
// INTERNAL INCLUDES
-#include <dali-toolkit/public-api/styling/style-manager.h>
-#include <dali-toolkit/public-api/builder/builder.h>
+#include <dali-toolkit/devel-api/styling/style-manager.h>
+#include <dali-toolkit/devel-api/builder/builder.h>
namespace Dali
{
namespace Internal
{
+
+class FeedbackStyle;
+
/**
* @copydoc Toolkit::StyleManager
*/
class StyleManager : public Dali::BaseObject, public ConnectionTracker
{
public:
-
/**
* Singleton access
*
*/
StyleManager();
+protected:
+ /**
+ * @brief Destructor
+ */
+ virtual ~StyleManager();
+
+public: // Public API
+
/**
* @copydoc Toolkit::StyleManager::SetOrientationValue
*/
Orientation GetOrientation();
/**
+ * @copydoc Toolkit::StyleManager::GetDefaultFontFamily
+ */
+ std::string GetDefaultFontFamily() const;
+
+ /**
* @copydoc Toolkit::StyleManager::SetStyleConstant
*/
void SetStyleConstant( const std::string& key, const Property::Value& value );
void RequestDefaultTheme();
/**
- * Determine if a theme change has been requested
- * @return Whether a theme request is pending
+ * @brief Apply the theme style to a control.
+ *
+ * @param[in] control The control to apply style.
*/
- bool IsThemeRequestPending();
+ void ApplyThemeStyle( Toolkit::Control control );
/**
- * @brief Apply the theme style to a control.
+ * @brief Apply the theme style to a control at initialization.
*
* @param[in] control The control to apply style.
*/
- void ApplyThemeStyle( Toolkit::Control control );
+ void ApplyThemeStyleAtInit( Toolkit::Control control );
/**
* @copydoc Toolkit::StyleManager::ApplyStyle
*/
Toolkit::StyleManager::StyleChangeSignalType& StyleChangeSignal();
-protected:
-
- /**
- * @brief Destructor
- */
- virtual ~StyleManager();
-
-
-public:
+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();
-
-private:
-
- typedef std::list<std::string> StringList;
+ void SetTheme( const std::string& themeFile );
/**
* @brief Internal helper method to read a file from file system.
* Callback for when style monitor raises a signal
*
* @param[in] styleMonitor The style monitor object
- * @param[in] styleChange The style change data
+ * @param[in] styleChange The style change type
*/
- void StyleMonitorChange( StyleMonitor styleMonitor, StyleChange styleChange );
+ void StyleMonitorChange( StyleMonitor styleMonitor, StyleChange::Type styleChange );
// Undefined
StyleManager(const StyleManager&);
typedef std::map< std::string, Toolkit::Builder > BuilderMap;
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
BuilderMap mBuilderCache; ///< Cache of builders keyed by JSON file name
+ Toolkit::Internal::FeedbackStyle* mFeedbackStyle; ///< Feedback style
+
// Signals
Toolkit::StyleManager::StyleChangeSignalType mStyleChangeSignal; ///< Emitted when the style( theme/font ) changes
};
} // namespace Dali
#endif // __DALI_TOOLKIT_INTERNAL_STYLE_MANAGER_H__
-