X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=docs%2Fcontent%2Fshared-javascript-and-cpp-documentation%2Fcreating-custom-controls.md;h=54a0220c7f481b270d5895aa39de4fbeaa389002;hp=a1451ee601ba238a68c96971a99f800fe1d5799a;hb=cf58f2980b99438db9784a284e126d80893e6138;hpb=fb545906ceea3a2946c8a451f34ea7da283c4ffe diff --git a/docs/content/shared-javascript-and-cpp-documentation/creating-custom-controls.md b/docs/content/shared-javascript-and-cpp-documentation/creating-custom-controls.md index a1451ee..54a0220 100644 --- a/docs/content/shared-javascript-and-cpp-documentation/creating-custom-controls.md +++ b/docs/content/shared-javascript-and-cpp-documentation/creating-custom-controls.md @@ -341,10 +341,10 @@ An up call to the Control class is necessary if these methods are overridden. // C++ void MyUIControlImpl::OnChildAdd( Actor& child ); { - // Up call to Control first - Control::OnChildAdd( child ); - // Do any other operations required upon child addition + + // Up call to Control at the end + Control::OnChildAdd( child ); } ~~~ ~~~{.cpp} @@ -371,10 +371,10 @@ An up call to the Control class is necessary if these methods are overridden. // C++ void MyUIControlImpl::OnStageConnection( int depth ) { - // Up call to Control first - Control::OnStageConnection( depth ); - // Do any other operations required upon stage connection + + // Up call to Control at the end + Control::OnStageConnection( depth ); } ~~~ ~~~{.cpp} @@ -449,6 +449,18 @@ More information on size negotiation can be found [here](@ref size-negotiation-c ___________________________________________________________________________________________________ +### Clipping Support {#creating-controls-clipping} + +When an Actor is set to clip its children, the renderers have to be added manually in order to specify what its children need to clip to. +The Control base class automates the creation of the renderers/visuals when it is set to clip its children. + +This is only done if the application or custom control writer has not added any renderers to the Control or registered any visuals +(regardless of whether these visuals are enabled or not). + +If custom control writers want to define the clipping visuals themselves, then they should register all required visuals before the control is staged. + +___________________________________________________________________________________________________ + ### Other Features {#creating-controls-other} + [Background](@ref background)