TextInput Popup border colour styling and missing offset property registration.
[platform/core/uifw/dali-toolkit.git] / base / dali-toolkit / internal / controls / text-input / text-input-impl.cpp
index 8b962fc..fe7964c 100644 (file)
@@ -44,7 +44,7 @@ const std::size_t DEFAULT_NUMBER_OF_LINES_LIMIT( std::numeric_limits<std::size_t
 const Vector3 DEFAULT_SELECTION_HANDLE_SIZE( 51.0f, 79.0f, 0.0f );  // Selection cursor image size
 const Vector3 DEFAULT_GRAB_HANDLE_RELATIVE_SIZE( 1.5f, 2.0f, 1.0f );
 const Vector3 DEFAULT_SELECTION_HANDLE_RELATIVE_SIZE( 1.5f, 1.5f, 1.0f );
-const Vector4 LIGHTBLUE( 10.0f/255.0f, 140.0f/255.0f, 210.0f/255.0f, 1.0f );    // Used for Selection highlight
+const Vector4 LIGHTBLUE( 0.07f, 0.41f, 0.59f, 1.0f );    // Used for Selection highlight
 
 const char* DEFAULT_GRAB_HANDLE( DALI_IMAGE_DIR "insertpoint-icon.png" );
 const char* DEFAULT_SELECTION_HANDLE_ONE( DALI_IMAGE_DIR "text-input-selection-handle-left.png" );
@@ -57,15 +57,15 @@ const Vector4 DEFAULT_CURSOR_IMAGE_9_BORDER( 2.0f, 2.0f, 2.0f, 2.0f );
 
 const std::size_t CURSOR_BLINK_INTERVAL = 500;                              ///< Cursor blink interval
 const float CHARACTER_THRESHOLD( 2.5f );                                    ///< the threshold of a line.
-const float DISPLAYED_HIGHLIGHT_Z_OFFSET( 0.0f );                           ///< 1. Highlight rendered (z-offset).
-const float DISPLAYED_TEXT_VIEW_Z_OFFSET( 0.1f );                           ///< 2. Text rendered (z-offset).
+const float DISPLAYED_HIGHLIGHT_Z_OFFSET( 0.1f );                           ///< 1. Highlight rendered (z-offset).
+const float DISPLAYED_TEXT_VIEW_Z_OFFSET( 0.2f );                           ///< 2. Text rendered (z-offset).
 const float UI_Z_OFFSET( 0.2f );                                            ///< 3. Text Selection Handles/Cursor z-offset.
 
 const Vector3 UI_OFFSET(0.0f, 0.0f, UI_Z_OFFSET);                           ///< Text Selection Handles/Cursor offset.
 const Vector3 DEFAULT_HANDLE_ONE_OFFSET(0.0f, -5.0f, 0.0f);                 ///< Handle One's Offset
 const Vector3 DEFAULT_HANDLE_TWO_OFFSET(0.0f, -5.0f, 0.0f);                 ///< Handle Two's Offset
-const float TOP_HANDLE_TOP_OFFSET(-1.5f);                                   ///< Offset between top handle and cutCopyPaste pop-up
-const float BOTTOM_HANDLE_BOTTOM_OFFSET(1.5f);                              ///< Offset between bottom handle and cutCopyPaste pop-up
+const float TOP_HANDLE_TOP_OFFSET( 34.0f);                                   ///< Offset between top handle and cutCopyPaste pop-up
+const float BOTTOM_HANDLE_BOTTOM_OFFSET(34.0f);                              ///< Offset between bottom handle and cutCopyPaste pop-up
 const float CURSOR_THICKNESS(6.0f);
 const Degree CURSOR_ANGLE_OFFSET(2.0f);                                     ///< Offset from the angle of italic angle.
 
@@ -200,13 +200,19 @@ namespace Toolkit
 const Property::Index TextInput::HIGHLIGHT_COLOR_PROPERTY                     = Internal::TextInput::TEXTINPUT_PROPERTY_START_INDEX;
 const Property::Index TextInput::CUT_AND_PASTE_COLOR_PROPERTY                 = Internal::TextInput::TEXTINPUT_PROPERTY_START_INDEX+1;
 const Property::Index TextInput::CUT_AND_PASTE_PRESSED_COLOR_PROPERTY         = Internal::TextInput::TEXTINPUT_PROPERTY_START_INDEX+2;
-
-const Property::Index TextInput::CUT_BUTTON_POSITION_PRIORITY_PROPERTY        = Internal::TextInput::TEXTINPUT_PROPERTY_START_INDEX+3;
-const Property::Index TextInput::COPY_BUTTON_POSITION_PRIORITY_PROPERTY       = Internal::TextInput::TEXTINPUT_PROPERTY_START_INDEX+4;
-const Property::Index TextInput::PASTE_BUTTON_POSITION_PRIORITY_PROPERTY      = Internal::TextInput::TEXTINPUT_PROPERTY_START_INDEX+5;
-const Property::Index TextInput::SELECT_BUTTON_POSITION_PRIORITY_PROPERTY     = Internal::TextInput::TEXTINPUT_PROPERTY_START_INDEX+6;
-const Property::Index TextInput::SELECT_ALL_BUTTON_POSITION_PRIORITY_PROPERTY = Internal::TextInput::TEXTINPUT_PROPERTY_START_INDEX+7;
-const Property::Index TextInput::CLIPBOARD_BUTTON_POSITION_PRIORITY_PROPERTY  = Internal::TextInput::TEXTINPUT_PROPERTY_START_INDEX+8;
+const Property::Index TextInput::CUT_AND_PASTE_BORDER_COLOR_PROPERTY          = Internal::TextInput::TEXTINPUT_PROPERTY_START_INDEX+3;
+const Property::Index TextInput::CUT_AND_PASTE_ICON_COLOR_PROPERTY            = Internal::TextInput::TEXTINPUT_PROPERTY_START_INDEX+4;
+const Property::Index TextInput::CUT_AND_PASTE_ICON_PRESSED_COLOR_PROPERTY    = Internal::TextInput::TEXTINPUT_PROPERTY_START_INDEX+5;
+const Property::Index TextInput::CUT_AND_PASTE_TEXT_COLOR_PROPERTY            = Internal::TextInput::TEXTINPUT_PROPERTY_START_INDEX+6;
+const Property::Index TextInput::CUT_AND_PASTE_TEXT_PRESSED_COLOR_PROPERTY    = Internal::TextInput::TEXTINPUT_PROPERTY_START_INDEX+7;
+const Property::Index TextInput::CUT_BUTTON_POSITION_PRIORITY_PROPERTY        = Internal::TextInput::TEXTINPUT_PROPERTY_START_INDEX+8;
+const Property::Index TextInput::COPY_BUTTON_POSITION_PRIORITY_PROPERTY       = Internal::TextInput::TEXTINPUT_PROPERTY_START_INDEX+9;
+const Property::Index TextInput::PASTE_BUTTON_POSITION_PRIORITY_PROPERTY      = Internal::TextInput::TEXTINPUT_PROPERTY_START_INDEX+10;
+const Property::Index TextInput::SELECT_BUTTON_POSITION_PRIORITY_PROPERTY     = Internal::TextInput::TEXTINPUT_PROPERTY_START_INDEX+11;
+const Property::Index TextInput::SELECT_ALL_BUTTON_POSITION_PRIORITY_PROPERTY = Internal::TextInput::TEXTINPUT_PROPERTY_START_INDEX+12;
+const Property::Index TextInput::CLIPBOARD_BUTTON_POSITION_PRIORITY_PROPERTY  = Internal::TextInput::TEXTINPUT_PROPERTY_START_INDEX+13;
+
+const Property::Index TextInput::POP_UP_OFFSET_FROM_TEXT_PROPERTY             = Internal::TextInput::TEXTINPUT_PROPERTY_START_INDEX+14;
 
 namespace Internal
 {
@@ -233,13 +239,18 @@ SignalConnectorType signalConnector6( typeRegistration, Toolkit::TextInput::SIGN
 PropertyRegistration property1( typeRegistration, "highlight-color",  Toolkit::TextInput::HIGHLIGHT_COLOR_PROPERTY, Property::VECTOR4, &TextInput::SetProperty, &TextInput::GetProperty );
 PropertyRegistration property2( typeRegistration, "cut-and-paste-bg-color",  Toolkit::TextInput::CUT_AND_PASTE_COLOR_PROPERTY, Property::VECTOR4, &TextInput::SetProperty, &TextInput::GetProperty );
 PropertyRegistration property3( typeRegistration, "cut-and-paste-pressed-color",  Toolkit::TextInput::CUT_AND_PASTE_PRESSED_COLOR_PROPERTY, Property::VECTOR4, &TextInput::SetProperty, &TextInput::GetProperty );
-PropertyRegistration property4( typeRegistration, "cut-button-position-priority",  Toolkit::TextInput::CUT_BUTTON_POSITION_PRIORITY_PROPERTY, Property::UNSIGNED_INTEGER, &TextInput::SetProperty, &TextInput::GetProperty );
-PropertyRegistration property5( typeRegistration, "copy-button-position-priority",  Toolkit::TextInput::COPY_BUTTON_POSITION_PRIORITY_PROPERTY, Property::UNSIGNED_INTEGER, &TextInput::SetProperty, &TextInput::GetProperty );
-PropertyRegistration property6( typeRegistration, "paste-button-position-priority",  Toolkit::TextInput::PASTE_BUTTON_POSITION_PRIORITY_PROPERTY, Property::UNSIGNED_INTEGER, &TextInput::SetProperty, &TextInput::GetProperty );
-PropertyRegistration property7( typeRegistration, "select-button-position-priority",  Toolkit::TextInput::SELECT_BUTTON_POSITION_PRIORITY_PROPERTY, Property::UNSIGNED_INTEGER, &TextInput::SetProperty, &TextInput::GetProperty );
-PropertyRegistration property8( typeRegistration, "select-all-button-position-priority",  Toolkit::TextInput::SELECT_ALL_BUTTON_POSITION_PRIORITY_PROPERTY, Property::UNSIGNED_INTEGER, &TextInput::SetProperty, &TextInput::GetProperty );
-PropertyRegistration property9( typeRegistration, "clipboard-button-position-priority",  Toolkit::TextInput::CLIPBOARD_BUTTON_POSITION_PRIORITY_PROPERTY, Property::UNSIGNED_INTEGER, &TextInput::SetProperty, &TextInput::GetProperty );
-
+PropertyRegistration property4( typeRegistration, "cut-and-paste-icon-color",  Toolkit::TextInput::CUT_AND_PASTE_ICON_COLOR_PROPERTY, Property::VECTOR4, &TextInput::SetProperty, &TextInput::GetProperty );
+PropertyRegistration property5( typeRegistration, "cut-and-paste-icon-pressed-color",  Toolkit::TextInput::CUT_AND_PASTE_ICON_PRESSED_COLOR_PROPERTY, Property::VECTOR4, &TextInput::SetProperty, &TextInput::GetProperty );
+PropertyRegistration property6( typeRegistration, "cut-and-paste-text-color",  Toolkit::TextInput::CUT_AND_PASTE_TEXT_COLOR_PROPERTY, Property::VECTOR4, &TextInput::SetProperty, &TextInput::GetProperty );
+PropertyRegistration property7( typeRegistration, "cut-and-paste-text-pressed-color",  Toolkit::TextInput::CUT_AND_PASTE_TEXT_PRESSED_COLOR_PROPERTY, Property::VECTOR4, &TextInput::SetProperty, &TextInput::GetProperty );
+PropertyRegistration property8( typeRegistration, "cut-and-paste-border-color",  Toolkit::TextInput::CUT_AND_PASTE_BORDER_COLOR_PROPERTY, Property::VECTOR4, &TextInput::SetProperty, &TextInput::GetProperty );
+PropertyRegistration property9( typeRegistration, "cut-button-position-priority",  Toolkit::TextInput::CUT_BUTTON_POSITION_PRIORITY_PROPERTY, Property::UNSIGNED_INTEGER, &TextInput::SetProperty, &TextInput::GetProperty );
+PropertyRegistration property10( typeRegistration, "copy-button-position-priority",  Toolkit::TextInput::COPY_BUTTON_POSITION_PRIORITY_PROPERTY, Property::UNSIGNED_INTEGER, &TextInput::SetProperty, &TextInput::GetProperty );
+PropertyRegistration property11( typeRegistration, "paste-button-position-priority",  Toolkit::TextInput::PASTE_BUTTON_POSITION_PRIORITY_PROPERTY, Property::UNSIGNED_INTEGER, &TextInput::SetProperty, &TextInput::GetProperty );
+PropertyRegistration property12( typeRegistration, "select-button-position-priority",  Toolkit::TextInput::SELECT_BUTTON_POSITION_PRIORITY_PROPERTY, Property::UNSIGNED_INTEGER, &TextInput::SetProperty, &TextInput::GetProperty );
+PropertyRegistration property13( typeRegistration, "select-all-button-position-priority",  Toolkit::TextInput::SELECT_ALL_BUTTON_POSITION_PRIORITY_PROPERTY, Property::UNSIGNED_INTEGER, &TextInput::SetProperty, &TextInput::GetProperty );
+PropertyRegistration property14( typeRegistration, "clipboard-button-position-priority",  Toolkit::TextInput::CLIPBOARD_BUTTON_POSITION_PRIORITY_PROPERTY, Property::UNSIGNED_INTEGER, &TextInput::SetProperty, &TextInput::GetProperty );
+PropertyRegistration property15( typeRegistration, "popup-offset-from-text", Toolkit::TextInput::POP_UP_OFFSET_FROM_TEXT_PROPERTY, Property::VECTOR4, &TextInput::SetProperty, &TextInput::GetProperty );
 
 // [TextInput::HighlightInfo] /////////////////////////////////////////////////
 
@@ -312,6 +323,7 @@ TextInput::TextInput()
  mBoundingRectangleWorldCoordinates( 0.0f, 0.0f, 0.0f, 0.0f ),
  mClipboard(),
  mMaterialColor( LIGHTBLUE ),
+ mPopupOffsetFromText ( Vector4( 0.0f, TOP_HANDLE_TOP_OFFSET, 0.0f, BOTTOM_HANDLE_BOTTOM_OFFSET ) ),
  mOverrideAutomaticAlignment( false ),
  mCursorRTLEnabled( false ),
  mClosestCursorPositionEOL ( false ),
@@ -782,6 +794,9 @@ void TextInput::SetBoundingRectangle( const Rect<float>& boundingRectangle )
                           originY + boundingRectangle.height );
 
   mBoundingRectangleWorldCoordinates = boundary;
+
+  // Set Boundary for Popup so it keeps the Pop-up within the area also.
+  mPopUpPanel.SetPopupBoundary( boundingRectangle );
 }
 
 const Rect<float> TextInput::GetBoundingRectangle() const
@@ -1386,7 +1401,7 @@ void TextInput::OnDoubleTap(Dali::Actor actor, Dali::TapGesture tap)
      SelectText( start, end );
    }
    // if no text but clipboard has content then show paste option
-   if ( mClipboard.NumberOfItems() || !mStyledText.empty() )
+   if ( ( mClipboard && mClipboard.NumberOfItems() ) || !mStyledText.empty() )
    {
      ShowPopupCutCopyPaste();
    }
@@ -1576,7 +1591,7 @@ void TextInput::OnLongPress(Dali::Actor actor, Dali::LongPressGesture longPress)
     }
 
     // if no text but clipboard has content then show paste option, if no text and clipboard empty then do nothing
-    if ( mClipboard.NumberOfItems() || !mStyledText.empty() )
+    if ( ( mClipboard && mClipboard.NumberOfItems() ) || !mStyledText.empty() )
     {
       ShowPopupCutCopyPaste();
     }
@@ -3697,14 +3712,10 @@ void TextInput::AddPopupOptions()
   mPopUpPanel.AddPopupOptions();
 }
 
-void TextInput::AddPopupOption(const std::string& name, const std::string& caption, const Image icon, bool finalOption)
-{
-  mPopUpPanel.AddOption(name, caption, icon, finalOption);
-}
-
 void TextInput::SetPopupPosition(const Vector3& position)
 {
   mPopUpPanel.Self().SetPosition( position );
+  mPopUpPanel.SetTailPosition( position );
 }
 
 void TextInput::HidePopup(bool animate, bool signalFinished )
@@ -3740,27 +3751,31 @@ void TextInput::ShowPopup(bool animate)
       topHandle = mSelectionHandleTwoActualPosition;
       rowSize = GetRowRectFromCharacterPosition( mSelectionHandleTwoPosition );
     }
-    topHandle.y += TOP_HANDLE_TOP_OFFSET - rowSize.height;
+    topHandle.y += -mPopupOffsetFromText.y - rowSize.height;
     position = Vector3(topHandle.x, topHandle.y, 0.0f);
 
     // bottomHandle: referring to the bottom most point of the handle or the bottom line of selection.
     Vector3 bottomHandle;
     bottomHandle.y = std::max ( mSelectionHandleTwoActualPosition.y , mSelectionHandleOneActualPosition.y );
-    bottomHandle.y += GetSelectionHandleSize().y + BOTTOM_HANDLE_BOTTOM_OFFSET;
-    mPopUpPanel.SetAlternativeOffset(Vector2(0.0f, bottomHandle.y - topHandle.y));
+    bottomHandle.y += GetSelectionHandleSize().y + mPopupOffsetFromText.w;
+    mPopUpPanel.SetAlternativeOffset(Vector2( mBoundingRectangleWorldCoordinates.x, bottomHandle.y - topHandle.y));
+
+    float xPosition = ( fabsf( topHandle.x - bottomHandle.x ) )*0.5f + std::min( topHandle.x , bottomHandle.x );
+
+    position.x = xPosition;
   }
   else
   {
     // When no text is selected, show popup at world position of grab handle or cursor
     position = GetActualPositionFromCharacterPosition( mCursorPosition );
     const Size rowSize = GetRowRectFromCharacterPosition( mCursorPosition );
-    position.y -= rowSize.height;
+    position.y -= ( mPopupOffsetFromText.y + rowSize.height );
     // if can't be positioned above, then position below row.
-    Vector2 alternativePopUpPosition( 0.0f, position.y ); // default if no grab handle
+    Vector2 alternativePopUpPosition( mBoundingRectangleWorldCoordinates.x, position.y ); // default if no grab handle
     if ( mGrabHandle )
     {
-      alternativePopUpPosition.y = rowSize.height + ( mGrabHandle.GetCurrentSize().height * DEFAULT_GRAB_HANDLE_RELATIVE_SIZE.y ) ;
       // If grab handle enabled then position pop-up below the grab handle.
+      alternativePopUpPosition.y = rowSize.height + mGrabHandle.GetCurrentSize().height + mPopupOffsetFromText.w +50.0f;
     }
     mPopUpPanel.SetAlternativeOffset( alternativePopUpPosition );
   }
@@ -3768,8 +3783,8 @@ void TextInput::ShowPopup(bool animate)
   // reposition popup above the desired cursor posiiton.
   Vector3 textViewSize = mDisplayedTextView.GetCurrentSize();
   textViewSize.z = 0.0f;
-  // World position = world position of ParentOrigin of cursor (i.e. top-left corner of TextView) + cursor position;
-  Vector3 worldPosition = mDisplayedTextView.GetCurrentWorldPosition() - (textViewSize * 0.5f) + position;
+  // World position = world position of local position i.e. top-left corner of TextView
+  Vector3 worldPosition = mDisplayedTextView.GetCurrentWorldPosition() - ( textViewSize * 0.5f ) + position;
 
   SetPopupPosition( worldPosition );
 
@@ -3798,7 +3813,7 @@ void TextInput::ShowPopupCutCopyPaste()
     mPopUpPanel.TogglePopUpButtonOnOff( TextInputPopup::ButtonsCut, true );
   }
 
-  if( mClipboard.NumberOfItems() )
+  if( mClipboard && mClipboard.NumberOfItems() )
   {
     mPopUpPanel.TogglePopUpButtonOnOff( TextInputPopup::ButtonsPaste, true );
     mPopUpPanel.TogglePopUpButtonOnOff( TextInputPopup::ButtonsClipboard, true );
@@ -3822,7 +3837,7 @@ void TextInput::SetUpPopUpSelection()
     mPopUpPanel.TogglePopUpButtonOnOff( TextInputPopup::ButtonsCut, true );
   }
   // if clipboard has valid contents then offer paste option
-  if( mClipboard.NumberOfItems() )
+  if( mClipboard && mClipboard.NumberOfItems() )
   {
     mPopUpPanel.TogglePopUpButtonOnOff( TextInputPopup::ButtonsPaste, true );
     mPopUpPanel.TogglePopUpButtonOnOff( TextInputPopup::ButtonsClipboard, true );
@@ -5137,6 +5152,16 @@ void TextInput::GetTextLayoutInfo()
   }
 }
 
+void TextInput::SetOffsetFromText( const Vector4& offset )
+{
+  mPopupOffsetFromText = offset;
+}
+
+const Vector4& TextInput::GetOffsetFromText() const
+{
+  return mPopupOffsetFromText;
+}
+
 void TextInput::SetProperty( BaseObject* object, Property::Index propertyIndex, const Property::Value& value )
 {
   Toolkit::TextInput textInput = Toolkit::TextInput::DownCast( Dali::BaseHandle( object ) );
@@ -5162,6 +5187,31 @@ void TextInput::SetProperty( BaseObject* object, Property::Index propertyIndex,
         textInputImpl.mPopUpPanel.SetCutPastePopUpPressedColor( value.Get< Vector4 >() );
         break;
       }
+      case Toolkit::TextInput::CUT_AND_PASTE_BORDER_COLOR_PROPERTY:
+      {
+        textInputImpl.mPopUpPanel.SetCutPastePopUpBorderColor( value.Get< Vector4 >() );
+        break;
+      }
+      case Toolkit::TextInput::CUT_AND_PASTE_ICON_COLOR_PROPERTY:
+      {
+        textInputImpl.mPopUpPanel.SetCutPastePopUpIconColor( value.Get< Vector4 >() );
+        break;
+      }
+      case Toolkit::TextInput::CUT_AND_PASTE_ICON_PRESSED_COLOR_PROPERTY:
+      {
+        textInputImpl.mPopUpPanel.SetCutPastePopUpIconPressedColor( value.Get< Vector4 >() );
+        break;
+      }
+      case Toolkit::TextInput::CUT_AND_PASTE_TEXT_COLOR_PROPERTY:
+      {
+        textInputImpl.mPopUpPanel.SetCutPastePopUpTextColor( value.Get< Vector4 >() );
+        break;
+      }
+      case Toolkit::TextInput::CUT_AND_PASTE_TEXT_PRESSED_COLOR_PROPERTY:
+      {
+        textInputImpl.mPopUpPanel.SetCutPastePopUpTextPressedColor( value.Get< Vector4 >() );
+        break;
+      }
       case Toolkit::TextInput::CUT_BUTTON_POSITION_PRIORITY_PROPERTY:
       {
         textInputImpl.mPopUpPanel.SetButtonPriorityPosition( TextInputPopup::ButtonsCut, value.Get<unsigned int>() );
@@ -5192,6 +5242,11 @@ void TextInput::SetProperty( BaseObject* object, Property::Index propertyIndex,
         textInputImpl.mPopUpPanel.SetButtonPriorityPosition( TextInputPopup::ButtonsClipboard, value.Get<unsigned int>() );
         break;
       }
+      case Toolkit::TextInput::POP_UP_OFFSET_FROM_TEXT_PROPERTY:
+      {
+        textInputImpl.SetOffsetFromText( value.Get< Vector4 >() );
+        break;
+      }
     }
   }
 }
@@ -5223,6 +5278,31 @@ Property::Value TextInput::GetProperty( BaseObject* object, Property::Index prop
         value = textInputImpl.mPopUpPanel.GetCutPastePopUpPressedColor();
         break;
       }
+      case Toolkit::TextInput::CUT_AND_PASTE_BORDER_COLOR_PROPERTY :
+      {
+        value = textInputImpl.mPopUpPanel.GetCutPastePopUpBorderColor();
+        break;
+      }
+      case Toolkit::TextInput::CUT_AND_PASTE_ICON_COLOR_PROPERTY:
+      {
+        value = textInputImpl.mPopUpPanel.GetCutPastePopUpIconColor();
+        break;
+      }
+      case Toolkit::TextInput::CUT_AND_PASTE_ICON_PRESSED_COLOR_PROPERTY:
+      {
+        value = textInputImpl.mPopUpPanel.GetCutPastePopUpIconPressedColor();
+        break;
+      }
+      case Toolkit::TextInput::CUT_AND_PASTE_TEXT_COLOR_PROPERTY:
+      {
+        value = textInputImpl.mPopUpPanel.GetCutPastePopUpTextColor();
+        break;
+      }
+      case Toolkit::TextInput::CUT_AND_PASTE_TEXT_PRESSED_COLOR_PROPERTY:
+      {
+        value = textInputImpl.mPopUpPanel.GetCutPastePopUpTextPressedColor();
+        break;
+      }
       case Toolkit::TextInput::CUT_BUTTON_POSITION_PRIORITY_PROPERTY:
       {
         value = textInputImpl.mPopUpPanel.GetButtonPriorityPosition( TextInputPopup::ButtonsCut );
@@ -5253,6 +5333,11 @@ Property::Value TextInput::GetProperty( BaseObject* object, Property::Index prop
         value = textInputImpl.mPopUpPanel.GetButtonPriorityPosition( TextInputPopup::ButtonsClipboard );
         break;
       }
+      case Toolkit::TextInput::POP_UP_OFFSET_FROM_TEXT_PROPERTY:
+      {
+        value = textInputImpl.GetOffsetFromText();
+        break;
+      }
     }
   }
   return value;