[problem] Popup button order, colour of background, colour of pressed buttons and highlight predefined in internal code
[solution] Dali Properties now represent the above settings so can be defined in a JSON file or via the Public API.
Change-Id: Ia33d63d95cfdcbfb095a31c1cf514368f2683814
#include <math.h>
#include <sstream>
#include <algorithm>
-#include <libintl.h>
-
-#define GET_LOCALE_TEXT(string) dgettext("sys_string", string)
using namespace std;
using namespace Dali;
const char* DEFAULT_SELECTION_HANDLE_TWO_PRESSED( DALI_IMAGE_DIR "text-input-selection-handle-right-press.png" );
const char* DEFAULT_CURSOR( DALI_IMAGE_DIR "cursor.png" );
-const char* DEFAULT_ICON_CLIPBOARD( DALI_IMAGE_DIR "copy_paste_icon_clipboard.png" );
-const char* DEFAULT_ICON_COPY( DALI_IMAGE_DIR "copy_paste_icon_copy.png" );
-const char* DEFAULT_ICON_CUT( DALI_IMAGE_DIR "copy_paste_icon_cut.png" );
-const char* DEFAULT_ICON_PASTE( DALI_IMAGE_DIR "copy_paste_icon_paste.png" );
-const char* DEFAULT_ICON_SELECT( DALI_IMAGE_DIR "copy_paste_icon_select.png" );
-const char* DEFAULT_ICON_SELECT_ALL( DALI_IMAGE_DIR "copy_paste_icon_select_all.png" );
-
const Vector4 DEFAULT_CURSOR_IMAGE_9_BORDER( 2.0f, 2.0f, 2.0f, 2.0f );
-const std::string OPTION_SELECT_WORD("select_word"); ///< "Select Word" popup option.
-const std::string OPTION_SELECT_ALL("select_all"); ///< "Select All" popup option.
-const std::string OPTION_CUT("cut"); ///< "Cut" popup option.
-const std::string OPTION_COPY("copy"); ///< "Copy" popup option.
-const std::string OPTION_PASTE("paste"); ///< "Paste" popup option.
-const std::string OPTION_CLIPBOARD("clipboard"); ///< "Clipboard" popup option.
-
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 SCROLL_SPEED = 15.f;
/**
+ * Selection state enumeration (FSM)
+ */
+enum SelectionState
+{
+ SelectionNone, ///< Currently not encountered selected section.
+ SelectionStarted, ///< Encountered selected section
+ SelectionFinished ///< Finished selected section
+};
+
+/**
* Whether the given style is the default style or not.
* @param[in] style The given style.
* @return \e true if the given style is the default. Otherwise it returns \e false.
return true;
}
-/**
- * Selection state enumeration (FSM)
- */
-enum SelectionState
-{
- SelectionNone, ///< Currently not encountered selected section.
- SelectionStarted, ///< Encountered selected section
- SelectionFinished ///< Finished selected section
-};
-
std::size_t FindVisibleCharacterLeft( std::size_t cursorPosition, const Toolkit::TextView::CharacterLayoutInfoContainer& characterLayoutInfoTable )
{
for( Toolkit::TextView::CharacterLayoutInfoContainer::const_reverse_iterator it = characterLayoutInfoTable.rbegin() + characterLayoutInfoTable.size() - cursorPosition, endIt = characterLayoutInfoTable.rend();
namespace Toolkit
{
+// Properties
+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;
namespace Internal
{
}
+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 );
+
+
// [TextInput::HighlightInfo] /////////////////////////////////////////////////
void TextInput::HighlightInfo::AddQuad( float x1, float y1, float x2, float y2 )
mTouchStartTime( 0 ),
mTextLayoutInfo(),
mCurrentCopySelecton(),
+ mPopUpPanel(),
mScrollTimer(),
mScrollDisplacement(),
mCurrentHandlePosition(),
mSelectionHandleFlipMargin( 0.0f, 0.0f, 0.0f, 0.0f ),
mBoundingRectangleWorldCoordinates( 0.0f, 0.0f, 0.0f, 0.0f ),
mClipboard(),
+ mMaterialColor( LIGHTBLUE ),
mOverrideAutomaticAlignment( false ),
mCursorRTLEnabled( false ),
mClosestCursorPositionEOL ( false ),
return mStyledText.size();
}
+// Styling
+void TextInput::SetMaterialDiffuseColor( const Vector4& color )
+{
+ mMaterialColor = color;
+ if ( mCustomMaterial )
+ {
+ mCustomMaterial.SetDiffuseColor( mMaterialColor );
+ mMeshData.SetMaterial( mCustomMaterial );
+ }
+}
+
+const Vector4& TextInput::GetMaterialDiffuseColor() const
+{
+ return mMaterialColor;
+}
+
+// Signals
+
Toolkit::TextInput::InputSignalV2& TextInput::InputStartedSignal()
{
return mInputStartedSignalV2;
const std::string& name = button.GetName();
- if(name == OPTION_SELECT_WORD)
+ if(name == TextInputPopup::OPTION_SELECT_WORD)
{
std::size_t start = 0;
std::size_t end = 0;
SelectText( start, end );
}
- else if(name == OPTION_SELECT_ALL)
+ else if(name == TextInputPopup::OPTION_SELECT_ALL)
{
SetCursorVisibility(false);
StopCursorBlinkTimer();
SelectText( start, end );
}
- else if(name == OPTION_CUT)
+ else if(name == TextInputPopup::OPTION_CUT)
{
bool ret = CopySelectedTextToClipboard();
HidePopup();
}
- else if(name == OPTION_COPY)
+ else if(name == TextInputPopup::OPTION_COPY)
{
CopySelectedTextToClipboard();
HidePopup();
}
- else if(name == OPTION_PASTE)
+ else if(name == TextInputPopup::OPTION_PASTE)
{
const Text retrievedString( mClipboard.GetItem( 0 ) ); // currently can only get first item in clip board, index 0;
HidePopup();
}
- else if(name == OPTION_CLIPBOARD)
+ else if(name == TextInputPopup::OPTION_CLIPBOARD)
{
// In the case of clipboard being shown we do not want to show updated pop-up after hide animation completes
// Hence pass the false parameter for signalFinished.
mPopUpPanel.Clear();
}
+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::ShowPopupCutCopyPaste()
{
ClearPopup();
+
+ mPopUpPanel.CreateOrderedListOfOptions(); // todo Move this so only run when order has changed
// Check the selected text is whole text or not.
if( IsTextSelected() && ( mStyledText.size() != GetSelectedText().size() ) )
{
- Image selectAllIcon = Image::New( DEFAULT_ICON_SELECT_ALL );
- AddPopupOption( OPTION_SELECT_ALL, GET_LOCALE_TEXT("IDS_COM_BODY_SELECT_ALL"), selectAllIcon );
+ mPopUpPanel.TogglePopUpButtonOnOff( TextInputPopup::ButtonsSelectAll, true );
}
if ( !mStyledText.empty() )
{
- Image cutIcon = Image::New( DEFAULT_ICON_CUT );
- Image copyIcon = Image::New( DEFAULT_ICON_COPY );
- AddPopupOption( OPTION_CUT, GET_LOCALE_TEXT("IDS_COM_BODY_CUT"), cutIcon );
- AddPopupOption( OPTION_COPY, GET_LOCALE_TEXT("IDS_COM_BODY_COPY"), copyIcon, true );
+
+ mPopUpPanel.TogglePopUpButtonOnOff( TextInputPopup::ButtonsCopy, true );
+ mPopUpPanel.TogglePopUpButtonOnOff( TextInputPopup::ButtonsCut, true );
}
- if(mClipboard.NumberOfItems())
+ if( mClipboard.NumberOfItems() )
{
- Image pasteIcon = Image::New( DEFAULT_ICON_PASTE );
- Image clipboardIcon = Image::New( DEFAULT_ICON_CLIPBOARD );
- AddPopupOption( OPTION_PASTE, GET_LOCALE_TEXT("IDS_COM_BODY_PASTE"), pasteIcon );
- AddPopupOption( OPTION_CLIPBOARD, GET_LOCALE_TEXT("IDS_COM_BODY_CLIPBOARD"), clipboardIcon, true );
+ mPopUpPanel.TogglePopUpButtonOnOff( TextInputPopup::ButtonsPaste, true );
+ mPopUpPanel.TogglePopUpButtonOnOff( TextInputPopup::ButtonsClipboard, true );
}
+ AddPopupOptions();
+
mPopUpPanel.Hide(false);
ShowPopup();
}
void TextInput::SetUpPopUpSelection()
{
ClearPopup();
-
+ mPopUpPanel.CreateOrderedListOfOptions(); // todo Move this so only run when order has changed
// If no text exists then don't offer to select
if ( !mStyledText.empty() )
{
- Image selectIcon = Image::New( DEFAULT_ICON_SELECT );
- Image selectAllIcon = Image::New( DEFAULT_ICON_SELECT_ALL );
- AddPopupOption( OPTION_SELECT_WORD, GET_LOCALE_TEXT("IDS_COM_SK_SELECT"), selectIcon );
- AddPopupOption( OPTION_SELECT_ALL, GET_LOCALE_TEXT("IDS_COM_BODY_SELECT_ALL"), selectAllIcon );
+ mPopUpPanel.TogglePopUpButtonOnOff( TextInputPopup::ButtonsSelectAll, true );
+ mPopUpPanel.TogglePopUpButtonOnOff( TextInputPopup::ButtonsSelect, true );
+ mPopUpPanel.TogglePopUpButtonOnOff( TextInputPopup::ButtonsCut, true );
}
// if clipboard has valid contents then offer paste option
if( mClipboard.NumberOfItems() )
{
- Image pasteIcon = Image::New( DEFAULT_ICON_PASTE );
- Image clipboardIcon = Image::New( DEFAULT_ICON_CLIPBOARD );
- AddPopupOption( OPTION_PASTE, GET_LOCALE_TEXT("IDS_COM_BODY_PASTE"), pasteIcon, true );
- AddPopupOption( OPTION_CLIPBOARD, GET_LOCALE_TEXT("IDS_COM_BODY_CLIPBOARD"), clipboardIcon, true );
+ mPopUpPanel.TogglePopUpButtonOnOff( TextInputPopup::ButtonsPaste, true );
+ mPopUpPanel.TogglePopUpButtonOnOff( TextInputPopup::ButtonsClipboard, true );
}
+ AddPopupOptions();
+
mPopUpPanel.Hide(false);
}
mMeshData.SetHasNormals( true );
mCustomMaterial = Material::New("CustomMaterial");
- mCustomMaterial.SetDiffuseColor( LIGHTBLUE );
+ mCustomMaterial.SetDiffuseColor( mMaterialColor );
mMeshData.SetMaterial( mCustomMaterial );
}
}
+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::HIGHLIGHT_COLOR_PROPERTY:
+ {
+ textInputImpl.SetMaterialDiffuseColor( value.Get< Vector4 >() );
+ break;
+ }
+ case Toolkit::TextInput::CUT_AND_PASTE_COLOR_PROPERTY:
+ {
+ textInputImpl.mPopUpPanel.SetCutPastePopUpColor( value.Get< Vector4 >() );
+ break;
+ }
+ case Toolkit::TextInput::CUT_AND_PASTE_PRESSED_COLOR_PROPERTY:
+ {
+ textInputImpl.mPopUpPanel.SetCutPastePopUpPressedColor( value.Get< Vector4 >() );
+ break;
+ }
+ case Toolkit::TextInput::CUT_BUTTON_POSITION_PRIORITY_PROPERTY:
+ {
+ textInputImpl.mPopUpPanel.SetButtonPriorityPosition( TextInputPopup::ButtonsCut, value.Get<unsigned int>() );
+ break;
+ }
+ case Toolkit::TextInput::COPY_BUTTON_POSITION_PRIORITY_PROPERTY:
+ {
+ textInputImpl.mPopUpPanel.SetButtonPriorityPosition( TextInputPopup::ButtonsCopy, value.Get<unsigned int>() );
+ break;
+ }
+ case Toolkit::TextInput::PASTE_BUTTON_POSITION_PRIORITY_PROPERTY:
+ {
+ textInputImpl.mPopUpPanel.SetButtonPriorityPosition( TextInputPopup::ButtonsPaste, value.Get<unsigned int>() );
+ break;
+ }
+ case Toolkit::TextInput::SELECT_BUTTON_POSITION_PRIORITY_PROPERTY:
+ {
+ textInputImpl.mPopUpPanel.SetButtonPriorityPosition( TextInputPopup::ButtonsSelect, value.Get<unsigned int>() );
+ break;
+ }
+ case Toolkit::TextInput::SELECT_ALL_BUTTON_POSITION_PRIORITY_PROPERTY:
+ {
+ textInputImpl.mPopUpPanel.SetButtonPriorityPosition( TextInputPopup::ButtonsSelectAll, value.Get<unsigned int>() );
+ break;
+ }
+ case Toolkit::TextInput::CLIPBOARD_BUTTON_POSITION_PRIORITY_PROPERTY:
+ {
+ textInputImpl.mPopUpPanel.SetButtonPriorityPosition( TextInputPopup::ButtonsClipboard, value.Get<unsigned int>() );
+ 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::HIGHLIGHT_COLOR_PROPERTY:
+ {
+ value = textInputImpl.GetMaterialDiffuseColor();
+ break;
+ }
+ case Toolkit::TextInput::CUT_AND_PASTE_COLOR_PROPERTY:
+ {
+ value = textInputImpl.mPopUpPanel.GetCutPastePopUpColor();
+ break;
+ }
+ case Toolkit::TextInput::CUT_AND_PASTE_PRESSED_COLOR_PROPERTY:
+ {
+ value = textInputImpl.mPopUpPanel.GetCutPastePopUpPressedColor();
+ break;
+ }
+ case Toolkit::TextInput::CUT_BUTTON_POSITION_PRIORITY_PROPERTY:
+ {
+ value = textInputImpl.mPopUpPanel.GetButtonPriorityPosition( TextInputPopup::ButtonsCut );
+ break;
+ }
+ case Toolkit::TextInput::COPY_BUTTON_POSITION_PRIORITY_PROPERTY:
+ {
+ value = textInputImpl.mPopUpPanel.GetButtonPriorityPosition( TextInputPopup::ButtonsCopy );
+ break;
+ }
+ case Toolkit::TextInput::PASTE_BUTTON_POSITION_PRIORITY_PROPERTY:
+ {
+ value = textInputImpl.mPopUpPanel.GetButtonPriorityPosition( TextInputPopup::ButtonsPaste );
+ break;
+ }
+ case Toolkit::TextInput::SELECT_BUTTON_POSITION_PRIORITY_PROPERTY:
+ {
+ value = textInputImpl.mPopUpPanel.GetButtonPriorityPosition( TextInputPopup::ButtonsSelect );
+ break;
+ }
+ case Toolkit::TextInput::SELECT_ALL_BUTTON_POSITION_PRIORITY_PROPERTY:
+ {
+ value = textInputImpl.mPopUpPanel.GetButtonPriorityPosition( TextInputPopup::ButtonsSelectAll );
+ break;
+ }
+ case Toolkit::TextInput::CLIPBOARD_BUTTON_POSITION_PRIORITY_PROPERTY:
+ {
+ value = textInputImpl.mPopUpPanel.GetButtonPriorityPosition( TextInputPopup::ButtonsClipboard );
+ break;
+ }
+ }
+ }
+ return value;
+}
+
void TextInput::EmitStyleChangedSignal()
{
// emit signal if input style changes.
{
public:
+ // Properties
+ enum
+ {
+ TEXTINPUT_PROPERTY_START_INDEX = Control::CONTROL_PROPERTY_END_INDEX + 1,
+ TEXTINPUT_PROPERTY_END_INDEX = TEXTINPUT_PROPERTY_START_INDEX + 512 ///< Reserving property indices
+ };
+
/**
* Create a new TextInput
* @return instrusive ptr to a TextInput
*/
std::size_t GetNumberOfCharacters() const;
+ /**
+ * Styling
+ */
+
+ /**
+ * Set the diffuse color for the highlight
+ * @param[in] color color to use
+ */
+ void SetMaterialDiffuseColor( const Vector4& color );
+
+ /**
+ * Get the diffuse color used by the highlight
+ * @return color
+ */
+ const Vector4& GetMaterialDiffuseColor() const;
+
private:
/**
void ClearPopup();
/**
+ * Adds Popup options which have been enabled.
+ */
+ void AddPopupOptions();
+
+ /**
* Adds a popup option.
* @note Creates popup frame if not already created.
* @param[in] name The unique name for this option.
*/
void GetTextLayoutInfo();
+ // Properties
+
+ /**
+ * Called when a property of an object of this type is set.
+ * @param[in] object The object whose property is set.
+ * @param[in] index The property index.
+ * @param[in] value The new property value.
+ */
+ static void SetProperty( BaseObject* object, Property::Index index, const Property::Value& value );
+
+ /**
+ * Called to retrieve a property of an object of this type.
+ * @param[in] object The object whose property is to be retrieved.
+ * @param[in] index The property index.
+ * @return The current value of the property.
+ */
+ static Property::Value GetProperty( BaseObject* object, Property::Index propertyIndex );
+
/**
* Emits the style changed signal.
*/
Clipboard mClipboard; ///< Handle to clipboard
+ // Styling
+ Vector4 mMaterialColor; // Color of the highlight
+
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)
bool mClosestCursorPositionEOL:1; ///< closest cursor position is end of line.
*/
#include <dali-toolkit/internal/controls/text-input/text-input-popup-impl.h>
+
#include <dali-toolkit/public-api/controls/buttons/push-button.h>
+#include <dali-toolkit/public-api/controls/default-controls/solid-color-actor.h>
+
+#include <libintl.h>
using namespace std;
using namespace Dali;
+#define GET_LOCALE_TEXT(string) dgettext("sys_string", string)
+
namespace {
-// Popup: Background
-const char* DEFAULT_PANEL_BACKGROUND = DALI_IMAGE_DIR "cutCopyPastePopup_bg.png";
+// Default Colors
+
+const Vector4 DEFAULT_POPUP_BACKGROUND( Vector4( 0.24f, 0.41f, 0.88f, 1.0f ) );
+const Vector4 DEFAULT_POPUP_BUTTON_PRESSED( Vector4( 0.18f, 0.56f, 1.0f, 1.0f ) );
+const Vector4 DEFAULT_BORDER_COLOR( Vector4( 0.2f, 0.2f, 0.2f, 1.0f ) );
+const Vector3 POPUP_BORDER( Vector3(1.0f, 1.0f, 0.0f) );
// Popup: Divider
const char* DEFAULT_PANEL_BUTTON_DIVIDER = DALI_IMAGE_DIR "copypanelLine.png";
* the left image can be rounded on the left and straight on the right, the right image can be straight on the left and rounded on the right.
*/
-// Popup: Left Pressed Highlight
-const char* DEFAULT_BUTTON_HIGHLIGHT_LEFT( DALI_IMAGE_DIR "00_popup_button_pressed.png" );
-const Vector4 DEFAULT_BUTTON_HIGHLIGHT_LEFT_BORDER( 6.0f, 9.0f, 6.0f, 9.0f );
-
-// Popup: Center Pressed Highlight
-const char* DEFAULT_BUTTON_HIGHLIGHT_CENTER( DALI_IMAGE_DIR "00_popup_button_pressed.png" );
-const Vector4 DEFAULT_BUTTON_HIGHLIGHT_CENTER_BORDER( 6.0f, 9.0f, 6.0f, 9.0f );
-
-// Popup: Right Pressed Highlight
-const char* DEFAULT_BUTTON_HIGHLIGHT_RIGHT( DALI_IMAGE_DIR "00_popup_button_pressed.png" );
-const Vector4 DEFAULT_BUTTON_HIGHLIGHT_RIGHT_BORDER( 6.0f, 9.0f, 6.0f, 9.0f );
-
// Popup: Tails
const char* DEFAULT_POPUP_TAIL_BOTTOM( DALI_IMAGE_DIR "00_popup_bubble_tail_bottom.png" );
// height of the indicator actor from Dali-Toolkit.
const Vector2 DEFAULT_POPUP_INDICATOR_OFFSET(0.0f, 60.0f);
-const Vector4 BACKGROUND_IMAGE_BORDER( 22.0f, 20.0f, 29.0f, 27.0f );
-const Vector2 BACKGROUND_IMAGE_SIZE( 50.0f, 54.0f );
-const Vector3 POPUP_TEXT_OFFSET( 12.0f, 10.0f, 0.0f );
+const Vector3 POPUP_TEXT_OFFSET( 0.0f, 0.0f, 0.0f );
const Vector3 POPUP_TEXT_ENLARGE( 12.0f, 28.0f, 0.0f );
const Vector3 POPUP_MINIMUM_SIZE( 128.0f, 124.0f, 0.0f );
const Vector3 BUTTON_TEXT_ENLARGE( 32.0f, 0.0f, 0.0f );
const Vector3 BUTTON_TEXT_MINIMUM_SIZE( 128.0f, 126.0f, 0.0f );
-const Vector3 BUTTON_TEXT_MAXIMUM_SIZE( 196.0f, 126.0f, 0.0f );
+const Vector3 BUTTON_TEXT_MAXIMUM_SIZE( 190.0f, 126.0f, 0.0f );
const Vector3 TEXT_LABEL_MAX_SIZE( 160.0f, 30.0f, 0.0f );
const float DIVIDER_WIDTH(2.0f); ///< Width of each button divider
-const float DIVIDER_MARGIN(10.0f); ///< Top/Bottom Margin between divider and edge of popup.
+const float DIVIDER_MARGIN(0.0f); ///< Top/Bottom Margin between divider and edge of popup.
const float DEFAULT_UI_FONT_SIZE(7.0f); ///< Standard font size for Text-Input's UI
const float TEXT_POSITION_OFFSET( -19.0f ); ///< Default offset for text label
const float ICON_POSITION_OFFSET( 19.0f ); ///< Default offset for icon
+const char* DEFAULT_ICON_CLIPBOARD( DALI_IMAGE_DIR "copy_paste_icon_clipboard.png" );
+const char* DEFAULT_ICON_COPY( DALI_IMAGE_DIR "copy_paste_icon_copy.png" );
+const char* DEFAULT_ICON_CUT( DALI_IMAGE_DIR "copy_paste_icon_cut.png" );
+const char* DEFAULT_ICON_PASTE( DALI_IMAGE_DIR "copy_paste_icon_paste.png" );
+const char* DEFAULT_ICON_SELECT( DALI_IMAGE_DIR "copy_paste_icon_select.png" );
+const char* DEFAULT_ICON_SELECT_ALL( DALI_IMAGE_DIR "copy_paste_icon_select_all.png" );
+
// TODO: This should be based on the content for example:
// 1. For selection: should be above top of highlighted selection, or below bottom of highlighted selection + end handle.
// 2. For cursor: should be above top of cursor, or below bottom of cursor + grab handle.
const char* const TextInputPopup::SIGNAL_HIDE_FINISHED = "hide-finished";
const char* const TextInputPopup::SIGNAL_SHOW_FINISHED = "show-finished";
+const char* const TextInputPopup::OPTION_SELECT_WORD = "select_word"; // "Select Word" popup option.
+const char* const TextInputPopup::OPTION_SELECT_ALL("select_all"); // "Select All" popup option.
+const char* const TextInputPopup::OPTION_CUT("cut"); // "Cut" popup option.
+const char* const TextInputPopup::OPTION_COPY("copy"); // "Copy" popup option.
+const char* const TextInputPopup::OPTION_PASTE("paste"); // "Paste" popup option.
+const char* const TextInputPopup::OPTION_CLIPBOARD("clipboard"); // "Clipboard" popup option.
+
TextInputPopup::TextInputPopup()
: mState(StateHidden),
mRootActor(Layer::New()),
+ mContentSize( Vector3::ZERO ),
+ mCutPasteButtonsColor( DEFAULT_POPUP_BACKGROUND ),
+ mCutPasteButtonsPressedColor( DEFAULT_POPUP_BUTTON_PRESSED ),
+ mBorderColor( DEFAULT_BORDER_COLOR ),
+ mSelectOptionPriority(1),
+ mSelectAllOptionPriority(2),
+ mCutOptionPriority(3),
+ mCopyOptionPriority(4),
+ mPasteOptionPriority(5),
+ mClipboardOptionPriority(6),
mPressedSignal(),
mHideFinishedSignal(),
mShowFinishedSignal()
// Create background-panel if not already created (required if we have at least one option)
if ( !mBackground )
{
- Image backgroundImage = Image::New( DEFAULT_PANEL_BACKGROUND );
-
- mBackground = ImageActor::New( backgroundImage );
- // Expand background from bottom-center of root actor.
- mBackground.SetParentOrigin( ParentOrigin::BOTTOM_CENTER );
- mBackground.SetAnchorPoint( AnchorPoint::BOTTOM_CENTER );
- mBackground.SetStyle( ImageActor::STYLE_NINE_PATCH );
-
- mBackground.SetNinePatchBorder( Vector4(13.0f, 13.0f, 13.0f, 13.0f) );
+ mBackground = Toolkit::CreateSolidColorActor( GetCutPastePopUpColor(), true, mBorderColor );
Self().Add( mBackground );
mContentSize = POPUP_TEXT_OFFSET;
ImageActor divider = ImageActor::New( dividerImage );
divider.SetParentOrigin( ParentOrigin::TOP_LEFT );
divider.SetAnchorPoint( AnchorPoint::TOP_LEFT );
- divider.SetPosition( Vector3( mContentSize.width, POPUP_TEXT_OFFSET.y + 5.0f, 0.0f ) );
+ divider.SetPosition( Vector3( mContentSize.width, POPUP_TEXT_OFFSET.y, 0.0f ) );
// Keep track of all the dividers. As their height's need to be updated to the max. of all
// buttons currently added.
mDividerContainer.push_back(divider);
}
}
-ImageActor TextInputPopup::CreatePressedBackground( const Vector3 requiredSize, const bool finalFlag )
+ImageActor TextInputPopup::CreatePressedBackground( const Vector3 requiredSize )
{
std::string pressedImageFilename;
Vector4 pressedImageBorder;
Vector2 pressedImageSize;
- if(mButtonContainer.size() == 0) // LEFT
- {
- pressedImageFilename = DEFAULT_BUTTON_HIGHLIGHT_LEFT;
- pressedImageBorder = DEFAULT_BUTTON_HIGHLIGHT_LEFT_BORDER;
- }
- else if(!finalFlag) // CENTER
- {
- pressedImageFilename = DEFAULT_BUTTON_HIGHLIGHT_CENTER;
- pressedImageBorder = DEFAULT_BUTTON_HIGHLIGHT_CENTER_BORDER;
- }
- else // RIGHT
+ ImageActor pressedButtonBg = Toolkit::CreateSolidColorActor( GetCutPastePopUpPressedColor() );
+
+ pressedButtonBg.SetSize ( requiredSize );
+ pressedButtonBg.SetParentOrigin( ParentOrigin::CENTER );
+ pressedButtonBg.SetAnchorPoint( AnchorPoint::CENTER );
+
+ return pressedButtonBg;
+}
+
+TextInputPopup::ButtonRequirement TextInputPopup::CreateRequiredButton( TextInputPopup::Buttons buttonId, std::size_t orderOfPriority,
+ const std::string& name, const std::string& caption, Image iconImage, bool enabled )
+{
+ TextInputPopup::ButtonRequirement currentButton;
+
+ currentButton.buttonId = buttonId;
+ currentButton.orderOfPriority = orderOfPriority;
+ currentButton.name = name;
+ currentButton.caption = caption;
+ currentButton.iconImage = iconImage;
+ currentButton.enabled = enabled;
+
+ return currentButton;
+}
+
+void TextInputPopup::CreateOrderedListOfOptions()
+{
+ mOrderListOfButtons.clear();
+
+ for ( std::size_t index= 0; index < ButtonsEnumEnd; index++ )
{
- pressedImageFilename = DEFAULT_BUTTON_HIGHLIGHT_RIGHT;
- pressedImageBorder = DEFAULT_BUTTON_HIGHLIGHT_RIGHT_BORDER;
- }
+ TextInputPopup::ButtonRequirement currentButton;
- Image pressedImage = Image::New( pressedImageFilename );
- ImageActor pressedImageBg = ImageActor::New( pressedImage );
- pressedImageBg.SetStyle( ImageActor::STYLE_NINE_PATCH );
- pressedImageBg.SetNinePatchBorder( pressedImageBorder );
- pressedImageBg.SetSize ( requiredSize );
- pressedImageBg.SetParentOrigin( ParentOrigin::CENTER );
- pressedImageBg.SetAnchorPoint( AnchorPoint::CENTER );
+ // Create button for each possible option using Option priority
+ switch ( index )
+ {
+ case ButtonsCut:
+ {
+ Image cutIcon = Image::New( DEFAULT_ICON_CUT );
+ currentButton = CreateRequiredButton( ButtonsCut, mCutOptionPriority, OPTION_CUT, GET_LOCALE_TEXT("IDS_COM_BODY_CUT"), cutIcon, false );
+ break;
+ }
+ case ButtonsCopy:
+ {
+ Image copyIcon = Image::New( DEFAULT_ICON_COPY );
+ currentButton = CreateRequiredButton( ButtonsCopy, mCopyOptionPriority, OPTION_COPY, GET_LOCALE_TEXT("IDS_COM_BODY_COPY"), copyIcon, false );
+ break;
+ }
+ case ButtonsPaste:
+ {
+ Image pasteIcon = Image::New( DEFAULT_ICON_PASTE );
+ currentButton = CreateRequiredButton( ButtonsPaste, mPasteOptionPriority, OPTION_PASTE, GET_LOCALE_TEXT("IDS_COM_BODY_PASTE"), pasteIcon, false );
+ break;
+ }
+ case ButtonsSelect:
+ {
+ Image selectIcon = Image::New( DEFAULT_ICON_SELECT );
+ currentButton = CreateRequiredButton( ButtonsSelect, mSelectOptionPriority, OPTION_SELECT_WORD, GET_LOCALE_TEXT("IDS_COM_SK_SELECT"), selectIcon, false );
+ break;
+ }
+ case ButtonsSelectAll:
+ {
+ Image selectAllIcon = Image::New( DEFAULT_ICON_SELECT_ALL );
+ currentButton = CreateRequiredButton( ButtonsSelectAll, mSelectAllOptionPriority, OPTION_SELECT_ALL, GET_LOCALE_TEXT("IDS_COM_BODY_SELECT_ALL"), selectAllIcon, false );
+ break;
+ }
+ case ButtonsClipboard:
+ {
+ Image clipboardIcon = Image::New( DEFAULT_ICON_CLIPBOARD );
+ currentButton = CreateRequiredButton( ButtonsClipboard, mClipboardOptionPriority, OPTION_CLIPBOARD, GET_LOCALE_TEXT("IDS_COM_BODY_CLIPBOARD"), clipboardIcon, false );
+ break;
+ }
+ case ButtonsEnumEnd:
+ {
+ DALI_ASSERT_DEBUG( "ButtonsEnumEnd used but an invalid choice");
+ currentButton.orderOfPriority = 0;
+ break;
+ }
+ }
- return pressedImageBg;
+ bool match = false;
+
+ // Insert button in list of buttons in order of priority setting.
+ for( std::vector<ButtonRequirement>::iterator it = mOrderListOfButtons.begin(), endIt = mOrderListOfButtons.end(); ( it != endIt && !match ); ++it )
+ {
+ const ButtonRequirement& button( *it );
+ if ( currentButton.orderOfPriority < button.orderOfPriority )
+ {
+ if ( currentButton.orderOfPriority != 0 ) // If order priority 0 then do not add button as not required.
+ {
+ mOrderListOfButtons.insert( it, currentButton );
+ }
+ match = true;
+ }
+ }
+
+ if ( !match)
+ {
+ mOrderListOfButtons.push_back( currentButton );
+ }
+ }
}
void TextInputPopup::AddOption(const std::string& name, const std::string& caption, const Image iconImage, bool finalOption)
button.SetParentOrigin( ParentOrigin::TOP_LEFT );
button.SetAnchorPoint( AnchorPoint::TOP_LEFT );
button.SetSize( buttonSize );
- button.SetPosition( Vector3( mContentSize.width, POPUP_TEXT_OFFSET.y, 0.0f ) );
+ button.SetPosition( Vector3( mContentSize.width, POPUP_BORDER.y, 0.0f ) );
// 2. Add icon
ImageActor icon = CreateOptionIcon( iconImage );
iconTextContainer.Add( icon );
// 3. Add highlight - Pressed state in Pushbutton needs a new image which means creating the text and icon again but including a highlight this time.
- ImageActor pressedImageBg = CreatePressedBackground( buttonSize, finalOption );
+ ImageActor pressedImageBg = CreatePressedBackground( buttonSize );
Actor iconPressedTextContainer = Actor::New();
iconPressedTextContainer.SetDrawMode( DrawMode::OVERLAY );
// Update content size (represents size of all content i.e. from top-left of first button, to bottom-right of last button)
mContentSize.width += buttonSize.width;
- mContentSize.height = std::max(mContentSize.height, buttonSize.height);
+ mContentSize.height = std::max(mContentSize.height + ( POPUP_BORDER.y ), buttonSize.height);
mButtonContainer.push_back(button);
// resize all dividers based on the height content (i.e. max of all button heights)
i->SetSize( DIVIDER_WIDTH, dividerHeight );
}
- Vector3 popupSize( Max(mContentSize + POPUP_TEXT_ENLARGE, POPUP_MINIMUM_SIZE) );
+ Vector3 popupSize( Max(mContentSize, POPUP_MINIMUM_SIZE) );
mBackground.SetSize( popupSize );
// Make Root Actor reflect the size of its content
return mRootActor;
}
+// 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 );
+ }
+ }
+}
+
+
bool TextInputPopup::OnButtonPressed( Toolkit::Button button )
{
mPressedSignal.Emit( button );
StateShown
};
+ enum Buttons
+ {
+ ButtonsCut,
+ ButtonsCopy,
+ ButtonsPaste,
+ ButtonsSelect,
+ ButtonsSelectAll,
+ ButtonsClipboard,
+ ButtonsEnumEnd
+ };
+
+ struct ButtonRequirement
+ {
+ TextInputPopup::Buttons buttonId;
+ std::size_t orderOfPriority;
+ std::string name;
+ std::string caption;
+ Image iconImage;
+ bool enabled;
+ };
+
+ static const char* const OPTION_SELECT_WORD;
+ static const char* const OPTION_SELECT_ALL;
+ static const char* const OPTION_CUT;
+ static const char* const OPTION_COPY;
+ static const char* const OPTION_PASTE;
+ static const char* const OPTION_CLIPBOARD;
+
// Signal names
static const char* const SIGNAL_PRESSED;
static const char* const SIGNAL_HIDE_FINISHED;
/**
* Create a background to be used when button pressed
* @param[in] requiredSize size Image actor should be
- * @param[in] finalFlag flag to be set if option is the final one.
* @return Returns an Image Actor to be used a pressed background
*/
- ImageActor CreatePressedBackground( const Vector3 requiredSize, const bool finalFlag );
+ ImageActor CreatePressedBackground( const Vector3 requiredSize );
+
+ /**
+ * Creates a ordered vector of button options
+ */
+ void CreateOrderedListOfOptions();
/**
* Adds a popup option.
*/
Actor GetRootActor() const;
+ /**
+ * Set the Cut and Paste buttons color when in normal state
+ * @param[in] color color to use
+ */
+ void SetCutPastePopUpColor( const Vector4& color );
+
+ /**
+ * Get the set color of the Copy and Paste PopUp buttons
+ * @return color
+ */
+ const Vector4& GetCutPastePopUpColor() const;
+
+ /**
+ * Set the Cut and Paste button color when pressed.
+ * @param[in] color color to use
+ */
+ void SetCutPastePopUpPressedColor( const Vector4& color );
+
+ /**
+ * Get the Cut and Paste pressed button color.
+ * @return color
+ */
+ const Vector4& GetCutPastePopUpPressedColor() const;
+
+ /**
+ * Toggle if a popup button should be enabled (shown) or not
+ * @param[in] requiredButton Button Id to enable or disable
+ * @param[in] enable toggle to enable (true) or disable (false)
+ */
+ void TogglePopUpButtonOnOff( TextInputPopup::Buttons requiredButton, bool enable );
+
+ /**
+ * Set the Button Priority Position
+ * @param[in] button Button id for priority to be set on
+ * @param[in] priority Priority level, 1 is highest so will appear first. 0 priority will not show the button.
+ */
+ void SetButtonPriorityPosition( TextInputPopup::Buttons button, unsigned int priority );
+
+ /**
+ * Get the Button Priority Position
+ * @param[in] button Button id to get priority of
+ * @return the button priority, 1 is highest, 0 is not shown.
+ */
+ unsigned int GetButtonPriorityPosition( TextInputPopup::Buttons button ) const;
+
+ /**
+ * Adds Popup options which have been enabled.
+ */
+ void AddPopupOptions();
+
private:
/**
- * Adds popup to the stage (ideally on a separate top-most layer and as an overlay)
+ * Creates a Button with the required parameters.
+ * @param[in] buttonId enum representing the button
+ * @param[in] orderOfPriority Position in toolbar button should be position, 1 is first from left to right.
+ * @param[in] name Given name for Button actor
+ * @param[in] caption Text to display in button
+ * @param[in] iconImage Icon to display in button
+ * @param[in] enabled Toggle if button should be used or not, this is decided by the current state/conditions.
+ */
+ TextInputPopup::ButtonRequirement CreateRequiredButton( TextInputPopup::Buttons buttonId, std::size_t orderOfPriority,
+ const std::string& name, const std::string& caption, Image iconImage, bool enabled );
+
+ /**
+ * Adds Popup to the stage (ideally on a separate top-most layer and as an overlay)
*/
void AddToStage();
void ApplyConfinementConstraint();
/**
- * Removes popup from the stage.
+ * Removes Popup from the stage.
*/
void RemoveFromStage();
/**
- * Called when a button is pressed in the popup
+ * Called when a button is pressed in the Popup
* @param[in] button The button pressed.
*/
bool OnButtonPressed( Toolkit::Button button );
ActorContainer mDividerContainer; ///< List of dividers added to popup.
Animation mAnimation; ///< Popup Hide/Show animation.
+ std::vector<ButtonRequirement> mOrderListOfButtons; // List of buttons in the order to be displayed and a flag to indicate if needed.
+
+ Vector4 mCutPasteButtonsColor; // Color of the cut and paste popup
+ Vector4 mCutPasteButtonsPressedColor; // Color of the cut and paste buttons when pressed.
+ Vector4 mBorderColor; // Color of the border around the Cut and Paste Popup
+
+ // Priority of Options/Buttons in the Cut and Paste pop-up, higher priority buttons are displayed first, left to right.
+ std::size_t mSelectOptionPriority; // Position of Select Button
+ std::size_t mSelectAllOptionPriority; // Position of Select All button
+ std::size_t mCutOptionPriority; // Position of Cut button
+ std::size_t mCopyOptionPriority; // Position of Copy button
+ std::size_t mPasteOptionPriority; // Position of Paste button
+ std::size_t mClipboardOptionPriority; // Position of Clipboard button
+
PressedSignalV2 mPressedSignal; ///< Signal emitted when a button within the popup is pressed.
HideFinishedSignalV2 mHideFinishedSignal; ///< Signal emitted when popup is completely hidden
ShowFinishedSignalV2 mShowFinishedSignal; ///< Signal emitted when popup is completely shown
public:
- //Signal Names
+ /// @name Properties
+ /** @{ */
+ static const Property::Index HIGHLIGHT_COLOR_PROPERTY; // Property, name "highlight-color", type VECTOR4
+ static const Property::Index CUT_AND_PASTE_COLOR_PROPERTY; // Property, name "cut-and-paste-bg-color", type VECTOR4
+ static const Property::Index CUT_AND_PASTE_PRESSED_COLOR_PROPERTY; // Property, name "cut-and-paste-pressed-color", type VECTOR4
+
+ static const Property::Index CUT_BUTTON_POSITION_PRIORITY_PROPERTY; // Property, name "cut-button-position-priority", type unsigned int
+ static const Property::Index COPY_BUTTON_POSITION_PRIORITY_PROPERTY; // Property, name "copy-button-position-priority", type unsigned int
+ static const Property::Index PASTE_BUTTON_POSITION_PRIORITY_PROPERTY; // Property, name "paste-button-position-priority", type unsigned int
+ static const Property::Index SELECT_BUTTON_POSITION_PRIORITY_PROPERTY; // Property, name "select-button-position-priority", type unsigned int
+ static const Property::Index SELECT_ALL_BUTTON_POSITION_PRIORITY_PROPERTY; // Property, name "select-all-button-position-priority", type unsigned int
+ static const Property::Index CLIPBOARD_BUTTON_POSITION_PRIORITY_PROPERTY; // Property, name "clipboard-button-position-priority", type unsigned int
+ /** @} */
+
+ /// @name Signals
+ /** @{ */
static const char* const SIGNAL_START_INPUT; ///< name "start-input"
static const char* const SIGNAL_END_INPUT; ///< name "end-input"
static const char* const SIGNAL_STYLE_CHANGED; ///< name "style-changed"
static const char* const SIGNAL_MAX_INPUT_CHARACTERS_REACHED; ///< name "max-input-characters-reached"
static const char* const SIGNAL_TOOLBAR_DISPLAYED; ///< name "toolbar-displayed"
static const char* const SIGNAL_TEXT_EXCEED_BOUNDARIES; ///< name "text-exceed-boundaries"
+ /** @} */
public: