change the clipboard system (normalisation and standardisation
This commit is contained in:
@@ -103,9 +103,9 @@ class Buffer {
|
||||
virtual void SetCharset(unicode::charset_te newCharset) {};
|
||||
|
||||
//virtual void SelectAll(void);
|
||||
virtual void Copy(int8_t clipboardID) {};
|
||||
virtual void Cut(int8_t clipboardID) {};
|
||||
virtual void Paste(int8_t clipboardID) {};
|
||||
virtual void Copy(ewol::clipBoard::clipboardListe_te clipboardID) {};
|
||||
virtual void Cut(ewol::clipBoard::clipboardListe_te clipboardID) {};
|
||||
virtual void Paste(ewol::clipBoard::clipboardListe_te clipboardID) {};
|
||||
virtual void Search(etk::UString &data, bool back, bool caseSensitive, bool wrap, bool regExp) {};
|
||||
virtual void Replace(etk::UString &data) {};
|
||||
virtual int32_t FindLine(etk::UString &data) { return 0; };
|
||||
|
@@ -1155,7 +1155,7 @@ void BufferText::Replace(etk::UString &data)
|
||||
* @return ---
|
||||
*
|
||||
*/
|
||||
void BufferText::Copy(int8_t clipboardID)
|
||||
void BufferText::Copy(ewol::clipBoard::clipboardListe_te clipboardID)
|
||||
{
|
||||
etk::UString mVect;
|
||||
// get the curent selected data
|
||||
@@ -1175,7 +1175,7 @@ void BufferText::Copy(int8_t clipboardID)
|
||||
* @return ---
|
||||
*
|
||||
*/
|
||||
void BufferText::Cut(int8_t clipboardID)
|
||||
void BufferText::Cut(ewol::clipBoard::clipboardListe_te clipboardID)
|
||||
{
|
||||
|
||||
int32_t SelectionStart, SelectionEnd, SelectionRectStart, SelectionRectEnd;
|
||||
@@ -1203,11 +1203,11 @@ void BufferText::Cut(int8_t clipboardID)
|
||||
* @return ---
|
||||
*
|
||||
*/
|
||||
void BufferText::Paste(int8_t clipboardID)
|
||||
void BufferText::Paste(ewol::clipBoard::clipboardListe_te clipboardID)
|
||||
{
|
||||
etk::UString mVect;
|
||||
// copy data from the click board :
|
||||
ewol::clipBoard::Get(clipboardID, mVect);
|
||||
mVect = ewol::clipBoard::Get(clipboardID);
|
||||
|
||||
int32_t SelectionStart, SelectionEnd, SelectionRectStart, SelectionRectEnd;
|
||||
bool SelectionIsRect;
|
||||
|
@@ -60,9 +60,9 @@ class BufferText : public Buffer {
|
||||
void MouseEventDouble(void);
|
||||
void MouseEventTriple(void);
|
||||
|
||||
void Copy(int8_t clipboardID);
|
||||
void Cut(int8_t clipboardID);
|
||||
void Paste(int8_t clipboardID);
|
||||
void Copy(ewol::clipBoard::clipboardListe_te clipboardID);
|
||||
void Cut(ewol::clipBoard::clipboardListe_te clipboardID);
|
||||
void Paste(ewol::clipBoard::clipboardListe_te clipboardID);
|
||||
|
||||
void Search(etk::UString &data, bool back, bool caseSensitive, bool wrap, bool regExp);
|
||||
void Replace(etk::UString &data);
|
||||
|
@@ -193,6 +193,17 @@ bool CodeView::OnEventKbMove(ewol::eventKbType_te typeEvent, ewol::eventKbMoveTy
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Event on a past event ==> this event is asynchronous due to all system does not support direct getting datas
|
||||
* @note : need to have focus ...
|
||||
* @param[in] mode Mode of data requested
|
||||
* @return ---
|
||||
*/
|
||||
void CodeView::OnEventClipboard(ewol::clipBoard::clipboardListe_te clipboardID)
|
||||
{
|
||||
BufferManager::Get(m_bufferID)->Paste(clipboardID);
|
||||
MarkToRedraw();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Event on an input of this Widget
|
||||
@@ -263,8 +274,7 @@ bool CodeView::OnEventInput(ewol::inputType_te type, int32_t IdInput, ewol::even
|
||||
} else if (2 == IdInput) {
|
||||
if (ewol::EVENT_INPUT_TYPE_SINGLE == typeEvent) {
|
||||
BufferManager::Get(m_bufferID)->MouseEvent(m_fontNormal, relativePos.x+m_originScrooled.x, relativePos.y+m_originScrooled.y);
|
||||
BufferManager::Get(m_bufferID)->Paste(ewol::clipBoard::CLIPBOARD_SELECTION);
|
||||
MarkToRedraw();
|
||||
ewol::clipBoard::Request(ewol::clipBoard::CLIPBOARD_SELECTION);
|
||||
ewol::widgetManager::FocusKeep(this);
|
||||
}
|
||||
}
|
||||
@@ -308,7 +318,7 @@ void CodeView::OnReceiveMessage(ewol::EObject * CallerObject, const char * event
|
||||
} else if (eventId == ednMsgGuiCut) {
|
||||
BufferManager::Get(m_bufferID)->Cut(ewol::clipBoard::CLIPBOARD_STD);
|
||||
} else if (eventId == ednMsgGuiPaste) {
|
||||
BufferManager::Get(m_bufferID)->Paste(ewol::clipBoard::CLIPBOARD_STD);
|
||||
ewol::clipBoard::Request(ewol::clipBoard::CLIPBOARD_STD);
|
||||
} else if (eventId == ednMsgGuiUndo) {
|
||||
BufferManager::Get(m_bufferID)->Undo();
|
||||
} else if (eventId == ednMsgGuiRedo) {
|
||||
|
@@ -85,6 +85,13 @@ class CodeView :public ewol::WidgetScrooled
|
||||
virtual bool OnEventInput(ewol::inputType_te type, int32_t IdInput, ewol::eventInputType_te typeEvent, Vector2D<float> pos);
|
||||
virtual bool OnEventKb(ewol::eventKbType_te typeEvent, uniChar_t unicodeData);
|
||||
virtual bool OnEventKbMove(ewol::eventKbType_te typeEvent, ewol::eventKbMoveType_te moveTypeEvent);
|
||||
/**
|
||||
* @brief Event on a past event ==> this event is asynchronous due to all system does not support direct getting datas
|
||||
* @note : need to have focus ...
|
||||
* @param[in] mode Mode of data requested
|
||||
* @return ---
|
||||
*/
|
||||
virtual void OnEventClipboard(ewol::clipBoard::clipboardListe_te clipboardID);
|
||||
|
||||
virtual void OnGetFocus(void);
|
||||
virtual void OnLostFocus(void);
|
||||
|
Reference in New Issue
Block a user