X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Fdevel-api%2Fcontrols%2Ftext-controls%2Ftext-selection-popup.h;h=720b37cad70bc011e96a5692088b129a27df832e;hb=HEAD;hp=31cf93926b8923923f5d4fa33609f4c2d3021485;hpb=2605550b3ac430c2849ba72ec3f4872009d66eea;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/devel-api/controls/text-controls/text-selection-popup.h b/dali-toolkit/devel-api/controls/text-controls/text-selection-popup.h index 31cf939..720b37c 100644 --- a/dali-toolkit/devel-api/controls/text-controls/text-selection-popup.h +++ b/dali-toolkit/devel-api/controls/text-controls/text-selection-popup.h @@ -1,8 +1,8 @@ -#ifndef __DALI_TOOLKIT_TEXT_SELECTION_POPUP_H__ -#define __DALI_TOOLKIT_TEXT_SELECTION_POPUP_H__ +#ifndef DALI_TOOLKIT_TEXT_SELECTION_POPUP_H +#define DALI_TOOLKIT_TEXT_SELECTION_POPUP_H /* - * Copyright (c) 2015 Samsung Electronics Co., Ltd. + * Copyright (c) 2022 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,13 +20,12 @@ // INTERNAL INCLUDES #include +#include namespace Dali { - namespace Toolkit { - class TextSelectionPopupCallbackInterface; namespace Internal DALI_INTERNAL @@ -44,19 +43,18 @@ class TextSelectionPopup; * * */ -class DALI_IMPORT_API TextSelectionPopup : public Control +class DALI_TOOLKIT_API TextSelectionPopup : public Control { public: - enum Buttons { - CUT = 1u << 0, - COPY = 1u << 1, - PASTE = 1u << 2, - SELECT = 1u << 3, + CUT = 1u << 0, + COPY = 1u << 1, + PASTE = 1u << 2, + SELECT = 1u << 3, SELECT_ALL = 1u << 4, - CLIPBOARD = 1u << 5, - NONE = 1u << 6, + CLIPBOARD = 1u << 5, + NONE = 1u << 6, }; /** @@ -65,7 +63,7 @@ public: enum PropertyRange { PROPERTY_START_INDEX = Control::CONTROL_PROPERTY_END_INDEX + 1, - PROPERTY_END_INDEX = PROPERTY_START_INDEX + 1000 ///< Reserve property indices + PROPERTY_END_INDEX = PROPERTY_START_INDEX + 1000 ///< Reserve property indices }; /** @@ -79,7 +77,7 @@ public: * @brief The maximum size the Popup can be. * @details Name "popupMaxSize", type Vector2. */ - POPUP_MAX_SIZE = PROPERTY_START_INDEX, + POPUP_MAX_SIZE = PROPERTY_START_INDEX, /** * @brief The minimum size the Popup can be. @@ -106,6 +104,12 @@ public: OPTION_DIVIDER_SIZE, /** + * @brief The padding of the divider between options. + * @details Name "optionDividerPadding", type Vector4. + */ + OPTION_DIVIDER_PADDING, + + /** * @brief The image to use as the popup clipboard icon. * @details Name "popupClipboardButtonImage", type string. */ @@ -160,6 +164,12 @@ public: POPUP_PRESSED_COLOR, /** + * @brief The corner radius of the option when pressed. + * @details Name "popupPressedCornerRadius", type float. + */ + POPUP_PRESSED_CORNER_RADIUS, + + /** * @brief The image to use for the option when pressed. * @details Name "popupPressedImage", type string. */ @@ -182,7 +192,42 @@ public: * @details Name "backgroundBorder", type Property::Map. * @note Optional. */ - BACKGROUND_BORDER + BACKGROUND_BORDER, + + /** + * @brief The popup background. + * @details Name "background", type Property::Map. + * @note Optional. + */ + BACKGROUND, + + /** + * @brief The minimum size of popup label. + * @details Name "labelMinimumSize", type Vector2. + * @note Optional. + */ + LABEL_MINIMUM_SIZE, + + /** + * @brief The padding of popup label. + * @details Name "labelPadding", type Vector4. + * @note Optional. + */ + LABEL_PADDING, + + /** + * @brief The text visual map of popup label. + * @details Name "labelTextVisual", type Property::Map. + * @note Optional. + */ + LABEL_TEXT_VISUAL, + + /** + * @brief Whether the scroll-bar is enabled. + * @details Name "enableScrollBar", type Property::BOOLEAN. + * @note Optional. + */ + ENABLE_SCROLL_BAR }; }; @@ -191,7 +236,7 @@ public: * @param[in] callbackInterface The text popup callback interface which receives the button click callbacks. * @return A handle to the TextSelectionPopup control. */ - static TextSelectionPopup New( TextSelectionPopupCallbackInterface* callbackInterface ); + static TextSelectionPopup New(TextSelectionPopupCallbackInterface* callbackInterface); /** * @brief Creates an empty handle. @@ -203,7 +248,7 @@ public: * * @param[in] handle The handle to copy from. */ - TextSelectionPopup( const TextSelectionPopup& handle ); + TextSelectionPopup(const TextSelectionPopup& handle); /** * @brief Assignment operator. @@ -211,7 +256,22 @@ public: * @param[in] handle The handle to copy from. * @return A reference to this. */ - TextSelectionPopup& operator=( const TextSelectionPopup& handle ); + TextSelectionPopup& operator=(const TextSelectionPopup& handle); + + /** + * @brief Move constructor. + * + * @param[in] handle The handle to move from. + */ + TextSelectionPopup(TextSelectionPopup&& handle); + + /** + * @brief Move assignment operator. + * + * @param[in] handle The handle to move from. + * @return A reference to this. + */ + TextSelectionPopup& operator=(TextSelectionPopup&& handle); /** * @brief Destructor @@ -229,20 +289,20 @@ public: * @param[in] handle Handle to an object * @return handle to a TextSelectionPopup or an empty handle */ - static TextSelectionPopup DownCast( BaseHandle handle ); + static TextSelectionPopup DownCast(BaseHandle handle); /** * @brief Specify which buttons to show in Popup * @param[in] buttonsToEnable Buttons to enable */ - void EnableButtons( Toolkit::TextSelectionPopup::Buttons buttonsToEnable ); + void EnableButtons(Toolkit::TextSelectionPopup::Buttons buttonsToEnable); /** - * @brief Raises the toolbar's layer above the given @e target layer. + * @brief Raises the toolbar's actor above the given @e target actor. * - * @param[in] target The layer to get above of. + * @param[in] target The actor to get above of. */ - void RaiseAbove( Layer target ); + void RaiseAbove(Actor target); /** * @brief Show the Popup if not being shown @@ -254,21 +314,34 @@ public: */ void HidePopup(); -public: // Not intended for application developers + /** + * @brief Used to set options of text selection popup + * + * @param[in] properties The text selection popup options + */ + void SetProperties(const Dali::Property::Map& properties); /** + * @brief Retrieve property map of text selection popup options + * + * @param[out] properties The text selection popup options + */ + void GetProperties(Dali::Property::Map& properties); + +public: // Not intended for application developers + /** * @brief Creates a handle using the Toolkit::Internal implementation. * * @param[in] implementation The Control implementation. */ - DALI_INTERNAL TextSelectionPopup( Internal::TextSelectionPopup& implementation ); + DALI_INTERNAL TextSelectionPopup(Internal::TextSelectionPopup& implementation); /** * @brief Allows the creation of this Control from an Internal::CustomActor pointer. * * @param[in] internal A pointer to the internal CustomActor. */ - explicit DALI_INTERNAL TextSelectionPopup( Dali::Internal::CustomActor* internal ); + explicit DALI_INTERNAL TextSelectionPopup(Dali::Internal::CustomActor* internal); }; // Class TextSelectionPopup @@ -276,4 +349,4 @@ public: // Not intended for application developers } // namespace Dali -#endif // __DALI_TOOLKIT_TEXT_SELECTION_POPUP_H__ +#endif // DALI_TOOLKIT_TEXT_SELECTION_POPUP_H