Add Wayland support.
[platform/core/uifw/dali-toolkit.git] / base / dali-toolkit / internal / controls / text-input / text-input-impl.h
index b9f3233..dfbb2c5 100644 (file)
@@ -26,7 +26,6 @@
 #include <dali-toolkit/internal/controls/text-input/text-input-popup-impl.h>
 
 #include <dali/public-api/common/dali-vector.h>
-#include <dali/public-api/adaptor-framework/common/imf-manager.h>
 #include <dali/public-api/geometry/mesh.h>
 
 namespace Dali
@@ -866,12 +865,11 @@ public:  // Public to allow internal testing.
   std::size_t InsertAt( const Text& newText, const std::size_t insertionPosition, const std::size_t numberOfCharactersToReplace );
 
   /**
-   * Creates a cursor from the supplied image
-   * @param[in] cursorImage the image to be used for the cursor.
-   * @param[in] border the nine patch border corresponding to the supplied image.
-   * @return the image actor to be used as the cursor.
-   */
-  ImageActor CreateCursor( Image cursorImage, const Vector4& border );
+  * Creates a cursor.
+  * @param[in] color the cursor color.
+  * @return the image actor to be used as the cursor.
+  */
+  ImageActor CreateCursor( const Vector4 &color );
 
   /**
    * Moves cursor to the right
@@ -1060,21 +1058,11 @@ public:  // Public to allow internal testing.
   void AddPopupOptions();
 
   /**
-   * Adds a popup option.
-   * @note Creates popup frame if not already created.
-   * @param[in] name The unique name for this option.
-   * @param[in] caption The caption (label) for this option
-   * @param[in] icon the image icon to be displayed for this option
-   * @param[in] finalOption Flag to indicate that this is the final option.
-   * (set to true on the last option you add)
-   */
-  void AddPopupOption(const std::string& name, const std::string& caption, const Image icon, bool finalOption = false);
-
-  /**
    * Sets popup position
    * @param[in] position The actual position for this popup.
+   * @param[in] alternativePosition Alternative popup position if no space in upper area.
    */
-  void SetPopupPosition(const Vector3& position);
+  void SetPopupPosition(const Vector3& position, const Vector2& alternativePosition );
 
   /**
    * Hides the popup
@@ -1097,7 +1085,7 @@ public:  // Public to allow internal testing.
   /**
    * Setup the selection popup and clipboard if relevant so the correct options are shown when ShowPopup is called.
    */
-  void SetUpPopUpSelection();
+  void SetUpPopupSelection();
 
   /**
    * Return the logical index containing the character position closest to the source.
@@ -1344,6 +1332,18 @@ public:  // Public to allow internal testing.
    */
   void GetTextLayoutInfo();
 
+  /**
+   * Set the offset for positioning Popup from the TextInput
+   * @param[in] offset in the order, left, top, right, bottom
+   */
+  void SetOffsetFromText( const Vector4& offset );
+
+  /**
+   * Get the offset of the Popup from the TextInput
+   * @return Vector4 with the offset in the order, left, top, right, bottom
+   */
+  const Vector4& GetOffsetFromText() const;
+
   // Properties
 
   /**
@@ -1452,7 +1452,7 @@ private:
                                                                                      ///< the text size after layout and the scroll offset.
 
   MarkupProcessor::StyledTextArray mCurrentCopySelecton;                                              ///< Array to store copied text.
-  TextInputPopup mPopUpPanel;                                                                         ///< Panel to house cut and paste, select all buttons.
+  TextInputPopup mPopupPanel;                                                                         ///< Panel to house cut and paste, select all buttons.
 
   Timer mScrollTimer;
   Vector2 mScrollDisplacement;
@@ -1463,10 +1463,11 @@ private:
   Vector4 mSelectionHandleFlipMargin;
   Vector4 mBoundingRectangleWorldCoordinates;
 
-  Clipboard mClipboard;                  ///< Handle to clipboard
+  Clipboard mClipboard;                   ///< Handle to clipboard
 
   // Styling
-  Vector4           mMaterialColor;      // Color of the highlight
+  Vector4           mMaterialColor;       // Color of the highlight
+  Vector4           mPopupOffsetFromText; // Offset of Popup from the TextInput.
 
   bool mOverrideAutomaticAlignment:1;    ///< Whether to override the alignment automatically set by the text content (e.g. european LTR or arabic RTL)
   bool mCursorRTLEnabled:1;              ///< Enable state of Alternate RTL Cursor (need to keep track of this as it's not always enabled)