X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=capi%2Fdali-toolkit%2Fpublic-api%2Fcontrols%2Fcontrol.h;h=d22f6b4072420aa88a0b7753541d04e9ed9e51cf;hb=16e2b98c54081905fa9e26e017e96672581c9f34;hp=f588a2c69d257eea562307c0289f82668f484ac9;hpb=aa19ec23c1186efea1585ed2dc19587714063e39;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/capi/dali-toolkit/public-api/controls/control.h b/capi/dali-toolkit/public-api/controls/control.h index f588a2c..d22f6b4 100644 --- a/capi/dali-toolkit/public-api/controls/control.h +++ b/capi/dali-toolkit/public-api/controls/control.h @@ -33,23 +33,41 @@ namespace Toolkit //Forward declarations. -class ControlImpl; +namespace Internal +{ +class Control; +} /** * @brief Control is the base class for all controls. * - * The implementation of the control must be supplied; see ControlImpl for more details. - * @see ControlImpl + * The implementation of the control must be supplied; see Internal::Control for more details. + * @see Internal::Control */ class Control : public CustomActor, public ConnectionTrackerInterface { public: - // Action Names - static const char* const ACTION_CONTROL_ACTIVATED; ///< name "control-activated" - - // Signal Names - static const char* const SIGNAL_KEY_EVENT; ///< name "key-event" + /// @name Properties + /** @{ */ + static const Property::Index PROPERTY_BACKGROUND_COLOR; ///< name "background-color", @see SetBackgroundColor, type VECTOR4 + static const Property::Index PROPERTY_BACKGROUND; ///< name "background", @see SetBackground, type MAP + static const Property::Index PROPERTY_WIDTH_POLICY; ///< name "width-policy", @see SetSizePolicy, type STRING + static const Property::Index PROPERTY_HEIGHT_POLICY; ///< name "height-policy", @see SetSizePolicy, type STRING + static const Property::Index PROPERTY_MINIMUM_SIZE; ///< name "minimum-size", @see SetMinimumSize, type VECTOR3 + static const Property::Index PROPERTY_MAXIMUM_SIZE; ///< name "maximum-size", @see SetMaximumSize, type VECTOR3 + static const Property::Index PROPERTY_KEY_INPUT_FOCUS; ///< name "key-input-focus", @see SetKeyInputFocus, type BOOLEAN + /** @} */ + + /// @name Signals + /** @{ */ + static const char* const SIGNAL_KEY_EVENT; ///< name "key-event" + /** @} */ + + /// @name Actions + /** @{ */ + static const char* const ACTION_CONTROL_ACTIVATED; ///< name "control-activated" + /** @} */ /** * @brief Describes how a control could be resized. @@ -150,14 +168,16 @@ public: * * @return The implementation. */ - ControlImpl& GetImplementation(); + Internal::Control& GetImplementation(); /** * @brief Retrieve the Control implementation. * * @return The implementation. */ - const ControlImpl& GetImplementation() const; + const Internal::Control& GetImplementation() const; + + // Size Negotiation /** * @brief Sets the size policies for the width and height dimensions. @@ -230,6 +250,8 @@ public: */ float GetWidthForHeight( float height ); + // Key Input + /** * @brief This sets the control to receive key events. * @@ -262,8 +284,78 @@ public: */ void ClearKeyInputFocus(); -//signals -public: + // Gesture Detection + + /** + * @brief Retrieves the pinch gesture detector of the control. + * + * @return The pinch gesture detector. + * @pre Pinch detection should have been enabled in the control. + */ + PinchGestureDetector GetPinchGestureDetector() const; + + /** + * @brief Retrieves the pan gesture detector of the control. + * + * @return The pan gesture detector. + * @pre Pan detection should have been enabled in the control. + */ + PanGestureDetector GetPanGestureDetector() const; + + /** + * @brief Retrieves the tap gesture detector of the control. + * + * @return The tap gesture detector. + * @pre Tap detection should have been enabled in the control. + */ + TapGestureDetector GetTapGestureDetector() const; + + /** + * @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. + */ + LongPressGestureDetector GetLongPressGestureDetector() const; + + // Background + + /** + * @brief Sets the background color of the control. + * + * @param[in] color The required background color of the control + */ + void SetBackgroundColor( const Vector4& color ); + + /** + * @brief Retrieves the background color of the control. + * + * @return The background color of the control. + */ + Vector4 GetBackgroundColor() const; + + /** + * @brief Sets an image as the background of the control. + * + * The color of this image is blended with the background color @see SetBackgroundColor + * + * @param[in] image The image to set as the background. + */ + void SetBackground( Image image ); + + /** + * @brief Clears the background. + */ + void ClearBackground(); + + /** + * @brief Retrieves the actor used as the background for this control. + * + * @return The actor that used as the background for this control. + */ + Actor GetBackgroundActor() const; + + // Signals /** * @brief This signal is emitted when key event is received. @@ -304,7 +396,7 @@ public: // Not intended for application developers * @param[in] implementation The implementation for this control. * @return A handle to a newly allocated Dali resource. */ - Control(ControlImpl& implementation); + Control(Internal::Control& implementation); /** * @brief This constructor is used by CustomActor within Dali core to create additional Control handles