diff --git a/data/color/white.xml b/data/color/white.xml
index aa42f6a..b0946fa 100644
--- a/data/color/white.xml
+++ b/data/color/white.xml
@@ -21,6 +21,8 @@
+
+
diff --git a/data/languages/c/highlight.xml b/data/languages/c/highlight.xml
index 9879c93..736eba8 100644
--- a/data/languages/c/highlight.xml
+++ b/data/languages/c/highlight.xml
@@ -89,7 +89,7 @@
storageKeyword
- \@const|class|virtual|private|public|protected|friend|const|extern|auto|register|static|unsigned|signed|volatile|char|double|float|int|long|short|void|typedef|struct|union|enum\@
+ \@inline|const|class|virtual|private|public|protected|friend|const|extern|auto|register|static|unsigned|signed|volatile|char|double|float|int|long|short|void|typedef|struct|union|enum\@
commonDefine
@@ -107,6 +107,14 @@
macro
\@[A-Z_][A-Z_0-9]{3,500}\@
+
+ memberClass
+ \@m_[A-Za-z_0-9]*\@
+
+
+ inputFunction
+ \@_[A-Za-z_0-9]*\@
+
functionName
\@(\w|_)+[ \t]*\(
diff --git a/sources/appl/Buffer/EdnBuf/EdnBuf.cpp b/sources/appl/Buffer/EdnBuf/EdnBuf.cpp
index 21df458..b316d8d 100644
--- a/sources/appl/Buffer/EdnBuf/EdnBuf.cpp
+++ b/sources/appl/Buffer/EdnBuf/EdnBuf.cpp
@@ -167,7 +167,7 @@ void EdnBuf::GetRange(int32_t start, int32_t end, etk::UString &output)
* @return The character at buffer position "pos"
*
*/
-int8_t EdnBuf::operator[] (int32_t pos)
+int8_t EdnBuf::operator[] (int32_t pos) const
{
int8_t res = m_data.Get(pos);
return res;
diff --git a/sources/appl/Buffer/EdnBuf/EdnBuf.h b/sources/appl/Buffer/EdnBuf/EdnBuf.h
index 3cfb32f..fb81371 100644
--- a/sources/appl/Buffer/EdnBuf/EdnBuf.h
+++ b/sources/appl/Buffer/EdnBuf/EdnBuf.h
@@ -65,7 +65,7 @@ class EdnBuf {
bool DumpIn( etk::FSNode &file);
bool DumpFrom( etk::FSNode &file);
// replace with operator [] ...
- int8_t operator[] (int32_t);
+ int8_t operator[] (int32_t) const;
int32_t Insert( int32_t pos, etk::Vector &insertText);
int32_t Insert( int32_t pos, etk::UString &insertText);
int32_t Replace( int32_t start, int32_t end, etk::Vector &insertText);
diff --git a/sources/appl/Gui/BufferView.h b/sources/appl/Gui/BufferView.h
index d7cdb00..9383c8d 100644
--- a/sources/appl/Gui/BufferView.h
+++ b/sources/appl/Gui/BufferView.h
@@ -51,17 +51,13 @@ class BufferView : public widget::List
protected:
// function call to display the list :
virtual draw::Color GetBasicBG(void);
+ void RemoveAllElement(void);
// Derived function
virtual uint32_t GetNuberOfColomn(void);
- // Derived function
virtual bool GetTitle(int32_t colomn, etk::UString &myTitle, draw::Color &fg, draw::Color &bg);
- // Derived function
virtual uint32_t GetNuberOfRaw(void);
- // Derived function
virtual bool GetElement(int32_t colomn, int32_t raw, etk::UString &myTextToWrite, draw::Color &fg, draw::Color &bg);
- // Derived function
virtual bool OnItemEvent(int32_t IdInput, ewol::keyEvent::status_te typeEvent, int32_t colomn, int32_t raw, float x, float y);
- void RemoveAllElement(void);
};
diff --git a/sources/appl/Gui/CodeView.cpp b/sources/appl/Gui/CodeView.cpp
index c9236d4..42e7f48 100644
--- a/sources/appl/Gui/CodeView.cpp
+++ b/sources/appl/Gui/CodeView.cpp
@@ -80,7 +80,6 @@ CodeView::~CodeView(void)
/**
* @brief Check if the number of reference buffer is good or not ...
* @param[in] bufferID id of the current Buffer that needed to have a reference
- * @return ---
*/
void CodeView::UpdateNumberOfLineReference(int32_t bufferID)
{
@@ -188,38 +187,30 @@ void CodeView::OnRegenerateDisplay(void)
}
-bool CodeView::OnEventKb(ewol::keyEvent::status_te typeEvent, uniChar_t unicodeData)
+bool CodeView::OnEventEntry(const ewol::EventEntry& _event)
{
- //APPL_DEBUG("KB EVENT : \"" << UTF8_data << "\" size=" << strlen(UTF8_data) << "type=" << (int32_t)typeEvent);
- if (typeEvent == ewol::keyEvent::statusDown) {
+ if (_event.GetType() == ewol::keyEvent::keyboardChar) {
+ //APPL_DEBUG("KB EVENT : \"" << UTF8_data << "\" size=" << strlen(UTF8_data) << "type=" << (int32_t)typeEvent);
+ if (_event.GetStatus() == ewol::keyEvent::statusDown) {
+ BufferText* tmpBuffer = BufferManager::Get(m_bufferID);
+ if (NULL!=tmpBuffer) {
+ tmpBuffer->AddChar(_event.GetChar());
+ }
+ MarkToRedraw();
+ }
+ return true;
+ }
+ // move events ...
+ if (_event.GetStatus() == ewol::keyEvent::statusDown) {
BufferText* tmpBuffer = BufferManager::Get(m_bufferID);
if (NULL!=tmpBuffer) {
- tmpBuffer->AddChar(unicodeData);
+ tmpBuffer->cursorMove(_event.GetType());
}
MarkToRedraw();
}
return true;
}
-
-bool CodeView::OnEventKbMove(ewol::keyEvent::status_te typeEvent, ewol::keyEvent::keyboard_te moveTypeEvent)
-{
- if (typeEvent == ewol::keyEvent::statusDown) {
- BufferText* tmpBuffer = BufferManager::Get(m_bufferID);
- if (NULL!=tmpBuffer) {
- tmpBuffer->cursorMove(moveTypeEvent);
- }
- MarkToRedraw();
- }
- 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)
{
BufferText* tmpBuffer = BufferManager::Get(m_bufferID);
@@ -229,25 +220,17 @@ void CodeView::OnEventClipboard(ewol::clipBoard::clipboardListe_te clipboardID)
MarkToRedraw();
}
-/**
- * @brief Event on an input of this Widget
- * @param[in] type Type of the input (ewol::INPUT_TYPE_MOUSE/ewol::INPUT_TYPE_FINGER ...)
- * @param[in] IdInput Id of the current Input (PC : left=1, right=2, middle=3, none=0 / Tactil : first finger=1 , second=2 (only on this widget, no knowledge at ouside finger))
- * @param[in] typeEvent ewol type of event like EVENT_INPUT_TYPE_DOWN/EVENT_INPUT_TYPE_MOVE/EVENT_INPUT_TYPE_UP/EVENT_INPUT_TYPE_SINGLE/EVENT_INPUT_TYPE_DOUBLE/...
- * @param[in] pos Absolute position of the event
- * @return true the event is used
- * @return false the event is not used
- */
-bool CodeView::OnEventInput(ewol::keyEvent::type_te type, int32_t IdInput, ewol::keyEvent::status_te typeEvent, const vec2& pos)
+bool CodeView::OnEventInput(const ewol::EventInput& _event)
{
- vec2 relativePos = RelativePosition(pos);
+ vec2 relativePos = RelativePosition(_event.GetPos());
+ //APPL_DEBUG("Event at pos : " << _event.GetPos() << " ==> " << relativePos );
// corection for the openGl abstraction
//relativePos.y = m_size.y - relativePos.y;
- vec2 limitedPos = relativePos;
+ vec2 limitedPos = relativePos;
limitedPos.setValue(etk_avg(1, limitedPos.x(), m_size.x()-1),
etk_avg(1, limitedPos.y(), m_size.y()-1));
- if (true == WidgetScrooled::OnEventInput(type, IdInput, typeEvent, pos)) {
+ if (true == WidgetScrooled::OnEventInput(_event)) {
ewol::widgetManager::FocusKeep(this);
// nothing to do ... done on upper widget ...
return true;
@@ -257,9 +240,10 @@ bool CodeView::OnEventInput(ewol::keyEvent::type_te type, int32_t IdInput, ewol:
return false;
}
- if (1 == IdInput) {
- #ifndef __MODE__Touch
- if (ewol::keyEvent::statusDown == typeEvent) {
+ if (1 == _event.GetId()) {
+
+ if (ewol::keyEvent::typeMouse == _event.GetType()) {
+ if (ewol::keyEvent::statusDown == _event.GetStatus()) {
m_buttunOneSelected = true;
ewol::widgetManager::FocusKeep(this);
// TODO : Set something good
@@ -268,39 +252,39 @@ bool CodeView::OnEventInput(ewol::keyEvent::type_te type, int32_t IdInput, ewol:
tmpBuffer->MouseEvent(limitedPos);
}
MarkToRedraw();
- } else if (ewol::keyEvent::statusUp == typeEvent) {
+ } else if (ewol::keyEvent::statusUp == _event.GetStatus()) {
m_buttunOneSelected = false;
BufferText* tmpBuffer = BufferManager::Get(m_bufferID);
if (NULL!=tmpBuffer) {
tmpBuffer->Copy(ewol::clipBoard::clipboardSelection);
}
MarkToRedraw();
- } else
- #endif
- if (ewol::keyEvent::statusSingle == typeEvent) {
- #ifdef __MODE__Touch
+ }
+ }
+ if (ewol::keyEvent::statusSingle == _event.GetStatus()) {
+ if (ewol::keyEvent::typeMouse == _event.GetType()) {
ewol::widgetManager::FocusKeep(this);
BufferText* tmpBuffer = BufferManager::Get(m_bufferID);
if (NULL!=tmpBuffer) {
tmpBuffer->MouseEvent(limitedPos);
}
MarkToRedraw();
- #else
+ } else {
// nothing to do ...
- #endif
- } else if (ewol::keyEvent::statusDouble == typeEvent) {
+ }
+ } else if (ewol::keyEvent::statusDouble == _event.GetStatus()) {
BufferText* tmpBuffer = BufferManager::Get(m_bufferID);
if (NULL!=tmpBuffer) {
tmpBuffer->MouseEventDouble();
}
MarkToRedraw();
- } else if (ewol::keyEvent::statusTriple == typeEvent) {
+ } else if (ewol::keyEvent::statusTriple == _event.GetStatus()) {
BufferText* tmpBuffer = BufferManager::Get(m_bufferID);
if (NULL!=tmpBuffer) {
tmpBuffer->MouseEventTriple();
}
MarkToRedraw();
- } else if (ewol::keyEvent::statusMove == typeEvent) {
+ } else if (ewol::keyEvent::statusMove == _event.GetStatus()) {
if (true == m_buttunOneSelected) {
int xxx, yyy;
xxx = relativePos.x();
@@ -320,8 +304,8 @@ bool CodeView::OnEventInput(ewol::keyEvent::type_te type, int32_t IdInput, ewol:
MarkToRedraw();
}
}
- } else if (2 == IdInput) {
- if (ewol::keyEvent::statusSingle == typeEvent) {
+ } else if (2 == _event.GetId()) {
+ if (ewol::keyEvent::statusSingle == _event.GetStatus()) {
// TODO : Set something good
BufferText* tmpBuffer = BufferManager::Get(m_bufferID);
if (NULL!=tmpBuffer) {
@@ -334,15 +318,6 @@ bool CodeView::OnEventInput(ewol::keyEvent::type_te type, int32_t IdInput, ewol:
return true;
}
-
-
-/**
- * @brief Receive a message from an other EObject with a specific eventId and data
- * @param[in] CallerObject Pointer on the EObject that information came from
- * @param[in] eventId Message registered by this class
- * @param[in] data Data registered by this class
- * @return ---
- */
void CodeView::OnReceiveMessage(ewol::EObject * CallerObject, const char * eventId, const etk::UString& data)
{
widget::WidgetScrooled::OnReceiveMessage(CallerObject, eventId, data);
diff --git a/sources/appl/Gui/CodeView.h b/sources/appl/Gui/CodeView.h
index 6a2631d..fe64b6f 100644
--- a/sources/appl/Gui/CodeView.h
+++ b/sources/appl/Gui/CodeView.h
@@ -40,23 +40,13 @@ class CodeView :public widget::WidgetScrooled
// drawing elements :
ewol::Text m_displayText;
ewol::Drawing m_displayDrawing;
- public:
- // Derived function
+ public: // Derived function
virtual void OnRegenerateDisplay(void);
- // Derived function
virtual void OnReceiveMessage(ewol::EObject * CallerObject, const char * eventId, const etk::UString& data);
- public:
- // Derived function
- virtual bool OnEventInput(ewol::keyEvent::type_te type, int32_t IdInput, ewol::keyEvent::status_te typeEvent,const vec2& pos);
- // Derived function
- virtual bool OnEventKb(ewol::keyEvent::status_te typeEvent, uniChar_t unicodeData);
- // Derived function
- virtual bool OnEventKbMove(ewol::keyEvent::status_te typeEvent, ewol::keyEvent::keyboard_te moveTypeEvent);
- // Derived function
+ virtual bool OnEventInput(const ewol::EventInput& _event);
+ virtual bool OnEventEntry(const ewol::EventEntry& _event);
virtual void OnEventClipboard(ewol::clipBoard::clipboardListe_te clipboardID);
- // Derived function
virtual void OnGetFocus(void);
- // Derived function
virtual void OnLostFocus(void);
public:
void SetFontSize(int32_t size);
diff --git a/sources/appl/Gui/TagFileList.h b/sources/appl/Gui/TagFileList.h
index b214a41..462c79a 100644
--- a/sources/appl/Gui/TagFileList.h
+++ b/sources/appl/Gui/TagFileList.h
@@ -28,7 +28,7 @@ namespace appl {
class TagFileList : public widget::List
{
private:
- int32_t m_selectedLine;
+ int32_t m_selectedLine;
etk::Vector m_list;
public:
TagFileList(void);
@@ -40,21 +40,15 @@ namespace appl {
uint32_t GetNuberOfRaw(void);
bool GetElement(int32_t colomn, int32_t raw, etk::UString &myTextToWrite, draw::Color &fg, draw::Color &bg);
bool OnItemEvent(int32_t IdInput, ewol::keyEvent::status_te typeEvent, int32_t colomn, int32_t raw, float x, float y);
- /**
- * @brief Get the current Object type of the EObject
- * @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
- * @param[in] objectType type description
- * @return true if the object is compatible, otherwise false
- */
+ // herited function
const char * const GetObjectType(void) { return "TagFileList"; };
public:
/**
* @brief Add a Ctags item on the curent list
* @param[in] file Compleate file name
* @param[in] jump line id
- * @return ---
*/
- void Add(etk::UString& file, int32_t line);
+ void Add(etk::UString& file, int32_t line);
};
};