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=b6db52d5f3bb5a0d3b36adbd5e0b29992d91b9e6;hp=3051917ceab5ea6e45457af14b6e1d9522c4c127;hb=50550b5dd051c5baebd26365991b50f155031dc8;hpb=3dce4163d27820a63fedb91ad4628efc3f864152 diff --git a/dali-toolkit/internal/builder/builder-impl.h b/dali-toolkit/internal/builder/builder-impl.h index 3051917..b6db52d 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...) \ @@ -150,6 +150,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 +233,7 @@ public: */ void EmitQuitSignal(); + protected: virtual ~Builder(); @@ -263,11 +282,25 @@ 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 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 +310,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), @@ -337,6 +377,7 @@ private: SlotDelegate mSlotDelegate; Property::Map mReplacementMap; MappingsLut mCompleteMappings; + Dictionary mStyles; // State based styles Toolkit::Builder::BuilderSignalType mQuitSignal; };