change the clipboard system (normalisation and standardisation
This commit is contained in:
parent
0fc8934d93
commit
699564e17f
5
Makefile
5
Makefile
@ -8,7 +8,10 @@ PROJECT_VENDOR=heeroyui
|
||||
# Binary name ... (no dot, no MAJ no Numerical char)
|
||||
PROJECT_NAME=edn
|
||||
|
||||
USER_PACKAGES=$(shell pwd)/Sources/
|
||||
# Add package needed
|
||||
USER_PACKAGES =$(shell pwd)/Sources/
|
||||
# Add ewol packages :
|
||||
USER_PACKAGES+=$(shell realpath $(shell pwd)/../ewol/Sources/)
|
||||
|
||||
# include basic makefile for EWOL
|
||||
include $(shell pwd)/../ewol/Build/Makefile.mk
|
||||
|
@ -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);
|
||||
|
Before Width: | Height: | Size: 6.4 KiB After Width: | Height: | Size: 6.4 KiB |
67
os-Linux/README
Normal file
67
os-Linux/README
Normal file
@ -0,0 +1,67 @@
|
||||
Edn
|
||||
====
|
||||
|
||||
`Edn` (Editeur De N'ours) is a FREE software.
|
||||
|
||||
This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY.
|
||||
|
||||
Instructions
|
||||
============
|
||||
|
||||
download the software :
|
||||
|
||||
mkdir yourDevFolder
|
||||
cd yourDevFolder
|
||||
git clone git://github.com/HeeroYui/ewol.git
|
||||
cd ewol
|
||||
git submodule init
|
||||
git submodule update
|
||||
cd ..
|
||||
git clone git://github.com/HeeroYui/edn.git
|
||||
cd edn
|
||||
|
||||
(debug) Compile software & Run debug version:
|
||||
|
||||
make DEBUG=1
|
||||
or
|
||||
make CLANG=1 DEBUG=1
|
||||
./out_LINUX/debug/obj/usr/bin/edn -l6 yourFile.txt
|
||||
Note : -l6 corespond at the LOG level to display
|
||||
|
||||
(release) Compile software & install & run:
|
||||
|
||||
make
|
||||
./install.sh
|
||||
edn exemple.txt
|
||||
|
||||
(Android) Compile software & install
|
||||
|
||||
cd yourDevFolder
|
||||
mkdir andoid
|
||||
cd android
|
||||
download here in "sdk" and "ndk" the coresponding SDK and NDK of Android:
|
||||
http://developer.android.com/tools/sdk/ndk/index.html
|
||||
http://developer.android.com/sdk/index.html
|
||||
==> you need to download sub package of the NDK (refer to the NDK doccumentation) but only supported android version >4.0
|
||||
cd ../edn
|
||||
make PLATFORM=Android
|
||||
make PLATFORM=Android install
|
||||
|
||||
License (like GPL)
|
||||
==================
|
||||
|
||||
You can:
|
||||
- Redistribute the sources code and binaries.
|
||||
- Modify the Sources code.
|
||||
- Use a part of the sources (less than 50%) in an other software, just write somewhere "Edn is great" visible by the user (on your product or on your website with a link to my page).
|
||||
- Redistribute the modification only if you want.
|
||||
- Send me the bug-fix (it could be great).
|
||||
- Pay me a beer or some other things.
|
||||
- Print the source code on WC paper ...
|
||||
You can NOT:
|
||||
- Earn money with this Software (But I can).
|
||||
- Add malware in the Sources.
|
||||
- Do something bad with the sources.
|
||||
- Use it to travel in the space with a toaster.
|
||||
|
||||
I reserve the right to change this licence. If it change the version of the copy you have keep its own license
|
Loading…
Reference in New Issue
Block a user