+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 ) );
+
+ if ( textInput )
+ {
+ TextInput& textInputImpl( GetImpl( textInput ) );
+
+ switch ( propertyIndex )
+ {
+ case Toolkit::TextInput::Property::HIGHLIGHT_COLOR:
+ {
+ textInputImpl.SetMaterialDiffuseColor( value.Get< Vector4 >() );
+ break;
+ }
+ case Toolkit::TextInput::Property::CUT_AND_PASTE_COLOR:
+ {
+ textInputImpl.mPopupPanel.SetCutPastePopupColor( value.Get< Vector4 >() );
+ break;
+ }
+ case Toolkit::TextInput::Property::CUT_AND_PASTE_PRESSED_COLOR:
+ {
+ textInputImpl.mPopupPanel.SetCutPastePopupPressedColor( value.Get< Vector4 >() );
+ break;
+ }
+ case Toolkit::TextInput::Property::CUT_AND_PASTE_BORDER_COLOR:
+ {
+ textInputImpl.mPopupPanel.SetCutPastePopupBorderColor( value.Get< Vector4 >() );
+ break;
+ }
+ case Toolkit::TextInput::Property::CUT_AND_PASTE_ICON_COLOR:
+ {
+ textInputImpl.mPopupPanel.SetCutPastePopupIconColor( value.Get< Vector4 >() );
+ break;
+ }
+ case Toolkit::TextInput::Property::CUT_AND_PASTE_ICON_PRESSED_COLOR:
+ {
+ textInputImpl.mPopupPanel.SetCutPastePopupIconPressedColor( value.Get< Vector4 >() );
+ break;
+ }
+ case Toolkit::TextInput::Property::CUT_AND_PASTE_TEXT_COLOR:
+ {
+ textInputImpl.mPopupPanel.SetCutPastePopupTextColor( value.Get< Vector4 >() );
+ break;
+ }
+ case Toolkit::TextInput::Property::CUT_AND_PASTE_TEXT_PRESSED_COLOR:
+ {
+ textInputImpl.mPopupPanel.SetCutPastePopupTextPressedColor( value.Get< Vector4 >() );
+ break;
+ }
+ case Toolkit::TextInput::Property::CUT_BUTTON_POSITION_PRIORITY:
+ {
+ textInputImpl.mPopupPanel.SetButtonPriorityPosition( TextInputPopup::ButtonsCut, value.Get<unsigned int>() );
+ break;
+ }
+ case Toolkit::TextInput::Property::COPY_BUTTON_POSITION_PRIORITY:
+ {
+ textInputImpl.mPopupPanel.SetButtonPriorityPosition( TextInputPopup::ButtonsCopy, value.Get<unsigned int>() );
+ break;
+ }
+ case Toolkit::TextInput::Property::PASTE_BUTTON_POSITION_PRIORITY:
+ {
+ textInputImpl.mPopupPanel.SetButtonPriorityPosition( TextInputPopup::ButtonsPaste, value.Get<unsigned int>() );
+ break;
+ }
+ case Toolkit::TextInput::Property::SELECT_BUTTON_POSITION_PRIORITY:
+ {
+ textInputImpl.mPopupPanel.SetButtonPriorityPosition( TextInputPopup::ButtonsSelect, value.Get<unsigned int>() );
+ break;
+ }
+ case Toolkit::TextInput::Property::SELECT_ALL_BUTTON_POSITION_PRIORITY:
+ {
+ textInputImpl.mPopupPanel.SetButtonPriorityPosition( TextInputPopup::ButtonsSelectAll, value.Get<unsigned int>() );
+ break;
+ }
+ case Toolkit::TextInput::Property::CLIPBOARD_BUTTON_POSITION_PRIORITY:
+ {
+ textInputImpl.mPopupPanel.SetButtonPriorityPosition( TextInputPopup::ButtonsClipboard, value.Get<unsigned int>() );
+ break;
+ }
+ case Toolkit::TextInput::Property::POP_UP_OFFSET_FROM_TEXT:
+ {
+ textInputImpl.SetOffsetFromText( value.Get< Vector4 >() );
+ break;
+ }
+ case Toolkit::TextInput::Property::CURSOR_COLOR:
+ {
+ textInputImpl.mCursor.SetColor( value.Get< Vector4 >() );
+ break;
+ }
+ }
+ }
+}
+
+Property::Value TextInput::GetProperty( BaseObject* object, Property::Index propertyIndex )
+{
+ Property::Value value;
+
+ Toolkit::TextInput textInput = Toolkit::TextInput::DownCast( Dali::BaseHandle( object ) );
+
+ if ( textInput )
+ {
+ TextInput& textInputImpl( GetImpl( textInput ) );
+
+ switch ( propertyIndex )
+ {
+ case Toolkit::TextInput::Property::HIGHLIGHT_COLOR:
+ {
+ value = textInputImpl.GetMaterialDiffuseColor();
+ break;
+ }
+ case Toolkit::TextInput::Property::CUT_AND_PASTE_COLOR:
+ {
+ value = textInputImpl.mPopupPanel.GetCutPastePopupColor();
+ break;
+ }
+ case Toolkit::TextInput::Property::CUT_AND_PASTE_PRESSED_COLOR:
+ {
+ value = textInputImpl.mPopupPanel.GetCutPastePopupPressedColor();
+ break;
+ }
+ case Toolkit::TextInput::Property::CUT_AND_PASTE_BORDER_COLOR :
+ {
+ value = textInputImpl.mPopupPanel.GetCutPastePopupBorderColor();
+ break;
+ }
+ case Toolkit::TextInput::Property::CUT_AND_PASTE_ICON_COLOR:
+ {
+ value = textInputImpl.mPopupPanel.GetCutPastePopupIconColor();
+ break;
+ }
+ case Toolkit::TextInput::Property::CUT_AND_PASTE_ICON_PRESSED_COLOR:
+ {
+ value = textInputImpl.mPopupPanel.GetCutPastePopupIconPressedColor();
+ break;
+ }
+ case Toolkit::TextInput::Property::CUT_AND_PASTE_TEXT_COLOR:
+ {
+ value = textInputImpl.mPopupPanel.GetCutPastePopupTextColor();
+ break;
+ }
+ case Toolkit::TextInput::Property::CUT_AND_PASTE_TEXT_PRESSED_COLOR:
+ {
+ value = textInputImpl.mPopupPanel.GetCutPastePopupTextPressedColor();
+ break;
+ }
+ case Toolkit::TextInput::Property::CUT_BUTTON_POSITION_PRIORITY:
+ {
+ value = textInputImpl.mPopupPanel.GetButtonPriorityPosition( TextInputPopup::ButtonsCut );
+ break;
+ }
+ case Toolkit::TextInput::Property::COPY_BUTTON_POSITION_PRIORITY:
+ {
+ value = textInputImpl.mPopupPanel.GetButtonPriorityPosition( TextInputPopup::ButtonsCopy );
+ break;
+ }
+ case Toolkit::TextInput::Property::PASTE_BUTTON_POSITION_PRIORITY:
+ {
+ value = textInputImpl.mPopupPanel.GetButtonPriorityPosition( TextInputPopup::ButtonsPaste );
+ break;
+ }
+ case Toolkit::TextInput::Property::SELECT_BUTTON_POSITION_PRIORITY:
+ {
+ value = textInputImpl.mPopupPanel.GetButtonPriorityPosition( TextInputPopup::ButtonsSelect );
+ break;
+ }
+ case Toolkit::TextInput::Property::SELECT_ALL_BUTTON_POSITION_PRIORITY:
+ {
+ value = textInputImpl.mPopupPanel.GetButtonPriorityPosition( TextInputPopup::ButtonsSelectAll );
+ break;
+ }
+ case Toolkit::TextInput::Property::CLIPBOARD_BUTTON_POSITION_PRIORITY:
+ {
+ value = textInputImpl.mPopupPanel.GetButtonPriorityPosition( TextInputPopup::ButtonsClipboard );
+ break;
+ }
+ case Toolkit::TextInput::Property::POP_UP_OFFSET_FROM_TEXT:
+ {
+ value = textInputImpl.GetOffsetFromText();
+ break;
+ }
+ case Toolkit::TextInput::Property::CURSOR_COLOR:
+ {
+ value = textInputImpl.mCursor.GetCurrentColor();
+ }
+ }
+ }
+ return value;
+}
+