namespace Toolkit
{
+class StyleManager;
+
namespace Internal DALI_INTERNAL
{
class StyleChangeProcessor;
class KeyInputFocusManager;
}
-typedef std::pair< Actor, Vector2 > ActorSizePair; ///< Pair of actor and size
+typedef std::pair< Actor, Vector2 > ActorSizePair; ///< Pair of actor and size
typedef std::vector< ActorSizePair > ActorSizeContainer; ///< Container of actors and their sizes
+namespace Internal
+{
+
/**
* @brief This is the internal base class for all controls.
*
* Implements ConnectionTrackerInterface so that signals (typically connected to member functions) will
* be disconnected automatically when the control is destroyed.
*/
-class ControlImpl : public CustomActorImpl, public ConnectionTrackerInterface
+class DALI_IMPORT_API Control : public CustomActorImpl, public ConnectionTrackerInterface
{
public:
* If touch is required then the user can connect to this class' touch signal.
* @return A handle to the ConntrolImpl instance.
*/
- static Control New();
+ static Toolkit::Control New();
// Destruction
/**
* @brief Virtual destructor.
*/
- virtual ~ControlImpl();
+ virtual ~Control();
// Actions
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] 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, Control::KeyboardFocusNavigationDirection direction, bool loopEnabled);
+ virtual Actor GetNextKeyboardFocusableActor(Actor currentFocusedActor, Toolkit::Control::KeyboardFocusNavigationDirection direction, bool loopEnabled);
/**
* @brief Informs this control that its chosen focusable actor will be focused.
*/
static bool DoAction(BaseObject* object, const std::string& actionName, const std::vector<Property::Value>& attributes);
-public:
-
- /**
- * @copydoc Dali::Toolkit::Control::KeyEventSignal()
- */
- Toolkit::Control::KeyEventSignalV2& KeyEventSignal();
-
-protected:
-
- // Construction
-
- /**
- * @brief Second phase initialization.
- */
- void Initialize();
-
- // Gesture Detection
-
- /**
- * @brief Allows deriving classes to enable any of the gesture detectors that are available.
- *
- * Gesture detection can be enabled one at a time or in bitwise format as shown:
- * @code
- * EnableGestureDetection(Gesture::Type(Gesture::Pinch | Gesture::Tap | Gesture::Pan));
- * @endcode
- * @param[in] type The gesture type(s) to enable.
- */
- void EnableGestureDetection(Gesture::Type type);
-
- /**
- * @brief Allows deriving classes to disable any of the gesture detectors.
- *
- * Like EnableGestureDetection, this can also be called using bitwise or.
- * @param[in] type The gesture type(s) to disable.
- * @see EnableGetureDetection
- */
- void DisableGestureDetection(Gesture::Type type);
-
/**
* @brief If deriving classes wish to fine tune pinch gesture
* detection then they can access the gesture detector through this
*/
LongPressGestureDetector GetLongPressGestureDetector() const;
+ // Background
+
+ /**
+ * @copydoc Dali::Toolkit::Control::SetBackgroundColor
+ */
+ void SetBackgroundColor( const Vector4& color );
+
+ /**
+ * @copydoc Dali::Toolkit::Control::GetBackgroundColor
+ */
+ Vector4 GetBackgroundColor() const;
+
+ /**
+ * @copydoc Dali::Toolkit::Control::SetBackground
+ */
+ void SetBackground( Image image );
+
+ /**
+ * @copydoc Dali::Toolkit::Control::ClearBackground
+ */
+ void ClearBackground();
+
+ /**
+ * @copydoc Dali::Toolkit::Control::GetBackgroundActor
+ */
+ Actor GetBackgroundActor() const;
+
+public:
+
+ /**
+ * @copydoc Dali::Toolkit::Control::KeyEventSignal()
+ */
+ Toolkit::Control::KeyEventSignalV2& KeyEventSignal();
+
+protected:
+
+ // Construction
+
+ /**
+ * @brief Second phase initialization.
+ */
+ void Initialize();
+
+ // Gesture Detection
+
+ /**
+ * @brief Allows deriving classes to enable any of the gesture detectors that are available.
+ *
+ * Gesture detection can be enabled one at a time or in bitwise format as shown:
+ * @code
+ * EnableGestureDetection(Gesture::Type(Gesture::Pinch | Gesture::Tap | Gesture::Pan));
+ * @endcode
+ * @param[in] type The gesture type(s) to enable.
+ */
+ void EnableGestureDetection(Gesture::Type type);
+
+ /**
+ * @brief Allows deriving classes to disable any of the gesture detectors.
+ *
+ * Like EnableGestureDetection, this can also be called using bitwise or.
+ * @param[in] type The gesture type(s) to disable.
+ * @see EnableGetureDetection
+ */
+ void DisableGestureDetection(Gesture::Type type);
+
private: // For derived classes to override
/**
protected: // Construction
/**
- * @brief Create a ControlImpl.
+ * @brief Create a Control.
*
* @param[in] requiresTouchEvents True if the OnTouchEvent() callback is required.
*/
- ControlImpl(bool requiresTouchEvents);
+ Control(bool requiresTouchEvents);
public:
// Size negotiation
/**
- * @copydoc Control::SetSizePolicy()
+ * @copydoc Toolkit::Control::SetSizePolicy()
*/
- void SetSizePolicy( Control::SizePolicy widthPolicy, Control::SizePolicy heightPolicy );
+ void SetSizePolicy( Toolkit::Control::SizePolicy widthPolicy, Toolkit::Control::SizePolicy heightPolicy );
/**
- * @copydoc Control::GetSizePolicy()
+ * @copydoc Toolkit::Control::GetSizePolicy()
*/
- void GetSizePolicy( Control::SizePolicy& widthPolicy, Control::SizePolicy& heightPolicy ) const;
+ void GetSizePolicy( Toolkit::Control::SizePolicy& widthPolicy, Toolkit::Control::SizePolicy& heightPolicy ) const;
/**
- * @copydoc Control::SetMinimumSize()
+ * @copydoc Toolkit::Control::SetMinimumSize()
*/
void SetMinimumSize( const Vector3& size );
/**
- * @copydoc Control::GetMinimumSize()
+ * @copydoc Toolkit::Control::GetMinimumSize()
*/
const Vector3& GetMinimumSize() const;
/**
- * @copydoc Control::SetMaximumSize()
+ * @copydoc Toolkit::Control::SetMaximumSize()
*/
void SetMaximumSize( const Vector3& size );
/**
- * @copydoc Control::GetMaximumSize()
+ * @copydoc Toolkit::Control::GetMaximumSize()
*/
const Vector3& GetMaximumSize() const;
/**
- * @copydoc Control::GetNaturalSize()
+ * @copydoc Toolkit::Control::GetNaturalSize()
*/
virtual Vector3 GetNaturalSize();
/**
- * @copydoc Control::GetHeightForWidth()
+ * @copydoc Toolkit::Control::GetHeightForWidth()
*/
virtual float GetHeightForWidth( float width );
/**
- * @copydoc Control::GetWidthForHeight()
+ * @copydoc Toolkit::Control::GetWidthForHeight()
*/
virtual float GetWidthForHeight( float height );
//KeyInput
/**
- * @copydoc Control::SetKeyInputFocus()
+ * @copydoc Toolkit::Control::SetKeyInputFocus()
*/
void SetKeyInputFocus();
/**
- * @copydoc Control::HasKeyInputFocus()
+ * @copydoc Toolkit::Control::HasKeyInputFocus()
*/
bool HasKeyInputFocus();
/**
- * @copydoc Control::ClearKeyInputFocus()
+ * @copydoc Toolkit::Control::ClearKeyInputFocus()
*/
void ClearKeyInputFocus();
private:
// Undefined
- ControlImpl(const ControlImpl&);
- ControlImpl& operator=(const ControlImpl&);
+ Control(const Control&);
+ Control& operator=(const Control&);
class Impl;
Impl *mImpl;
friend class Internal::KeyInputFocusManager; ///< KeyInputFocusManager needs to call which is private.
};
+} // namespace Internal
+
+typedef Internal::Control ControlImpl; ///< @deprecated, Use Internal::Control
+
} // namespace Toolkit
} // namespace Dali