X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Fdevel-api%2Fcontrols%2Frenderer-factory%2Fcontrol-renderer.h;h=e95d906a20d6ffd96ff3c410c635e4813249a5f7;hb=refs%2Fchanges%2F40%2F49040%2F8;hp=d5f0df4270e0103538d4a23651b319e8b0f3a6cc;hpb=2f04a4705842cce7a40c414e4591ae77035059c2;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/devel-api/controls/renderer-factory/control-renderer.h b/dali-toolkit/devel-api/controls/renderer-factory/control-renderer.h index d5f0df4..e95d906 100644 --- a/dali-toolkit/devel-api/controls/renderer-factory/control-renderer.h +++ b/dali-toolkit/devel-api/controls/renderer-factory/control-renderer.h @@ -33,7 +33,8 @@ class ControlRenderer; } /** - * ControlRenderer provides renderer for rendering the controls. A control may have multiple ControlRenders. + * @brief ControlRenderer provides renderer for rendering the controls. A control may have multiple ControlRenders. + * * ControlRenderers reuses geometry, shader etc. across controls and manages the renderer and material to exist only when control is on-stage. * It also responds to actor size and color change, and provides the clipping at the renderer level. * Note: The control renderer responds to the the Actor::COLOR by blending it with the 'Multiply' operator. @@ -70,14 +71,31 @@ public: ControlRenderer& operator=( const ControlRenderer& handle ); /** - * Set the size of the painting area. + * @brief Set the size of the painting area. * * @param[in] size The size of the painting area. */ void SetSize( const Vector2& size ); /** - * Set the depth index of this renderer. + * @brief Get the size of the painting area. + * + * @return The size of the renderer's painting area. + */ + const Vector2& GetSize() const; + + /** + * @brief Return the natural size of the renderer. + * + * Deriving classes stipulate the natural size and by default a renderer has a ZERO natural size. + * + * @param[out] naturalSize The renderer's natural size + */ + void GetNaturalSize( Vector2& naturalSize ) const; + + /** + * @brief Set the depth index of this renderer. + * * Depth-index controls draw-order for overlapping renderers. * Renderer with higher depth indices are rendered in front of other renderer with smaller values * @@ -86,13 +104,47 @@ public: void SetDepthIndex( float index ); /** - * Renderer only exists when control is on stage. + * @brief Get the depth index of this renderer + * + * @return The depth index of this renderer. + */ + float GetDepthIndex() const; + + /** + * @brief Renderer only exists when control is on stage. + * * This function should be called when the control put on stage. * * @param[in] actor The actor applying this renderer. + * @post SetOffStage should be called with the same actor when the control is put off stage otherwise memory will be leaked */ void SetOnStage( Actor& actor ); + /** + * @brief Renderer is destroyed when control is off stage. + * + * This function should be called when the control removes from stage + * + * @param[in] actor The actor applying this renderer. + */ + void SetOffStage( Actor& actor ); + + /** + * @brief Remove the renderer from actor and reset the control renderer self. + * + * This function can be called with an empty handle. If the control renderer is empty, do nothing. + * + * @param[in] actor The actor to be set off stage. + */ + void RemoveAndReset( Actor& actor ); + + /** + * @brief Create the property map representing this renderer. + * + * @param[out] map The renderer property map. + */ + void CreatePropertyMap( Property::Map& map ) const; + public: // Not intended for application developers explicit DALI_INTERNAL ControlRenderer(Internal::ControlRenderer *impl);