From 9640f3c52722cb6b4895f6917fb3bc7f3629446e Mon Sep 17 00:00:00 2001 From: Edouard Dupin Date: Tue, 14 Aug 2012 16:11:09 +0200 Subject: [PATCH] change the color_ts in a better class anc rename VectorType in Vector --- jni/appl/Buffer/BufferEmpty.cpp | 2 +- jni/appl/Buffer/BufferManager.cpp | 10 ++-- jni/appl/Buffer/BufferText.cpp | 22 +++---- jni/appl/Buffer/EdnBuf/EdnBuf.cpp | 64 ++++++++++----------- jni/appl/Buffer/EdnBuf/EdnBuf.h | 30 +++++----- jni/appl/Buffer/EdnBuf/EdnBufHistory.cpp | 6 +- jni/appl/Buffer/EdnBuf/EdnBufHistory.h | 10 ++-- jni/appl/Buffer/EdnBuf/EdnBuf_History.cpp | 4 +- jni/appl/Buffer/EdnBuf/EdnBuf_Selection.cpp | 4 +- jni/appl/Buffer/EdnVectorBuf.cpp | 8 +-- jni/appl/Buffer/EdnVectorBuf.h | 8 +-- jni/appl/Colorize/Colorize.cpp | 12 ++-- jni/appl/Colorize/Colorize.h | 8 +-- jni/appl/Colorize/ColorizeManager.cpp | 22 +++---- jni/appl/Colorize/ColorizeManager.h | 2 +- jni/appl/Gui/BufferView.cpp | 6 +- jni/appl/Gui/BufferView.h | 6 +- jni/appl/Gui/CodeView.cpp | 8 +-- jni/appl/Gui/CodeView.h | 6 +- jni/appl/Gui/MainWindows.cpp | 2 +- jni/appl/Highlight/Highlight.cpp | 6 +- jni/appl/Highlight/Highlight.h | 12 ++-- jni/appl/Highlight/HighlightManager.cpp | 2 +- jni/appl/Highlight/HighlightPattern.h | 6 +- jni/appl/ctags/CTagsManager.cpp | 2 +- jni/appl/ctags/CTagsManager.h | 4 +- jni/appl/init.cpp | 2 +- 27 files changed, 137 insertions(+), 137 deletions(-) diff --git a/jni/appl/Buffer/BufferEmpty.cpp b/jni/appl/Buffer/BufferEmpty.cpp index dd0ef95..366eb1b 100644 --- a/jni/appl/Buffer/BufferEmpty.cpp +++ b/jni/appl/Buffer/BufferEmpty.cpp @@ -94,7 +94,7 @@ int32_t BufferEmpty::Display(ewol::OObject2DTextColored& OOTextNormal, tmpDisplay = "No Buffer Availlable to display"; OOTextNormal.Text(textPos, tmpDisplay); - OOColored.SetColor(etk::color::color_White); + OOColored.SetColor(etk::color::white); OOColored.Rectangle( 0, 0, sizeX, sizeY); return ERR_NONE; diff --git a/jni/appl/Buffer/BufferManager.cpp b/jni/appl/Buffer/BufferManager.cpp index d257048..2211f5f 100644 --- a/jni/appl/Buffer/BufferManager.cpp +++ b/jni/appl/Buffer/BufferManager.cpp @@ -80,7 +80,7 @@ class classBufferManager: public ewol::EObject private: - etk::VectorType listBuffer; //!< element List of the char Elements + etk::Vector listBuffer; //!< element List of the char Elements void RemoveAll(void); //!< remove all buffer int32_t m_idSelected; @@ -148,7 +148,7 @@ void classBufferManager::OnReceiveMessage(ewol::EObject * CallerObject, const ch APPL_ERROR("Request select buffer ID = \"\" "); } else { int32_t newID = -1; - sscanf(data.Utf8Data(), "%d", &newID); + sscanf(data.c_str(), "%d", &newID); if(true == Exist(newID)) { m_idSelected = newID; } else { @@ -192,7 +192,7 @@ void classBufferManager::OnReceiveMessage(ewol::EObject * CallerObject, const ch } } else { int32_t newId; - sscanf(data.Utf8Data(), "%d", &newId); + sscanf(data.c_str(), "%d", &newId); if (false == Exist(newId)) { APPL_ERROR("Request a save As with a non existant ID=" << newId); } else { @@ -219,7 +219,7 @@ void classBufferManager::OnReceiveMessage(ewol::EObject * CallerObject, const ch APPL_DEBUG("Close specific buffer ID" << closeID); } else { // close specific buffer ... - sscanf(data.Utf8Data(), "%d", &closeID); + sscanf(data.c_str(), "%d", &closeID); APPL_DEBUG("Close specific buffer ID="<< closeID); } if(true == Exist(closeID)) { @@ -260,7 +260,7 @@ void classBufferManager::OnReceiveMessage(ewol::EObject * CallerObject, const ch APPL_ERROR("Null data for changing buffer ID file ... "); } else { int32_t newId; - sscanf(data.Utf8Data(), "%d", &newId); + sscanf(data.c_str(), "%d", &newId); if (true == Exist(newId)) { m_idSelected = newId; } else { diff --git a/jni/appl/Buffer/BufferText.cpp b/jni/appl/Buffer/BufferText.cpp index 22a9e16..6342b5a 100644 --- a/jni/appl/Buffer/BufferText.cpp +++ b/jni/appl/Buffer/BufferText.cpp @@ -125,7 +125,7 @@ BufferText::BufferText(etk::File &fileName) : Buffer(fileName) FILE * myFile = NULL; // try to open the file. if not existed, new file - myFile = fopen(fileName.GetCompleateName().Utf8Data(), "r"); + myFile = fopen(fileName.GetCompleateName().c_str(), "r"); if (NULL != myFile) { m_EdnBuf.DumpFrom(myFile); // close the input file @@ -152,7 +152,7 @@ void BufferText::Save(void) { APPL_INFO("Save File : \"" << GetFileName() << "\"" ); FILE * myFile = NULL; - myFile = fopen(GetFileName().GetCompleateName().Utf8Data(), "w"); + myFile = fopen(GetFileName().GetCompleateName().c_str(), "w"); if (NULL != myFile) { m_EdnBuf.DumpIn(myFile); fclose(myFile); @@ -225,7 +225,7 @@ void BufferText::DrawLineNumber(ewol::OObject2DTextColored* OOText, ewol::OObjec #define CURSOR_THICKNESS (1.2) void BufferText::DrawCursor(ewol::OObject2DColored* OOColored, int32_t x, int32_t y, int32_t letterHeight, int32_t letterWidth, clipping_ts &clip) { - color_ts & tmpppppp = ColorizeManager::Get(COLOR_CODE_CURSOR); + etk::Color & tmpppppp = ColorizeManager::Get(COLOR_CODE_CURSOR); OOColored->SetColor(tmpppppp); if (true == ewol::IsSetInsert()) { OOColored->Rectangle( x, y, letterWidth, letterHeight); @@ -317,8 +317,8 @@ int32_t BufferText::Display(ewol::OObject2DTextColored& OOTextNormal, // Get color : Colorize * myColor = ColorizeManager::Get("normal"); Colorize * myColorSel = ColorizeManager::Get("SelectedText"); - color_ts & myColorSpace = ColorizeManager::Get(COLOR_CODE_SPACE); - color_ts & myColorTab = ColorizeManager::Get(COLOR_CODE_TAB); + etk::Color & myColorSpace = ColorizeManager::Get(COLOR_CODE_SPACE); + etk::Color & myColorTab = ColorizeManager::Get(COLOR_CODE_TAB); Colorize * selectColor = NULL; ewol::OObject2DTextColored* OOTextSelected = NULL; @@ -913,7 +913,7 @@ void BufferText::AddChar(uniChar_t unicodeData) bool haveSelectionActive = m_EdnBuf.GetSelectionPos(SelectionStart, SelectionEnd, SelectionIsRect, SelectionRectStart, SelectionRectEnd); if (unicodeData == 0x09) { if (false == haveSelectionActive) { - etk::VectorType tmpVect; + etk::Vector tmpVect; tmpVect.PushBack(0x09); m_EdnBuf.Insert(m_cursorPos, tmpVect); SetInsertPosition(m_cursorPos+1, true); @@ -922,7 +922,7 @@ void BufferText::AddChar(uniChar_t unicodeData) // count the number of line : int32_t nbSelectedLines = m_EdnBuf.CountLines(SelectionStart, SelectionEnd); if (0 == nbSelectedLines) { - etk::VectorType tmpVect; + etk::Vector tmpVect; tmpVect.PushBack(0x09); m_EdnBuf.ReplaceSelected(tmpVect); SetInsertPosition(SelectionStart+tmpVect.Size(), true); @@ -935,7 +935,7 @@ void BufferText::AddChar(uniChar_t unicodeData) } } } else if (unicodeData == '\n') { - etk::VectorType tmpVect; + etk::Vector tmpVect; if (true == ewol::IsSetShift()) { tmpVect.PushBack('\r'); } else { @@ -991,7 +991,7 @@ void BufferText::AddChar(uniChar_t unicodeData) if (true == m_EdnBuf.GetUTF8Mode()) { char tmpUTF8[16]; unicode::convertUnicodeToUtf8(unicodeData, tmpUTF8); - etk::VectorType tmpVect; + etk::Vector tmpVect; int32_t localOfset = strlen(tmpUTF8); tmpVect.PushBack((int8_t*)tmpUTF8, localOfset); if (false == haveSelectionActive) { @@ -1006,7 +1006,7 @@ void BufferText::AddChar(uniChar_t unicodeData) char output_ISO; unicode::convertUnicodeToIso(m_EdnBuf.GetCharsetType(), unicodeData, output_ISO); //printf(" insert : \"%s\"==> 0x%08x=%d ", UTF8data, (unsigned int)output_ISO, (int)output_ISO); - etk::VectorType tmpVect; + etk::Vector tmpVect; tmpVect.PushBack(output_ISO); if (false == haveSelectionActive) { m_EdnBuf.Insert(m_cursorPos, tmpVect); @@ -1030,7 +1030,7 @@ int32_t BufferText::FindLine(etk::UString &data) return 0; } APPL_INFO("Search data line : \"" << data << "\""); - etk::VectorType mVectSearch; + etk::Vector mVectSearch; mVectSearch = data.GetVector(); //APPL_INFO("search data Forward : startSearchPos=" << startSearchPos ); /* diff --git a/jni/appl/Buffer/EdnBuf/EdnBuf.cpp b/jni/appl/Buffer/EdnBuf/EdnBuf.cpp index 8b4fb5e..c1efad6 100644 --- a/jni/appl/Buffer/EdnBuf/EdnBuf.cpp +++ b/jni/appl/Buffer/EdnBuf/EdnBuf.cpp @@ -119,7 +119,7 @@ bool EdnBuf::DumpFrom(FILE *myFile) } -void EdnBuf::GetAll(etk::VectorType &text) +void EdnBuf::GetAll(etk::Vector &text) { // Clean output vector text.Clear(); @@ -128,9 +128,9 @@ void EdnBuf::GetAll(etk::VectorType &text) } -void EdnBuf::SetAll(etk::VectorType &text) +void EdnBuf::SetAll(etk::Vector &text) { - etk::VectorType deletedText; + etk::Vector deletedText; // extract all data of the buffer : GetAll(deletedText); @@ -148,7 +148,7 @@ void EdnBuf::SetAll(etk::VectorType &text) eventModification(0, m_data.Size(), deletedText); } -void EdnBuf::GetRange(int32_t start, int32_t end, etk::VectorType &output) +void EdnBuf::GetRange(int32_t start, int32_t end, etk::Vector &output) { // Remove all data ... output.Clear(); @@ -162,14 +162,14 @@ void EdnBuf::GetRange(int32_t start, int32_t end, etk::UString &output) // Remove all data ... output = ""; // import data : - etk::VectorType localOutput; + etk::Vector localOutput; m_data.Get(start, end-start, localOutput); // transcript in UNICODE ... if (true == m_isUtf8) { localOutput.PushBack('\0'); output = (char*)&localOutput[0]; } else { - etk::VectorType tmpUnicodeData; + etk::Vector tmpUnicodeData; // transform in unicode : convertIsoToUnicode(m_charsetType, localOutput, tmpUnicodeData); output = tmpUnicodeData; @@ -202,7 +202,7 @@ int8_t EdnBuf::operator[] (int32_t pos) * @return --- * */ -int32_t EdnBuf::Insert(int32_t pos, etk::VectorType &insertText) +int32_t EdnBuf::Insert(int32_t pos, etk::Vector &insertText) { // if pos is not contiguous to existing text, make it pos = etk_avg(0, pos, m_data.Size() ); @@ -210,7 +210,7 @@ int32_t EdnBuf::Insert(int32_t pos, etk::VectorType &insertText) int32_t sizeInsert=LocalInsert(pos, insertText); // Call the redisplay ... - etk::VectorType deletedText; + etk::Vector deletedText; eventModification(pos, insertText.Size(), deletedText); return sizeInsert; } @@ -222,7 +222,7 @@ int32_t EdnBuf::Insert(int32_t pos, etk::UString &insertText) int32_t sizeInsert=LocalInsert(pos, insertText); // Call the redisplay ... - etk::VectorType deletedText; + etk::Vector deletedText; eventModification(pos, insertText.Size(), deletedText); return sizeInsert; } @@ -237,12 +237,12 @@ int32_t EdnBuf::Insert(int32_t pos, etk::UString &insertText) * @return nb Octet inserted * */ -int32_t EdnBuf::Replace(int32_t start, int32_t end, etk::VectorType &insertText) +int32_t EdnBuf::Replace(int32_t start, int32_t end, etk::Vector &insertText) { if (end-start == 0) { return 0; } - etk::VectorType deletedText; + etk::Vector deletedText; GetRange(start, end, deletedText); m_data.Replace(start, end-start, insertText); // update internal elements @@ -255,16 +255,16 @@ int32_t EdnBuf::Replace(int32_t start, int32_t end, etk::UString &insertText) if (end-start == 0) { return 0; } - etk::VectorType deletedText; + etk::Vector deletedText; GetRange(start, end, deletedText); - etk::VectorType tmpInsertText; + etk::Vector tmpInsertText; if (true == m_isUtf8) { - char * tmpPointer = insertText.Utf8Data(); + char * tmpPointer = insertText.c_str(); while (*tmpPointer != '\0') { tmpInsertText.PushBack(*tmpPointer++); } } else { - etk::VectorType tmppp = insertText.GetVector(); + etk::Vector tmppp = insertText.GetVector(); convertUnicodeToIso(m_charsetType, tmppp, tmpInsertText); } if (tmpInsertText.Size()>0) { @@ -296,7 +296,7 @@ int32_t EdnBuf::Replace(int32_t start, int32_t end, etk::UString &insertText) void EdnBuf::Remove(int32_t start, int32_t end) { - etk::VectorType deletedText; + etk::Vector deletedText; // Make sure the arguments make sense if (start > end) { int32_t temp = start; @@ -327,7 +327,7 @@ int32_t EdnBuf::Indent(void) // Get Range : int32_t l_start = StartOfLine(SelectionStart); int32_t l_end = EndOfLine(SelectionEnd); - etk::VectorType l_tmpData; + etk::Vector l_tmpData; GetRange(l_start, l_end, l_tmpData); l_tmpData.Insert(0, '\n'); @@ -366,7 +366,7 @@ int32_t EdnBuf::UnIndent(void) // Get Range : int32_t l_start = StartOfLine(SelectionStart); int32_t l_end = EndOfLine(SelectionEnd); - etk::VectorType l_tmpData; + etk::Vector l_tmpData; GetRange(l_start, l_end, l_tmpData); l_tmpData.Insert(0, '\n'); @@ -408,7 +408,7 @@ int32_t EdnBuf::UnIndent(void) * @return --- * */ -void EdnBuf::GetLineText(int32_t pos, etk::VectorType &text) +void EdnBuf::GetLineText(int32_t pos, etk::Vector &text) { GetRange( StartOfLine(pos), EndOfLine(pos), text); } @@ -841,9 +841,9 @@ int32_t EdnBuf::CountLines(int32_t startPos, int32_t endPos) * @return number of line found * */ -int32_t EdnBuf::CountLines(etk::VectorType &data) +int32_t EdnBuf::CountLines(etk::Vector &data) { - etk::VectorType::Iterator myPosIt = data.Begin(); + etk::Vector::Iterator myPosIt = data.Begin(); int32_t lineCount = 0; while(myPosIt) { @@ -987,14 +987,14 @@ bool EdnBuf::charMatch(char first, char second, bool caseSensitive) */ bool EdnBuf::SearchForward(int32_t startPos, etk::UString &search, int32_t *foundPos, int32_t *foundPosEnd, bool caseSensitive) { - etk::VectorType searchVect; + etk::Vector searchVect; if (true == m_isUtf8) { - char * tmpPointer = search.Utf8Data(); + char * tmpPointer = search.c_str(); while (*tmpPointer != '\0') { searchVect.PushBack(*tmpPointer++); } } else { - etk::VectorType tmppp = search.GetVector(); + etk::Vector tmppp = search.GetVector(); convertUnicodeToIso(m_charsetType, tmppp, searchVect); } // remove the '\0' at the end of the string ... @@ -1042,14 +1042,14 @@ bool EdnBuf::SearchForward(int32_t startPos, etk::UString &search, int32_t *foun */ bool EdnBuf::SearchBackward(int32_t startPos, etk::UString &search, int32_t *foundPos, int32_t *foundPosEnd, bool caseSensitive) { - etk::VectorType searchVect; + etk::Vector searchVect; if (true == m_isUtf8) { - char * tmpPointer = search.Utf8Data(); + char * tmpPointer = search.c_str(); while (*tmpPointer != '\0') { searchVect.PushBack(*tmpPointer++); } } else { - etk::VectorType tmppp = search.GetVector(); + etk::Vector tmppp = search.GetVector(); convertUnicodeToIso(m_charsetType, tmppp, searchVect); } // remove the '\0' at the end of the string ... @@ -1181,7 +1181,7 @@ bool EdnBuf::SelectAround(int32_t startPos, int32_t &beginPos, int32_t &endPos) * @return number of element inserted. * */ -int32_t EdnBuf::LocalInsert(int32_t pos, etk::VectorType &insertText) +int32_t EdnBuf::LocalInsert(int32_t pos, etk::Vector &insertText) { // Insert data in buffer m_data.Insert(pos, insertText); @@ -1192,14 +1192,14 @@ int32_t EdnBuf::LocalInsert(int32_t pos, etk::VectorType &insertText) } int32_t EdnBuf::LocalInsert(int32_t pos, etk::UString &insertText) { - etk::VectorType tmpInsertText; + etk::Vector tmpInsertText; if (true == m_isUtf8) { - char * tmpPointer = insertText.Utf8Data(); + char * tmpPointer = insertText.c_str(); while (*tmpPointer != '\0') { tmpInsertText.PushBack(*tmpPointer++); } } else { - etk::VectorType tmppp = insertText.GetVector(); + etk::Vector tmppp = insertText.GetVector(); convertUnicodeToIso(m_charsetType, tmppp, tmpInsertText); } if (tmpInsertText.Size()>0) { @@ -1221,7 +1221,7 @@ int32_t EdnBuf::LocalInsert(int32_t pos, etk::UString &insertText) * @return --- * */ -void EdnBuf::eventModification(int32_t pos, int32_t nInserted, etk::VectorType &deletedText) +void EdnBuf::eventModification(int32_t pos, int32_t nInserted, etk::Vector &deletedText) { if( 0 == deletedText.Size() && 0 == nInserted) diff --git a/jni/appl/Buffer/EdnBuf/EdnBuf.h b/jni/appl/Buffer/EdnBuf/EdnBuf.h index 75f557c..5c28ba0 100644 --- a/jni/appl/Buffer/EdnBuf/EdnBuf.h +++ b/jni/appl/Buffer/EdnBuf/EdnBuf.h @@ -59,7 +59,7 @@ typedef struct { } selection; typedef struct { - etk::VectorType HLData; + etk::Vector HLData; int32_t posHLPass1; int32_t posHLPass2; }displayHLData_ts; @@ -74,24 +74,24 @@ class EdnBuf { // destructer ~EdnBuf(void); // public function : - void GetAll( etk::VectorType &text); - void SetAll( etk::VectorType &text); - void GetRange( int32_t start, int32_t end, etk::VectorType &output); + void GetAll( etk::Vector &text); + void SetAll( etk::Vector &text); + void GetRange( int32_t start, int32_t end, etk::Vector &output); void GetRange( int32_t start, int32_t end, etk::UString &output); bool DumpIn( FILE *myFile); bool DumpFrom( FILE *myFile); // replace with operator [] ... int8_t operator[] (int32_t); - int32_t Insert( int32_t pos, etk::VectorType &insertText); + 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::VectorType &insertText); + int32_t Replace( int32_t start, int32_t end, etk::Vector &insertText); int32_t Replace( int32_t start, int32_t end, etk::UString &insertText); void Remove( int32_t start, int32_t end); int32_t Indent( void); int32_t UnIndent( void); - void GetLineText( int32_t pos, etk::VectorType &text); + void GetLineText( int32_t pos, etk::Vector &text); int32_t StartOfLine( int32_t pos); int32_t EndOfLine( int32_t pos); @@ -103,7 +103,7 @@ class EdnBuf { int32_t CountForwardDispChars( int32_t lineStartPos, int32_t nChars); int32_t CountLines( int32_t startPos, int32_t endPos); int32_t CountLines( void); - int32_t CountLines( etk::VectorType &data); + int32_t CountLines( etk::Vector &data); int32_t CountForwardNLines( int32_t startPos, int32_t nLines); int32_t CountBackwardNLines( int32_t startPos, int32_t nLines); @@ -126,10 +126,10 @@ class EdnBuf { void Unselect( void); void RectSelect( int32_t start, int32_t end, int32_t rectStart, int32_t rectEnd); bool GetSelectionPos( int32_t &start, int32_t &end, bool &isRect, int32_t &rectStart, int32_t &rectEnd); - void GetSelectionText( etk::VectorType &text); + void GetSelectionText( etk::Vector &text); void GetSelectionText( etk::UString &text); void RemoveSelected( void); - int32_t ReplaceSelected( etk::VectorType &text); + int32_t ReplaceSelected( etk::Vector &text); int32_t ReplaceSelected( etk::UString &text); private: // current selection of the buffer @@ -145,15 +145,15 @@ class EdnBuf { private: bool m_isUndoProcessing; bool m_isRedoProcessing; - etk::VectorType m_historyUndo; - etk::VectorType m_historyRedo; + etk::Vector m_historyUndo; + etk::Vector m_historyRedo; // ----------------------------------------- // hightlight section : // ----------------------------------------- private: Highlight * m_Highlight; //!< internal link with the Highlight system - etk::VectorType m_HLDataPass1; //!< colorisation position in the current buffer pass 1 + etk::Vector m_HLDataPass1; //!< colorisation position in the current buffer pass 1 void RegenerateHighLightAt(int32_t pos, int32_t nbDeleted, int32_t nbAdded); void GenerateHighLightAt(int32_t pos, int32_t endPos, int32_t addinPos=0); void CleanHighLight(void); @@ -197,10 +197,10 @@ class EdnBuf { void removeSelected( selection &sel); void replaceSelected( selection &sel, const char *text); - void eventModification( int32_t pos, int32_t nInserted, etk::VectorType &deletedText); + void eventModification( int32_t pos, int32_t nInserted, etk::Vector &deletedText); - int32_t LocalInsert( int32_t pos, etk::VectorType &insertText); + int32_t LocalInsert( int32_t pos, etk::Vector &insertText); int32_t LocalInsert( int32_t pos, etk::UString &insertText); bool charMatch( char first, char second, bool caseSensitive = true); diff --git a/jni/appl/Buffer/EdnBuf/EdnBufHistory.cpp b/jni/appl/Buffer/EdnBuf/EdnBufHistory.cpp index 4583ea5..015a266 100644 --- a/jni/appl/Buffer/EdnBuf/EdnBufHistory.cpp +++ b/jni/appl/Buffer/EdnBuf/EdnBufHistory.cpp @@ -39,7 +39,7 @@ EdnBufHistory::EdnBufHistory(void) m_nInserted = 0; } -EdnBufHistory::EdnBufHistory(int32_t pos, int32_t nInserted, etk::VectorType &deletedText) +EdnBufHistory::EdnBufHistory(int32_t pos, int32_t nInserted, etk::Vector &deletedText) { //APPL_INFO("EdnBufHistory new + data"); m_pos = pos; @@ -47,7 +47,7 @@ EdnBufHistory::EdnBufHistory(int32_t pos, int32_t nInserted, etk::VectorType &deletedText) +void EdnBufHistory::Set(int32_t pos, int32_t nInserted, etk::Vector &deletedText) { //APPL_INFO("EdnBufHistory new + data"); m_pos = pos; @@ -75,7 +75,7 @@ int32_t EdnBufHistory::getnbInserted(void) return m_nInserted; } -void EdnBufHistory::getData(etk::VectorType &deletedText) +void EdnBufHistory::getData(etk::Vector &deletedText) { deletedText = m_deletedText; } diff --git a/jni/appl/Buffer/EdnBuf/EdnBufHistory.h b/jni/appl/Buffer/EdnBuf/EdnBufHistory.h index 3545561..6a8f08b 100644 --- a/jni/appl/Buffer/EdnBuf/EdnBufHistory.h +++ b/jni/appl/Buffer/EdnBuf/EdnBufHistory.h @@ -27,22 +27,22 @@ #define __EDN_BUFFER_HISTORY_H__ -#include +#include class EdnBufHistory{ public: EdnBufHistory(void); - EdnBufHistory(int32_t pos, int32_t nInserted, etk::VectorType &deletedText); + EdnBufHistory(int32_t pos, int32_t nInserted, etk::Vector &deletedText); ~EdnBufHistory(void); - void Set(int32_t pos, int32_t nInserted, etk::VectorType &deletedText); + void Set(int32_t pos, int32_t nInserted, etk::Vector &deletedText); int32_t getPos(void); int32_t getnbDeleted(void); int32_t getnbInserted(void); - void getData(etk::VectorType &deletedText); + void getData(etk::Vector &deletedText); private: int32_t m_pos; int32_t m_nInserted; - etk::VectorType m_deletedText; + etk::Vector m_deletedText; }; #endif diff --git a/jni/appl/Buffer/EdnBuf/EdnBuf_History.cpp b/jni/appl/Buffer/EdnBuf/EdnBuf_History.cpp index 65b2730..a668ec3 100644 --- a/jni/appl/Buffer/EdnBuf/EdnBuf_History.cpp +++ b/jni/appl/Buffer/EdnBuf/EdnBuf_History.cpp @@ -53,7 +53,7 @@ int32_t EdnBuf::Undo(void) int32_t pos = m_historyUndo[nbElement]->getPos(); int32_t nbDeleted = m_historyUndo[nbElement]->getnbDeleted(); int32_t nbInserted = m_historyUndo[nbElement]->getnbInserted(); - etk::VectorType deletedText; + etk::Vector deletedText; m_historyUndo[nbElement]->getData(deletedText); m_isUndoProcessing = true; if (0 == nbInserted) { @@ -101,7 +101,7 @@ int32_t EdnBuf::Redo(void) int32_t pos = m_historyRedo[nbElement]->getPos(); int32_t nbDeleted = m_historyRedo[nbElement]->getnbDeleted(); int32_t nbInserted = m_historyRedo[nbElement]->getnbInserted(); - etk::VectorType deletedText; + etk::Vector deletedText; m_historyRedo[nbElement]->getData(deletedText); m_isRedoProcessing = true; if (0 == nbInserted) { diff --git a/jni/appl/Buffer/EdnBuf/EdnBuf_Selection.cpp b/jni/appl/Buffer/EdnBuf/EdnBuf_Selection.cpp index 7b511ea..d22f719 100644 --- a/jni/appl/Buffer/EdnBuf/EdnBuf_Selection.cpp +++ b/jni/appl/Buffer/EdnBuf/EdnBuf_Selection.cpp @@ -136,7 +136,7 @@ bool EdnBuf::GetSelectionPos(int32_t &start, int32_t &end, bool &isRect, int32_t * @return --- * */ -void EdnBuf::GetSelectionText(etk::VectorType &text) +void EdnBuf::GetSelectionText(etk::Vector &text) { int32_t start, end, rectStart, rectEnd; bool isRect; @@ -220,7 +220,7 @@ void EdnBuf::RemoveSelected(void) * @return --- * */ -int32_t EdnBuf::ReplaceSelected(etk::VectorType &text) +int32_t EdnBuf::ReplaceSelected(etk::Vector &text) { int32_t start, end, rectStart, rectEnd; bool isRect; diff --git a/jni/appl/Buffer/EdnVectorBuf.cpp b/jni/appl/Buffer/EdnVectorBuf.cpp index 2331dcb..4e55425 100644 --- a/jni/appl/Buffer/EdnVectorBuf.cpp +++ b/jni/appl/Buffer/EdnVectorBuf.cpp @@ -225,7 +225,7 @@ int8_t& EdnVectorBuf::Get(int32_t pos) * @return --- * */ -void EdnVectorBuf::Get(int32_t pos, int32_t nbElement, etk::VectorType &tmpBuffer) +void EdnVectorBuf::Get(int32_t pos, int32_t nbElement, etk::Vector &tmpBuffer) { tmpBuffer.Clear(); if (pos < m_gapStart) { @@ -397,7 +397,7 @@ void EdnVectorBuf::Insert(int32_t pos, const int8_t& item) * @return --- * */ -void EdnVectorBuf::Insert(int32_t pos, etk::VectorType& items) +void EdnVectorBuf::Insert(int32_t pos, etk::Vector& items) { if( pos > Size() || pos < 0 ) { @@ -453,7 +453,7 @@ void EdnVectorBuf::Replace(int32_t pos, const int8_t& item) * @return --- * */ -void EdnVectorBuf::Replace(int32_t pos, int32_t nbRemoveElement, etk::VectorType& items) +void EdnVectorBuf::Replace(int32_t pos, int32_t nbRemoveElement, etk::Vector& items) { if( pos > Size() || pos < 0 ) { @@ -650,7 +650,7 @@ void TestEdnVectorBuf(void) myBufferTmp.Display(); plop='m'; - etk::VectorType items; + etk::Vector items; items.PushBack('i'); items.PushBack('j'); items.PushBack('k'); diff --git a/jni/appl/Buffer/EdnVectorBuf.h b/jni/appl/Buffer/EdnVectorBuf.h index 3cfbba8..52afcdd 100644 --- a/jni/appl/Buffer/EdnVectorBuf.h +++ b/jni/appl/Buffer/EdnVectorBuf.h @@ -26,7 +26,7 @@ #ifndef __EDN_VECTOR_BUF_H__ #define __EDN_VECTOR_BUF_H__ -#include +#include #undef __class__ #define __class__ "EdnVectorBuf" @@ -271,14 +271,14 @@ class EdnVectorBuf EdnVectorBuf & operator=( const EdnVectorBuf & Evb); int8_t operator[] (int32_t pos); int8_t & Get( int32_t pos); - void Get( int32_t pos, int32_t nbElement, etk::VectorType &tmpBuffer); + void Get( int32_t pos, int32_t nbElement, etk::Vector &tmpBuffer); // insert functions void PushBack( const int8_t& item); void Insert( int32_t pos, const int8_t& item); - void Insert( int32_t pos, etk::VectorType& items); + void Insert( int32_t pos, etk::Vector& items); // Remove and insert functions void Replace( int32_t pos, const int8_t& item); - void Replace( int32_t pos, int32_t nbRemoveElement, etk::VectorType& items); + void Replace( int32_t pos, int32_t nbRemoveElement, etk::Vector& items); // Revove fonctions void Remove( int32_t pos, int32_t nbRemoveElement = 1); void PopBack( void); diff --git a/jni/appl/Colorize/Colorize.cpp b/jni/appl/Colorize/Colorize.cpp index c3209a9..7e6ae9b 100644 --- a/jni/appl/Colorize/Colorize.cpp +++ b/jni/appl/Colorize/Colorize.cpp @@ -35,8 +35,8 @@ Colorize::Colorize( etk::UString &newColorName) { - m_colorFG = etk::color::color_Black; - m_colorBG = etk::color::color_Black; + m_colorFG = etk::color::black; + m_colorBG = etk::color::black; italic = false; bold = false; @@ -50,8 +50,8 @@ Colorize::Colorize(void) { ColorName = "no_name"; - m_colorFG = etk::color::color_Black; - m_colorBG = etk::color::color_Black; + m_colorFG = etk::color::black; + m_colorBG = etk::color::black; italic = false; bold = false; @@ -89,14 +89,14 @@ etk::UString Colorize::GetName(void) void Colorize::SetFgColor(const char *myColor) { haveFG = true; - m_colorFG = etk::color::Parse(myColor); + m_colorFG = myColor; APPL_VERBOSE(myColor << " ==> "<< m_colorFG ); } void Colorize::SetBgColor(const char *myColor) { haveBG = true; - m_colorBG = etk::color::Parse(myColor); + m_colorBG = myColor; APPL_VERBOSE(myColor << " ==> "<< m_colorBG ); } diff --git a/jni/appl/Colorize/Colorize.h b/jni/appl/Colorize/Colorize.h index 09299f7..5ee0294 100644 --- a/jni/appl/Colorize/Colorize.h +++ b/jni/appl/Colorize/Colorize.h @@ -40,8 +40,8 @@ class Colorize { void SetFgColor(const char *myColor); void SetBgColor(const char *myColor); - color_ts & GetFG(void) { return m_colorFG; }; - color_ts & GetBG(void) { return m_colorBG; }; + etk::Color & GetFG(void) { return m_colorFG; }; + etk::Color & GetBG(void) { return m_colorBG; }; bool HaveBg(void); @@ -54,8 +54,8 @@ class Colorize { private: etk::UString ColorName; //!< curent color Name - color_ts m_colorFG; - color_ts m_colorBG; + etk::Color m_colorFG; + etk::Color m_colorBG; bool italic; bool bold; diff --git a/jni/appl/Colorize/ColorizeManager.cpp b/jni/appl/Colorize/ColorizeManager.cpp index 29f452f..3dfdc32 100644 --- a/jni/appl/Colorize/ColorizeManager.cpp +++ b/jni/appl/Colorize/ColorizeManager.cpp @@ -61,16 +61,16 @@ class classColorManager: public ewol::EObject void LoadFile(const char * xmlFilename); Colorize * Get(const char *colorName); Colorize * Get(etk::UString &colorName); - color_ts & Get(basicColor_te myColor); + etk::Color& Get(basicColor_te myColor); bool Exist(etk::UString &colorName); bool Exist(const char *colorName); void DisplayListOfColor(void); private: - etk::UString m_fileColor; - etk::VectorType listMyColor; //!< List of ALL Color + etk::UString m_fileColor; + etk::Vector listMyColor; //!< List of ALL Color Colorize * errorColor; - color_ts basicColors[COLOR_NUMBER_MAX]; + etk::Color basicColors[COLOR_NUMBER_MAX]; }; @@ -116,7 +116,7 @@ void classColorManager::OnReceiveMessage(ewol::EObject * CallerObject, const cha void classColorManager::LoadFile(etk::UString &xmlFilename) { // TODO : Remove this - LoadFile(xmlFilename.Utf8Data()); + LoadFile(xmlFilename.c_str()); } // TODO : Remove this ... @@ -225,7 +225,7 @@ void classColorManager::LoadFile(const char * xmlFilename) } const char *color = pGuiNode->ToElement()->Attribute("val"); if (NULL != color) { - basicColors[id] = etk::color::Parse(color); + basicColors[id] = color; } } else { APPL_ERROR("(l "<Row()<<") node not suported : \""<Value()<<"\" must be [color]"); @@ -313,10 +313,10 @@ Colorize *classColorManager::Get(const char *colorName) Colorize *classColorManager::Get(etk::UString &colorName) { // TODO : Remove this - return Get(colorName.Utf8Data()); + return Get(colorName.c_str()); } -color_ts & classColorManager::Get(basicColor_te myColor) +etk::Color & classColorManager::Get(basicColor_te myColor) { if (myColor < COLOR_NUMBER_MAX) { return basicColors[myColor]; @@ -342,7 +342,7 @@ bool classColorManager::Exist(const char *colorName) bool classColorManager::Exist(etk::UString &colorName) { // TODO : Remove this - return Exist(colorName.Utf8Data()); + return Exist(colorName.c_str()); } void classColorManager::DisplayListOfColor(void) @@ -417,9 +417,9 @@ Colorize* ColorizeManager::Get(etk::UString &colorName) return localManager->Get(colorName); } -color_ts errorColor; +etk::Color errorColor; -color_ts& ColorizeManager::Get(basicColor_te myColor) +etk::Color& ColorizeManager::Get(basicColor_te myColor) { if (NULL == localManager) { return errorColor; diff --git a/jni/appl/Colorize/ColorizeManager.h b/jni/appl/Colorize/ColorizeManager.h index 3f94cfd..eba1d55 100644 --- a/jni/appl/Colorize/ColorizeManager.h +++ b/jni/appl/Colorize/ColorizeManager.h @@ -57,7 +57,7 @@ namespace ColorizeManager void LoadFile(const char * xmlFilename); Colorize * Get(const char *colorName); Colorize * Get(etk::UString &colorName); - color_ts & Get(basicColor_te myColor); + etk::Color& Get(basicColor_te myColor); bool Exist(etk::UString &colorName); bool Exist(const char *colorName); void DisplayListOfColor(void); diff --git a/jni/appl/Gui/BufferView.cpp b/jni/appl/Gui/BufferView.cpp index d163839..6f5f062 100644 --- a/jni/appl/Gui/BufferView.cpp +++ b/jni/appl/Gui/BufferView.cpp @@ -72,7 +72,7 @@ void BufferView::OnReceiveMessage(ewol::EObject * CallerObject, const char * eve } -color_ts BufferView::GetBasicBG(void) +etk::Color BufferView::GetBasicBG(void) { return ColorizeManager::Get(COLOR_LIST_BG_1); } @@ -82,7 +82,7 @@ uint32_t BufferView::GetNuberOfColomn(void) return 1; } -bool BufferView::GetTitle(int32_t colomn, etk::UString &myTitle, color_ts &fg, color_ts &bg) +bool BufferView::GetTitle(int32_t colomn, etk::UString &myTitle, etk::Color &fg, etk::Color &bg) { myTitle = "Buffers : "; return true; @@ -93,7 +93,7 @@ uint32_t BufferView::GetNuberOfRaw(void) return BufferManager::SizeOpen(); } -bool BufferView::GetElement(int32_t colomn, int32_t raw, etk::UString &myTextToWrite, color_ts &fg, color_ts &bg) +bool BufferView::GetElement(int32_t colomn, int32_t raw, etk::UString &myTextToWrite, etk::Color &fg, etk::Color &bg) { etk::File name; bool isModify; diff --git a/jni/appl/Gui/BufferView.h b/jni/appl/Gui/BufferView.h index c8f18b6..a4b69bd 100644 --- a/jni/appl/Gui/BufferView.h +++ b/jni/appl/Gui/BufferView.h @@ -54,11 +54,11 @@ class BufferView : public ewol::List virtual void OnReceiveMessage(ewol::EObject * CallerObject, const char * eventId, etk::UString data); protected: // function call to display the list : - virtual color_ts GetBasicBG(void); + virtual etk::Color GetBasicBG(void); virtual uint32_t GetNuberOfColomn(void); - virtual bool GetTitle(int32_t colomn, etk::UString &myTitle, color_ts &fg, color_ts &bg); + virtual bool GetTitle(int32_t colomn, etk::UString &myTitle, etk::Color &fg, etk::Color &bg); virtual uint32_t GetNuberOfRaw(void); - virtual bool GetElement(int32_t colomn, int32_t raw, etk::UString &myTextToWrite, color_ts &fg, color_ts &bg); + virtual bool GetElement(int32_t colomn, int32_t raw, etk::UString &myTextToWrite, etk::Color &fg, etk::Color &bg); virtual bool OnItemEvent(int32_t IdInput, ewol::eventInputType_te typeEvent, int32_t colomn, int32_t raw, float x, float y); private: int32_t m_selectedIdRequested; diff --git a/jni/appl/Gui/CodeView.cpp b/jni/appl/Gui/CodeView.cpp index 6b1cf97..359bc1c 100644 --- a/jni/appl/Gui/CodeView.cpp +++ b/jni/appl/Gui/CodeView.cpp @@ -56,10 +56,10 @@ CodeView::CodeView(void) m_lineNumberList.Clear(); - m_textColorFg = etk::color::color_Black; + m_textColorFg = etk::color::black; - m_textColorBg = etk::color::color_Black; - m_textColorBg.alpha = 0.25; + m_textColorBg = etk::color::black; + m_textColorBg.alpha = 0x40; SetCanHaveFocus(true); RegisterMultiCast(ednMsgBufferId); RegisterMultiCast(ednMsgGuiCopy); @@ -292,7 +292,7 @@ void CodeView::OnReceiveMessage(ewol::EObject * CallerObject, const char * event m_lineNumberList[m_bufferID] = m_originScrooled; } int32_t bufferID = 0; - sscanf(data.Utf8Data(), "%d", &bufferID); + sscanf(data.c_str(), "%d", &bufferID); APPL_INFO("Select a new Buffer ... " << bufferID); // set the new buffer ID m_bufferID = bufferID; diff --git a/jni/appl/Gui/CodeView.h b/jni/appl/Gui/CodeView.h index b87456c..557393b 100644 --- a/jni/appl/Gui/CodeView.h +++ b/jni/appl/Gui/CodeView.h @@ -49,11 +49,11 @@ class CodeView :public ewol::WidgetScrooled virtual bool CalculateMinSize(void); private: etk::UString m_label; - color_ts m_textColorFg; //!< Text color - color_ts m_textColorBg; //!< Background color + etk::Color m_textColorFg; //!< Text color + etk::Color m_textColorBg; //!< Background color int32_t m_bufferID; bool m_buttunOneSelected; - etk::VectorType > m_lineNumberList; + etk::Vector > m_lineNumberList; void UpdateNumberOfLineReference(int32_t bufferID); // drawing elements : ewol::OObject2DTextColored m_OObjectTextNormal; diff --git a/jni/appl/Gui/MainWindows.cpp b/jni/appl/Gui/MainWindows.cpp index a7dfc34..77ede39 100644 --- a/jni/appl/Gui/MainWindows.cpp +++ b/jni/appl/Gui/MainWindows.cpp @@ -273,7 +273,7 @@ void MainWindows::OnReceiveMessage(ewol::EObject * CallerObject, const char * ev if (data == "current") { m_currentSavingAsIdBuffer = BufferManager::GetSelected(); } else { - sscanf(data.Utf8Data(), "%d", &m_currentSavingAsIdBuffer); + sscanf(data.c_str(), "%d", &m_currentSavingAsIdBuffer); } if (false == BufferManager::Exist(m_currentSavingAsIdBuffer)) { diff --git a/jni/appl/Highlight/Highlight.cpp b/jni/appl/Highlight/Highlight.cpp index 64c7ccc..73fe87a 100644 --- a/jni/appl/Highlight/Highlight.cpp +++ b/jni/appl/Highlight/Highlight.cpp @@ -33,7 +33,7 @@ #define __class__ "Highlight" -void Highlight::ParseRules(TiXmlNode *child, etk::VectorType &mListPatern, int32_t level) +void Highlight::ParseRules(TiXmlNode *child, etk::Vector &mListPatern, int32_t level) { // Create the patern ... HighlightPattern *myPattern = new HighlightPattern(); @@ -236,7 +236,7 @@ void Highlight::Display(void) // TODO : Celui qui appelle suprime des element pour rien ... Enfin c'est pas trègrave... Il suffirait juste de suprimer celuis d'avant si il n'est pas terminer... void Highlight::Parse(int32_t start, int32_t stop, - etk::VectorType &metaData, + etk::Vector &metaData, int32_t addingPos, EdnVectorBuf &buffer) { @@ -300,7 +300,7 @@ void Highlight::Parse(int32_t start, */ void Highlight::Parse2(int32_t start, int32_t stop, - etk::VectorType &metaData, + etk::Vector &metaData, EdnVectorBuf &buffer) { //APPL_DEBUG("Parse element 0 => " << m_listHighlightPass2.size() << " ==> position search: (" << start << "," << stop << ")" ); diff --git a/jni/appl/Highlight/Highlight.h b/jni/appl/Highlight/Highlight.h index a0df313..fdc41f5 100644 --- a/jni/appl/Highlight/Highlight.h +++ b/jni/appl/Highlight/Highlight.h @@ -59,19 +59,19 @@ class Highlight { void ReloadColor(void); void Parse(int32_t start, int32_t stop, - etk::VectorType &metaData, + etk::Vector &metaData, int32_t addingPos, EdnVectorBuf &buffer); void Parse2(int32_t start, int32_t stop, - etk::VectorType &metaData, + etk::Vector &metaData, EdnVectorBuf &buffer); private: - void ParseRules(TiXmlNode *child, etk::VectorType &mListPatern, int32_t level); + void ParseRules(TiXmlNode *child, etk::Vector &mListPatern, int32_t level); etk::UString m_styleName; //!< curent style name (like "c++" or "c" or "script Bash") - etk::VectorType m_listExtentions; //!< List of possible extention for this high-light, like : ".c", ".cpp", ".h" - etk::VectorType m_listHighlightPass1; //!< List of ALL hightlight modules (pass 1 ==> when we load and wride data on the buffer) - etk::VectorType m_listHighlightPass2; //!< List of ALL hightlight modules (pass 2 ==> When we display the buffer( only the display area (100 lines)) ) + etk::Vector m_listExtentions; //!< List of possible extention for this high-light, like : ".c", ".cpp", ".h" + etk::Vector m_listHighlightPass1; //!< List of ALL hightlight modules (pass 1 ==> when we load and wride data on the buffer) + etk::Vector m_listHighlightPass2; //!< List of ALL hightlight modules (pass 2 ==> When we display the buffer( only the display area (100 lines)) ) }; diff --git a/jni/appl/Highlight/HighlightManager.cpp b/jni/appl/Highlight/HighlightManager.cpp index 2efd8d6..b10b940 100644 --- a/jni/appl/Highlight/HighlightManager.cpp +++ b/jni/appl/Highlight/HighlightManager.cpp @@ -35,7 +35,7 @@ class localClassHighlightManager: public ewol::EObject { private: - etk::VectorType listHighlight; //!< List of ALL hightlight modules + etk::Vector listHighlight; //!< List of ALL hightlight modules public: // Constructeur localClassHighlightManager(void) { diff --git a/jni/appl/Highlight/HighlightPattern.h b/jni/appl/Highlight/HighlightPattern.h index 24f4388..ecb0649 100644 --- a/jni/appl/Highlight/HighlightPattern.h +++ b/jni/appl/Highlight/HighlightPattern.h @@ -33,7 +33,7 @@ class HighlightPattern; #include #include -#include +#include #include #include @@ -81,8 +81,8 @@ class HighlightPattern { bool m_haveStopPatern; //!< Stop patern presence bool m_multiline; //!< The patern is multiline uniChar_t m_escapeChar; //!< Escape char to prevent exeit of patern .... - etk::VectorType m_subPatern; //!< Under patern of this one -// etk::VectorType m_subColor; //!< Under Color in the start RegExp ... + etk::Vector m_subPatern; //!< Under patern of this one +// etk::Vector m_subColor; //!< Under Color in the start RegExp ... }; #endif diff --git a/jni/appl/ctags/CTagsManager.cpp b/jni/appl/ctags/CTagsManager.cpp index de16c25..abca180 100644 --- a/jni/appl/ctags/CTagsManager.cpp +++ b/jni/appl/ctags/CTagsManager.cpp @@ -344,7 +344,7 @@ void CTagsManager::JumpTo(void) /* m_currentList.Clear(); if (NULL != m_ctagFile) { - etk::VectorType data; + etk::Vector data; // get the middle button of the clipboard ==> represent the current selection ... ClipBoard::Get(COPY_MIDDLE_BUTTON, data); if (data.Size() == 0) { diff --git a/jni/appl/ctags/CTagsManager.h b/jni/appl/ctags/CTagsManager.h index 7be6e5c..1d1bff9 100644 --- a/jni/appl/ctags/CTagsManager.h +++ b/jni/appl/ctags/CTagsManager.h @@ -64,8 +64,8 @@ class CTagsManager: public etk::Singleton, public ewol::Widget // history system void AddToHistory(int32_t bufferID); int32_t m_historyPos; - etk::VectorType m_historyList; - etk::VectorType m_currentList; + etk::Vector m_historyList; + etk::Vector m_currentList; void JumpAtID(int32_t selectID); }; */ diff --git a/jni/appl/init.cpp b/jni/appl/init.cpp index 4222eba..48b3a1a 100644 --- a/jni/appl/init.cpp +++ b/jni/appl/init.cpp @@ -85,7 +85,7 @@ void APP_Init(void) // set color and other trucs... ColorizeManager::Init(); etk::UString corlorFile = "color_white.xml"; - ColorizeManager::LoadFile( corlorFile.Utf8Data() ); + ColorizeManager::LoadFile( corlorFile.c_str() ); ColorizeManager::DisplayListOfColor(); HighlightManager::Init();