X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fvisuals%2Fvisual-base-data-impl.h;h=999b41cfeeaa56c2e01db6cdc20be64ff225376a;hb=d6f1c901d74aef4e66ffb6565bb61de952a090a3;hp=c4877b48f7f50bf6ff8670a1f90cc370dccc19af;hpb=f05c437df1fc28be1354e47af9dbf336828956f1;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/internal/visuals/visual-base-data-impl.h b/dali-toolkit/internal/visuals/visual-base-data-impl.h index c4877b4..999b41c 100644 --- a/dali-toolkit/internal/visuals/visual-base-data-impl.h +++ b/dali-toolkit/internal/visuals/visual-base-data-impl.h @@ -24,6 +24,7 @@ // INTERNAL INCLUDES #include +#include namespace Dali { @@ -39,6 +40,16 @@ namespace Visual struct Base::Impl { + /** + * Constructor + */ + Impl(); + + /** + * Destructor + */ + ~Impl(); + enum Flags { IS_ON_STAGE = 1, @@ -50,25 +61,68 @@ struct Base::Impl struct CustomShader { + CustomShader( const Property::Map& map ); + void SetPropertyMap( const Property::Map& map ); + void CreatePropertyMap( Property::Map& map ) const; + std::string mVertexShader; std::string mFragmentShader; Dali::ImageDimensions mGridSize; Dali::Shader::Hint::Value mHints; //(bitfield) values from enum Shader::Hint + }; - CustomShader( const Property::Map& map ); + struct Transform + { + /** + * Default constructor ensures the visual fills the control + */ + Transform(); + + /** + * Use the property map to set zero or more of the transform + * attributes, and sets the remaining attributes to their default + * values. + */ void SetPropertyMap( const Property::Map& map ); - void CreatePropertyMap( Property::Map& map ) const; - }; - Renderer mRenderer; - CustomShader* mCustomShader; - std::string mName; - Vector2 mSize; - float mDepthIndex; - int mFlags; + /** + * Add the transform attributes to the map (using integer keys) + */ + void GetPropertyMap( Property::Map& map ) const; + + /** + * Update zero or more attributes from the property map. + */ + void UpdatePropertyMap( const Property::Map& map ); + + /** + * Register or set the uniform properties onto the renderer + */ + void RegisterUniforms( Renderer renderer, Toolkit::Direction::Type direction ); + + /** + * Convert the control size and the transform attributes into the actual + * size of the visual. + */ + Vector2 GetVisualSize( const Vector2& controlSize ); + + Vector2 mOffset; + Vector2 mSize; + Vector4 mOffsetSizeMode; + Toolkit::Align::Type mOrigin; + Toolkit::Align::Type mAnchorPoint; + }; - Impl(); - ~Impl(); + Renderer mRenderer; + CustomShader* mCustomShader; + SlotDelegate* mBlendSlotDelegate; ///< Used to own mix color animation connection + std::string mName; + Transform mTransform; + Vector4 mMixColor; + Size mControlSize; + float mDepthIndex; + Property::Index mMixColorIndex; + int mFlags; }; } // namespace Visual