+// Styling
+
+void TextInputPopup::SetCutPastePopUpColor( const Vector4& color )
+{
+ mCutPasteButtonsColor = color;
+}
+
+const Vector4& TextInputPopup::GetCutPastePopUpColor() const
+{
+ return mCutPasteButtonsColor;
+}
+
+void TextInputPopup::SetCutPastePopUpPressedColor( const Vector4& color )
+{
+ mCutPasteButtonsPressedColor = color;
+}
+
+const Vector4& TextInputPopup::GetCutPastePopUpPressedColor() const
+{
+ return mCutPasteButtonsPressedColor;
+}
+
+void TextInputPopup::TogglePopUpButtonOnOff( TextInputPopup::Buttons requiredButton, bool enable )
+{
+ bool match ( false );
+ for( std::vector<ButtonRequirement>::iterator it = mOrderListOfButtons.begin(), endIt = mOrderListOfButtons.end(); ( it != endIt && !match ); ++it )
+ {
+ ButtonRequirement& button( *it );
+ if ( requiredButton == button.buttonId )
+ {
+ button.enabled = enable;
+ match = true;
+ }
+ }
+}
+
+void TextInputPopup::SetButtonPriorityPosition( TextInputPopup::Buttons button, unsigned int priority )
+{
+ switch ( button )
+ {
+ case ButtonsCut:
+ {
+ mCutOptionPriority = priority;
+ break;
+ }
+ case ButtonsCopy:
+ {
+ mCopyOptionPriority = priority;
+ break;
+ }
+ case ButtonsPaste:
+ {
+ mPasteOptionPriority = priority;
+ break;
+ }
+ case ButtonsSelect:
+ {
+ mSelectOptionPriority = priority;
+ break;
+ }
+ case ButtonsSelectAll:
+ {
+ mSelectAllOptionPriority = priority;
+ break;
+ }
+ case ButtonsClipboard:
+ {
+ mClipboardOptionPriority = priority;
+ break;
+ }
+ case ButtonsEnumEnd:
+ {
+ DALI_ASSERT_DEBUG( "ButtonsEnumEnd used but an invalid choice");
+ break;
+ }
+ }
+ CreateOrderedListOfOptions(); // Update list of options as priority changed.
+}
+
+unsigned int TextInputPopup::GetButtonPriorityPosition( TextInputPopup::Buttons button ) const
+{
+ unsigned int priority = 0;
+
+ switch ( button )
+ {
+ case ButtonsCut:
+ {
+ priority = mCutOptionPriority;
+ break;
+ }
+ case ButtonsCopy:
+ {
+ priority = mCopyOptionPriority;
+ break;
+ }
+ case ButtonsPaste:
+ {
+ priority = mPasteOptionPriority;
+ break;
+ }
+ case ButtonsSelect:
+ {
+ priority = mSelectOptionPriority;
+ break;
+ }
+ case ButtonsSelectAll:
+ {
+ priority = mSelectAllOptionPriority;
+ break;
+ }
+ case ButtonsClipboard:
+ {
+ priority = mClipboardOptionPriority;
+ break;
+ }
+ case ButtonsEnumEnd:
+ {
+ DALI_ASSERT_DEBUG( "ButtonsEnumEnd used but an invalid choice");
+ break;
+ }
+ }
+
+ return priority;
+}
+
+void TextInputPopup::AddPopupOptions()
+{
+ for( std::vector<ButtonRequirement>::const_iterator it = mOrderListOfButtons.begin(), endIt = mOrderListOfButtons.end(); ( it != endIt ); ++it )
+ {
+ const ButtonRequirement& button( *it );
+ if ( button.enabled )
+ {
+ AddOption( button.name, button.caption, button.iconImage, false );
+ }
+ }
+}
+
+