X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fcontrols%2Ftext-controls%2Ftext-selection-popup-impl.h;h=3bb8b7113d4c80ae19bcdd662ce56ec4b8ca5b1d;hb=5419ef62a5e3ee36785444083e914804268ea488;hp=3650977ab344bc8a22354578687e497d70f7e129;hpb=a8f695318919be238c1cf3c94add9567abd82351;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 3650977..3bb8b71 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 @@ -97,16 +97,13 @@ public: }; /** - * @copydoc Dali::Toollkit::TextSelectionPopup::New() - */ - static Toolkit::TextSelectionPopup New(); - - /** * @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 ); + static Toolkit::TextSelectionPopup New( Toolkit::TextSelectionPopup::Buttons buttonsToEnable, + TextSelectionPopupCallbackInterface* callbackInterface ); // Properties @@ -127,6 +124,11 @@ public: */ static Property::Value GetProperty( BaseObject* object, Property::Index index ); + /** + * @copydoc Toolkit::TextSelectionPopup::RaiseAbove() + */ + void RaiseAbove( Layer target ); + private: // From Control /** @@ -134,14 +136,54 @@ private: // From Control */ virtual void OnInitialize(); + /** + * @copydoc Control::OnStageConnection() + */ + virtual void OnStageConnection( int depth ); + private: // Implementation /** - * @brief When a popup button is pressed + * @brief When the cut button is pressed. + * @param[in] button the button pressed + * @return @e true to consume the event. + */ + bool OnCutButtonPressed( Toolkit::Button button ); + + /** + * @brief When the copy button is pressed. + * @param[in] button the button pressed + * @return @e true to consume the event. + */ + bool OnCopyButtonPressed( Toolkit::Button button ); + + /** + * @brief When the paste button is pressed. + * @param[in] button the button pressed + * @return @e true to consume the event. + */ + bool OnPasteButtonPressed( Toolkit::Button button ); + + /** + * @brief When the select button is pressed. + * @param[in] button the button pressed + * @return @e true to consume the event. + */ + bool OnSelectButtonPressed( Toolkit::Button button ); + + /** + * @brief When the select all button is pressed. + * @param[in] button the button pressed + * @return @e true to consume the event. + */ + bool OnSelectAllButtonPressed( Toolkit::Button button ); + + /** + * @brief When the clipboard button is pressed. * @param[in] button the button pressed - * @return bool + * @return @e true to consume the event. */ - bool OnButtonPressed( Toolkit::Button button ); + bool OnClipboardButtonPressed( Toolkit::Button button ); /** * @brief Method to set the dimension or dimension constraint on certain aspects of the Popup. @@ -176,7 +218,7 @@ private: // Implementation void CreateOrderedListOfPopupOptions(); - void AddOption( const std::string& name, const std::string& caption, const Image iconImage, bool showDivider, bool showIcons, bool showCaption ); + void AddOption( const ButtonRequirement& button, bool showDivider, bool showIcons, bool showCaption ); std::size_t GetNumberOfEnabledOptions(); @@ -187,7 +229,7 @@ private: // Implementation /** * Construct a new TextField. */ - TextSelectionPopup(); + TextSelectionPopup( TextSelectionPopupCallbackInterface* callbackInterface ); /** * A reference counted object may only be deleted by calling Unreference() @@ -225,10 +267,11 @@ private: // Data std::vector mOrderListOfButtons; // List of buttons in the order to be displayed and a flag to indicate if needed. Toolkit::TextSelectionPopup::Buttons mEnabledButtons; // stores enabled buttons + Toolkit::TextSelectionPopupCallbackInterface* mCallbackInterface; - Vector4 mLineColor; // Color of the line around the text input popup + Vector4 mDividerColor; // Color of the divider between buttons Vector4 mIconColor; // Color of the popup icon. - Vector4 mIconPressedColor; // Color of the popup icon when pressed. + Vector4 mPressedColor; // Color of the popup option when pressed. // Priority of Options/Buttons in the Cut and Paste pop-up, higher priority buttons are displayed first, left to right. std::size_t mSelectOptionPriority; // Position of Select Button