X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fcontrols%2Ftext-controls%2Ftext-selection-popup-impl.h;h=9625435db98f09087f122b83b7b3eab4403807b6;hp=4444d0ca58385e7576ddd035b0bc1ad6f21079c9;hb=b1e8521ad77e7b4e62b59613b2edef64429130e9;hpb=4469fbe38e5ce460187346003a013552a9d393a5 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 4444d0c..9625435 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) 2020 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. @@ -18,17 +18,19 @@ * */ +// EXTERNAL INCLUDES +#include +#include +#include + // INTERNAL INCLUDES #include #include -#include +#include +#include #include #include -// EXTERNAL INCLUDES -#include -#include - namespace Dali { @@ -57,7 +59,6 @@ public: priority( 0u ), name(), caption(), - icon(), enabled( false ) {} @@ -65,13 +66,11 @@ public: std::size_t buttonPriority, const std::string& buttonName, const std::string& buttonCaption, - Dali::Image& buttonIcon, bool buttonEnabled ) : id( buttonId ), priority( buttonPriority ), name( buttonName ), caption( buttonCaption ), - icon( buttonIcon ), enabled( buttonEnabled ) {} @@ -79,7 +78,6 @@ public: std::size_t priority; std::string name; std::string caption; - Dali::Image icon; bool enabled; }; @@ -143,11 +141,6 @@ private: // From Control */ virtual void OnInitialize(); - /** - * @copydoc Control::OnStageConnection() - */ - virtual void OnStageConnection( int depth ); - private: // Implementation void HideAnimationFinished( Animation& animation ); @@ -207,7 +200,7 @@ private: // Implementation * * @param[in] setting The setting from the PopupCustomisations enum */ - Size GetDimensionToCustomise( const PopupCustomisations& setting ); + Size GetDimensionToCustomise( const PopupCustomisations& setting ) const; /** * @brief Sets the image for the given button of the Popup. @@ -215,7 +208,7 @@ private: // Implementation * @param[in] button The button the image should be used for from the Buttons Enum. * @param[in] image The image to use. */ - void SetButtonImage( Toolkit::TextSelectionPopup::Buttons button, Dali::Image image ); + void SetButtonImage( Toolkit::TextSelectionPopup::Buttons button, const std::string& image ); /** * @brief Retrieves the image of the given button used by the popup @@ -223,7 +216,7 @@ private: // Implementation * @param[in] button The button to get the image from * @return The image used for that button. */ - Dali::Image GetButtonImage( Toolkit::TextSelectionPopup::Buttons button ); + const std::string& GetButtonImage( Toolkit::TextSelectionPopup::Buttons button ) const; /** * @brief Sets the image for the pressed state of a popup option. @@ -243,11 +236,18 @@ private: // Implementation void AddOption( const ButtonRequirement& button, bool showDivider, bool showIcons, bool showCaption ); - std::size_t GetNumberOfEnabledOptions(); + std::size_t GetNumberOfEnabledOptions() const; void AddPopupOptionsToToolbar( bool showIcons, bool showCaptions ); /** + * Creates the background-border image + * + * @param[in] propertyMap The properties describing the background-border + */ + void CreateBackgroundBorder( Property::Map& propertyMap ); + + /** * Construct a new TextField. */ TextSelectionPopup( TextSelectionPopupCallbackInterface* callbackInterface ); @@ -270,13 +270,13 @@ private: // Data Dali::Toolkit::TableView mTableOfButtons; // Actor which holds all the buttons, sensitivity can be set on buttons via this actor - // Images to be used by the Popup buttons - Image mCutIconImage; - Image mCopyIconImage; - Image mPasteIconImage; - Image mClipboardIconImage; - Image mSelectIconImage; - Image mSelectAllIconImage; + // Images paths to be used by the Popup buttons + std::string mCutIconImage; + std::string mCopyIconImage; + std::string mPasteIconImage; + std::string mClipboardIconImage; + std::string mSelectIconImage; + std::string mSelectAllIconImage; Size mPopupMaxSize; // Maximum size of the Popup Size mOptionMaxSize; // Maximum size of an Option button @@ -336,5 +336,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