X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Fdevel-api%2Fcontrols%2Frenderer-factory%2Fcontrol-renderer.h;h=fe31a7e147eda7bd9d5266207a29789eb37f5354;hp=3a44603ff57306ca99f5ad83ff0f8b7cf8b84cc9;hb=e2dd845116bdbe8bd852c73023ccea33ba1c8576;hpb=669373aecf093fe345b679b0ebe1e8056b12af2c 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 3a44603..fe31a7e 100644 --- a/dali-toolkit/devel-api/controls/renderer-factory/control-renderer.h +++ b/dali-toolkit/devel-api/controls/renderer-factory/control-renderer.h @@ -35,7 +35,7 @@ class ControlRenderer; /** * @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. + * ControlRenderers reuses geometry, shader etc. across controls and manages the renderer and texture sets 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. */ @@ -78,21 +78,45 @@ public: void SetSize( const Vector2& size ); /** + * @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 * - * @param[in] depthIndex The depth index of this renderer. + * @param[in] index The depth index of this renderer. */ void SetDepthIndex( float index ); /** + * @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 ); @@ -106,6 +130,15 @@ public: 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.