X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=base%2Fdali-toolkit%2Fpublic-api%2Fcontrols%2Fcontrol-impl.h;h=470fb27de31aa4c26c367a291fb7f8447865729c;hb=refs%2Fchanges%2F90%2F30190%2F1;hp=bf58ce75772e37a23beaed20dbd4339325327059;hpb=fba034a17645832eecc1ac8544de26add0745a39;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/base/dali-toolkit/public-api/controls/control-impl.h b/base/dali-toolkit/public-api/controls/control-impl.h index bf58ce7..470fb27 100644 --- a/base/dali-toolkit/public-api/controls/control-impl.h +++ b/base/dali-toolkit/public-api/controls/control-impl.h @@ -19,12 +19,19 @@ */ // EXTERNAL INCLUDES +#include #include +#include +#include +#include +#include +#include +#include // INTERNAL INCLUDES #include -namespace Dali DALI_IMPORT_API +namespace Dali { namespace Toolkit @@ -176,7 +183,18 @@ public: * @param[in] attributes The attributes with which to perfrom this action. * @return true if action has been accepted by this control */ - static bool DoAction(BaseObject* object, const std::string& actionName, const std::vector& attributes); + static bool DoAction(BaseObject* object, const std::string& actionName, const PropertyValueContainer& attributes); + + /** + * Connects a callback function with the object's signals. + * @param[in] object The object providing the signal. + * @param[in] tracker Used to disconnect the signal. + * @param[in] signalName The signal to connect to. + * @param[in] functor A newly allocated FunctorDelegate. + * @return True if the signal was connected. + * @post If a signal was connected, ownership of functor was passed to CallbackBase. Otherwise the caller is responsible for deleting the unused functor. + */ + static bool DoConnectSignal( BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor ); /** * @brief If deriving classes wish to fine tune pinch gesture @@ -315,17 +333,6 @@ private: // For derived classes to override virtual void OnFontChange( bool defaultFontChange, bool defaultFontSizeChange ){ } /** - * @deprecated Use OnFontChange() instead. - * Before the using of StyleManager, the StyleChange only deals with font change. - * - * @brief This method should be overridden by deriving classes when - * they wish to be notified when the style changes. - * - * @param[in] change Information denoting what has changed. - */ - virtual void OnStyleChange( StyleChange change ) { } - - /** * @brief Called whenever a pinch gesture is detected on this control. * * This can be overridden by deriving classes when pinch detection @@ -337,7 +344,7 @@ private: // For derived classes to override * @param[in] pinch The pinch gesture. * @see EnableGestureDetection */ - virtual void OnPinch(PinchGesture pinch); + virtual void OnPinch(const PinchGesture& pinch); /** * @brief Called whenever a pan gesture is detected on this control. @@ -350,7 +357,7 @@ private: // For derived classes to override * @param[in] pan The pan gesture. * @see EnableGestureDetection */ - virtual void OnPan(PanGesture pan) { } + virtual void OnPan( const PanGesture& pan ); /** * @brief Called whenever a tap gesture is detected on this control. @@ -363,7 +370,7 @@ private: // For derived classes to override * @param[in] tap The tap gesture. * @see EnableGestureDetection */ - virtual void OnTap(TapGesture tap) { } + virtual void OnTap( const TapGesture& tap ); /** * @brief Called whenever a long press gesture is detected on this control. @@ -376,7 +383,7 @@ private: // For derived classes to override * @param[in] longPress The long press gesture. * @see EnableGestureDetection */ - virtual void OnLongPress(LongPressGesture longPress) { } + virtual void OnLongPress( const LongPressGesture& longPress ); /** * @brief Called whenever the control is added to the stage. @@ -507,6 +514,11 @@ private: // From CustomActorImpl, derived classes can override these. virtual bool OnTouchEvent(const TouchEvent& event); /** + * @copydoc Dali::CustomActorImpl::OnHoverEvent(const HoverEvent&) + */ + virtual bool OnHoverEvent(const HoverEvent& event); + + /** * @copydoc Dali::CustomActorImpl::OnKeyEvent(const KeyEvent&) */ virtual bool OnKeyEvent(const KeyEvent& event); @@ -539,7 +551,7 @@ private: * @param[in] styleManager The StyleManager Object * @param[in] change Information denoting what has changed. */ - void DoStyleChange( Toolkit::StyleManager styleManager, StyleChange change ); + DALI_INTERNAL void DoStyleChange( Toolkit::StyleManager styleManager, StyleChange change ); protected: // Construction @@ -549,18 +561,12 @@ protected: // Construction CONTROL_BEHAVIOUR_NONE = 0, REQUIRES_TOUCH_EVENTS = 1<<1, ///< True if the OnTouchEvent() callback is required. REQUIRES_STYLE_CHANGE_SIGNALS = 1<<2, ///< True if needs to monitor style change signals such as theme/font change - NO_SIZE_NEGOTIATION = 1<<3 ///< True if control does not need size negotiation, i.e. it can be skipped in the algorithm + NO_SIZE_NEGOTIATION = 1<<3, ///< True if control does not need size negotiation, i.e. it can be skipped in the algorithm + REQUIRES_HOVER_EVENTS = 1<<4, ///< True if the OnHoverEvent() callback is required. + REQUIRES_MOUSE_WHEEL_EVENTS = 1<<5 ///< True if the OnMouseWheelEvent() callback is required. }; /** - * @deprecated Use the constructor taking flags instead - * @brief Create a Control. - * - * @param[in] requiresTouchEvents True if the OnTouchEvent() callback is required. - */ - Control(bool requiresTouchEvents); - - /** * @brief Create a Control. * * @param[in] behaviourFlags Behavioural flags from ControlBehaviour enum @@ -657,11 +663,6 @@ public: */ virtual void SignalDisconnected( SlotObserver* slotObserver, CallbackBase* callback ); - /** - * @copydoc ConnectionTrackerInterface::GetConnectionCount - */ - virtual std::size_t GetConnectionCount() const; - protected: /** @@ -708,7 +709,7 @@ private: // Used by the RelayoutController * @param[in,out] container The container that holds actors that are fed back into the * RelayoutController algorithm. */ - void NegotiateSize( Vector2 size, ActorSizeContainer& container ); + DALI_INTERNAL void NegotiateSize( Vector2 size, ActorSizeContainer& container ); private: @@ -721,7 +722,7 @@ private: * @param[in,out] container The control should add actors to this container that it is not able * to allocate a size for. */ - void Relayout( Vector2 size, ActorSizeContainer& container ); + DALI_INTERNAL void Relayout( Vector2 size, ActorSizeContainer& container ); /** * @brief Used by the KeyInputFocusManager to emit key event signals. @@ -729,13 +730,13 @@ private: * @param[in] event The key event. * @return True if the event was consumed. */ - bool EmitKeyEventSignal(const KeyEvent& event); + DALI_INTERNAL bool EmitKeyEventSignal(const KeyEvent& event); private: // Undefined - Control(const Control&); - Control& operator=(const Control&); + DALI_INTERNAL Control(const Control&); + DALI_INTERNAL Control& operator=(const Control&); class Impl; Impl* mImpl; @@ -746,8 +747,6 @@ private: } // namespace Internal -typedef Internal::Control ControlImpl; ///< @deprecated, Use Internal::Control - } // namespace Toolkit } // namespace Dali