public:
+ static std::string GetResourcePath();
+
//Orientation& GetOrientation();
public: // static methods
//delete mOrientation;
}
+std::string Application::GetResourcePath()
+{
+ return "";
+}
//Orientation& Application::GetOrientation()
//{
// return *mOrientation;
}
/*
- * Recursively collects all stylesin a node (An array of style names).
+ * Recursively collects all styles in a node (An array of style names).
*
* stylesCollection The set of styles from the json file (a json object of named styles)
* style The style array to begin the collection from
#include <dali/public-api/object/type-registry.h>
#include <dali/public-api/object/type-registry-helper.h>
#include <dali/integration-api/debug.h>
+#include <dali/public-api/adaptor-framework/application.h>
// INTERNAL INCLUDES
#include <dali-toolkit/public-api/controls/control.h>
const char* DEFAULT_THEME = DALI_STYLE_DIR "dali-toolkit-default-theme.json";
const char* PACKAGE_PATH_KEY = "PACKAGE_PATH";
+const char* APPLICATION_RESOURCE_PATH_KEY = "APPLICATION_RESOURCE_PATH";
+
const char* DEFAULT_PACKAGE_PATH = DALI_DATA_READ_ONLY_DIR "/toolkit/";
} // namespace
{
// Add theme builder constants
mThemeBuilderConstants[ PACKAGE_PATH_KEY ] = DEFAULT_PACKAGE_PATH;
+ mThemeBuilderConstants[ APPLICATION_RESOURCE_PATH_KEY ] = Application::GetResourcePath();
mStyleMonitor = StyleMonitor::Get();
if( mStyleMonitor )
{
mStyleMonitor.StyleChangeSignal().Connect( this, &StyleManager::StyleMonitorChange );
-
mDefaultFontSize = mStyleMonitor.GetDefaultFontSize();
}
* If the application wants to customize the theme, RequestThemeChange
* needs to be called.
*
+ * To supply resource paths ( in json ) the following constant is available: APPLICATION_RESOURCE_PATH.
+ * It provides the path to the application resource root folder, from there the filename can an be specified along with
+ * any sub folders, e.g Images, Models etc.
+ * The APPLICATION_RESOURCE_PATH can be retrieved using Application::GetResourcePath()
+ *
* Signals
* | %Signal Name | Method |
* |------------------------------------------------------------|
*
* @SINCE_1_1.32
* @param[in] themeFile If a relative path is specified, then this is relative
- * to the directory returned by app_get_resource_path().
+ * to the directory returned by Application::GetResourcePath().
*/
void ApplyTheme( const std::string& themeFile );
* @param[in] control The control to which to apply the style.
* @param[in] jsonFileName The name of the JSON style file to apply. If a
* relative path is specified, then this is relative to the directory
- * returned by app_get_resource_path().
+ * returned by Application::GetResourcePath().
* @param[in] styleName The name of the style within the JSON file to apply.
*/
void ApplyStyle( Toolkit::Control control, const std::string& jsonFileName, const std::string& styleName );
Images for that style should be in their own folder named images.
Common images not specific for a particular style will be in the images-common folder located in the style folder.
+
+All application resources are stored in a defined path (application resource path), from this path sub directories can be specified.
+
+The application resource path can be retrieved using Application::GetResourcePath()
+
+Alternatively to supply resource paths in json the following constant is available: APPLICATION_RESOURCE_PATH.
+
+It provides the path to the application resource root folder, from there the filename can an be specified along with any sub folders, e.g Images, Models etc.
+
+
*
*/