#include <dali/public-api/object/base-object.h>
#include <dali/public-api/object/property-map.h>
#include <dali/public-api/render-tasks/render-task.h>
-#include <dali-toolkit/devel-api/visual-factory/transition-data.h>
#include <dali/integration-api/debug.h>
// INTERNAL INCLUDES
#include <dali-toolkit/devel-api/builder/json-parser.h>
#include <dali-toolkit/devel-api/builder/builder.h>
#include <dali-toolkit/internal/builder/builder-declarations.h>
+#include <dali-toolkit/internal/builder/style.h>
// Warning messages usually displayed
#define DALI_SCRIPT_WARNING(format, args...) \
void AddConstant( const std::string& key, const Property::Value& value );
/**
+ * @copydoc Toolkit::Builder::GetConfigurations
+ */
+ const Property::Map& GetConfigurations() const;
+
+ /**
* @copydoc Toolkit::Builder::GetConstants
*/
const Property::Map& GetConstants() const;
bool ApplyStyle( const std::string& styleName, Handle& handle );
/**
+ * Lookup the stylename in builder. If it's found in the parse tree,
+ * then return true.
+ * @param[in] styleName The style name to search for
+ * @return true if the stylename exists
+ */
+ bool LookupStyleName( const std::string& styleName );
+
+ /**
+ * Lookup the stylename in the recorded Styles - if it exists,
+ * performs a shallow copy to the passed in style and returns true.
+ * Otherwise it returns false.
+
+ * @param[in] styleName The stylename to search for
+ * @return A const pointer to the style object
+ */
+ const StylePtr GetStyle( const std::string& styleName );
+
+ /**
* @copydoc Toolkit::Builder::AddActors
*/
void AddActors( Actor toActor );
*/
void EmitQuitSignal();
+
protected:
virtual ~Builder();
void LoadConstants( const TreeNode& root, Property::Map& intoMap );
+ void LoadConfiguration( const TreeNode& root, Property::Map& intoMap );
+
Animation CreateAnimation( const std::string& animationName,
const Replacement& replacement,
Dali::Actor sourceActor );
Dali::Handle& handle,
const Replacement& constant );
+ void RecordStyles( const char* styleName,
+ const TreeNode& node,
+ Dali::Handle& handle,
+ const Replacement& replacements );
+
+ void RecordStyle( StylePtr style,
+ const TreeNode& node,
+ Dali::Handle& handle,
+ const Replacement& replacements );
+
+ void RecordTransitions( const TreeNode::KeyNodePair& keyValue,
+ Property::Array& transitions,
+ const Replacement& replacements );
+
+ void RecordTransitionData( const TreeNode::KeyNodePair& keyNode,
+ Toolkit::TransitionData& transitionData,
+ const Replacement& replacements );
+
void ApplyProperties( const TreeNode& root,
const TreeNode& node,
Dali::Handle& handle,
const Replacement& constant );
+ void ApplySignals( const TreeNode& root,
+ const TreeNode& node,
+ Dali::Handle& handle );
+
void ApplyStylesByActor( const TreeNode& root,
const TreeNode& node,
Dali::Handle& handle,
Handle& handle,
const Replacement& constant );
+ bool MapToTargetProperty( Handle& propertyObject,
+ const std::string& key,
+ const TreeNode& node,
+ const Replacement& constant,
+ Property::Index& index,
+ Property::Value& value );
+
/**
* Find the key in the mapping table, if it's present, then generate
* a property value for it (of the given type if available),
LinearConstrainerLut mLinearConstrainerLut;
SlotDelegate<Builder> mSlotDelegate;
Property::Map mReplacementMap;
+ Property::Map mConfigurationMap;
MappingsLut mCompleteMappings;
+ Dictionary<StylePtr> mStyles; // State based styles
Toolkit::Builder::BuilderSignalType mQuitSignal;
};