#define __DALI_TOOLKIT_INTERNAL_TEXT_SELECTION_POPUP_H__
/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 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.
// INTERNAL INCLUDES
#include <dali-toolkit/public-api/controls/control-impl.h>
#include <dali-toolkit/public-api/controls/buttons/push-button.h>
+#include <dali-toolkit/public-api/controls/image-view/image-view.h>
#include <dali-toolkit/public-api/controls/table-view/table-view.h>
#include <dali-toolkit/devel-api/controls/text-controls/text-selection-popup.h>
#include <dali-toolkit/devel-api/controls/text-controls/text-selection-toolbar.h>
// EXTERNAL INCLUDES
-#include <dali/public-api/actors/image-actor.h>
#include <dali/public-api/actors/layer.h>
+#include <dali/public-api/object/property-map.h>
namespace Dali
{
namespace Internal
{
-namespace
-{
-
enum PopupCustomisations
{
POPUP_MAXIMUM_SIZE,
OPTION_DIVIDER_SIZE
};
-} // namespace
-
class TextSelectionPopup : public Control
{
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
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 );
*/
void ShowPopup();
+ /**
+ * @copydoc Toolkiut::TextSelectionPopup::HidePopup()
+ */
+ void HidePopup();
+
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
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.
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
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
};