X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=docs%2Fcontent%2Fprogramming-guide%2Ftype-registration.h;h=e9912effacd59634852bbec8f0ee2603e6630cab;hb=acbf7e2c17c1578c7125fa07c7eaabe1fe214406;hp=43fe731cbebe69c8b2550d9be93b7a075aae57a3;hpb=998d982768c7f211d948cfd7921ec27ff739ce49;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/docs/content/programming-guide/type-registration.h b/docs/content/programming-guide/type-registration.h index 43fe731..e9912ef 100644 --- a/docs/content/programming-guide/type-registration.h +++ b/docs/content/programming-guide/type-registration.h @@ -30,8 +30,8 @@ A type can be registered using Dali::TypeRegistration. This is normally done in within the source file of the deriving control as shown in the code below. Please note: This snippet assumes knowledge of the \link Dali::Toolkit::Control Control -\endlink / \link Dali::Toolkit::ControlImpl ControlImpl \endlink creation process where -MyControl derives from a Control and MyControlImpl derives from ControlImpl. +\endlink / \link Dali::Toolkit::Internal::Control Internal::Control \endlink creation process where +MyControl derives from a Control and MyControlImpl derives from Internal::Control. @code namespace @@ -184,6 +184,10 @@ bool MyControl::DoAction( } @endcode +If the action is not performed by the derived class, it will be propagated to the base class. +For example, in the above case, MyControl can perform "action1" so should return true, but it +cannot perform "action4" so should return false and propagate the action to Control. + @section register-property Registering a Property DALi has a property system which can be extended by registering more properties through the type @@ -193,10 +197,10 @@ Dali::PROPERTY_REGISTRATION_MAX_INDEX. Furthermore, if deriving from \link Dali::Toolkit::Control Control\endlink, the control writer needs to be aware of their parent class's property range. Control reserves a property range between -\link Dali::Toolkit::ControlImpl::CONTROL_PROPERTY_START_INDEX ControlImpl::CONTROL_PROPERTY_START_INDEX\endlink -and \link Dali::Toolkit::ControlImpl::CONTROL_PROPERTY_END_INDEX ControlImpl::CONTROL_PROPERTY_END_INDEX\endlink. +\link Dali::Toolkit::Control::CONTROL_PROPERTY_START_INDEX ControlImpl::CONTROL_PROPERTY_START_INDEX\endlink +and \link Dali::Toolkit::Control::CONTROL_PROPERTY_END_INDEX Control::CONTROL_PROPERTY_END_INDEX\endlink. Any deriving control should start their property indices from -\link Dali::Toolkit::ControlImpl::CONTROL_PROPERTY_END_INDEX ControlImpl::CONTROL_PROPERTY_END_INDEX\endlink + 1. +\link Dali::Toolkit::Control::CONTROL_PROPERTY_END_INDEX Control::CONTROL_PROPERTY_END_INDEX\endlink + 1. Please have a look at \ref property-indices for more information. @@ -204,9 +208,9 @@ The following code shows how a property can be added to a type. @code // Define the indices we will use for the properties -static const int PROPERTY_ONE( Dali::Toolkit::ControlImpl::CONTROL_PROPERTY_END_INDEX + 1 ); -static const int PROPERTY_TWO( Dali::Toolkit::ControlImpl::CONTROL_PROPERTY_END_INDEX + 2 ); -static const int PROPERTY_THREE( Dali::Toolkit::ControlImpl::CONTROL_PROPERTY_END_INDEX + 3 ); +static const int PROPERTY_ONE( Dali::Toolkit::Internal::Control::CONTROL_PROPERTY_END_INDEX + 1 ); +static const int PROPERTY_TWO( Dali::Toolkit::Internal::Control::CONTROL_PROPERTY_END_INDEX + 2 ); +static const int PROPERTY_THREE( Dali::Toolkit::Internal::Control::CONTROL_PROPERTY_END_INDEX + 3 ); Dali::PropertyRegistration property1( type, // Reference to type registration object (see above)