X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=base%2Fdali-toolkit%2Fpublic-api%2Fcontrols%2Fcontrol.h;h=1911030ce7bfd0ff81b707f3eb0ad4a3a3986c9b;hp=82ab066a097737f0acb4aa76f3fe81e2e51924da;hb=7e315a440bad7033d19fefa8f9952d625ee6f076;hpb=a544935a60770da7a421b604a9e85afac71ad6b9 diff --git a/base/dali-toolkit/public-api/controls/control.h b/base/dali-toolkit/public-api/controls/control.h index 82ab066..1911030 100644 --- a/base/dali-toolkit/public-api/controls/control.h +++ b/base/dali-toolkit/public-api/controls/control.h @@ -18,10 +18,17 @@ * */ -// INTERNAL INCLUDES -#include - -namespace Dali DALI_IMPORT_API +// EXTERNAL INCLUDES +#include +#include +#include +#include +#include +#include +#include +#include + +namespace Dali { namespace Toolkit @@ -40,7 +47,7 @@ class Control; * The implementation of the control must be supplied; see Internal::Control for more details. * @see Internal::Control */ -class Control : public CustomActor +class DALI_IMPORT_API Control : public CustomActor { public: @@ -58,6 +65,10 @@ public: /// @name Signals /** @{ */ static const char* const SIGNAL_KEY_EVENT; ///< name "key-event" + static const char* const SIGNAL_TAPPED; ///< name "tapped" + static const char* const SIGNAL_PANNED; ///< name "panned" + static const char* const SIGNAL_PINCHED; ///< name "pinched" + static const char* const SIGNAL_LONG_PRESSED; ///< name "long-pressed" /** @} */ /// @name Actions @@ -101,7 +112,7 @@ public: // Typedefs /// @brief Key Event signal type; - typedef SignalV2 KeyEventSignalV2; + typedef Signal KeyEventSignalType; public: // Creation & Destruction @@ -286,7 +297,7 @@ public: * @brief Retrieves the pinch gesture detector of the control. * * @return The pinch gesture detector. - * @pre Pinch detection should have been enabled in the control. + * @note Will return an empty handle if the control does not handle the gesture itself. */ PinchGestureDetector GetPinchGestureDetector() const; @@ -294,7 +305,7 @@ public: * @brief Retrieves the pan gesture detector of the control. * * @return The pan gesture detector. - * @pre Pan detection should have been enabled in the control. + * @note Will return an empty handle if the control does not handle the gesture itself. */ PanGestureDetector GetPanGestureDetector() const; @@ -302,7 +313,7 @@ public: * @brief Retrieves the tap gesture detector of the control. * * @return The tap gesture detector. - * @pre Tap detection should have been enabled in the control. + * @note Will return an empty handle if the control does not handle the gesture itself. */ TapGestureDetector GetTapGestureDetector() const; @@ -310,7 +321,7 @@ public: * @brief Retrieves the long press gesture detector of the control. * * @return The long press gesture detector. - * @pre Long press detection should have been enabled in the control. + * @note Will return an empty handle if the control does not handle the gesture itself. */ LongPressGestureDetector GetLongPressGestureDetector() const; @@ -320,6 +331,8 @@ public: * @brief Sets the background color of the control. * * @param[in] color The required background color of the control + * + * @note The background color fully blends with the actor color. */ void SetBackgroundColor( const Vector4& color ); @@ -365,17 +378,19 @@ public: * @pre The Control has been initialized. * @return The signal to connect to. */ - KeyEventSignalV2& KeyEventSignal(); + KeyEventSignalType& KeyEventSignal(); -public: // Not intended for application developers +public: // Intended for control developers /** * @brief Create an initialised Control. * * @param[in] implementation The implementation for this control. * @return A handle to a newly allocated Dali resource. + * + * @note Should NOT be called to create a handle from the implementation. As stated, this allocates a NEW Dali resource. */ - Control(Internal::Control& implementation); + explicit Control(Internal::Control& implementation); /** * @brief This constructor is used by CustomActor within Dali core to create additional Control handles @@ -383,7 +398,7 @@ public: // Not intended for application developers * * @param [in] internal A pointer to a newly allocated Dali resource */ - Control(Dali::Internal::CustomActor* internal); + explicit Control(Dali::Internal::CustomActor* internal); public: // Templates for Deriving Classes @@ -397,7 +412,7 @@ public: // Templates for Deriving Classes * @see DownCast(BaseHandle) */ template - static T DownCast( BaseHandle handle ) + DALI_INTERNAL static T DownCast( BaseHandle handle ) { T result; @@ -425,7 +440,7 @@ public: // Templates for Deriving Classes * @param[in] internal Pointer to the Internal::CustomActor */ template - void VerifyCustomActorPointer(Dali::Internal::CustomActor* internal) + DALI_INTERNAL void VerifyCustomActorPointer(Dali::Internal::CustomActor* internal) { // Can have a NULL pointer so we only need to check if the internal implementation is our class // when there is a value.