X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Fdevel-api%2Fcontrols%2Ftext-controls%2Ftext-selection-popup.h;h=5201c08f1bd8977d60bd2a31d2e4244a0562042b;hb=50550b5dd051c5baebd26365991b50f155031dc8;hp=2243f2d92d14a67231c1445f7e1083168efc12a2;hpb=c3f7ea6cb0c0b75c2276193aff88b5c7a679a2d5;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 2243f2d..5201c08 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 @@ -27,6 +27,8 @@ namespace Dali namespace Toolkit { +class TextSelectionPopupCallbackInterface; + namespace Internal DALI_INTERNAL { class TextSelectionPopup; @@ -46,6 +48,17 @@ class DALI_IMPORT_API TextSelectionPopup : public Control { public: + enum Buttons + { + CUT = 1u << 0, + COPY = 1u << 1, + PASTE = 1u << 2, + SELECT = 1u << 3, + SELECT_ALL = 1u << 4, + CLIPBOARD = 1u << 5, + NONE = 1u << 6, + }; + /** * @brief The start and end property ranges for this control. */ @@ -56,29 +69,38 @@ public: }; /** - * @brief An enumeration of properties belonging to the TextLabel class. + * @brief An enumeration of properties belonging to the TextSelectionPopup class. */ struct Property { enum { - - POPUP_MAX_SIZE, ///< name "popup-max-size", The max size the Popup can be, type VECTOR2 - POPUP_BACKGROUND_IMAGE, ///< name "popup-background-image", The image to display for popup background type STRING - POPUP_CLIPBOARD_BUTTON_ICON_IMAGE, ///< name "popup-clipboard-button-image", The image to use as the popup clipboard icon, type STRING - POPUP_CUT_BUTTON_ICON_IMAGE, ///< name "popup-cut-button-image", The image to use as the popup cut icon, type STRING - POPUP_COPY_BUTTON_ICON_IMAGE, ///< name "popup-copy-button-image", The image to use as the popup copy icon, type STRING - POPUP_PASTE_BUTTON_ICON_IMAGE, ///< name "popup-paste-button-image", The image to use as the popup paste icon, type STRING - POPUP_SELECT_BUTTON_ICON_IMAGE, ///< name "popup-select-button-image", The image to use as the popup select icon, type STRING - POPUP_SELECT_ALL_BUTTON_ICON_IMAGE, ///< name "popup-select-all-button-image", The image to use as the popup select all icon, type STRING + POPUP_MAX_SIZE = PROPERTY_START_INDEX, ///< name "popupMaxSize", maximum size the Popup can be, type VECTOR2 + POPUP_MIN_SIZE, ///< name "popupMinSize", minimum size the Popup can be, type VECTOR2 + OPTION_MAX_SIZE, ///< name "optionMaxSize", maximum size an option can be, type VECTOR2 + OPTION_MIN_SIZE, ///< name "optionMinSize", minimum size an option can be, type VECTOR2 + OPTION_DIVIDER_SIZE, ///< name "optionDividerSize", size of the divider between options type VECTOR2 + POPUP_CLIPBOARD_BUTTON_ICON_IMAGE, ///< name "popupClipboardButtonImage", The image to use as the popup clipboard icon, type STRING + POPUP_CUT_BUTTON_ICON_IMAGE, ///< name "popupCutButtonImage", The image to use as the popup cut icon, type STRING + POPUP_COPY_BUTTON_ICON_IMAGE, ///< name "popupCopyButtonImage", The image to use as the popup copy icon, type STRING + POPUP_PASTE_BUTTON_ICON_IMAGE, ///< name "popupPasteButtonImage", The image to use as the popup paste icon, type STRING + POPUP_SELECT_BUTTON_ICON_IMAGE, ///< name "popupSelectButtonImage", The image to use as the popup select icon, type STRING + POPUP_SELECT_ALL_BUTTON_ICON_IMAGE, ///< name "popupSelectAllButtonImage", The image to use as the popup select all icon, type STRING + POPUP_DIVIDER_COLOR, ///< name "popupDividerColor", The color of the divider between options, type VECTOR4 + POPUP_ICON_COLOR, ///< name "popupIconColor", The color of the icons (if supplied), type VECTOR4 + POPUP_PRESSED_COLOR, ///< name "popupPressedColor", The color of the option when pressed, type VECTOR4 + POPUP_PRESSED_IMAGE, ///< name "popupPressedImage", The image to use for the option when pressed, type STRING + POPUP_FADE_IN_DURATION, ///< name "popupFadeInDuration", The duration of the fade-in animation, type FLOAT + POPUP_FADE_OUT_DURATION, ///< name "popupFadeOutDuration", The duration of the fade-out animation, type FLOAT }; }; /** * Create the TextSelectionPopup control. + * @param[in] callbackInterface The text popup callback interface which receives the button click callbacks. * @return A handle to the TextSelectionPopup control. */ - static TextSelectionPopup New(); + static TextSelectionPopup New( TextSelectionPopupCallbackInterface* callbackInterface ); /** * @brief Creates an empty handle. @@ -118,6 +140,29 @@ public: */ 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 ); + + /** + * @brief Raises the toolbar's layer above the given @e target layer. + * + * @param[in] target The layer to get above of. + */ + void RaiseAbove( Layer target ); + + /** + * @brief Show the Popup if not being shown + */ + void ShowPopup(); + + /** + * @brief Hide the Popup if shown + */ + void HidePopup(); + public: // Not intended for application developers /** @@ -138,6 +183,6 @@ public: // Not intended for application developers } // namespace Toolkit -} // namepsace Dali +} // namespace Dali #endif // __DALI_TOOLKIT_TEXT_SELECTION_POPUP_H__