X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fbuilder%2Fbuilder-impl.h;h=8a90b03424e09bed92c95477b2046df5b94928e2;hp=3051917ceab5ea6e45457af14b6e1d9522c4c127;hb=386634b00f264e667074fa7d956c81bc72233c62;hpb=3dce4163d27820a63fedb91ad4628efc3f864152 diff --git a/dali-toolkit/internal/builder/builder-impl.h b/dali-toolkit/internal/builder/builder-impl.h index 3051917..8a90b03 100644 --- a/dali-toolkit/internal/builder/builder-impl.h +++ b/dali-toolkit/internal/builder/builder-impl.h @@ -28,13 +28,13 @@ #include #include #include -#include #include // INTERNAL INCLUDES #include #include #include +#include // Warning messages usually displayed #define DALI_SCRIPT_WARNING(format, args...) \ @@ -95,6 +95,11 @@ public: 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; @@ -150,6 +155,24 @@ public: 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 ); @@ -215,6 +238,7 @@ public: */ void EmitQuitSignal(); + protected: virtual ~Builder(); @@ -238,6 +262,8 @@ private: 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 ); @@ -263,11 +289,33 @@ private: 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, @@ -277,6 +325,13 @@ private: 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), @@ -336,7 +391,9 @@ private: LinearConstrainerLut mLinearConstrainerLut; SlotDelegate mSlotDelegate; Property::Map mReplacementMap; + Property::Map mConfigurationMap; MappingsLut mCompleteMappings; + Dictionary mStyles; // State based styles Toolkit::Builder::BuilderSignalType mQuitSignal; };