Remove std::vector and std::string from the sources for reson of portability
This commit is contained in:
parent
2c6f280c58
commit
a196c615bf
@ -26,8 +26,6 @@
|
|||||||
#ifndef __BUFFER_TEXT_H__
|
#ifndef __BUFFER_TEXT_H__
|
||||||
#define __BUFFER_TEXT_H__
|
#define __BUFFER_TEXT_H__
|
||||||
|
|
||||||
#include <vector>
|
|
||||||
#include <string>
|
|
||||||
#include "ColorizeManager.h"
|
#include "ColorizeManager.h"
|
||||||
#include "Buffer.h"
|
#include "Buffer.h"
|
||||||
#include "EdnBuf.h"
|
#include "EdnBuf.h"
|
||||||
|
@ -37,8 +37,17 @@ ColorizeManager::ColorizeManager(void)
|
|||||||
ColorizeManager::~ColorizeManager(void)
|
ColorizeManager::~ColorizeManager(void)
|
||||||
{
|
{
|
||||||
delete(errorColor);
|
delete(errorColor);
|
||||||
// TODO : delete all color previously
|
|
||||||
listMyColor.clear();
|
uint32_t i;
|
||||||
|
// clean all Element
|
||||||
|
for (i=0; i< listMyColor.Size(); i++) {
|
||||||
|
if (NULL != listMyColor[i]) {
|
||||||
|
delete(listMyColor[i]);
|
||||||
|
listMyColor[i] = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// clear the compleate list
|
||||||
|
listMyColor.Clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -181,7 +190,7 @@ void ColorizeManager::LoadFile(const char * xmlFilename)
|
|||||||
myNewColor->SetItalic(true);
|
myNewColor->SetItalic(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
listMyColor.push_back(myNewColor);
|
listMyColor.PushBack(myNewColor);
|
||||||
} else {
|
} else {
|
||||||
EDN_ERROR(PFX"(l "<<pNode->Row()<<") node not suported : \""<<pNode->Value()<<"\" must be [color]");
|
EDN_ERROR(PFX"(l "<<pNode->Row()<<") node not suported : \""<<pNode->Value()<<"\" must be [color]");
|
||||||
}
|
}
|
||||||
@ -199,7 +208,7 @@ void ColorizeManager::LoadFile(const char * xmlFilename)
|
|||||||
Colorize *ColorizeManager::Get(const char *colorName)
|
Colorize *ColorizeManager::Get(const char *colorName)
|
||||||
{
|
{
|
||||||
uint32_t i;
|
uint32_t i;
|
||||||
for (i=0; i<listMyColor.size(); i++) {
|
for (i=0; i<listMyColor.Size(); i++) {
|
||||||
Edn::String elementName = listMyColor[i]->GetName();
|
Edn::String elementName = listMyColor[i]->GetName();
|
||||||
if (elementName == colorName) {
|
if (elementName == colorName) {
|
||||||
return listMyColor[i];
|
return listMyColor[i];
|
||||||
@ -228,7 +237,7 @@ color_ts & ColorizeManager::Get(basicColor_te myColor)
|
|||||||
bool ColorizeManager::Exist(const char *colorName)
|
bool ColorizeManager::Exist(const char *colorName)
|
||||||
{
|
{
|
||||||
uint32_t i;
|
uint32_t i;
|
||||||
for (i=0; i<listMyColor.size(); i++) {
|
for (i=0; i<listMyColor.Size(); i++) {
|
||||||
Edn::String elementName = listMyColor[i]->GetName();
|
Edn::String elementName = listMyColor[i]->GetName();
|
||||||
if (elementName == colorName) {
|
if (elementName == colorName) {
|
||||||
return true;
|
return true;
|
||||||
@ -245,7 +254,7 @@ void ColorizeManager::DisplayListOfColor(void)
|
|||||||
{
|
{
|
||||||
uint32_t i;
|
uint32_t i;
|
||||||
EDN_INFO(PFX"List of ALL COLOR : ");
|
EDN_INFO(PFX"List of ALL COLOR : ");
|
||||||
for (i=0; i<listMyColor.size(); i++) {
|
for (i=0; i<listMyColor.Size(); i++) {
|
||||||
//Edn::String elementName = listMyColor[i]->GetName();
|
//Edn::String elementName = listMyColor[i]->GetName();
|
||||||
//EDN_INFO(i << " : \"" << elementName.c_str() << "\"" );
|
//EDN_INFO(i << " : \"" << elementName.c_str() << "\"" );
|
||||||
listMyColor[i]->Display(i);
|
listMyColor[i]->Display(i);
|
||||||
|
@ -27,9 +27,8 @@
|
|||||||
#define __COLORIZE_MANAGER_H__
|
#define __COLORIZE_MANAGER_H__
|
||||||
|
|
||||||
#include "Singleton.h"
|
#include "Singleton.h"
|
||||||
#include <vector>
|
|
||||||
#include <string>
|
|
||||||
#include "Colorize.h"
|
#include "Colorize.h"
|
||||||
|
#include "Edn.h"
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
// BASIC color for codeViewer
|
// BASIC color for codeViewer
|
||||||
@ -69,7 +68,7 @@ class ColorizeManager: public Singleton<ColorizeManager>
|
|||||||
void DisplayListOfColor(void);
|
void DisplayListOfColor(void);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::vector<Colorize*> listMyColor; //!< List of ALL Color
|
Edn::VectorType<Colorize*> listMyColor; //!< List of ALL Color
|
||||||
Colorize * errorColor;
|
Colorize * errorColor;
|
||||||
color_ts basicColors[COLOR_NUMBER_MAX];
|
color_ts basicColors[COLOR_NUMBER_MAX];
|
||||||
};
|
};
|
||||||
|
@ -26,8 +26,6 @@
|
|||||||
#define __BUFFER_VIEW_H__
|
#define __BUFFER_VIEW_H__
|
||||||
|
|
||||||
#include "tools_debug.h"
|
#include "tools_debug.h"
|
||||||
#include <vector>
|
|
||||||
#include <string>
|
|
||||||
#include "Singleton.h"
|
#include "Singleton.h"
|
||||||
#include "CodeView.h"
|
#include "CodeView.h"
|
||||||
#include "BufferManager.h"
|
#include "BufferManager.h"
|
||||||
|
@ -28,8 +28,7 @@
|
|||||||
|
|
||||||
#include "tools_debug.h"
|
#include "tools_debug.h"
|
||||||
#include "Singleton.h"
|
#include "Singleton.h"
|
||||||
#include <string>
|
|
||||||
#include <vector>
|
|
||||||
|
|
||||||
|
|
||||||
class MainAreaView: public Singleton<MainAreaView>
|
class MainAreaView: public Singleton<MainAreaView>
|
||||||
|
@ -28,8 +28,6 @@
|
|||||||
|
|
||||||
#include "tools_debug.h"
|
#include "tools_debug.h"
|
||||||
#include "Singleton.h"
|
#include "Singleton.h"
|
||||||
#include <string>
|
|
||||||
#include <vector>
|
|
||||||
|
|
||||||
|
|
||||||
class Search: public Singleton<Search>
|
class Search: public Singleton<Search>
|
||||||
|
@ -33,14 +33,14 @@
|
|||||||
#define __class__ "Highlight"
|
#define __class__ "Highlight"
|
||||||
|
|
||||||
|
|
||||||
void Highlight::ParseRules(TiXmlNode *child, std::vector<HighlightPattern*> &mListPatern, int32_t level)
|
void Highlight::ParseRules(TiXmlNode *child, Edn::VectorType<HighlightPattern*> &mListPatern, int32_t level)
|
||||||
{
|
{
|
||||||
// Create the patern ...
|
// Create the patern ...
|
||||||
HighlightPattern *myPattern = new HighlightPattern();
|
HighlightPattern *myPattern = new HighlightPattern();
|
||||||
// parse under Element
|
// parse under Element
|
||||||
myPattern->ParseRules(child, level);
|
myPattern->ParseRules(child, level);
|
||||||
// add element in the list
|
// add element in the list
|
||||||
mListPatern.push_back(myPattern);
|
mListPatern.PushBack(myPattern);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -72,8 +72,8 @@ Highlight::Highlight(Edn::String &xmlFilename)
|
|||||||
const char *myData = child->ToElement()->GetText();
|
const char *myData = child->ToElement()->GetText();
|
||||||
if (NULL != myData) {
|
if (NULL != myData) {
|
||||||
//EDN_INFO(PFX"(l %d) node fined : %s=\"%s\"", child->Row(), child->Value() , myData);
|
//EDN_INFO(PFX"(l %d) node fined : %s=\"%s\"", child->Row(), child->Value() , myData);
|
||||||
Edn::String myEdnData = myData;
|
Edn::String * myEdnData = new Edn::String(myData);
|
||||||
m_listExtentions.push_back(myEdnData);
|
m_listExtentions.PushBack(myEdnData);
|
||||||
}
|
}
|
||||||
} else if (!strcmp(child->Value(), "pass1")) {
|
} else if (!strcmp(child->Value(), "pass1")) {
|
||||||
// Get sub Nodes ...
|
// Get sub Nodes ...
|
||||||
@ -113,21 +113,34 @@ Highlight::Highlight(Edn::String &xmlFilename)
|
|||||||
|
|
||||||
Highlight::~Highlight(void)
|
Highlight::~Highlight(void)
|
||||||
{
|
{
|
||||||
uint32_t i;
|
int32_t i;
|
||||||
// clean all Element
|
// clean all Element
|
||||||
for (i=0; i< m_listHighlightPass1.size(); i++) {
|
for (i=0; i< m_listHighlightPass1.Size(); i++) {
|
||||||
|
if (NULL != m_listHighlightPass1[i]) {
|
||||||
delete(m_listHighlightPass1[i]);
|
delete(m_listHighlightPass1[i]);
|
||||||
|
m_listHighlightPass1[i] = NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// clear the compleate list
|
// clear the compleate list
|
||||||
m_listHighlightPass1.clear();
|
m_listHighlightPass1.Clear();
|
||||||
|
|
||||||
|
// clean all Element
|
||||||
|
for (i=0; i< m_listExtentions.Size(); i++) {
|
||||||
|
if (NULL != m_listExtentions[i]) {
|
||||||
|
delete(m_listExtentions[i]);
|
||||||
|
m_listExtentions[i] = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// clear the compleate list
|
||||||
|
m_listExtentions.Clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool Highlight::HasExtention(Edn::String &ext)
|
bool Highlight::HasExtention(Edn::String &ext)
|
||||||
{
|
{
|
||||||
uint32_t i;
|
int32_t i;
|
||||||
for (i=0; i<m_listExtentions.size(); i++) {
|
for (i=0; i<m_listExtentions.Size(); i++) {
|
||||||
if (ext == m_listExtentions[i] ) {
|
if (ext == *m_listExtentions[i] ) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -136,7 +149,7 @@ bool Highlight::HasExtention(Edn::String &ext)
|
|||||||
|
|
||||||
bool Highlight::FileNameCompatible(Edn::File &fileName)
|
bool Highlight::FileNameCompatible(Edn::File &fileName)
|
||||||
{
|
{
|
||||||
uint32_t i;
|
int32_t i;
|
||||||
Edn::String extention;
|
Edn::String extention;
|
||||||
if (true == fileName.HasExtention() ) {
|
if (true == fileName.HasExtention() ) {
|
||||||
extention = "*.";
|
extention = "*.";
|
||||||
@ -146,8 +159,8 @@ bool Highlight::FileNameCompatible(Edn::File &fileName)
|
|||||||
}
|
}
|
||||||
EDN_DEBUG(" try to find : in \"" << fileName << "\" extention:\"" << extention << "\" ");
|
EDN_DEBUG(" try to find : in \"" << fileName << "\" extention:\"" << extention << "\" ");
|
||||||
|
|
||||||
for (i=0; i<m_listExtentions.size(); i++) {
|
for (i=0; i<m_listExtentions.Size(); i++) {
|
||||||
if (extention == m_listExtentions[i] ) {
|
if (extention == *m_listExtentions[i] ) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -157,18 +170,18 @@ bool Highlight::FileNameCompatible(Edn::File &fileName)
|
|||||||
|
|
||||||
void Highlight::Display(void)
|
void Highlight::Display(void)
|
||||||
{
|
{
|
||||||
uint32_t i;
|
int32_t i;
|
||||||
EDN_INFO("List of ALL Highlight : ");
|
EDN_INFO("List of ALL Highlight : ");
|
||||||
for (i=0; i< m_listExtentions.size(); i++) {
|
for (i=0; i< m_listExtentions.Size(); i++) {
|
||||||
EDN_INFO(" Extention : " << i << " : " << m_listExtentions[i] );
|
EDN_INFO(" Extention : " << i << " : " << *m_listExtentions[i] );
|
||||||
}
|
}
|
||||||
// Display all elements
|
// Display all elements
|
||||||
for (i=0; i< m_listHighlightPass1.size(); i++) {
|
for (i=0; i< m_listHighlightPass1.Size(); i++) {
|
||||||
EDN_INFO(" " << i << " Pass 1 : " << m_listHighlightPass1[i]->GetName() );
|
EDN_INFO(" " << i << " Pass 1 : " << m_listHighlightPass1[i]->GetName() );
|
||||||
//m_listHighlightPass1[i]->Display();
|
//m_listHighlightPass1[i]->Display();
|
||||||
}
|
}
|
||||||
// Display all elements
|
// Display all elements
|
||||||
for (i=0; i< m_listHighlightPass2.size(); i++) {
|
for (i=0; i< m_listHighlightPass2.Size(); i++) {
|
||||||
EDN_INFO(" " << i << " Pass 2 : " << m_listHighlightPass2[i]->GetName() );
|
EDN_INFO(" " << i << " Pass 2 : " << m_listHighlightPass2[i]->GetName() );
|
||||||
//m_listHighlightPass2[i]->Display();
|
//m_listHighlightPass2[i]->Display();
|
||||||
}
|
}
|
||||||
@ -178,14 +191,14 @@ void Highlight::Display(void)
|
|||||||
// TODO : Celui qui appelle suprime des element pour rien ... Enfin c'est pas tr\Uffffffffgrave... Il suffirait juste de suprimer celuis d'avant si il n'est pas terminer...
|
// TODO : Celui qui appelle suprime des element pour rien ... Enfin c'est pas tr\Uffffffffgrave... Il suffirait juste de suprimer celuis d'avant si il n'est pas terminer...
|
||||||
void Highlight::Parse(int32_t start,
|
void Highlight::Parse(int32_t start,
|
||||||
int32_t stop,
|
int32_t stop,
|
||||||
std::vector<colorInformation_ts> &metaData,
|
Edn::VectorType<colorInformation_ts> &metaData,
|
||||||
int32_t addingPos,
|
int32_t addingPos,
|
||||||
EdnVectorBuf &buffer)
|
EdnVectorBuf &buffer)
|
||||||
{
|
{
|
||||||
if (0 > addingPos) {
|
if (0 > addingPos) {
|
||||||
addingPos = 0;
|
addingPos = 0;
|
||||||
}
|
}
|
||||||
//EDN_DEBUG("Parse element 0 => " << m_listHighlightPass1.size() << " ==> position search: (" << start << "," << stop << ")" );
|
//EDN_DEBUG("Parse element 0 => " << m_listHighlightPass1.Size() << " ==> position search: (" << start << "," << stop << ")" );
|
||||||
int32_t elementStart = start;
|
int32_t elementStart = start;
|
||||||
int32_t elementStop = stop;
|
int32_t elementStop = stop;
|
||||||
colorInformation_ts resultat;
|
colorInformation_ts resultat;
|
||||||
@ -193,7 +206,7 @@ void Highlight::Parse(int32_t start,
|
|||||||
//EDN_DEBUG("Parse element in the buffer id=" << elementStart);
|
//EDN_DEBUG("Parse element in the buffer id=" << elementStart);
|
||||||
//try to fond the HL in ALL of we have
|
//try to fond the HL in ALL of we have
|
||||||
int32_t jjj;
|
int32_t jjj;
|
||||||
for (jjj=0; jjj<m_listHighlightPass1.size(); jjj++){
|
for (jjj=0; jjj<m_listHighlightPass1.Size(); jjj++){
|
||||||
resultFind_te ret = HLP_FIND_OK;
|
resultFind_te ret = HLP_FIND_OK;
|
||||||
//EDN_DEBUG("Parse HL id=" << jjj << " position search: (" << start << "," << buffer.Size() << ")" );
|
//EDN_DEBUG("Parse HL id=" << jjj << " position search: (" << start << "," << buffer.Size() << ")" );
|
||||||
// Stop the search to the end (to get the end of the pattern)
|
// Stop the search to the end (to get the end of the pattern)
|
||||||
@ -202,12 +215,12 @@ void Highlight::Parse(int32_t start,
|
|||||||
//EDN_INFO("Find Pattern in the Buffer : (" << resultat.beginStart << "," << resultat.endStop << ")" );
|
//EDN_INFO("Find Pattern in the Buffer : (" << resultat.beginStart << "," << resultat.endStop << ")" );
|
||||||
// Remove element in the current List where the current Element have a end inside the next...
|
// Remove element in the current List where the current Element have a end inside the next...
|
||||||
int32_t kkk=addingPos;
|
int32_t kkk=addingPos;
|
||||||
while(kkk < (int32_t)metaData.size() ) {
|
while(kkk < metaData.Size() ) {
|
||||||
if (metaData[kkk].beginStart <= resultat.endStop) {
|
if (metaData[kkk].beginStart <= resultat.endStop) {
|
||||||
// Remove element
|
// Remove element
|
||||||
metaData.erase(metaData.begin()+kkk, metaData.begin()+kkk+1);
|
metaData.Erase(kkk, kkk+1);
|
||||||
// Increase the end of search
|
// Increase the end of search
|
||||||
if (kkk < (int32_t)metaData.size()) {
|
if (kkk < metaData.Size()) {
|
||||||
// just befor the end of the next element
|
// just befor the end of the next element
|
||||||
elementStop = metaData[kkk].beginStart-1;
|
elementStop = metaData[kkk].beginStart-1;
|
||||||
} else {
|
} else {
|
||||||
@ -220,7 +233,7 @@ void Highlight::Parse(int32_t start,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Add curent element in the list ...
|
// Add curent element in the list ...
|
||||||
metaData.insert(metaData.begin() + addingPos, resultat);
|
metaData.Insert(addingPos, resultat);
|
||||||
//EDN_DEBUG("INSERT at "<< addingPos << " S=" << resultat.beginStart << " E=" << resultat.endStop );
|
//EDN_DEBUG("INSERT at "<< addingPos << " S=" << resultat.beginStart << " E=" << resultat.endStop );
|
||||||
// Update the current research starting element: (Set position at the end of the current element
|
// Update the current research starting element: (Set position at the end of the current element
|
||||||
elementStart = resultat.endStop-1;
|
elementStart = resultat.endStop-1;
|
||||||
@ -242,10 +255,9 @@ void Highlight::Parse(int32_t start,
|
|||||||
*/
|
*/
|
||||||
void Highlight::Parse2(int32_t start,
|
void Highlight::Parse2(int32_t start,
|
||||||
int32_t stop,
|
int32_t stop,
|
||||||
std::vector<colorInformation_ts> &metaData,
|
Edn::VectorType<colorInformation_ts> &metaData,
|
||||||
EdnVectorBuf &buffer)
|
EdnVectorBuf &buffer)
|
||||||
{
|
{
|
||||||
int32_t elementID = 0;
|
|
||||||
//EDN_DEBUG("Parse element 0 => " << m_listHighlightPass2.size() << " ==> position search: (" << start << "," << stop << ")" );
|
//EDN_DEBUG("Parse element 0 => " << m_listHighlightPass2.size() << " ==> position search: (" << start << "," << stop << ")" );
|
||||||
int32_t elementStart = start;
|
int32_t elementStart = start;
|
||||||
int32_t elementStop = stop;
|
int32_t elementStop = stop;
|
||||||
@ -254,7 +266,7 @@ void Highlight::Parse2(int32_t start,
|
|||||||
//EDN_DEBUG("Parse element in the buffer id=" << elementStart);
|
//EDN_DEBUG("Parse element in the buffer id=" << elementStart);
|
||||||
//try to fond the HL in ALL of we have
|
//try to fond the HL in ALL of we have
|
||||||
int32_t jjj;
|
int32_t jjj;
|
||||||
for (jjj=0; jjj<m_listHighlightPass2.size(); jjj++){
|
for (jjj=0; jjj<m_listHighlightPass2.Size(); jjj++){
|
||||||
resultFind_te ret = HLP_FIND_OK;
|
resultFind_te ret = HLP_FIND_OK;
|
||||||
//EDN_DEBUG("Parse HL id=" << jjj << " position search: (" << start << "," << buffer.Size() << ")" );
|
//EDN_DEBUG("Parse HL id=" << jjj << " position search: (" << start << "," << buffer.Size() << ")" );
|
||||||
// Stop the search to the end (to get the end of the pattern)
|
// Stop the search to the end (to get the end of the pattern)
|
||||||
@ -262,7 +274,7 @@ void Highlight::Parse2(int32_t start,
|
|||||||
if (HLP_FIND_ERROR != ret) {
|
if (HLP_FIND_ERROR != ret) {
|
||||||
//EDN_INFO("Find Pattern in the Buffer : (" << resultat.beginStart << "," << resultat.endStop << ")" );
|
//EDN_INFO("Find Pattern in the Buffer : (" << resultat.beginStart << "," << resultat.endStop << ")" );
|
||||||
// Add curent element in the list ...
|
// Add curent element in the list ...
|
||||||
metaData.push_back(resultat);
|
metaData.PushBack(resultat);
|
||||||
elementStart = resultat.endStop;
|
elementStart = resultat.endStop;
|
||||||
// Exit current cycle
|
// Exit current cycle
|
||||||
break;
|
break;
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "Edn.h"
|
||||||
#ifndef __HIGHLIGHT_H__
|
#ifndef __HIGHLIGHT_H__
|
||||||
#define __HIGHLIGHT_H__
|
#define __HIGHLIGHT_H__
|
||||||
|
|
||||||
@ -42,10 +43,8 @@ extern "C" {
|
|||||||
} colorInformation_ts;
|
} colorInformation_ts;
|
||||||
}
|
}
|
||||||
|
|
||||||
#include <vector>
|
|
||||||
#include "HighlightPattern.h"
|
#include "HighlightPattern.h"
|
||||||
#include "Colorize.h"
|
#include "Colorize.h"
|
||||||
#include "Edn.h"
|
|
||||||
#include "EdnVectorBuf.h"
|
#include "EdnVectorBuf.h"
|
||||||
#include "tinyxml.h"
|
#include "tinyxml.h"
|
||||||
|
|
||||||
@ -59,19 +58,19 @@ class Highlight {
|
|||||||
void Display(void);
|
void Display(void);
|
||||||
void Parse(int32_t start,
|
void Parse(int32_t start,
|
||||||
int32_t stop,
|
int32_t stop,
|
||||||
std::vector<colorInformation_ts> &metaData,
|
Edn::VectorType<colorInformation_ts> &metaData,
|
||||||
int32_t addingPos,
|
int32_t addingPos,
|
||||||
EdnVectorBuf &buffer);
|
EdnVectorBuf &buffer);
|
||||||
void Parse2(int32_t start,
|
void Parse2(int32_t start,
|
||||||
int32_t stop,
|
int32_t stop,
|
||||||
std::vector<colorInformation_ts> &metaData,
|
Edn::VectorType<colorInformation_ts> &metaData,
|
||||||
EdnVectorBuf &buffer);
|
EdnVectorBuf &buffer);
|
||||||
private:
|
private:
|
||||||
void ParseRules(TiXmlNode *child, std::vector<HighlightPattern*> &mListPatern, int32_t level);
|
void ParseRules(TiXmlNode *child, Edn::VectorType<HighlightPattern*> &mListPatern, int32_t level);
|
||||||
Edn::String m_styleName; //!< curent style name (like "c++" or "c" or "script Bash")
|
Edn::String m_styleName; //!< curent style name (like "c++" or "c" or "script Bash")
|
||||||
std::vector<Edn::String> m_listExtentions; //!< List of possible extention for this high-light, like : ".c", ".cpp", ".h"
|
Edn::VectorType<Edn::String*> m_listExtentions; //!< List of possible extention for this high-light, like : ".c", ".cpp", ".h"
|
||||||
std::vector<HighlightPattern*> m_listHighlightPass1; //!< List of ALL hightlight modules (pass 1 ==> when we load and wride data on the buffer)
|
Edn::VectorType<HighlightPattern*> m_listHighlightPass1; //!< List of ALL hightlight modules (pass 1 ==> when we load and wride data on the buffer)
|
||||||
std::vector<HighlightPattern*> m_listHighlightPass2; //!< List of ALL hightlight modules (pass 2 ==> When we display the buffer( only the display area (100 lines)) )
|
Edn::VectorType<HighlightPattern*> m_listHighlightPass2; //!< List of ALL hightlight modules (pass 2 ==> When we display the buffer( only the display area (100 lines)) )
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -37,14 +37,23 @@ HighlightManager::HighlightManager(void)
|
|||||||
|
|
||||||
HighlightManager::~HighlightManager(void)
|
HighlightManager::~HighlightManager(void)
|
||||||
{
|
{
|
||||||
listHighlight.clear();
|
uint32_t i;
|
||||||
|
// clean all Element
|
||||||
|
for (i=0; i< listHighlight.Size(); i++) {
|
||||||
|
if (NULL != listHighlight[i]) {
|
||||||
|
delete(listHighlight[i]);
|
||||||
|
listHighlight[i] = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// clear the compleate list
|
||||||
|
listHighlight.Clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Highlight *HighlightManager::Get(Edn::File &fileName)
|
Highlight *HighlightManager::Get(Edn::File &fileName)
|
||||||
{
|
{
|
||||||
uint32_t i;
|
uint32_t i;
|
||||||
for (i=0; i<listHighlight.size(); i++) {
|
for (i=0; i<listHighlight.Size(); i++) {
|
||||||
if (true == listHighlight[i]->FileNameCompatible(fileName) ) {
|
if (true == listHighlight[i]->FileNameCompatible(fileName) ) {
|
||||||
return listHighlight[i];
|
return listHighlight[i];
|
||||||
}
|
}
|
||||||
@ -73,32 +82,32 @@ void HighlightManager::loadLanguages(void)
|
|||||||
Edn::String xmlFilename = homedir;
|
Edn::String xmlFilename = homedir;
|
||||||
xmlFilename += "lang_c.xml";
|
xmlFilename += "lang_c.xml";
|
||||||
Highlight *myHightline = new Highlight(xmlFilename);
|
Highlight *myHightline = new Highlight(xmlFilename);
|
||||||
listHighlight.push_back(myHightline);
|
listHighlight.PushBack(myHightline);
|
||||||
|
|
||||||
xmlFilename = homedir;
|
xmlFilename = homedir;
|
||||||
xmlFilename += "lang_boo.xml";
|
xmlFilename += "lang_boo.xml";
|
||||||
myHightline = new Highlight(xmlFilename);
|
myHightline = new Highlight(xmlFilename);
|
||||||
listHighlight.push_back(myHightline);
|
listHighlight.PushBack(myHightline);
|
||||||
|
|
||||||
xmlFilename = homedir;
|
xmlFilename = homedir;
|
||||||
xmlFilename += "lang_Makefile.xml";
|
xmlFilename += "lang_Makefile.xml";
|
||||||
myHightline = new Highlight(xmlFilename);
|
myHightline = new Highlight(xmlFilename);
|
||||||
listHighlight.push_back(myHightline);
|
listHighlight.PushBack(myHightline);
|
||||||
|
|
||||||
xmlFilename = homedir;
|
xmlFilename = homedir;
|
||||||
xmlFilename += "lang_asm.xml";
|
xmlFilename += "lang_asm.xml";
|
||||||
myHightline = new Highlight(xmlFilename);
|
myHightline = new Highlight(xmlFilename);
|
||||||
listHighlight.push_back(myHightline);
|
listHighlight.PushBack(myHightline);
|
||||||
|
|
||||||
xmlFilename = homedir;
|
xmlFilename = homedir;
|
||||||
xmlFilename += "lang_xml.xml";
|
xmlFilename += "lang_xml.xml";
|
||||||
myHightline = new Highlight(xmlFilename);
|
myHightline = new Highlight(xmlFilename);
|
||||||
listHighlight.push_back(myHightline);
|
listHighlight.PushBack(myHightline);
|
||||||
|
|
||||||
xmlFilename = homedir;
|
xmlFilename = homedir;
|
||||||
xmlFilename += "lang_php.xml";
|
xmlFilename += "lang_php.xml";
|
||||||
myHightline = new Highlight(xmlFilename);
|
myHightline = new Highlight(xmlFilename);
|
||||||
listHighlight.push_back(myHightline);
|
listHighlight.PushBack(myHightline);
|
||||||
|
|
||||||
myHightline->Display();
|
myHightline->Display();
|
||||||
}
|
}
|
||||||
|
@ -29,8 +29,6 @@
|
|||||||
class HighlightManager;
|
class HighlightManager;
|
||||||
|
|
||||||
#include "Singleton.h"
|
#include "Singleton.h"
|
||||||
#include <vector>
|
|
||||||
#include <string>
|
|
||||||
#include "Highlight.h"
|
#include "Highlight.h"
|
||||||
|
|
||||||
|
|
||||||
@ -49,7 +47,7 @@ class HighlightManager: public Singleton<HighlightManager>
|
|||||||
bool Exist(Edn::File &fileName);
|
bool Exist(Edn::File &fileName);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::vector<Highlight*> listHighlight; //!< List of ALL hightlight modules
|
Edn::VectorType<Highlight*> listHighlight; //!< List of ALL hightlight modules
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -29,8 +29,6 @@
|
|||||||
#include "tools_debug.h"
|
#include "tools_debug.h"
|
||||||
#include "Colorize.h"
|
#include "Colorize.h"
|
||||||
#include "ColorizeManager.h"
|
#include "ColorizeManager.h"
|
||||||
#include <string>
|
|
||||||
#include <vector>
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -67,7 +67,7 @@ typedef enum{
|
|||||||
|
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
std::vector<colorInformation_ts> HLData;
|
Edn::VectorType<colorInformation_ts> HLData;
|
||||||
int32_t idSequence;
|
int32_t idSequence;
|
||||||
int32_t posHLPass1;
|
int32_t posHLPass1;
|
||||||
int32_t posHLPass2;
|
int32_t posHLPass2;
|
||||||
@ -156,7 +156,7 @@ class EdnBuf {
|
|||||||
// -----------------------------------------
|
// -----------------------------------------
|
||||||
private:
|
private:
|
||||||
Highlight * m_Highlight; //!< internal link with the Highlight system
|
Highlight * m_Highlight; //!< internal link with the Highlight system
|
||||||
std::vector<colorInformation_ts> m_HLDataPass1; //!< colorisation position in the current buffer pass 1
|
Edn::VectorType<colorInformation_ts> m_HLDataPass1; //!< colorisation position in the current buffer pass 1
|
||||||
int32_t m_HLDataSequence; //!< position of the start of line requested by the screen viewer
|
int32_t m_HLDataSequence; //!< position of the start of line requested by the screen viewer
|
||||||
void RegenerateHighLightAt(int32_t pos, int32_t nbDeleted, int32_t nbAdded);
|
void RegenerateHighLightAt(int32_t pos, int32_t nbDeleted, int32_t nbAdded);
|
||||||
void GenerateHighLightAt(int32_t pos, int32_t endPos, int32_t addinPos=0);
|
void GenerateHighLightAt(int32_t pos, int32_t endPos, int32_t addinPos=0);
|
||||||
|
@ -35,7 +35,7 @@ void EdnBuf::SetHLSystem(Highlight * newHLSystem)
|
|||||||
{
|
{
|
||||||
if (m_Highlight != newHLSystem) {
|
if (m_Highlight != newHLSystem) {
|
||||||
m_Highlight = newHLSystem;
|
m_Highlight = newHLSystem;
|
||||||
m_HLDataPass1.clear();
|
m_HLDataPass1.Clear();
|
||||||
RegenerateHighLightAt(0, 0, m_data.Size());
|
RegenerateHighLightAt(0, 0, m_data.Size());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -67,7 +67,7 @@ void EdnBuf::RegenerateHighLightAt(int32_t pos, int32_t nbDeleted, int32_t nbAdd
|
|||||||
int32_t startId;
|
int32_t startId;
|
||||||
int32_t stopId;
|
int32_t stopId;
|
||||||
// clean data if needed
|
// clean data if needed
|
||||||
if (0 != m_HLDataPass1.size()) {
|
if (0 != m_HLDataPass1.Size()) {
|
||||||
// find element previous
|
// find element previous
|
||||||
FindMainHighLightPosition(pos, posEnd, startId, stopId, true);
|
FindMainHighLightPosition(pos, posEnd, startId, stopId, true);
|
||||||
|
|
||||||
@ -75,19 +75,19 @@ void EdnBuf::RegenerateHighLightAt(int32_t pos, int32_t nbDeleted, int32_t nbAdd
|
|||||||
if( -1 == startId
|
if( -1 == startId
|
||||||
&& -1 == stopId)
|
&& -1 == stopId)
|
||||||
{
|
{
|
||||||
m_HLDataPass1.clear();
|
m_HLDataPass1.Clear();
|
||||||
} else if(-1 == startId) {
|
} else if(-1 == startId) {
|
||||||
if (0 == stopId){
|
if (0 == stopId){
|
||||||
m_HLDataPass1.erase(m_HLDataPass1.begin());
|
m_HLDataPass1.Erase(0);
|
||||||
} else {
|
} else {
|
||||||
m_HLDataPass1.erase(m_HLDataPass1.begin(),m_HLDataPass1.begin()+stopId);
|
m_HLDataPass1.Erase(0,stopId);
|
||||||
}
|
}
|
||||||
} else if(-1 == stopId) {
|
} else if(-1 == stopId) {
|
||||||
m_HLDataPass1.erase(m_HLDataPass1.begin()+startId+1,m_HLDataPass1.end());
|
m_HLDataPass1.Erase(startId+1, m_HLDataPass1.Size());
|
||||||
} else {
|
} else {
|
||||||
m_HLDataPass1.erase(m_HLDataPass1.begin()+startId+1,m_HLDataPass1.begin()+stopId);
|
m_HLDataPass1.Erase(startId+1, stopId);
|
||||||
}
|
}
|
||||||
EDN_DEBUG("new size=" << (int32_t)m_HLDataPass1.size()-1);
|
EDN_DEBUG("new size=" << (int32_t)m_HLDataPass1.Size()-1);
|
||||||
// update position after the range position :
|
// update position after the range position :
|
||||||
int32_t elemStart;
|
int32_t elemStart;
|
||||||
if(-1 == startId) {
|
if(-1 == startId) {
|
||||||
@ -95,7 +95,7 @@ void EdnBuf::RegenerateHighLightAt(int32_t pos, int32_t nbDeleted, int32_t nbAdd
|
|||||||
} else {
|
} else {
|
||||||
elemStart = startId+1;
|
elemStart = startId+1;
|
||||||
}
|
}
|
||||||
for (i=elemStart; i< (int32_t)m_HLDataPass1.size(); i++) {
|
for (i=elemStart; i< (int32_t)m_HLDataPass1.Size(); i++) {
|
||||||
//EDN_DEBUG("move element=" << i);
|
//EDN_DEBUG("move element=" << i);
|
||||||
m_HLDataPass1[i].beginStart += nbAdded - nbDeleted;
|
m_HLDataPass1[i].beginStart += nbAdded - nbDeleted;
|
||||||
m_HLDataPass1[i].beginStop += nbAdded - nbDeleted;
|
m_HLDataPass1[i].beginStop += nbAdded - nbDeleted;
|
||||||
@ -113,7 +113,7 @@ void EdnBuf::RegenerateHighLightAt(int32_t pos, int32_t nbDeleted, int32_t nbAdd
|
|||||||
GenerateHighLightAt(0, m_HLDataPass1[0].beginStart, 0);
|
GenerateHighLightAt(0, m_HLDataPass1[0].beginStart, 0);
|
||||||
} else if(-1 == stopId) {
|
} else if(-1 == stopId) {
|
||||||
//EDN_DEBUG("******* Regenerate STOP");
|
//EDN_DEBUG("******* Regenerate STOP");
|
||||||
GenerateHighLightAt(m_HLDataPass1[m_HLDataPass1.size() -1].endStop, m_data.Size(), m_HLDataPass1.size());
|
GenerateHighLightAt(m_HLDataPass1[m_HLDataPass1.Size() -1].endStop, m_data.Size(), m_HLDataPass1.Size());
|
||||||
} else {
|
} else {
|
||||||
//EDN_DEBUG("******* Regenerate RANGE");
|
//EDN_DEBUG("******* Regenerate RANGE");
|
||||||
GenerateHighLightAt(m_HLDataPass1[startId].endStop, m_HLDataPass1[startId+1].beginStart, startId+1);
|
GenerateHighLightAt(m_HLDataPass1[startId].endStop, m_HLDataPass1[startId+1].beginStart, startId+1);
|
||||||
@ -123,7 +123,7 @@ void EdnBuf::RegenerateHighLightAt(int32_t pos, int32_t nbDeleted, int32_t nbAdd
|
|||||||
//GenerateHighLightAt(pos, nbAdded);
|
//GenerateHighLightAt(pos, nbAdded);
|
||||||
GenerateHighLightAt(0, m_data.Size());
|
GenerateHighLightAt(0, m_data.Size());
|
||||||
}
|
}
|
||||||
for (i=0; i< (int32_t)m_HLDataPass1.size(); i++) {
|
for (i=0; i< (int32_t)m_HLDataPass1.Size(); i++) {
|
||||||
Edn::String ploppp;
|
Edn::String ploppp;
|
||||||
if (NULL != m_HLDataPass1[i].patern ) {
|
if (NULL != m_HLDataPass1[i].patern ) {
|
||||||
ploppp = ((HighlightPattern*)m_HLDataPass1[i].patern)->GetName();
|
ploppp = ((HighlightPattern*)m_HLDataPass1[i].patern)->GetName();
|
||||||
@ -177,7 +177,7 @@ void EdnBuf::FindMainHighLightPosition(int32_t startPos, int32_t endPos, int32_t
|
|||||||
S=-1 *************** E
|
S=-1 *************** E
|
||||||
*/
|
*/
|
||||||
int32_t i;
|
int32_t i;
|
||||||
for (i=0; i< (int32_t)m_HLDataPass1.size(); i++) {
|
for (i=0; i< (int32_t)m_HLDataPass1.Size(); i++) {
|
||||||
if (m_HLDataPass1[i].endStop > startPos) {
|
if (m_HLDataPass1[i].endStop > startPos) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -198,7 +198,7 @@ void EdnBuf::FindMainHighLightPosition(int32_t startPos, int32_t endPos, int32_t
|
|||||||
} else {
|
} else {
|
||||||
elemStart = startId+1;
|
elemStart = startId+1;
|
||||||
}
|
}
|
||||||
for (i=elemStart; i< (int32_t)m_HLDataPass1.size(); i++) {
|
for (i=elemStart; i< (int32_t)m_HLDataPass1.Size(); i++) {
|
||||||
if (m_HLDataPass1[i].beginStart > endPos)
|
if (m_HLDataPass1[i].beginStart > endPos)
|
||||||
{
|
{
|
||||||
stopId = i;
|
stopId = i;
|
||||||
@ -206,13 +206,13 @@ void EdnBuf::FindMainHighLightPosition(int32_t startPos, int32_t endPos, int32_t
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
if (-1 != startId && startId < (int32_t)m_HLDataPass1.size()) {
|
if (-1 != startId && startId < (int32_t)m_HLDataPass1.Size()) {
|
||||||
EDN_DEBUG("==> BEGIN : start="<<m_HLDataPass1[startId].beginStart<<", stop="<<m_HLDataPass1[startId].endStop<<" id=" << startId << "/" << (int32_t)m_HLDataPass1.size()-1);
|
EDN_DEBUG("==> BEGIN : start="<<m_HLDataPass1[startId].beginStart<<", stop="<<m_HLDataPass1[startId].endStop<<" id=" << startId << "/" << (int32_t)m_HLDataPass1.Size()-1);
|
||||||
} else {
|
} else {
|
||||||
EDN_DEBUG("==> BEGIN : start=???, stop=??? id=" << startId);
|
EDN_DEBUG("==> BEGIN : start=???, stop=??? id=" << startId);
|
||||||
}
|
}
|
||||||
if (-1 != stopId && stopId < (int32_t)m_HLDataPass1.size()) {
|
if (-1 != stopId && stopId < (int32_t)m_HLDataPass1.Size()) {
|
||||||
EDN_DEBUG("==> END : start="<<m_HLDataPass1[stopId].beginStart<<", stop="<<m_HLDataPass1[stopId].endStop<<" id=" << stopId<< "/" << (int32_t)m_HLDataPass1.size()-1);
|
EDN_DEBUG("==> END : start="<<m_HLDataPass1[stopId].beginStart<<", stop="<<m_HLDataPass1[stopId].endStop<<" id=" << stopId<< "/" << (int32_t)m_HLDataPass1.Size()-1);
|
||||||
} else {
|
} else {
|
||||||
EDN_DEBUG("==> END : start=???, stop=??? id=" << stopId);
|
EDN_DEBUG("==> END : start=???, stop=??? id=" << stopId);
|
||||||
}
|
}
|
||||||
@ -228,7 +228,7 @@ void EdnBuf::GenerateHighLightAt(int32_t pos, int32_t endPos, int32_t addinPos)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//EDN_DEBUG("area : ("<<pos<<","<<endPos<<") insert at : " << addinPos);
|
//EDN_DEBUG("area : ("<<pos<<","<<endPos<<") insert at : " << addinPos);
|
||||||
m_Highlight->ParseOneElement(pos, endPos, m_HLDataPass1, addinPos, m_data);
|
m_Highlight->Parse(pos, endPos, m_HLDataPass1, addinPos, m_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -236,7 +236,7 @@ void EdnBuf::GenerateHighLightAt(int32_t pos, int32_t endPos, int32_t addinPos)
|
|||||||
void EdnBuf::CleanHighLight(void)
|
void EdnBuf::CleanHighLight(void)
|
||||||
{
|
{
|
||||||
// Remove all element in the list...
|
// Remove all element in the list...
|
||||||
m_HLDataPass1.clear();
|
m_HLDataPass1.Clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -244,7 +244,7 @@ colorInformation_ts *EdnBuf::GetElementColorAtPosition(int32_t pos, int32_t &sta
|
|||||||
{
|
{
|
||||||
int32_t i;
|
int32_t i;
|
||||||
int32_t start = edn_max(0, starPos-1);
|
int32_t start = edn_max(0, starPos-1);
|
||||||
for (i=start; i<(int32_t)m_HLDataPass1.size(); i++) {
|
for (i=start; i<(int32_t)m_HLDataPass1.Size(); i++) {
|
||||||
starPos = i;
|
starPos = i;
|
||||||
if( m_HLDataPass1[i].beginStart <= pos
|
if( m_HLDataPass1[i].beginStart <= pos
|
||||||
&& m_HLDataPass1[i].endStop > pos)
|
&& m_HLDataPass1[i].endStop > pos)
|
||||||
@ -272,7 +272,7 @@ void EdnBuf::HightlightGenerateLines(displayHLData_ts & MData, int32_t HLStart,
|
|||||||
g_get_current_time(&timeStart);
|
g_get_current_time(&timeStart);
|
||||||
MData.idSequence = m_HLDataSequence;
|
MData.idSequence = m_HLDataSequence;
|
||||||
HLStart = StartOfLine(HLStart);
|
HLStart = StartOfLine(HLStart);
|
||||||
MData.HLData.clear();
|
MData.HLData.Clear();
|
||||||
int32_t HLStop = CountForwardNLines(HLStart, nbLines);
|
int32_t HLStop = CountForwardNLines(HLStart, nbLines);
|
||||||
int32_t startId, stopId;
|
int32_t startId, stopId;
|
||||||
// find element previous
|
// find element previous
|
||||||
@ -282,7 +282,7 @@ void EdnBuf::HightlightGenerateLines(displayHLData_ts & MData, int32_t HLStart,
|
|||||||
//EDN_DEBUG("List of section between : "<< startId << " & " << stopId);
|
//EDN_DEBUG("List of section between : "<< startId << " & " << stopId);
|
||||||
int32_t endSearch = stopId+1;
|
int32_t endSearch = stopId+1;
|
||||||
if (-1 == stopId) {
|
if (-1 == stopId) {
|
||||||
endSearch = m_HLDataPass1.size();
|
endSearch = m_HLDataPass1.Size();
|
||||||
}
|
}
|
||||||
for (k=edn_max(startId, 0); k<endSearch; k++) {
|
for (k=edn_max(startId, 0); k<endSearch; k++) {
|
||||||
// empty section :
|
// empty section :
|
||||||
@ -305,9 +305,9 @@ void EdnBuf::HightlightGenerateLines(displayHLData_ts & MData, int32_t HLStart,
|
|||||||
//EDN_DEBUG(" ==> (under section ) k="<<k<<" start="<<m_HLDataPass1[k].beginStart<<" stop="<<m_HLDataPass1[k].endStop << " subSectionOfID=" << 99999999);
|
//EDN_DEBUG(" ==> (under section ) k="<<k<<" start="<<m_HLDataPass1[k].beginStart<<" stop="<<m_HLDataPass1[k].endStop << " subSectionOfID=" << 99999999);
|
||||||
// TODO : ...
|
// TODO : ...
|
||||||
}
|
}
|
||||||
if (endSearch == (int32_t)m_HLDataPass1.size() ){
|
if (endSearch == (int32_t)m_HLDataPass1.Size() ){
|
||||||
//if( k < (int32_t)m_HLDataPass1.size()) {
|
//if( k < (int32_t)m_HLDataPass1.Size()) {
|
||||||
if (m_HLDataPass1.size() != 0) {
|
if (m_HLDataPass1.Size() != 0) {
|
||||||
//EDN_DEBUG(" ==> (empty section 3 ) k="<<k<<" start="<<m_HLDataPass1[k-1].endStop<<" stop="<<HLStop );
|
//EDN_DEBUG(" ==> (empty section 3 ) k="<<k<<" start="<<m_HLDataPass1[k-1].endStop<<" stop="<<HLStop );
|
||||||
m_Highlight->Parse2(m_HLDataPass1[k-1].endStop,
|
m_Highlight->Parse2(m_HLDataPass1[k-1].endStop,
|
||||||
HLStop,
|
HLStop,
|
||||||
@ -334,7 +334,7 @@ colorInformation_ts * EdnBuf::GetElementColorAtPosition(displayHLData_ts & MData
|
|||||||
{
|
{
|
||||||
int32_t i;
|
int32_t i;
|
||||||
int32_t start = edn_max(0, MData.posHLPass2-1);
|
int32_t start = edn_max(0, MData.posHLPass2-1);
|
||||||
for (i=start; i<(int32_t)MData.HLData.size(); i++) {
|
for (i=start; i<(int32_t)MData.HLData.Size(); i++) {
|
||||||
MData.posHLPass2 = i;
|
MData.posHLPass2 = i;
|
||||||
if( MData.HLData[i].beginStart <= pos
|
if( MData.HLData[i].beginStart <= pos
|
||||||
&& MData.HLData[i].endStop > pos)
|
&& MData.HLData[i].endStop > pos)
|
||||||
|
@ -26,14 +26,11 @@
|
|||||||
#include "tools_globals.h"
|
#include "tools_globals.h"
|
||||||
#include "ColorizeManager.h"
|
#include "ColorizeManager.h"
|
||||||
#include "MsgBroadcast.h"
|
#include "MsgBroadcast.h"
|
||||||
#include <string>
|
|
||||||
|
|
||||||
#undef __class__
|
#undef __class__
|
||||||
#define __class__ "globals"
|
#define __class__ "globals"
|
||||||
|
|
||||||
// Variables privé du namespace
|
|
||||||
|
|
||||||
static std::string curentFileName = "???";
|
|
||||||
|
|
||||||
|
|
||||||
erreurCode_te globals::init(void)
|
erreurCode_te globals::init(void)
|
||||||
@ -201,36 +198,3 @@ bool globals::IsSetInsert(void)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Basic GUI system :
|
|
||||||
*
|
|
||||||
*
|
|
||||||
*
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void globals::DisplaySystemString(std::vector<int32_t> &data)
|
|
||||||
{
|
|
||||||
// Display the copyed data ...
|
|
||||||
uint32_t i;
|
|
||||||
EDN_INFO("Display Data : ");
|
|
||||||
printf(" ========================================================\n");
|
|
||||||
for(i=0; i<data.size(); i++) {
|
|
||||||
# ifdef USE_GTK_VERSION_2_0
|
|
||||||
if (GDK_Return == data[i]) {
|
|
||||||
# elif USE_GTK_VERSION_3_0
|
|
||||||
if (GDK_KEY_Return == data[i]) {
|
|
||||||
# endif
|
|
||||||
printf("\n = ");
|
|
||||||
} else {
|
|
||||||
printf("%c", (char)data[i]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
printf("\n ========================================================\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -27,8 +27,6 @@
|
|||||||
#define __TOOLS_GLOBALS_H__
|
#define __TOOLS_GLOBALS_H__
|
||||||
|
|
||||||
#include "tools_debug.h"
|
#include "tools_debug.h"
|
||||||
#include <string>
|
|
||||||
#include <vector>
|
|
||||||
|
|
||||||
namespace globals
|
namespace globals
|
||||||
{
|
{
|
||||||
@ -63,7 +61,6 @@ namespace globals
|
|||||||
void UnSetInsert(void);
|
void UnSetInsert(void);
|
||||||
void ToggleInsert(void);
|
void ToggleInsert(void);
|
||||||
bool IsSetInsert(void);
|
bool IsSetInsert(void);
|
||||||
void DisplaySystemString(std::vector<int32_t> &data);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user