*/
// EXTERNAL INCLUDES
+#include <dali/public-api/adaptor-framework/style-change.h>
#include <dali/public-api/common/vector-wrapper.h>
+#include <dali/public-api/events/long-press-gesture.h>
+#include <dali/public-api/events/pan-gesture.h>
+#include <dali/public-api/events/pinch-gesture.h>
+#include <dali/public-api/events/tap-gesture.h>
+#include <dali/public-api/object/property-index.h>
+#include <dali/public-api/object/type-info.h>
// INTERNAL INCLUDES
#include <dali-toolkit/public-api/controls/control.h>
-namespace Dali DALI_IMPORT_API
+namespace Dali
{
namespace Toolkit
CONTROL_PROPERTY_END_INDEX = CONTROL_PROPERTY_START_INDEX + 1000 ///< Reserving 1000 property indices
};
- // Creation
+ // Creation & Destruction
/**
* @brief Create a new ControlImpl instance that does not require touch by default.
*
* If touch is required then the user can connect to this class' touch signal.
- * @return A handle to the ConntrolImpl instance.
+ * @return A handle to the ControlImpl instance.
*/
static Toolkit::Control New();
- // Destruction
-
/**
* @brief Virtual destructor.
*/
virtual ~Control();
- // Actions
+ // Size negotiation
/**
- * @brief This method should be overridden by deriving classes when they wish to be notified when they
- * are activated.
+ * @copydoc Toolkit::Control::SetSizePolicy()
*/
- virtual void OnActivated() { }
+ void SetSizePolicy( Toolkit::Control::SizePolicy widthPolicy, Toolkit::Control::SizePolicy heightPolicy );
/**
- * @brief This method should be overridden by deriving classes when they wish to respond the accessibility
- * pan gesture.
- *
- * @param[in] gesture The pan gesture.
- * @return true if the pan gesture has been consumed by this control
+ * @copydoc Toolkit::Control::GetSizePolicy()
*/
- virtual bool OnAccessibilityPan(PanGesture gesture);
+ void GetSizePolicy( Toolkit::Control::SizePolicy& widthPolicy, Toolkit::Control::SizePolicy& heightPolicy ) const;
/**
- * @brief This method should be overridden by deriving classes when they wish to respond the accessibility
- * touch event.
- *
- * @param[in] touchEvent The touch event.
- * @return true if the touch event has been consumed by this control
+ * @copydoc Toolkit::Control::SetMinimumSize()
*/
- virtual bool OnAccessibilityTouch(const TouchEvent& touchEvent);
+ void SetMinimumSize( const Vector3& size );
/**
- * @brief This method should be overridden by deriving classes when they wish to respond
- * the accessibility up and down action (i.e. value change of slider control).
- *
- * @param[in] isIncrease Whether the value should be increased or decreased
- * @return true if the value changed action has been consumed by this control
+ * @copydoc Toolkit::Control::GetMinimumSize()
*/
- virtual bool OnAccessibilityValueChange(bool isIncrease);
+ const Vector3& GetMinimumSize() const;
/**
- * @brief Sets whether this control supports two dimensional
- * keyboard navigation (i.e. whether it knows how to handle the
- * keyboardn focus movement between its child actors).
- *
- * The control doesn't support it by default.
- * @param[in] isSupported Whether this control supports two dimensional keyboard navigation.
+ * @copydoc Toolkit::Control::SetMaximumSize()
*/
- void SetKeyboardNavigationSupport(bool isSupported);
+ void SetMaximumSize( const Vector3& size );
/**
- * @brief Gets whether this control supports two dimensional keyboard navigation.
- *
- * @return true if this control supports two dimensional keyboard navigation.
+ * @copydoc Toolkit::Control::GetMaximumSize()
*/
- bool IsKeyboardNavigationSupported();
+ const Vector3& GetMaximumSize() const;
/**
- * @brief Sets whether this control is a focus group for keyboard navigation.
- *
- * (i.e. the scope of keyboard focus movement
- * can be limitied to its child actors). The control is not a focus group by default.
- * @param[in] isFocusGroup Whether this control is set as a focus group for keyboard navigation.
+ * @copydoc Toolkit::Control::GetNaturalSize()
*/
- void SetAsKeyboardFocusGroup(bool isFocusGroup);
+ virtual Vector3 GetNaturalSize();
/**
- * @brief Gets whether this control is a focus group for keyboard navigation.
+ * @brief This method is called during size negotiation when a height is required for a given width.
*
- * @return true if this control is set as a focus group for keyboard navigation.
+ * Derived classes should override this if they wish to customize the height returned.
*/
- bool IsKeyboardFocusGroup();
+ virtual float GetHeightForWidth( float width );
/**
- * @brief Gets the next keyboard focusable actor in this control towards the given direction.
+ * @brief This method is called during size negotiation when a width is required for a given height.
*
- * A control needs to override this function in order to support two dimensional keyboard navigation.
- * @param[in] currentFocusedActor The current focused actor.
- * @param[in] direction The direction to move the focus towards.
- * @param[in] loopEnabled Whether the focus movement should be looped within the control.
- * @return the next keyboard focusable actor in this control or an empty handle if no actor can be focused.
+ * Derived classes should override this if they wish to customize the width returned.
*/
- virtual Actor GetNextKeyboardFocusableActor(Actor currentFocusedActor, Toolkit::Control::KeyboardFocusNavigationDirection direction, bool loopEnabled);
+ virtual float GetWidthForHeight( float height );
/**
- * @brief Informs this control that its chosen focusable actor will be focused.
- *
- * This allows the application to preform any actions if wishes
- * before the focus is actually moved to the chosen actor.
+ * @brief Retrieves the current Control's size.
*
- * @param[in] commitedFocusableActor The commited focusable actor.
+ * @return The control's size.
*/
- virtual void OnKeyboardFocusChangeCommitted(Actor commitedFocusableActor) { }
+ const Vector3& GetControlSize() const;
/**
- * @brief Performs actions as requested using the action name.
+ * @brief Retrieves the Control's size set by the Application / Control.
*
- * @param[in] object The object on which to perform the action.
- * @param[in] actionName The action to perform.
- * @param[in] attributes The attributes with which to perfrom this action.
- * @return true if action has been accepted by this control
+ * @return The control's size.
+ */
+ const Vector3& GetSizeSet() const;
+
+ // Key Input
+
+ /**
+ * @copydoc Toolkit::Control::SetKeyInputFocus()
+ */
+ void SetKeyInputFocus();
+
+ /**
+ * @copydoc Toolkit::Control::HasKeyInputFocus()
*/
- static bool DoAction(BaseObject* object, const std::string& actionName, const std::vector<Property::Value>& attributes);
+ bool HasKeyInputFocus();
+
+ /**
+ * @copydoc Toolkit::Control::ClearKeyInputFocus()
+ */
+ void ClearKeyInputFocus();
+
+ // Gesture Detection
/**
* @brief If deriving classes wish to fine tune pinch gesture
*/
Actor GetBackgroundActor() const;
-public:
+ // Keyboard Navigation
+
+ /**
+ * @brief Sets whether this control supports two dimensional
+ * keyboard navigation (i.e. whether it knows how to handle the
+ * keyboardn focus movement between its child actors).
+ *
+ * The control doesn't support it by default.
+ * @param[in] isSupported Whether this control supports two dimensional keyboard navigation.
+ */
+ void SetKeyboardNavigationSupport(bool isSupported);
+
+ /**
+ * @brief Gets whether this control supports two dimensional keyboard navigation.
+ *
+ * @return true if this control supports two dimensional keyboard navigation.
+ */
+ bool IsKeyboardNavigationSupported();
+
+ // Called by Focus Managers
+
+ /**
+ * @brief Called by the focus manager and keyboard focus manager to Activate the Control
+ */
+ DALI_INTERNAL void Activate();
+
+ /**
+ * @brief This method should be overridden by deriving classes when they wish to respond the accessibility
+ * pan gesture.
+ *
+ * @param[in] gesture The pan gesture.
+ * @return true if the pan gesture has been consumed by this control
+ */
+ virtual bool OnAccessibilityPan(PanGesture gesture);
+
+ /**
+ * @brief This method should be overridden by deriving classes when they wish to respond the accessibility
+ * touch event.
+ *
+ * @param[in] touchEvent The touch event.
+ * @return true if the touch event has been consumed by this control
+ */
+ virtual bool OnAccessibilityTouch(const TouchEvent& touchEvent);
+
+ /**
+ * @brief This method should be overridden by deriving classes when they wish to respond
+ * the accessibility up and down action (i.e. value change of slider control).
+ *
+ * @param[in] isIncrease Whether the value should be increased or decreased
+ * @return true if the value changed action has been consumed by this control
+ */
+ virtual bool OnAccessibilityValueChange(bool isIncrease);
+
+ // Called by the RelayoutController
+
+ /**
+ * @brief Called by the RelayoutController to negotiate the size of a control.
+ *
+ * The size allocated by the the algorithm is passed in which the
+ * control must adhere to. A container is passed in as well which
+ * the control should populate with actors it has not / or does not
+ * need to handle in its size negotiation.
+ *
+ * @param[in] size The allocated size.
+ * @param[in,out] container The container that holds actors that are fed back into the
+ * RelayoutController algorithm.
+ */
+ DALI_INTERNAL void NegotiateSize( Vector2 size, ActorSizeContainer& container );
+
+ // Keyboard Focus
+
+ /**
+ * @brief Sets whether this control is a focus group for keyboard navigation.
+ *
+ * (i.e. the scope of keyboard focus movement
+ * can be limitied to its child actors). The control is not a focus group by default.
+ * @param[in] isFocusGroup Whether this control is set as a focus group for keyboard navigation.
+ */
+ void SetAsKeyboardFocusGroup(bool isFocusGroup);
+
+ /**
+ * @brief Gets whether this control is a focus group for keyboard navigation.
+ *
+ * @return true if this control is set as a focus group for keyboard navigation.
+ */
+ bool IsKeyboardFocusGroup();
+
+ /**
+ * @brief Gets the next keyboard focusable actor in this control towards the given direction.
+ *
+ * A control needs to override this function in order to support two dimensional keyboard navigation.
+ * @param[in] currentFocusedActor The current focused actor.
+ * @param[in] direction The direction to move the focus towards.
+ * @param[in] loopEnabled Whether the focus movement should be looped within the control.
+ * @return the next keyboard focusable actor in this control or an empty handle if no actor can be focused.
+ */
+ virtual Actor GetNextKeyboardFocusableActor(Actor currentFocusedActor, Toolkit::Control::KeyboardFocusNavigationDirection direction, bool loopEnabled);
+
+ /**
+ * @brief Informs this control that its chosen focusable actor will be focused.
+ *
+ * This allows the application to preform any actions if wishes
+ * before the focus is actually moved to the chosen actor.
+ *
+ * @param[in] commitedFocusableActor The commited focusable actor.
+ */
+ virtual void OnKeyboardFocusChangeCommitted(Actor commitedFocusableActor);
+
+ // Actions & Signals
+
+ /**
+ * @brief Performs actions as requested using the action name.
+ *
+ * @param[in] object The object on which to perform the action.
+ * @param[in] actionName The action to perform.
+ * @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 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 );
/**
* @copydoc Dali::Toolkit::Control::KeyEventSignal()
*/
Toolkit::Control::KeyEventSignalV2& KeyEventSignal();
+ /**
+ * @brief Called by the KeyInputFocusManager to emit key event signals.
+ *
+ * @param[in] event The key event.
+ * @return True if the event was consumed.
+ */
+ DALI_INTERNAL bool EmitKeyEventSignal(const KeyEvent& event);
+
protected:
// Construction
+ // Flags for the constructor
+ enum ControlBehaviour
+ {
+ 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
+ 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.
+ };
+
+ /**
+ * @brief Create a Control.
+ *
+ * @param[in] behaviourFlags Behavioural flags from ControlBehaviour enum
+ */
+ Control(ControlBehaviour behaviourFlags);
+
/**
* @brief Second phase initialization.
*/
*/
void DisableGestureDetection(Gesture::Type type);
-private: // For derived classes to override
+ // Size Negotiation
+
+ /**
+ * @brief Sends a request to be relaid-out.
+ *
+ * This method is called from OnStageConnection(), OnChildAdd(),
+ * OnChildRemove(), SetSizePolicy(), SetMinimumSize() and
+ * SetMaximumSize().
+ *
+ * This method could also be called from derived classes every time
+ * a control's poperty change and it needs to be relaid-out. After
+ * the Dali::Stage::SignalMessageQueueFlushed() is emitted a
+ * relayout process starts and all controls which called this method
+ * will be relaid-out.
+ *
+ * @note RelayoutRequest() only sends a request per Control before
+ * the Dali::Stage::SignalMessageQueueFlushed() signal is
+ * emitted. That means a control will be relaid-out only once, even
+ * if more than one request is sent between two consecutive signals.
+ */
+ void RelayoutRequest();
+
+ /**
+ * @brief Helper method for controls to Relayout their children if
+ * they do not know whether that child is a control or not.
+ *
+ * @param[in] actor The actor to relayout.
+ * @param[in] size The size to allocate to the actor.
+ * @param[in,out] container The container that holds actors that have not been allocated a size yet.
+ */
+ static void Relayout( Actor actor, Vector2 size, ActorSizeContainer& container );
+
+private:
+
+ // For derived classes to override
/**
* @brief This method is called after the Control has been initialized.
*
- * Derived classes should do any second phase initialization by
- * overriding this method.
+ * Derived classes should do any second phase initialization by overriding this method.
+ */
+ virtual void OnInitialize();
+
+ /**
+ * @brief This method is called when the control is activates.
+ *
+ * Derived classes should override this if they wish to be notified when they are activated.
*/
- virtual void OnInitialize() { }
+ virtual void OnActivated();
/**
* @brief This method should be overridden by deriving classes when
* @param[in] defaultFontChange Information denoting whether the default font has changed.
* @param[in] defaultFontSizeChange Information denoting whether the default font size has changed.
*/
- 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 ) { }
+ virtual void OnFontChange( bool defaultFontChange, bool defaultFontSizeChange );
/**
* @brief Called whenever a pinch gesture is detected on this control.
* @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.
* @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.
* @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.
* @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.
*
* Could be overridden by derived classes.
*/
- virtual void OnControlStageConnection() { }
+ virtual void OnControlStageConnection();
/**
* @brief Called whenever the control is removed from the stage.
*
* Could be overridden by derived classes.
*/
- virtual void OnControlStageDisconnection() { }
+ virtual void OnControlStageDisconnection();
/**
* @brief Called whenever an Actor is added to the control.
*
* @param[in] child The added actor.
*/
- virtual void OnControlChildAdd( Actor& child ) { }
+ virtual void OnControlChildAdd( Actor& child );
/**
* @brief Called whenever an Actor is removed from the control.
*
* @param[in] child The removed actor.
*/
- virtual void OnControlChildRemove( Actor& child ) { }
+ virtual void OnControlChildRemove( Actor& child );
/**
* @brief Called whenever the Control's size is set.
*
* @param[in] size The new size.
*/
- virtual void OnControlSizeSet( const Vector3& size ) { }
+ virtual void OnControlSizeSet( const Vector3& size );
/**
* @brief Called after the Dali::Stage::SignalMessageQueueFlushed()
*/
virtual void OnRelaidOut( Vector2 size, ActorSizeContainer& container );
-private: // From CustomActorImpl, derived classes can override these.
+ /**
+ * @brief Called when the control gains key input focus.
+ *
+ * Should be overridden by derived classes if they need to customize what happens when focus is gained.
+ */
+ virtual void OnKeyInputFocusGained();
+
+ /**
+ * @brief Called when the control loses key input focus.
+ *
+ * Should be overridden by derived classes if they need to customize what happens when focus is lost.
+ */
+ virtual void OnKeyInputFocusLost();
+
+ // From CustomActorImpl, derived classes can override these.
+
+ /**
+ * @copydoc Dali::CustomActorImpl::OnSizeAnimation(Animation&, const Vector3&)
+ */
+ virtual void OnSizeAnimation(Animation& animation, const Vector3& targetSize);
+
+ /**
+ * @copydoc Dali::CustomActorImpl::OnTouchEvent(const TouchEvent&)
+ */
+ 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);
+
+ /**
+ * @copydoc Dali::CustomActorImpl::OnMouseWheelEvent(const MouseWheelEvent&)
+ */
+ virtual bool OnMouseWheelEvent(const MouseWheelEvent& event);
+
+ /**
+ * @copydoc Dali::CustomActorImpl::GetChildByAlias(const std::string& actorAlias)
+ */
+ virtual Actor GetChildByAlias(const std::string& actorAlias);
+
+ // From CustomActorImpl, derived classes should NOT override these.
/**
* @brief Sends a request to relayout this control.
*/
virtual void OnSizeSet(const Vector3& targetSize);
- /**
- * @copydoc Dali::CustomActorImpl::OnSizeAnimation(Animation&, const Vector3&)
- */
- virtual void OnSizeAnimation(Animation& animation, const Vector3& targetSize);
-
- /**
- * @copydoc Dali::CustomActorImpl::OnTouchEvent(const TouchEvent&)
- */
- virtual bool OnTouchEvent(const TouchEvent& event);
-
- /**
- * @copydoc Dali::CustomActorImpl::OnKeyEvent(const KeyEvent&)
- */
- virtual bool OnKeyEvent(const KeyEvent& event);
-
- /**
- * @copydoc Dali::CustomActorImpl::OnMouseWheelEvent(const MouseWheelEvent&)
- */
- virtual bool OnMouseWheelEvent(const MouseWheelEvent& event);
-
- /**
- * @copydoc Dali::CustomActorImpl::OnKeyInputFocusGained()
- */
- virtual void OnKeyInputFocusGained();
-
- /**
- * @copydoc Dali::CustomActorImpl::OnKeyInputFocusLost()
- */
- virtual void OnKeyInputFocusLost();
-
- /**
- * @copydoc Dali::CustomActorImpl::GetChildByAlias(const std::string& actorAlias)
- */
- virtual Actor GetChildByAlias(const std::string& actorAlias);
-
-private:
-
- /**
- * @brief This method is the callback for the StyleChangeSignal from StyleManager
- *
- * @param[in] styleManager The StyleManager Object
- * @param[in] change Information denoting what has changed.
- */
- void DoStyleChange( Toolkit::StyleManager styleManager, StyleChange change );
-
-protected: // Construction
-
- // Flags for the constructor
- enum ControlBehaviour
- {
- 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
- };
-
- /**
- * @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
- */
- Control(ControlBehaviour behaviourFlags);
-
-public:
-
- // Size negotiation
-
- /**
- * @copydoc Toolkit::Control::SetSizePolicy()
- */
- void SetSizePolicy( Toolkit::Control::SizePolicy widthPolicy, Toolkit::Control::SizePolicy heightPolicy );
-
- /**
- * @copydoc Toolkit::Control::GetSizePolicy()
- */
- void GetSizePolicy( Toolkit::Control::SizePolicy& widthPolicy, Toolkit::Control::SizePolicy& heightPolicy ) const;
-
- /**
- * @copydoc Toolkit::Control::SetMinimumSize()
- */
- void SetMinimumSize( const Vector3& size );
-
- /**
- * @copydoc Toolkit::Control::GetMinimumSize()
- */
- const Vector3& GetMinimumSize() const;
-
- /**
- * @copydoc Toolkit::Control::SetMaximumSize()
- */
- void SetMaximumSize( const Vector3& size );
-
- /**
- * @copydoc Toolkit::Control::GetMaximumSize()
- */
- const Vector3& GetMaximumSize() const;
-
- /**
- * @copydoc Toolkit::Control::GetNaturalSize()
- */
- virtual Vector3 GetNaturalSize();
-
- /**
- * @copydoc Toolkit::Control::GetHeightForWidth()
- */
- virtual float GetHeightForWidth( float width );
-
- /**
- * @copydoc Toolkit::Control::GetWidthForHeight()
- */
- virtual float GetWidthForHeight( float height );
-
- /**
- * @brief Retrieves the current Control's size.
- *
- * @return The control's size.
- */
- const Vector3& GetControlSize() const;
-
- /**
- * @brief Retrieves the Control's size set by the Application / Control.
- *
- * @return The control's size.
- */
- const Vector3& GetSizeSet() const;
-
- //KeyInput
-
- /**
- * @copydoc Toolkit::Control::SetKeyInputFocus()
- */
- void SetKeyInputFocus();
-
- /**
- * @copydoc Toolkit::Control::HasKeyInputFocus()
- */
- bool HasKeyInputFocus();
-
- /**
- * @copydoc Toolkit::Control::ClearKeyInputFocus()
- */
- void ClearKeyInputFocus();
+ // From ConnectionTrackerInterface
/**
* @copydoc ConnectionTrackerInterface::SignalConnected
*/
virtual void SignalDisconnected( SlotObserver* slotObserver, CallbackBase* callback );
- /**
- * @copydoc ConnectionTrackerInterface::GetConnectionCount
- */
- virtual std::size_t GetConnectionCount() const;
-
-protected:
-
- /**
- * @brief Sends a request to be relaid-out.
- *
- * This method is called from OnStageConnection(), OnChildAdd(),
- * OnChildRemove(), SetSizePolicy(), SetMinimumSize() and
- * SetMaximumSize().
- *
- * This method could also be called from derived classes every time
- * a control's poperty change and it needs to be relaid-out. After
- * the Dali::Stage::SignalMessageQueueFlushed() is emitted a
- * relayout process starts and all controls which called this method
- * will be relaid-out.
- *
- * @note RelayoutRequest() only sends a request per Control before
- * the Dali::Stage::SignalMessageQueueFlushed() signal is
- * emitted. That means a control will be relaid-out only once, even
- * if more than one request is sent between two consecutive signals.
- */
- void RelayoutRequest();
+ // Style
/**
- * @brief Helper method for controls to Relayout their children if
- * they do not know whether that child is a control or not.
- *
- * @param[in] actor The actor to relayout.
- * @param[in] size The size to allocate to the actor.
- * @param[in,out] container The container that holds actors that have not been allocated a size yet.
- */
- static void Relayout( Actor actor, Vector2 size, ActorSizeContainer& container );
-
-private: // Used by the RelayoutController
-
- /**
- * @brief Called by the RelayoutController to negotiate the size of a control.
- *
- * The size allocated by the the algorithm is passed in which the
- * control must adhere to. A container is passed in as well which
- * the control should populate with actors it has not / or does not
- * need to handle in its size negotiation.
+ * @brief This method is the callback for the StyleChangeSignal from StyleManager
*
- * @param[in] size The allocated size.
- * @param[in,out] container The container that holds actors that are fed back into the
- * RelayoutController algorithm.
+ * @param[in] styleManager The StyleManager Object
+ * @param[in] change Information denoting what has changed.
*/
- void NegotiateSize( Vector2 size, ActorSizeContainer& container );
+ DALI_INTERNAL void DoStyleChange( Toolkit::StyleManager styleManager, StyleChange change );
-private:
+ // Size Negotiation
/**
* @brief Called by NegotiateSize when the size to allocate to the control has been calculated.
* @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 );
-
- /**
- * @brief Used by the KeyInputFocusManager to emit key event signals.
- *
- * @param[in] event The key event.
- * @return True if the event was consumed.
- */
- bool EmitKeyEventSignal(const KeyEvent& event);
+ DALI_INTERNAL void Relayout( Vector2 size, ActorSizeContainer& container );
private:
// Undefined
- Control(const Control&);
- Control& operator=(const Control&);
+ DALI_INTERNAL Control(const Control&);
+ DALI_INTERNAL Control& operator=(const Control&);
class Impl;
Impl* mImpl;
- friend class Internal::RelayoutControllerImpl; ///< Relayout controller needs to call Relayout() which is private.
- friend class Internal::KeyInputFocusManager; ///< KeyInputFocusManager needs to call which is private.
+ friend class Internal::KeyInputFocusManager; ///< KeyInputFocusManager needs to call several methods which are private. // TODO: Remove
};
} // namespace Internal
-typedef Internal::Control ControlImpl; ///< @deprecated, Use Internal::Control
-
} // namespace Toolkit
} // namespace Dali