X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fcontrols%2Ftext-controls%2Ftext-selection-popup-impl.h;h=a79a925c55ab99d089a64e3aca970af9cdb8c425;hb=6510379ea0355c08dfe00ad9221b8fb404418702;hp=8e0141a31e3559aa019eb0b4aef073a4f2d935dd;hpb=bc96db3d2013dbc71df9bb97ec14159c1afddb31;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/internal/controls/text-controls/text-selection-popup-impl.h b/dali-toolkit/internal/controls/text-controls/text-selection-popup-impl.h index 8e0141a..a79a925 100644 --- a/dali-toolkit/internal/controls/text-controls/text-selection-popup-impl.h +++ b/dali-toolkit/internal/controls/text-controls/text-selection-popup-impl.h @@ -1,8 +1,8 @@ -#ifndef __DALI_TOOLKIT_INTERNAL_TEXT_SELECTION_POPUP_H__ -#define __DALI_TOOLKIT_INTERNAL_TEXT_SELECTION_POPUP_H__ +#ifndef DALI_TOOLKIT_INTERNAL_TEXT_SELECTION_POPUP_H +#define DALI_TOOLKIT_INTERNAL_TEXT_SELECTION_POPUP_H /* - * Copyright (c) 2015 Samsung Electronics Co., Ltd. + * Copyright (c) 2019 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. @@ -21,13 +21,14 @@ // INTERNAL INCLUDES #include #include +#include #include #include #include // EXTERNAL INCLUDES -#include #include +#include namespace Dali { @@ -38,9 +39,6 @@ namespace Toolkit namespace Internal { -namespace -{ - enum PopupCustomisations { POPUP_MAXIMUM_SIZE, @@ -49,8 +47,6 @@ enum PopupCustomisations OPTION_DIVIDER_SIZE }; -} // namespace - class TextSelectionPopup : public Control { public: @@ -97,12 +93,10 @@ public: /** * @brief New constructor with provided buttons to enable. - * @param[in] buttonsToEnable bit mask of buttons to enable * @param[in] callbackInterface The text popup callback interface which receives the button click callbacks. * @return A handle to the TextSelectionPopup control. */ - static Toolkit::TextSelectionPopup New( Toolkit::TextSelectionPopup::Buttons buttonsToEnable, - TextSelectionPopupCallbackInterface* callbackInterface ); + static Toolkit::TextSelectionPopup New( TextSelectionPopupCallbackInterface* callbackInterface ); // Properties @@ -124,6 +118,11 @@ public: static Property::Value GetProperty( BaseObject* object, Property::Index index ); /** + * @copydoc Toolkit::EnableButtons + */ + void EnableButtons( Toolkit::TextSelectionPopup::Buttons buttonsToEnable ); + + /** * @copydoc Toolkit::TextSelectionPopup::RaiseAbove() */ void RaiseAbove( Layer target ); @@ -133,6 +132,11 @@ public: */ void ShowPopup(); + /** + * @copydoc Toolkiut::TextSelectionPopup::HidePopup() + */ + void HidePopup(); + private: // From Control /** @@ -140,13 +144,10 @@ private: // From Control */ virtual void OnInitialize(); - /** - * @copydoc Control::OnStageConnection() - */ - virtual void OnStageConnection( int depth ); - private: // Implementation + void HideAnimationFinished( Animation& animation ); + /** * @brief When the cut button is pressed. * @param[in] button the button pressed @@ -242,7 +243,12 @@ private: // Implementation void AddPopupOptionsToToolbar( bool showIcons, bool showCaptions ); - void CreatePopup(); + /** + * Creates the background-border image + * + * @param[in] propertyMap The properties describing the background-border + */ + void CreateBackgroundBorder( Property::Map& propertyMap ); /** * Construct a new TextField. @@ -275,6 +281,7 @@ private: // Data Image mSelectIconImage; Image mSelectAllIconImage; + Size mPopupMaxSize; // Maximum size of the Popup Size mOptionMaxSize; // Maximum size of an Option button Size mOptionMinSize; // Minimum size of an Option button Size mOptionDividerSize; // Size of divider line @@ -296,9 +303,13 @@ private: // Data std::size_t mCopyOptionPriority; // Position of Copy button std::size_t mPasteOptionPriority; // Position of Paste button std::size_t mClipboardOptionPriority; // Position of Clipboard button + float mFadeInDuration; // Duration of the animation to fade in the Popup + float mFadeOutDuration; // Duration of the animation to fade out the Popup bool mShowIcons:1; // Flag to show icons bool mShowCaptions:1; // Flag to show text captions + bool mPopupShowing:1; // Flag to indicate Popup showing + bool mButtonsChanged:1; // Flag to indicate the Popup Buttons have changed }; @@ -328,5 +339,5 @@ inline const Toolkit::Internal::TextSelectionPopup& GetImpl( const Toolkit::Text } // namespace Dali -#endif // __DALI_TOOLKIT_INTERNAL_TEXT_SELECTION_POPUP_H__ +#endif // DALI_TOOLKIT_INTERNAL_TEXT_SELECTION_POPUP_H