X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Fpublic-api%2Fbuilder%2Fbuilder.h;h=209f3c29811901c13d9c7592791aa9bc1d864666;hp=abc5a26432a7ea2d509da1b50adb2a1df9ff0965;hb=78304b72e0cd621ae2f51f93f746db341acde47e;hpb=af74001e7e61033e86323da5ad079ccbc310680a diff --git a/dali-toolkit/public-api/builder/builder.h b/dali-toolkit/public-api/builder/builder.h index abc5a26..209f3c2 100644 --- a/dali-toolkit/public-api/builder/builder.h +++ b/dali-toolkit/public-api/builder/builder.h @@ -137,6 +137,44 @@ typedef std::map PropertyValueMap; void AddConstants( const PropertyValueMap& map ); /** + * @brief Adds or modifies a user defined constant to all future style template or animation expansions + * + * e.g. + * @code builder.AddConstant( "IMAGE_DIRECTORY", "/usr/share/images" ); + * + * @pre The Builder has been initialized. + * @param key The constant name to add or update + * @param value The new value for the constant. + */ + void AddConstant( const std::string& key, const Property::Value& value ); + + /** + * @brief Gets all currently defined constants. + * + * e.g. + * @code PropertyValueMap map = builder.GetConstants(); // get copy of current constants + * map["IMAGE_DIRECTORY"] = "/usr/share/images"; // make modification + * builder.AddConstants( map ); // write back changes + * + * @pre The Builder has been initialized. + * @return A reference to the currently defined constants. + */ + const PropertyValueMap& GetConstants() const; + + /** + * @brief Gets a currently defined constant, or returns Property::INVALID + * + * e.g. + * @code PropertyValueMap map = builder.GetConstants(); // get copy of current constants + * map["IMAGE_DIRECTORY"] = "/usr/share/images"; // make modification + * builder.AddConstants( map ); // write back changes + * + * @pre The Builder has been initialized. + * @param key The constant name to search for. + */ + const Property::Value& GetConstant( const std::string& key ) const; + + /** * Creates an animation from the set of known animations * e.g. * Animation a = builder.CreateAnimation( "wobble");