*/
// EXTERNAL INCLUDES
-#include <dali/devel-api/text-abstraction/font-client.h>
+#include <dali/devel-api/adaptor-framework/clipboard.h>
#include <dali/devel-api/adaptor-framework/imf-manager.h>
+#include <dali/devel-api/text-abstraction/font-client.h>
// INTERNAL INCLUDES
#include <dali-toolkit/internal/text/layouts/layout-engine.h>
PAN_EVENT,
GRAB_HANDLE_EVENT,
LEFT_SELECTION_HANDLE_EVENT,
- RIGHT_SELECTION_HANDLE_EVENT
+ RIGHT_SELECTION_HANDLE_EVENT,
+ SELECT,
+ SELECT_ALL
};
union Param
mFontDefaults( NULL ),
mEventData( NULL ),
mFontClient(),
+ mClipboard(),
mView(),
mLayoutEngine(),
mModifyEvents(),
mVisualModel = VisualModel::New();
mFontClient = TextAbstraction::FontClient::Get();
+ mClipboard = Clipboard::Get();
mView.SetVisualModel( mVisualModel );
ClearPreEditFlag();
}
+ bool IsClipboardEmpty()
+ {
+ bool result( mClipboard && mClipboard.NumberOfItems() );
+ return !result; // // If NumberOfItems greater than 0, return false
+ }
+
void UpdateModel( OperationsMask operationsRequired );
/**
void OnHandleEvent( const Event& event );
+ void OnSelectEvent( const Event& event );
+
+ void OnSelectAllEvent();
+
+ void RetrieveSelection( std::string& selectedText, bool deleteAfterRetreival );
+
+ void ShowClipboard();
+
+ void HideClipboard();
+
+ bool CopyStringToClipboard( std::string& source );
+
+ void SendSelectionToClipboard( bool deleteAfterSending );
+
+ void GetTextFromClipboard( unsigned int itemIndex, std::string& retreivedString );
+
void RepositionSelectionHandles( CharacterIndex selectionStart, CharacterIndex selectionEnd );
void RepositionSelectionHandles( float visualX, float visualY );
FontDefaults* mFontDefaults; ///< Avoid allocating this when the user does not specify a font.
EventData* mEventData; ///< Avoid allocating everything for text input until EnableTextInput().
TextAbstraction::FontClient mFontClient; ///< Handle to the font client.
+ Clipboard mClipboard; ///< Handle to the system clipboard
View mView; ///< The view interface to the rendering back-end.
LayoutEngine mLayoutEngine; ///< The layout engine.
std::vector<ModifyEvent> mModifyEvents; ///< Temporary stores the text set until the next relayout.