#define __DALI_TOOLKIT_UIBUILDER_H__
/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#include <dali/public-api/animation/linear-constrainer.h>
#include <dali/devel-api/animation/path-constrainer.h>
#include <dali/public-api/images/frame-buffer-image.h>
-#include <dali/public-api/shader-effects/shader-effect.h>
namespace Dali
{
* {
* "templates": // are named instantiable actor trees
* {
- * "default-text":
+ * "defaultText":
* {
* "type":"TextActor",
* "font":"",
- * "parent-origin":[0.5,0.5,0],
+ * "parentOrigin":[0.5,0.5,0],
* "scale": [50,50,1]
* }
* },
* "styles": // are named property sets applied to actor trees
* {
- * "my-style":
+ * "myStyle":
* {
* "size": [10,10,1] // root properties applied to a given root actor
* "actors": // properties applied to actors found by name from root
* "stage":
* [
* {
- * "type":"default-text",
+ * "type":"defaultText",
* "text":"Hello World",
* "position":[0,0,0]
* },
*
* - Create an actor tree from the "templates" section
* @code
- * TextActor actor = TextActor::DownCast( builder.Create( "default-text" ) );
+ * TextActor actor = TextActor::DownCast( builder.Create( "defaultText" ) );
* @endcode
*
* - Style an actor tree from the "styles" section
* @code
- * builder.ApplyStyle( "my-style", actor );
+ * builder.ApplyStyle( "myStyle", actor );
* @endcode
*
* - Create an actor tree from json
void AddConstant( const std::string& key, const Property::Value& value );
/**
+ * @brief Gets all currently defined configurations.
+ *
+ * @pre The Builder has been initialized.
+ * @return A reference to the currently defined configurations.
+ */
+ const Property::Map& GetConfigurations() const;
+
+ /**
* @brief Gets all currently defined constants.
*
* e.g.
*
* The animation is applied to a specific actor.
* e.g.
- * Actor myInstance = builder.Create( "template-actor-tree" )
+ * Actor myInstance = builder.Create( "templateActorTree" )
* Animation a = builder.CreateAnimation( "wobble", myInstance );
*
* @pre The Builder has been initialized.
* e.g.
* Property::Map map;
* map["ACTOR"] = actor.GetName(); // replaces '{ACTOR} in the template
- * Actor myInstance = builder.Create( "template-actor-tree" )
+ * Actor myInstance = builder.Create( "templateActorTree" )
* Animation a = builder.CreateAnimation( "wobble", myInstance);
*
* @pre The Builder has been initialized.
* @brief Creates an object (e.g. an actor) from the set of known style templates
*
* e.g.
- * mActor.Add( Actor::DownCast(builder.Create( "default-text")) );
+ * mActor.Add( Actor::DownCast(builder.Create( "defaultText")) );
*
* @pre The Builder has been initialized.
* @pre Preconditions have been met for creating dali objects ie Images, Actors etc
* e.g.
* Property::Map map;
* map["IMAGE_DIR"] = "/usr/share/images"; // replaces '{IMAGE_DIR} in the template
- * mActor.Add( Actor::DownCast(builder.Create( "default-image", map) ) );
+ * mActor.Add( Actor::DownCast(builder.Create( "defaultImage", map) ) );
*
* @pre The Builder has been initialized.
* @pre Preconditions have been met for creating dali objects ie Images, Actors etc
void CreateRenderTask( const std::string &name );
/**
- * Get or create ShaderEffect from the ShaderEffect instance library.
- * An empty handle is returned otherwise.
- * @pre The Builder has been initialized.
- * @param name The name of a ShaderEffect in the loaded representation
- * @return A handle to a ShaderEffect if found, otherwise empty
- */
- ShaderEffect GetShaderEffect( const std::string &name );
-
- /**
* Get or create FrameBufferImage from the FrameBufferImage instance library.
* An empty handle is returned otherwise.
* @pre The Builder has been initialized.
/**
* Get or create a PathConstrainer from the set of known PathConstrainers
* e.g.
- * PathConstrainer a = builder.GetPathConstrainer( "my-path-constrainer");
+ * PathConstrainer a = builder.GetPathConstrainer( "myPathConstrainer");
*
* @pre The Builder has been initialized.
* @pre The pathConstrainerName exists in the Constrainers section of the data representation
/**
* Get or create a LinearConstrainer from the set of known LinearConstrainers
* e.g.
- * LinearConstrainer a = builder.GetLinearConstrainer( "my-linear-constrainer");
+ * LinearConstrainer a = builder.GetLinearConstrainer( "myLinearConstrainer");
*
* @pre The Builder has been initialized.
* @pre The linearConstrainerName exists in the Constrainers section of the data representation