diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..5a610a4 --- /dev/null +++ b/Makefile @@ -0,0 +1,257 @@ +################################################################################################################## +# # +# Fichier : Makefile # +# # +# Type : Makefile d'un programme complet # +# # +# Auteur : Heero Yui # +# # +# Evolutions : Date Auteur Raison # +# 2010-01-29 Heero Yui Mise en place d'un makefile ultra simple # +# 2011-07-14 Heero Yui Rework the current dorder includion (simplification) # +# # +# Notes : This makefile might be edited with an editor compatible with escape char and carrer return # +# char # +# # +# Concu Pour le projet edn # +# # +################################################################################################################## +export F_GRAS= +export F_INVERSER= +export F_SOUSLIGNER= +export F_NORMALE= +export F_NOIR= +export F_ROUGE= +export F_VERT= +export F_MARRON= +export F_BLUE= +export F_VIOLET= +export F_CYAN= +export F_GRIS= +export CADRE_HAUT_BAS=' $(F_INVERSER) $(F_NORMALE)' +export CADRE_COTERS=' $(F_INVERSER) $(F_NORMALE) $(F_INVERSER) $(F_NORMALE)' + + +############################################################################### +### Compilateur base system ### +############################################################################### +CXX=$(BIN_PREFIX)g++ +CC=$(BIN_PREFIX)gcc +AR=$(BIN_PREFIX)ar + +############################################################################### +### Compilation Define ### +############################################################################### +DEFINE= -DEDN_DEBUG_LEVEL=3 + + +GTKFLAGS= +ifeq ($(shell if `pkg-config --exists gtk+-3.0` ; then echo "yes"; else echo "no"; fi), yes) + GTKFLAGS= `pkg-config --cflags --libs gtk+-3.0` -DUSE_GTK_VERSION_3_0 +else + ifeq ($(shell if `pkg-config --exists gtk+-2.0` ; then echo "yes"; else echo "no"; fi), yes) + GTKFLAGS= `pkg-config --cflags --libs gtk+-2.0` -DUSE_GTK_VERSION_2_0 + else + $(error No GTK 3.0 or 2.0 librairies ...) + endif +endif + +############################################################################### +### Basic Cfags ### +############################################################################### + +# basic GTK librairy +CXXFLAGS= $(GTKFLAGS) +# Linux thread system +CXXFLAGS+= -lpthread +# Enable debug (cgdb edn) +CXXFLAGS+= -g -O0 +#CXXFLAGS+= -O2 +# display all flags +CXXFLAGS+= -Wall +# ... +CXXFLAGS+= -D_REENTRANT +# internal defines +CXXFLAGS+= $(DEFINE) + +CFLAGS= $(CXXFLAGS) -std=c99 + +# basic GTK librairy +LDFLAGS= $(GTKFLAGS) +# Linux thread system +LDFLAGS+= -lpthread +# Dynamic connection of the CALLBACK of the GUI +LDFLAGS+= -Wl,--export-dynamic + +############################################################################### +### Project Name ### +############################################################################### +OUTPUT_NAME=edn + +############################################################################### +### Basic Project description Files ### +############################################################################### +FILE_DIRECTORY=Sources +OBJECT_DIRECTORY=Object + +############################################################################### +### Generique dependency ### +############################################################################### +MAKE_DEPENDENCE=Makefile + +############################################################################### +### Files Listes ### +############################################################################### + +# tiny XML (extern OPEN Sources) : +CXXFILES = tools/tinyXML/tinyxml.cpp \ + tools/tinyXML/tinyxmlparser.cpp \ + tools/tinyXML/tinyxmlerror.cpp \ + tools/tinyXML/tinystr.cpp + +# ExuberantCtags reading file tools (extern OPEN Sources) : +CXXFILES+= ctags/readtags.cpp \ + ctags/CTagsManager.cpp + + +# Globals debug tool: +CXXFILES+= tools/debug/tools_debug.cpp \ + tools/globals/tools_globals.cpp \ + tools/memory/toolsMemory.cpp + +# Buffers internal: +CXXFILES+= tools/EdnTemplate/EdnVectorBuf.cpp \ + tools/EdnBuf/EdnBuf.cpp \ + tools/EdnBuf/EdnBuf_HighLight.cpp \ + tools/EdnBuf/EdnBuf_History.cpp \ + tools/EdnBuf/EdnBuf_Selection.cpp \ + tools/EdnBuf/EdnBufHistory.cpp + + +# Tools internal: +CXXFILES+= tools/AL/AL_Mutex.cpp \ + tools/Display/Display.cpp \ + tools/ClipBoard/ClipBoard.cpp \ + tools/MsgBroadcast/MsgBroadcast.cpp \ + tools/MsgBroadcast/AccelKey.cpp \ + tools/charset/charsetTable.cpp \ + tools/charset/charset.cpp \ + tools/EdnRegExp/EdnRegExp.cpp \ + tools/NameSpaceEdn/File.cpp \ + tools/NameSpaceEdn/String.cpp + +# Gui: +CXXFILES+= CustumWidget/BufferView/BufferView.cpp \ + CustumWidget/CodeView/CodeView.cpp \ + GuiTools/WindowsManager/WindowsManager.cpp \ + GuiTools/MainWindows/MainWindows.cpp \ + GuiTools/MainWindows/StatusBar.cpp \ + GuiTools/MainWindows/MenuBar.cpp \ + GuiTools/MainWindows/ToolBar.cpp \ + GuiTools/Search/Search.cpp \ + GuiTools/Search/SearchData.cpp + +# Basic Interface : +CXXFILES+= Buffer/Buffer.cpp \ + Buffer/BufferText.cpp \ + Buffer/BufferEmpty.cpp \ + Buffer/BufferManager.cpp \ + Colorize/Colorize.cpp \ + Colorize/ColorizeManager.cpp \ + Highlight/HighlightPattern.cpp \ + Highlight/Highlight.cpp \ + Highlight/HighlightManager.cpp + +# Main entry file : +CXXFILES+= init.cpp + + +############################################################################### +### Liste of folder where .h can be ### +############################################################################### +LISTE_MODULES = $(dir $(CXXFILES)) +INCLUDE_DIRECTORY = $(addprefix -I$(FILE_DIRECTORY)/, $(LISTE_MODULES)) + +############################################################################### +### Build Object Files List ### +############################################################################### +OBJ = $(addprefix $(OBJECT_DIRECTORY)/, $(CXXFILES:.cpp=.o)) + + + +############################################################################### +### Main Part of Makefile ### +############################################################################### +all: build + +-include $(OBJ:.o=.d) + +build: .encadrer $(OUTPUT_NAME) $(MAKE_DEPENDENCE) + + +.encadrer: + @echo $(CADRE_HAUT_BAS) + @echo $(CADRE_COTERS) + @echo ' DEBUT DE COMPILATION DU PROGRAMME :'$(CADRE_COTERS) + @echo ' Repertoire Sources : $(FILE_DIRECTORY)/'$(CADRE_COTERS) + @echo ' Repertoire object : $(OBJECT_DIRECTORY)/'$(CADRE_COTERS) + @echo ' Binaire de sortie : $(F_VIOLET)$(OUTPUT_NAME) / $(OUTPUT_NAME)-stripped$(F_NORMALE)'$(CADRE_COTERS) + @echo $(CADRE_COTERS) + @echo $(CADRE_HAUT_BAS) + @mkdir -p $(addprefix $(OBJECT_DIRECTORY)/, $(LISTE_MODULES)) + @mkdir -p ~/.bin + + +FILE_IMAGES= data/imagesSources/*.png + +# Tool used to create a binary version of every element png or other needed by the application +pngToCpp: tools/pngToCpp/pngToCpp.c + @echo $(F_ROUGE)" (bin) $@"$(F_NORMALE) + @$(CXX) $< -o $@ + @strip -s $@ + +# Generate basic +$(FILE_DIRECTORY)/GuiTools/myImage.cpp: $(FILE_IMAGES) $(MAKE_DEPENDENCE) pngToCpp + @echo $(F_BLUE)" (.cpp) *.png ==> $@"$(F_NORMALE) + @#echo ./pngToCpp $@ $(FILE_IMAGES) + @./pngToCpp $@ $(FILE_IMAGES) + + +# build C++ +$(OBJECT_DIRECTORY)/%.o: $(FILE_DIRECTORY)/%.cpp $(MAKE_DEPENDENCE) + @echo $(F_VERT)" (.o) $<"$(F_NORMALE) + @#echo $(CXX) $< -c -o $@ $(INCLUDE_DIRECTORY) $(CXXFLAGS) -MMD + @$(CXX) $< -c -o $@ $(INCLUDE_DIRECTORY) $(CXXFLAGS) -MMD + +# build binary +$(OUTPUT_NAME): $(OBJ) + @echo $(F_ROUGE)" (bin) $@ & $@-stripped"$(F_NORMALE) + @$(CXX) $(OBJ) $(LDFLAGS) -o $@ + @cp $@ $@-stripped + @strip -s $@-stripped + @#cp $@-stripped ~/.bin/$@ + + +clean: + @echo $(CADRE_HAUT_BAS) + @echo ' CLEANING : $(F_VIOLET)$(OUTPUT_NAME)$(F_NORMALE)'$(CADRE_COTERS) + @echo $(CADRE_HAUT_BAS) + @echo Remove Folder : $(OBJECT_DIRECTORY) + @rm -rf $(OBJECT_DIRECTORY) + @echo Remove File : $(OUTPUT_NAME) + @rm -f $(OUTPUT_NAME) + @echo Remove File : $(OUTPUT_NAME)-stripped + @rm -f $(OUTPUT_NAME)-stripped + @echo Remove File : pngToCpp + @rm -f pngToCpp + @echo Remove File : $(FILE_DIRECTORY)/GuiTools/myImage.* + @rm -f $(FILE_DIRECTORY)/GuiTools/myImage.* + @echo Remove doxygen files : doxygen/* + @rm -rf doxygen + @rm -f doxygen.log + @echo Remove temporary files *.bck + @rm -f `find . -name "*.bck"` + +count: + wc -l Makefile `find $(FILE_DIRECTORY)/ -name "*.cpp"` `find $(FILE_DIRECTORY)/ -name "*.h"` + diff --git a/Sources/Buffer/Buffer.cpp b/Sources/Buffer/Buffer.cpp new file mode 100644 index 0000000..82a88b7 --- /dev/null +++ b/Sources/Buffer/Buffer.cpp @@ -0,0 +1,435 @@ +/** + ******************************************************************************* + * @file Buffer.c + * @brief Editeur De N'ours : Text Buffer + * @author Edouard DUPIN + * @date 08/12/2010 + * @par Project + * Edn + * + * @par Copyright + * Copyright 2010 Edouard DUPIN, all right reserved + * + * This software is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY. + * + * Licence summary : + * You can modify and redistribute the sources code and binaries. + * You can send me the bug-fix + * You can not earn money with this Software (if the source extract from Edn + * represent less than 50% of original Sources) + * Term of the licence in in the file licence.txt. + * + ******************************************************************************* + */ + +#include "tools_debug.h" +#include "tools_globals.h" +#include "Buffer.h" +#include "BufferManager.h" + +#undef __class__ +#define __class__ "Buffer" + +/** + * @brief + * + * @param[in,out] --- + * + * @return --- + * + */ +Buffer::Buffer() +{ + m_fileModify = true; + m_haveName = false; + Edn::String mString = "No-Name"; + m_fileName.SetCompleateName(mString); +} + +/** + * @brief + * + * @param[in,out] --- + * + * @return --- + * + */ +Buffer::Buffer(Edn::String &newFileName) +{ + m_fileModify = false; + m_haveName = true; + m_fileName.SetCompleateName(newFileName); +} + +/** + * @brief + * + * @param[in,out] --- + * + * @return --- + * + */ +Buffer::~Buffer(void) +{ + +} +/** + * @brief + * + * @param[in,out] --- + * + * @return --- + * + */ +bool Buffer::IsModify(void) +{ + return m_fileModify; +} + +void Buffer::SetModify(bool status) +{ + if (status != m_fileModify) { + m_fileModify = status; + GeneralSendMessage(EDN_MSG__BUFFER_CHANGE_MODIFY); + } +} + + +Edn::File Buffer::GetFileName(void) +{ + return m_fileName; +} + + +/** + * @brief + * + * @param[in,out] --- + * + * @return --- + * + */ +Edn::String Buffer::GetName(void) +{ + // nothing to do + return m_fileName.GetCompleateName(); +} + +/** + * @brief + * + * @param[in,out] --- + * + * @return --- + * + */ +Edn::String Buffer::GetShortName(void) +{ + + // nothing to do + return m_fileName.GetShortFilename(); +} + +/** + * @brief + * + * @param[in,out] --- + * + * @return --- + * + */ +Edn::String Buffer::GetFolder(void) +{ + + // nothing to do + return m_fileName.GetFolder(); +} + + +/** + * @brief + * + * @param[in,out] --- + * + * @return --- + * + */ +bool Buffer::HaveName(void) +{ + // nothing to do + return true; +} + +/** + * @brief + * + * @param[in,out] --- + * + * @return --- + * + */ +void Buffer::SetName(Edn::String &newName) +{ + // nothing to do +} + +/** + * @brief + * + * @param[in,out] --- + * + * @return --- + * + */ + // TODO : ne marche plus ... +void Buffer::Save(void) +{ + // nothing to do +} + + +/** + * @brief + * + * @param[in,out] --- + * + * @return --- + * + */ +void Buffer::GetInfo(infoStatBuffer_ts &infoToUpdate) +{ + // nothing to do +} + +/** + * @brief + * + * @param[in,out] --- + * + * @return --- + * + */ +void Buffer::SetLineDisplay(uint32_t lineNumber) +{ + // nothing to do +} + + +/** + * @brief + * + * @param[in,out] --- + * + * @return --- + * + */ +int32_t Buffer::Display(DrawerManager &drawer) +{ + return ERR_NONE; +} + +/** + * @brief + * + * @param[in,out] --- + * + * @return --- + * + * @todo : Set the move up and DOWN... + * + */ +void Buffer::MouseSelectFromCursorTo(int32_t width, int32_t height) +{ + // nothing to do +} + + + +/** + * @brief + * + * @param[in,out] --- + * + * @return --- + * + */ +void Buffer::MouseEvent(int32_t width, int32_t height) +{ + // nothing to do +} + +/** + * @brief + * + * @param[in,out] --- + * + * @return --- + * + */ +void Buffer::MouseEventDouble(void) +{ + // nothing to do +} + +/** + * @brief + * + * @param[in,out] --- + * + * @return --- + * + */ +void Buffer::MouseEventTriple(void) +{ + // nothing to do +} + + +/** + * @brief + * + * @param[in,out] --- + * + * @return --- + * + */ +void Buffer::ScrollDown(void) +{ + // nothing to do +} + + +/** + * @brief + * + * @param[in,out] --- + * + * @return --- + * + */ +void Buffer::ScrollUp(void) +{ + // nothing to do +} + + +/** + * @brief + * + * @param[in,out] --- + * + * @return --- + * + */ +void Buffer::ForceReDraw(bool allElement) +{ + // nothing to do +} + + + +void Buffer::cursorMove(int32_t gtkKey) +{ + // nothing to do +} + +/** + * @brief + * + * @param[in,out] --- + * + * @return --- + * + */ +void Buffer::AddChar(char * UTF8data) +{ + // nothing to do +} + +void Buffer::Search(Edn::String &data, bool back, bool caseSensitive, bool wrap, bool regExp) +{ + // nothing to do +} + +void Buffer::Replace(Edn::String &data) +{ + // nothing to do +} + +int32_t Buffer::FindLine(Edn::String &data) +{ + // nothing to do +} + +void Buffer::JumpAtLine(int32_t newLine) +{ + // nothing to do +} + +/** + * @brief request a copy of the selection in the named clipBoard ID + * + * @param[in] clipboardID Id of the buffer we want to get data [0..10] (0 copy normal / 10 middle button) + * + * @return --- + * + */ +void Buffer::Copy(int8_t clipboardID) +{ + // nothing to do +} + + +/** + * @brief Request a copy and a remove of the curent selection in the named clipBoard ID + * + * @param[in] clipboardID Id of the buffer we want to get data [0..10] (0 copy normal / 10 middle button) + * + * @return --- + * + */ +void Buffer::Cut(int8_t clipboardID) +{ + // nothing to do +} + + +/** + * @brief request the past of a specific clipboard on the curent position or selection + * + * @param[in] clipboardID Id of the buffer we want to get data [0..10] (0 copy normal / 10 middle button) + * + * @return --- + * + */ +void Buffer::Paste(int8_t clipboardID) +{ + // nothing to do +} + +void Buffer::RemoveLine(void) +{ + // nothing to do +} + +void Buffer::SelectAll(void) +{ + // nothing to do +} + +void Buffer::SelectNone(void) +{ + // nothing to do +} + +void Buffer::Undo(void) +{ + // nothing to do +} + +void Buffer::Redo(void) +{ + // nothing to do +} + diff --git a/Sources/Buffer/Buffer.h b/Sources/Buffer/Buffer.h new file mode 100644 index 0000000..e470a07 --- /dev/null +++ b/Sources/Buffer/Buffer.h @@ -0,0 +1,99 @@ +/** + ******************************************************************************* + * @file Buffer.h + * @brief Editeur De N'ours : Text Buffer (header) + * @author Edouard DUPIN + * @date 08/12/2010 + * @par Project + * Edn + * + * @par Copyright + * Copyright 2010 Edouard DUPIN, all right reserved + * + * This software is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY. + * + * Licence summary : + * You can modify and redistribute the sources code and binaries. + * You can send me the bug-fix + * You can not earn money with this Software (if the source extract from Edn + * represent less than 50% of original Sources) + * Term of the licence in in the file licence.txt. + * + ******************************************************************************* + */ + +#ifndef __BUFFER_H__ +#define __BUFFER_H__ + +#include +#include "Display.h" +#include "charset.h" +#include "Edn.h" + + +typedef struct{ + uint32_t nbTotalLine; //!< Number of line in the buffer + uint32_t nbTotalColomn; //!< Number of line in the buffer + uint32_t startLineDisplay; //!< First line display. + uint32_t startColomnDisplay; //!< First Colomn displayed + uint32_t diplayableColomn; //!< NB colomn that can be displayed + uint32_t diplayableLine; //!< NB Line that can be displayed +}infoStatBuffer_ts; + + +class Buffer { + public: + Buffer(void); + Buffer(Edn::String &filename); + virtual ~Buffer(void); + Edn::File GetFileName(void); + virtual Edn::String GetName(void); + virtual Edn::String GetShortName(void); + virtual Edn::String GetFolder(void); + virtual void SetName(Edn::String &newName); + virtual void Save(void); + virtual bool HaveName(void); + bool IsModify(void); + protected: + void SetModify(bool status); + public: + virtual void GetInfo(infoStatBuffer_ts &infoToUpdate); + virtual void SetLineDisplay(uint32_t lineNumber); + + virtual int32_t Display(DrawerManager &drawer); + virtual void ForceReDraw(bool allElement); + virtual void AddChar(char * UTF8data); + virtual void cursorMove(int32_t gtkKey); + virtual void MouseSelectFromCursorTo(int32_t width, int32_t height); + virtual void MouseEvent(int32_t width, int32_t height); + virtual void MouseEventDouble(void); + virtual void MouseEventTriple(void); + virtual void ScrollDown(void); + virtual void ScrollUp(void); + virtual void RemoveLine(void); + virtual void SelectAll(void); + virtual void SelectNone(void); + virtual void Undo(void); + virtual void Redo(void); + virtual void SetCharset(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 Search(Edn::String &data, bool back, bool caseSensitive, bool wrap, bool regExp); + virtual void Replace(Edn::String &data); + virtual int32_t FindLine(Edn::String &data); + virtual void JumpAtLine(int32_t newLine); + + protected: + bool m_fileModify; + Edn::File m_fileName; + bool m_haveName; //!< to know if the file have a name or NOT +}; + + +#endif + + diff --git a/Sources/Buffer/BufferEmpty.cpp b/Sources/Buffer/BufferEmpty.cpp new file mode 100644 index 0000000..032b9fc --- /dev/null +++ b/Sources/Buffer/BufferEmpty.cpp @@ -0,0 +1,98 @@ +/** + ******************************************************************************* + * @file BufferEmpty.cpp + * @brief Editeur De N'ours : Text Buffer (edit For No buffer Display) + * @author Edouard DUPIN + * @date 19/01/2011 + * @par Project + * Edn + * + * @par Copyright + * Copyright 2010 Edouard DUPIN, all right reserved + * + * This software is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY. + * + * Licence summary : + * You can modify and redistribute the sources code and binaries. + * You can send me the bug-fix + * You can not earn money with this Software (if the source extract from Edn + * represent less than 50% of original Sources) + * Term of the licence in in the file licence.txt. + * + ******************************************************************************* + */ + +#include "tools_debug.h" +#include "tools_globals.h" +#include "BufferEmpty.h" +#include "ColorizeManager.h" +#include "MainWindows.h" + +#undef __class__ +#define __class__ "BufferEmpty" + +/** + * @brief + * + * @param[in,out] --- + * + * @return --- + * + */ +BufferEmpty::BufferEmpty() +{ + +} + +/** + * @brief + * + * @param[in,out] --- + * + * @return --- + * + */ +BufferEmpty::~BufferEmpty(void) +{ + +} + + +/** + * @brief + * + * @param[in,out] --- + * + * @return --- + * + */ +int32_t BufferEmpty::Display(DrawerManager &drawer) +{ + + ColorizeManager * myColorManager = ColorizeManager::getInstance(); + // Get color : + Colorize *myColor = NULL; + // Clean Buffer + drawer.Clean(myColorManager->Get(COLOR_CODE_BASIC_BG) ); + + myColor = myColorManager->Get("normal"); + // Draw the 2 comments Lines : + drawer.Text(myColor, 20,20, "edn - Editeur De N'ours, l'Editeur Desoxyribo-Nucleique"); + //drawer.Flush(); + myColor = myColorManager->Get("commentDoxygen"); + drawer.Text(myColor, 20,25 + Display::GetFontHeight(), "No Buffer Availlable to display"); + drawer.Flush(); + /* + myColor = myColorManager->Get(("SelectedText")); + drawer.Cursor(20, 50); + drawer.EndOfLine(20, 70); + drawer.Tabulation(myColor, 20, 90, 5); + drawer.UTF8UnknownElement(myColor, 20, 120, 3, false); + drawer.Flush(); + */ + return ERR_NONE; +} + + + diff --git a/Sources/Buffer/BufferEmpty.h b/Sources/Buffer/BufferEmpty.h new file mode 100644 index 0000000..19189a7 --- /dev/null +++ b/Sources/Buffer/BufferEmpty.h @@ -0,0 +1,42 @@ +/** + ******************************************************************************* + * @file BufferEmpty.h + * @brief Editeur De N'ours : Text Buffer (edit For No buffer Display) (header) + * @author Edouard DUPIN + * @date 19/01/2011 + * @par Project + * Edn + * + * @par Copyright + * Copyright 2010 Edouard DUPIN, all right reserved + * + * This software is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY. + * + * Licence summary : + * You can modify and redistribute the sources code and binaries. + * You can send me the bug-fix + * You can not earn money with this Software (if the source extract from Edn + * represent less than 50% of original Sources) + * Term of the licence in in the file licence.txt. + * + ******************************************************************************* + */ + +#ifndef __BUFFER_EMPTY_H__ +#define __BUFFER_EMPTY_H__ + +#include "Buffer.h" + +class BufferEmpty : public Buffer { + public: + BufferEmpty(void); + virtual ~BufferEmpty(void); + virtual int32_t Display(DrawerManager &drawer); + +}; + + +#endif + + diff --git a/Sources/Buffer/BufferManager.cpp b/Sources/Buffer/BufferManager.cpp new file mode 100644 index 0000000..ffce9b8 --- /dev/null +++ b/Sources/Buffer/BufferManager.cpp @@ -0,0 +1,288 @@ +/** + ******************************************************************************* + * @file BufferManager.cpp + * @brief Editeur De N'ours : Text Buffer manager (sources) + * @author Edouard DUPIN + * @date 08/12/2010 + * @par Project + * Edn + * + * @par Copyright + * Copyright 2010 Edouard DUPIN, all right reserved + * + * This software is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY. + * + * Licence summary : + * You can modify and redistribute the sources code and binaries. + * You can send me the bug-fix + * You can not earn money with this Software (if the source extract from Edn + * represent less than 50% of original Sources) + * Term of the licence in in the file licence.txt. + * + ******************************************************************************* + */ + + +#include "tools_debug.h" +#include "tools_globals.h" +#include "BufferManager.h" +//#include "MsgBroadcast.h" + +#undef __class__ +#define __class__ "BufferManager" + +// Constructeur +/** + * @brief + * + * @param[in,out] --- + * + * @return --- + * + */ +BufferManager::BufferManager(void) : MsgBroadcast("Buffer Manager", EDN_CAT_BUFFER_MANAGER) +{ + // nothing to do ... + BufferNotExiste = new BufferEmpty(); + m_idSelected = -1; +} + +/** + * @brief + * + * @param[in,out] --- + * + * @return --- + * + */ +BufferManager::~BufferManager(void) +{ + //clean All Buffer + EDN_INFO("~BufferManager::RemoveAll();"); + RemoveAll(); + // clear The list of Buffer + EDN_INFO("~BufferManager::listBuffer.clear();"); + listBuffer.clear(); + EDN_INFO("~BufferManager::delete(BufferNotExiste);"); + delete(BufferNotExiste); +} + + +void BufferManager::OnMessage(int32_t id, int32_t dataID) +{ + switch (id) + { + case EDN_MSG__NEW: + { + int32_t newOne = Create(); + if (-1 != newOne) { + SendMessage(EDN_MSG__CURRENT_CHANGE_BUFFER_ID, newOne); + } + } + break; + } +} + + + + + + + +/** + * @brief Remove all buffer opened + * + * @param[in,out] --- + * + * @return --- + * + */ +void BufferManager::RemoveAll(void) +{ + int32_t i; + for (i=0; i<(int32_t)listBuffer.size(); i++) { + Remove(i); + } + SendMessage(EDN_MSG__BUFFER_REMOVE_ALL); +} + + + +/** + * @brief Create a new buffer with no name and empty + * + * @param[in,out] --- + * + * @return The ID of the curent buffer where the file is loaded + * + */ +int32_t BufferManager::Create(void) +{ + // allocate a new Buffer + Buffer *myBuffer = new BufferText(); + // Add at the list of element + listBuffer.push_back(myBuffer); + int32_t basicID = (int32_t)listBuffer.size() - 1; + SendMessage(EDN_MSG__BUFFER_ADD, basicID); + return basicID; +} + + +/** + * @brief open a file with the name set in parameters + * + * @param[in] filename curent filename + * + * @return The ID of the curent buffer where the file is loaded + * + * @todo : check if this file is not curently open and return the old ID + * + */ +int32_t BufferManager::Open(Edn::String &filename) +{ + // allocate a new Buffer + Buffer *myBuffer = new BufferText(filename); + // Add at the list of element + listBuffer.push_back(myBuffer); + int32_t basicID = (int32_t)listBuffer.size() - 1; + SendMessage(EDN_MSG__BUFFER_ADD, basicID); + return basicID; +} + + + +Buffer * BufferManager::Get(int32_t BufferID) +{ + // possible special case : -1; + if (-1 >= BufferID) { + return BufferNotExiste; + } + // check if the Buffer existed + if (BufferID < (int32_t)listBuffer.size()) { + // check if the buffer already existed + if (NULL != listBuffer[BufferID]) { + return listBuffer[BufferID]; + } else { + EDN_ERROR("non existing Buffer " << BufferID); + } + } else { + EDN_ERROR("call an non existing Buffer number too hight : " << BufferID << " > " << listBuffer.size()); + } + return BufferNotExiste; +} + + +bool BufferManager::Exist(int32_t BufferID) +{ + if (-1 >= BufferID) { + return false; + } + // check if the Buffer existed + if (BufferID < (int32_t)listBuffer.size()) { + // check if the buffer already existed + if (NULL != listBuffer[BufferID]) { + return true; + } + } + return false; +} + + +int32_t BufferManager::GetId(Edn::String &filename) +{ + int32_t iii; + // check if the Buffer existed + for (iii=0; iii < (int32_t)listBuffer.size(); iii++) { + // check if the buffer already existed + if (NULL != listBuffer[iii]) { + if ( listBuffer[iii]->GetName() == filename) { + return iii; + } + } + } + return -1; +} + +bool BufferManager::Exist(Edn::String &filename) +{ + if (-1 == GetId(filename)) { + return false; + } + return true; +} + + +// return the number of buffer (open in the past) if 5 buffer open and 4 close ==> return 5 +uint32_t BufferManager::Size(void) +{ + return listBuffer.size(); +} + + +/** + * @brief + * + * @param[in,out] --- + * + * @return --- + * + */ +bool BufferManager::Remove(int32_t BufferID) +{ + if (-1 >= BufferID) { + return false; + } + // check if the Buffer existed + if (BufferID < (int32_t)listBuffer.size()) { + // check if the buffer already existed + if (NULL != listBuffer[BufferID]) { + // TODO : Check if it saved... + /* + if (false == IsSaved(BufferID) ) { + EDN_INFO("Buffer " << BufferID << " : Not Saved", BufferID); + } + */ + // Delete the Buffer + delete( listBuffer[BufferID] ); + listBuffer[BufferID] = NULL; + SendMessage(EDN_MSG__BUFFER_REMOVE, BufferID); + return true; + } else { + EDN_INFO("non existing Buffer " << BufferID); + return false; + } + } else { + EDN_INFO("call an non existing Buffer number too hight : " << BufferID << " > " << listBuffer.size()); + return false; + } +} + +/** + * @brief to get the element 14 in the buffer + * + * @param[in,out] --- + * + * @return --- + * + */ +int32_t BufferManager::WitchBuffer(int32_t iEmeElement) +{ + int32_t i; + for (i=0; i<(int32_t)listBuffer.size(); i++) { + if (NULL != listBuffer[i]) { + iEmeElement--; + // find the element : + if (0 == iEmeElement) { + return i; + } + } + } + return -1; +} + + + + + + diff --git a/Sources/Buffer/BufferManager.h b/Sources/Buffer/BufferManager.h new file mode 100644 index 0000000..ea6ca99 --- /dev/null +++ b/Sources/Buffer/BufferManager.h @@ -0,0 +1,76 @@ +/** + ******************************************************************************* + * @file BufferManager.h + * @brief Editeur De N'ours : Text Buffer (header) + * @author Edouard DUPIN + * @date 08/12/2010 + * @par Project + * Edn + * + * @par Copyright + * Copyright 2010 Edouard DUPIN, all right reserved + * + * This software is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY. + * + * Licence summary : + * You can modify and redistribute the sources code and binaries. + * You can send me the bug-fix + * You can not earn money with this Software (if the source extract from Edn + * represent less than 50% of original Sources) + * Term of the licence in in the file licence.txt. + * + ******************************************************************************* + */ + +#ifndef __BUFFER_MANAGER_H__ +#define __BUFFER_MANAGER_H__ + +#include "Buffer.h" +#include "BufferText.h" +#include "BufferEmpty.h" +#include "Singleton.h" +#include "MsgBroadcast.h" +#include +#include + +class BufferManager: public Singleton, public MsgBroadcast +{ + friend class Singleton; + // specific for sigleton system... + private: + // Constructeur + BufferManager(void); + ~BufferManager(void); + + public: + void OnMessage(int32_t id, int32_t dataID); + + // return the ID of the buffer allocated + // create a buffer with no element + int32_t Create(void); + // open curent filename + int32_t Open(Edn::String &filename); + int32_t GetSelected(void) { return m_idSelected;}; + void SetSelected(int32_t id) {m_idSelected = id;}; + Buffer * Get(int32_t BufferID); + bool Exist(int32_t BufferID); + bool Exist(Edn::String &filename); + int32_t GetId(Edn::String &filename); + // return the number of buffer (open in the past) if 5 buffer open and 4 close ==> return 5 + uint32_t Size(void); + int32_t WitchBuffer(int32_t iEmeElement); + + bool Remove(int32_t BufferID); + + private: + + std::vector listBuffer; //!< element List of the char Elements + + void RemoveAll(void); //!< remove all buffer + int32_t m_idSelected; + Buffer * BufferNotExiste; //!< When an error arrive in get buffer we return the Error buffer (not writable) +}; + +#endif + diff --git a/Sources/Buffer/BufferText.cpp b/Sources/Buffer/BufferText.cpp new file mode 100644 index 0000000..a2f3ee2 --- /dev/null +++ b/Sources/Buffer/BufferText.cpp @@ -0,0 +1,1393 @@ +/** + ******************************************************************************* + * @file BufferText.cpp + * @brief Editeur De N'ours : Text Buffer (edit only ASCII text File) (header) + * @author Edouard DUPIN + * @date 19/01/2011 + * @par Project + * Edn + * + * @par Copyright + * Copyright 2010 Edouard DUPIN, all right reserved + * + * This software is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY. + * + * Licence summary : + * You can modify and redistribute the sources code and binaries. + * You can send me the bug-fix + * You can not earn money with this Software (if the source extract from Edn + * represent less than 50% of original Sources) + * Term of the licence in in the file licence.txt. + * + ******************************************************************************* + */ + +#include "tools_debug.h" +#include "tools_globals.h" +#include "ClipBoard.h" +#include "BufferText.h" +#include "toolsMemory.h" +#include "Edn.h" + +#undef __class__ +#define __class__ "BufferText" + + +const uint32_t nbLineAllocatedInBase = 300; + + + + +/** + * @brief + * + * @param[in,out] --- + * + * @return --- + * + */ +void BufferText::BasicInit(void) +{ + static int32_t fileBasicID = 0; + NeedToCleanEndPage = true; + // set the first element that is displayed + m_displayStartBufferPos = 0; + // set basic filename : + filename = "Untitled "; + filename += fileBasicID; + // no name ... + haveName = false; + fileBasicID++; + // set the number of the lineNumber; + nbColoneForLineNumber = 1; + // init the link with the buffer manager + myColorManager = ColorizeManager::getInstance(); + // Init Selection mode : + SelectionEnd(); + //EDN_INFO("Init"); + // new mode : + m_cursorPos = 0; + m_cursorPreferredCol = -1; + m_cursorOn = true; + //m_cursorMode = CURSOR_DISPLAY_MODE_NORMAL; + m_displayStart.x = 0; + m_displayStart.y = 0; + m_displaySize.x = 200; + m_displaySize.y = 20; + m_displayLocalSyntax.idSequence = -1; +} + + +/** + * @brief + * + * @param[in,out] --- + * + * @return --- + * + */ +BufferText::BufferText() +{ + BasicInit(); + SetModify(true); + EDN_INFO("New(Empty-Buffer)"); +} + + +/** + * @brief + * + * @param[in,out] --- + * + * @return --- + * + */ +BufferText::BufferText(Edn::String &newFileName) +{ + BasicInit(); + EDN_INFO("Add Data from file(" << newFileName.c_str() << ")"); + FILE * myFile = NULL; + // set the filename : + SetName(newFileName); + // try to open the file. if not existed, new file + + myFile = fopen(newFileName.c_str(), "r"); + if (NULL != myFile) { + m_EdnBuf.DumpFrom(myFile); + // close the input file + fclose(myFile); + SetModify(false); + } else { + // fichier inexistant... creation d'un nouveaux + EDN_WARNING("No File ==> created a new one(" << newFileName.c_str() << ")"); + SetModify(true); + } + UpdateWindowsPosition(); + ForceReDraw(true); +} + + +/** + * @brief + * + * @param[in,out] --- + * + * @return --- + * + */ +void BufferText::Save(void) +{ + EDN_INFO("Save File : \"" << filename.c_str() << "\"" ); + FILE * myFile = NULL; + myFile = fopen(filename.c_str(), "w"); + if (NULL != myFile) { + m_EdnBuf.DumpIn(myFile); + fclose(myFile); + SetModify(false); + } +} + + + +/** + * @brief + * + * @param[in,out] --- + * + * @return --- + * + */ +BufferText::~BufferText(void) +{ + EDN_INFO("Delete(BufferText)"); +} + + +void BufferText::SelectionStart(void) +{ + // start a nex selection + SelectionCheckMode(); + //EDN_DEBUG("SELECT_start"); +} + +void BufferText::SelectionEnd(void) +{ + //EDN_DEBUG("SELECT_stop"); +} + +void BufferText::SelectionCheckMode(void) +{ + /* + if (true == globals::IsSetCtrl() ) { + } else { + } + */ +} + + + +/** + * @brief + * + * @param[in,out] --- + * + * @return --- + * + */ +Edn::String BufferText::GetName(void) +{ + return filename; +} + +/** + * @brief + * + * @param[in,out] --- + * + * @return --- + * + */ +Edn::String BufferText::GetShortName(void) +{ + char *ptr = strrchr(filename.c_str(), '/'); + if (NULL == ptr) { + ptr = strrchr(filename.c_str(), '\\'); + } + Edn::String out = filename; + if (NULL != ptr) { + out = ptr+1; + } + return out; +} + +/** + * @brief + * + * @param[in,out] --- + * + * @return --- + * + */ +Edn::String BufferText::GetFolder(void) +{ + char tmpVal[4096]; + strncpy(tmpVal, filename.c_str(), 4096); + tmpVal[4096-1] = '\0'; + char *ptr = strrchr(tmpVal, '/'); + if (NULL == ptr) { + ptr = strrchr(tmpVal, '\\'); + } + Edn::String out = "./"; + if (NULL != ptr) { + *ptr = '\0'; + out = tmpVal; + } + return out; +} + + +/** + * @brief + * + * @param[in,out] --- + * + * @return --- + * + */ +bool BufferText::HaveName(void) +{ + return haveName; +} + +/** + * @brief + * + * @param[in,out] --- + * + * @return --- + * + */ +void BufferText::SetName(Edn::String &newName) +{ + filename = newName; + haveName = true; + // Find HL system + if (true == HighlightManager::getInstance()->Exist(newName)) { + Highlight * myHL = HighlightManager::getInstance()->Get(newName); + // Set the new HL + if (NULL != myHL) { + m_EdnBuf.SetHLSystem(myHL); + } + } + +} + + +/** + * @brief + * + * @param[in,out] --- + * + * @return --- + * + */ +void BufferText::GetInfo(infoStatBuffer_ts &infoToUpdate) +{ + +} + +/** + * @brief + * + * @param[in,out] --- + * + * @return --- + * + */ +void BufferText::SetLineDisplay(uint32_t lineNumber) +{ + +} + + + +void BufferText::DrawLineNumber(DrawerManager &drawer,char *myPrint, int32_t lineNumber, int32_t positionY) +{ + char tmpLineNumber[50]; + sprintf(tmpLineNumber, myPrint, lineNumber); + drawer.Text(myColorManager->Get(COLOR_CODE_LINE_NUMBER), 1, positionY, tmpLineNumber); +} + + +/** + * @brief Display the curent buffer with all the probematic imposed by the xharset and the user contraint. + * + * @param[in,out] drawer the basic user drawer of EDN. + * + * @return + * + */ +int32_t BufferText::Display(DrawerManager &drawer) +{ + int32_t letterHeight = Display::GetFontHeight(); + int32_t letterWidth = Display::GetFontWidth(); + // update the number of element that can be displayed + m_displaySize.x = (drawer.GetWidth()/letterWidth) + 1 - nbColoneForLineNumber;; + m_displaySize.y = (drawer.GetHeight()/letterHeight) + 1; + EDN_INFO("main DIPLAY " << m_displaySize.x << " char * " << m_displaySize.y << " char"); + + int32_t selStart, selEnd, selRectStart, selRectEnd; + bool selIsRect; + int32_t selHave = m_EdnBuf.GetSelectionPos(SELECTION_PRIMARY, selStart, selEnd, selIsRect, selRectStart, selRectEnd); + + colorInformation_ts * HLColor = NULL; + + //displayLineNumber(drawer); + // get the number of line in the buffer + int32_t maxNumberLine = m_EdnBuf.NumberOfLines(); + //int32_t maxNumberLine = 2096; + char *myPrint = NULL; + if (10 > maxNumberLine) { nbColoneForLineNumber = 1; myPrint = (char *)"%1d"; + } else if (100 > maxNumberLine) { nbColoneForLineNumber = 2; myPrint = (char *)"%2d"; + } else if (1000 > maxNumberLine) { nbColoneForLineNumber = 3; myPrint = (char *)"%3d"; + } else if (10000 > maxNumberLine) { nbColoneForLineNumber = 4; myPrint = (char *)"%4d"; + } else if (100000 > maxNumberLine) { nbColoneForLineNumber = 5; myPrint = (char *)"%5d"; + } else if (1000000 > maxNumberLine) { nbColoneForLineNumber = 6; myPrint = (char *)"%6d"; + } else if (1000000 > maxNumberLine) { nbColoneForLineNumber = 7; myPrint = (char *)"%7d"; + } else if (10000000 > maxNumberLine) { nbColoneForLineNumber = 8; myPrint = (char *)"%8d"; + } else if (100000000 > maxNumberLine) { nbColoneForLineNumber = 9; myPrint = (char *)"%9d"; + } else { nbColoneForLineNumber = 10; myPrint = (char *)"%d"; + } + + uint32_t y = 0; + int32_t iii, new_i; + // Get color : + Colorize * myColor = myColorManager->Get("normal"); + Colorize * myColorSel = myColorManager->Get("SelectedText"); + color_ts & myColorSpace = myColorManager->Get(COLOR_CODE_SPACE); + color_ts & myColorTab = myColorManager->Get(COLOR_CODE_TAB); + Colorize * selectColor = NULL; + char displayChar[MAX_EXP_CHAR_LEN]; + memset(displayChar, 0, sizeof(char)*MAX_EXP_CHAR_LEN); + + + int mylen = m_EdnBuf.Size(); + int32_t x_base=nbColoneForLineNumber*letterWidth + 3; + uint32_t xx = 0; + int32_t idX = 0; + drawer.Clean(myColorManager->Get(COLOR_CODE_BASIC_BG)); + int displayLines = 0; + // Regenerate the colorizing if necessary ... + m_EdnBuf.HightlightGenerateLines(m_displayLocalSyntax, m_displayStartBufferPos, m_displaySize.y); + GTimeVal timeStart; + g_get_current_time(&timeStart); + + // draw the lineNumber : + int32_t currentLineID = m_displayStart.y+1; + DrawLineNumber(drawer, myPrint, currentLineID, y); + for (iii=m_displayStartBufferPos; iii (" << x << "," << y << ")" ); +} + + +/** + * @brief + * + * @param[in,out] --- + * + * @return --- + * + */ +// TODO : Simplify selection .... +void BufferText::MouseEvent(int32_t width, int32_t height) +{ + if (true == globals::IsSetShift() ) { + MouseSelectFromCursorTo(width, height); + } else { + int32_t posX, posY; + // Get the caracter mouse position + GetMousePosition(width, height, posX, posY); + // find the current selected line : + int32_t newPos = m_EdnBuf.CountForwardNLines(0, posY); + // Get the display char position + newPos = m_EdnBuf.CountForwardDispChars(newPos, posX); + // move the cursor + SetInsertPosition(newPos); + + // if a preferred column wasn't aleady established, establish it + if (m_cursorPreferredCol < 0) { + m_cursorPreferredCol = posX; + } + m_EdnBuf.Unselect(SELECTION_PRIMARY); + + ForceReDraw(true); + UpdateWindowsPosition(); + } +} + +/** + * @brief + * + * @param[in,out] --- + * + * @return --- + * + * @todo : Set the move up and DOWN... + * + */ +// TODO : Simplify selection .... +void BufferText::MouseSelectFromCursorTo(int32_t width, int32_t height) +{ + int32_t posX, posY; + // Get the caracter mouse position + GetMousePosition(width, height, posX, posY); + + int32_t selStart, selEnd, selRectStart, selRectEnd; + bool selIsRect; + int32_t selHave = m_EdnBuf.GetSelectionPos(SELECTION_PRIMARY, selStart, selEnd, selIsRect, selRectStart, selRectEnd); + //EDN_DEBUG("BufferText:: " << selHave << " = BufGetSelectionPos(SELECTION_PRIMARY," << selStart << "," << selEnd << "," << selIsRect << "," << selRectStart << "," << selRectEnd << ");" ); + + int32_t rememberCursorPos = m_cursorPos; + + // find the current selected line : + int32_t newPos = m_EdnBuf.CountForwardNLines(0, posY); + // Get the display char position + newPos = m_EdnBuf.CountForwardDispChars(newPos, posX); + // move the cursor + SetInsertPosition(newPos); + + // if a preferred column wasn't aleady established, establish it + if (m_cursorPreferredCol < 0) { + m_cursorPreferredCol = posX; + } + + if (false == selHave) { + m_EdnBuf.Select(SELECTION_PRIMARY, rememberCursorPos, m_cursorPos); + } else { + if (rememberCursorPos == selStart) { + m_EdnBuf.Select(SELECTION_PRIMARY, m_cursorPos, selEnd); + } else { + m_EdnBuf.Select(SELECTION_PRIMARY, selStart, m_cursorPos); + } + } + ForceReDraw(true); + UpdateWindowsPosition(); +} + + + +/** + * @brief double click : select the data around the selection + * + * @param[in,out] --- + * + * @return --- + * + */ +void BufferText::MouseEventDouble(void) +{ + int32_t beginPos, endPos; + if (true == m_EdnBuf.SelectAround(m_cursorPos, beginPos, endPos)) { + m_EdnBuf.Select(SELECTION_PRIMARY, beginPos, endPos); + m_cursorPos = endPos; + ForceReDraw(true); + } + // no else +} + +/** + * @brief triple click select all the line + * + * @param[in,out] --- + * + * @return --- + * + */ +void BufferText::MouseEventTriple(void) +{ + m_EdnBuf.Select(SELECTION_PRIMARY, m_EdnBuf.StartOfLine(m_cursorPos), m_EdnBuf.EndOfLine(m_cursorPos)); + m_cursorPos = m_EdnBuf.EndOfLine(m_cursorPos); + ForceReDraw(true); +} + +void BufferText::RemoveLine(void) +{ + int32_t start = m_EdnBuf.StartOfLine(m_cursorPos); + int32_t stop = m_EdnBuf.EndOfLine(m_cursorPos); + m_EdnBuf.Remove(start, stop+1); + SetInsertPosition(start); + SetModify(true); +} + +void BufferText::SelectAll(void) +{ + m_EdnBuf.Select(SELECTION_PRIMARY, 0, m_EdnBuf.Size()); + m_cursorPos = m_EdnBuf.Size(); + ForceReDraw(true); +} + +void BufferText::SelectNone(void) +{ + m_EdnBuf.Unselect(SELECTION_PRIMARY); + ForceReDraw(true); +} + +/** + * @brief + * + * @param[in,out] --- + * + * @return --- + * + */ +void BufferText::ScrollDown(void) +{ + MoveUpDown(3); +} + + +/** + * @brief + * + * @param[in,out] --- + * + * @return --- + * + */ +void BufferText::ScrollUp(void) +{ + MoveUpDown(-3); +} + + +/** + * @brief + * + * @param[in,out] --- + * + * @return --- + * + */ +void BufferText::MoveUpDown(int32_t ofset) +{ + m_displayLocalSyntax.idSequence = -1; + if (ofset >= 0) { + int32_t nbLine = m_EdnBuf.NumberOfLines(); + if (m_displayStart.y+ofset+3 > nbLine) { + m_displayStart.y = nbLine-3; + } else { + m_displayStart.y += ofset; + } + m_displayStartBufferPos = m_EdnBuf.CountForwardNLines(0, m_displayStart.y); + } else { + ofset *= -1; + if (m_displayStart.y < ofset) { + m_displayStart.y = 0; + m_displayStartBufferPos = 0; + } else { + m_displayStart.y -= ofset; + m_displayStartBufferPos = m_EdnBuf.CountForwardNLines(0, m_displayStart.y); + } + } + +} + + + +/** + * @brief + * + * @param[in,out] --- + * + * @return --- + * + */ +void BufferText::ForceReDraw(bool allElement) +{ + NeedToCleanEndPage = true; + //m_displayLocalSyntax.idSequence = -1; +} + +void BufferText::SetInsertPosition(int32_t newPos, bool insertChar) +{ + int32_t SelectionStart, SelectionEnd, SelectionRectStart, SelectionRectEnd; + bool SelectionIsRect; + bool haveSelectionActive = m_EdnBuf.GetSelectionPos(SELECTION_PRIMARY, SelectionStart, SelectionEnd, SelectionIsRect, SelectionRectStart, SelectionRectEnd); + int32_t rememberCursorPos = m_cursorPos; + + //EDN_DEBUG("newPos=" << newPos); + + // unselect buffer: + m_EdnBuf.Unselect(SELECTION_PRIMARY); + /* make sure new position is ok, do nothing if it hasn't changed */ + if (newPos != m_cursorPos) { + if (newPos < 0){ + newPos = 0; + } + if (newPos > m_EdnBuf.Size()) { + newPos = m_EdnBuf.Size(); + } + m_cursorPos = newPos; + } + m_cursorPreferredCol = -1; + // Force the cursor display + m_cursorOn = true; + + // special case when insert char ... + if (true == insertChar) { + return; + } + + if( false == haveSelectionActive + && true == globals::IsSetShift() ) + { + // new selection + m_EdnBuf.Select(SELECTION_PRIMARY, rememberCursorPos, m_cursorPos); + } else if( true == globals::IsSetShift() + && true == haveSelectionActive) + { + // update selection + if (rememberCursorPos == SelectionStart) { + m_EdnBuf.Select(SELECTION_PRIMARY, m_cursorPos, SelectionEnd); + } else { + m_EdnBuf.Select(SELECTION_PRIMARY, SelectionStart, m_cursorPos); + } + } +} + +bool BufferText::TextDMoveUp(int32_t offset) +{ + int32_t lineStartPos, column, prevLineStartPos, newPos; + + // Find the position of the start of the line. + lineStartPos = m_EdnBuf.StartOfLine(m_cursorPos); + // check if we can go up ... + if (lineStartPos == 0) { + return false; + } + + // Decide what column to move to, if there's a preferred column use that + if (m_cursorPreferredCol >= 0) { + column = m_cursorPreferredCol; + } else { + column = m_EdnBuf.CountDispChars(lineStartPos, m_cursorPos); + } + + // Get the previous line + prevLineStartPos = m_EdnBuf.CountBackwardNLines(lineStartPos, offset); + //EDN_INFO("Move Line UP result : prevLineStartPos=" << prevLineStartPos); + // Get the display char position + newPos = m_EdnBuf.CountForwardDispChars(prevLineStartPos, column); + //EDN_INFO("Move to colomn : column=" << column << " newPos=" << newPos); + + // move the cursor + SetInsertPosition(newPos); + + // if a preferred column wasn't aleady established, establish it + if (m_cursorPreferredCol < 0) { + m_cursorPreferredCol = column; + } + + return true; +} + +bool BufferText::TextDMoveDown(int32_t offset) +{ + int32_t lineStartPos, column, nextLineStartPos, newPos; + + // check if we are not at the end of Buffer + if (m_cursorPos == m_EdnBuf.Size() ) { + return false; + } + // Find the position of the start of the line. + lineStartPos = m_EdnBuf.StartOfLine(m_cursorPos); + + if (m_cursorPreferredCol >= 0) { + column = m_cursorPreferredCol; + } else { + column = m_EdnBuf.CountDispChars(lineStartPos, m_cursorPos); + } + // get the next line : + nextLineStartPos = m_EdnBuf.CountForwardNLines(lineStartPos, offset); + //EDN_INFO("Move Line DOWN result : nextLineStartPos=" << nextLineStartPos); + // Get the display char position + newPos = m_EdnBuf.CountForwardDispChars(nextLineStartPos, column); + //EDN_INFO("Move to colomn : column=" << column << " newPos=" << newPos); + + SetInsertPosition(newPos); + // if a preferred column wasn't aleady established, establish it + if (m_cursorPreferredCol < 0) { + m_cursorPreferredCol = column; + } + return true; +} + + +/** + * @brief + * + * @param[in,out] --- + * + * @return --- + * + */ +void BufferText::cursorMove(int32_t gtkKey) +{ + bool needUpdatePosition = true; + // check selection event ... + /* + if (true == globals::IsSetShift() ) { + if ( CURSOR_MODE_NORMAL == cursorMode) { + SelectionStart(); + } else { + SelectionCheckMode(); + } + } else { + SelectionEnd(); + } + */ + switch(gtkKey) { +# ifdef USE_GTK_VERSION_3_0 + case GDK_KEY_Left: +# elif defined( USE_GTK_VERSION_2_0) + case GDK_Left: +# endif + //EDN_INFO("keyEvent : "); + if (m_cursorPos > 0) { + SetInsertPosition(m_cursorPos - 1); + } + break; +# ifdef USE_GTK_VERSION_3_0 + case GDK_KEY_Right: +# elif defined( USE_GTK_VERSION_2_0) + case GDK_Right: +# endif + //EDN_INFO("keyEvent : "); + if (m_cursorPos < m_EdnBuf.Size() ) { + SetInsertPosition(m_cursorPos + 1); + } + break; +# ifdef USE_GTK_VERSION_3_0 + case GDK_KEY_Up: +# elif defined( USE_GTK_VERSION_2_0) + case GDK_Up: +# endif + //EDN_INFO("keyEvent : "); + TextDMoveUp(1); + break; +# ifdef USE_GTK_VERSION_3_0 + case GDK_KEY_Down: +# elif defined( USE_GTK_VERSION_2_0) + case GDK_Down: +# endif + //EDN_INFO("keyEvent : "); + // check if we have enought line ... + TextDMoveDown(1); + break; +# ifdef USE_GTK_VERSION_3_0 + case GDK_KEY_Page_Up: +# elif defined( USE_GTK_VERSION_2_0) + case GDK_Page_Up: +# endif + //EDN_INFO("keyEvent : "); + TextDMoveUp(m_displaySize.x); + break; +# ifdef USE_GTK_VERSION_3_0 + case GDK_KEY_Page_Down: +# elif defined( USE_GTK_VERSION_2_0) + case GDK_Page_Down: +# endif + //EDN_INFO("keyEvent : "); + TextDMoveDown(m_displaySize.x); + break; +# ifdef USE_GTK_VERSION_3_0 + case GDK_KEY_Begin: +# elif defined( USE_GTK_VERSION_2_0) + case GDK_Begin: +# endif + //EDN_INFO("keyEvent : "); + SetInsertPosition(m_EdnBuf.StartOfLine(m_cursorPos) ); + break; +# ifdef USE_GTK_VERSION_3_0 + case GDK_KEY_End: +# elif defined( USE_GTK_VERSION_2_0) + case GDK_End: +# endif + //EDN_INFO("keyEvent : "); + SetInsertPosition(m_EdnBuf.EndOfLine(m_cursorPos) ); + break; + default: + //LastUpDownCursorPosition = -1; + needUpdatePosition = false; + break; + } + if ( true == needUpdatePosition) { + UpdateWindowsPosition(); + } +} + + +/** + * @brief + * + * @param[in,out] --- + * + * @return --- + * + */ +void BufferText::UpdateWindowsPosition(bool centerPage) +{ + if (centerPage == false) { + // Display position (Y mode): + //EDN_INFO("BufferText::UpdateWindowsPosition() m_displayStart(" << m_displayStart.x << "," << m_displayStart.y << ") m_displaySize(" << m_displaySize.x << "," < (int32_t)cursorPosition.y - globals::getNbLineBorder() ) { + m_displayStart.y = cursorPosition.y - globals::getNbLineBorder(); + if (m_displayStart.y < 0) { + m_displayStart.y = 0; + ForceReDraw(true); + } + } else if (m_displayStart.y + m_displaySize.y <= (int32_t)cursorPosition.y + globals::getNbLineBorder() ) { + m_displayStart.y = cursorPosition.y - m_displaySize.y + globals::getNbLineBorder() + 1; + ForceReDraw(true); + } + // Display position (X mode): + //EDN_INFO("cursorPosition X : " << cursorPosition.y << " windows " << m_displayStart.y << "=>" << m_displayStart.x + m_displaySize.x); + if (m_displayStart.x > cursorPosition.x - globals::getNbColoneBorder() ) { + m_displayStart.x = cursorPosition.x - globals::getNbColoneBorder(); + if (m_displayStart.x < 0) { + m_displayStart.x = 0; + ForceReDraw(true); + } + } else if (m_displayStart.x + m_displaySize.x <= cursorPosition.x + globals::getNbColoneBorder() ) { + m_displayStart.x = cursorPosition.x - m_displaySize.x + globals::getNbColoneBorder() + 1; + ForceReDraw(true); + } + + //update the buffer position ID : + m_displayStartBufferPos = m_EdnBuf.CountForwardNLines(0, m_displayStart.y); + } else { + // center the line at the middle of the screen : + position_ts cursorPosition; + //EDN_DEBUG(" -------------------------------------------------"); + cursorPosition.y = m_EdnBuf.CountLines(0, m_cursorPos); + //EDN_DEBUG(" cursor position : " << m_cursorPos << " ==> ligne=" << cursorPosition.y); + cursorPosition.x = 0; + + m_displayStart.x = 0; + //EDN_DEBUG(" display size : " << m_displaySize.y); + m_displayStart.y = cursorPosition.y - m_displaySize.y/2; + m_displayStart.y = edn_max(m_displayStart.y, 0); + + m_displayStartBufferPos = m_EdnBuf.CountForwardNLines(0, m_displayStart.y); + ForceReDraw(true); + //EDN_DEBUG(" display start : " << m_displayStart.x << "x" << m_displayStart.y); + //EDN_DEBUG(" -------------------------------------------------"); + } +} + + +/** + * @brief + * + * @param[in,out] --- + * + * @return --- + * + */ +void BufferText::AddChar(char * UTF8data) +{ + int32_t SelectionStart, SelectionEnd, SelectionRectStart, SelectionRectEnd; + bool SelectionIsRect; + bool haveSelectionActive = m_EdnBuf.GetSelectionPos(SELECTION_PRIMARY, SelectionStart, SelectionEnd, SelectionIsRect, SelectionRectStart, SelectionRectEnd); + + int32_t size=strlen(UTF8data); + bool actionDone = false; + if (1==size) { + if (UTF8data[0] == 0x09) { + if (false == haveSelectionActive) { + EdnVectorBin tmpVect; + tmpVect.PushBack(0x09); + m_EdnBuf.Insert(m_cursorPos, tmpVect); + SetInsertPosition(m_cursorPos+1, true); + } else { + if (true == globals::IsSetCtrl() ) { + m_cursorPos = m_EdnBuf.UnIndent(SELECTION_PRIMARY); + } else { + m_cursorPos = m_EdnBuf.Indent(SELECTION_PRIMARY); + } + } + actionDone = true; + } else if (UTF8data[0] == '\n') { + EdnVectorBin tmpVect; + tmpVect.PushBack('\n'); + // if Auto indent Enable ==> we get the start of the previous line and add it to tne new one + if (true == globals::IsSetAutoIndent() ) { + int32_t l_lineStart; + // Get the begin of the line or the begin of the line befor selection + if (false == haveSelectionActive) { + l_lineStart = m_EdnBuf.StartOfLine(m_cursorPos); + } else { + l_lineStart = m_EdnBuf.StartOfLine(SelectionStart); + } + // add same characters in the temporar buffer + for (int32_t kk=l_lineStart; kk pos=" << m_cursorPos); + if (false == haveSelectionActive) { + m_EdnBuf.Remove(m_cursorPos, m_cursorPos+1); + } else { + m_EdnBuf.RemoveSelected(SELECTION_PRIMARY); + SetInsertPosition(SelectionStart, true); + } + actionDone = true; + } else if (UTF8data[0] == 0x08) { + //EDN_INFO("keyEvent : pos=" << m_cursorPos); + if (false == haveSelectionActive) { + m_EdnBuf.Remove(m_cursorPos-1, m_cursorPos); + SetInsertPosition(m_cursorPos-1, true); + } else { + m_EdnBuf.RemoveSelected(SELECTION_PRIMARY); + SetInsertPosition(SelectionStart, true); + } + actionDone = true; + } + } + + if (false == actionDone) { + if (true == m_EdnBuf.GetUTF8Mode()) { + EdnVectorBin tmpVect; + int32_t localOfset = strlen(UTF8data); + tmpVect.PushBack((int8_t*)UTF8data, localOfset); + if (false == haveSelectionActive) { + m_EdnBuf.Insert(m_cursorPos, tmpVect); + SetInsertPosition(m_cursorPos+localOfset, true); + } else { + m_EdnBuf.ReplaceSelected(SELECTION_PRIMARY, tmpVect); + SetInsertPosition(SelectionStart+localOfset, true); + } + } else { + // convert in the Good ISO format : + char output_ISO; + convertUtf8ToIso(m_EdnBuf.GetCharsetType(), UTF8data, output_ISO); + printf(" insert : \"%s\"==> 0x%08x=%d ", UTF8data, (unsigned int)output_ISO, (int)output_ISO); + EdnVectorBin tmpVect; + tmpVect.PushBack(output_ISO); + if (false == haveSelectionActive) { + m_EdnBuf.Insert(m_cursorPos, tmpVect); + SetInsertPosition(m_cursorPos+1, true); + } else { + m_EdnBuf.ReplaceSelected(SELECTION_PRIMARY, tmpVect); + SetInsertPosition(SelectionStart+1, true); + } + } + } + + SetModify(true); + UpdateWindowsPosition(); +} + +#include "EdnRegExp.h" + +int32_t BufferText::FindLine(Edn::String &data) +{ + if ( 0 == data.Size()) { + EDN_WARNING("no search data"); + return 0; + } + EDN_INFO("Search data line : \"" << data.c_str() << "\""); + EdnVectorBin mVectSearch; + mVectSearch = data.GetVector(); + //EDN_INFO("search data Forward : startSearchPos=" << startSearchPos ); + int32_t foundPos; + bool findSomething = m_EdnBuf.SearchForward(0, mVectSearch, &foundPos, true); + // if find data : + if (true == findSomething) { + return m_EdnBuf.CountLines(0, foundPos); + } else { + return 0; + } +} + +void BufferText::JumpAtLine(int32_t newLine) +{ + int32_t positionLine = m_EdnBuf.CountForwardNLines(0, newLine); + m_EdnBuf.Unselect(SELECTION_PRIMARY); + EDN_DEBUG("jump at the line : " << newLine ); + SetInsertPosition(positionLine); + UpdateWindowsPosition(true); +} + +void BufferText::Search(Edn::String &data, bool back, bool caseSensitive, bool wrap, bool regExp) +{ + EDN_INFO("Search data : \"" << data.c_str() << "\""); + + int32_t SelectionStart, SelectionEnd, SelectionRectStart, SelectionRectEnd; + bool SelectionIsRect; + bool haveSelectionActive = m_EdnBuf.GetSelectionPos(SELECTION_PRIMARY, SelectionStart, SelectionEnd, SelectionIsRect, SelectionRectStart, SelectionRectEnd); + + int32_t startSearchPos = m_cursorPos; + if (true == haveSelectionActive) { + if (false == back) { + startSearchPos = SelectionEnd; + } else { + startSearchPos = SelectionStart; + } + } + + if ( 0 == data.Size()) { + EDN_WARNING("no search data"); + return; + } + EdnVectorBin mVectSearch; + mVectSearch = data.GetVector(); + if (false == back) { + //EDN_INFO("search data Forward : startSearchPos=" << startSearchPos ); + int32_t foundPos; + bool findSomething = m_EdnBuf.SearchForward(startSearchPos, mVectSearch, &foundPos, caseSensitive); + if( false == findSomething + && true == wrap) + { + //EDN_INFO("WrapMode !!! 0 ==> end"); + findSomething = m_EdnBuf.SearchForward(0, mVectSearch, &foundPos, caseSensitive); + } + // if find data : + if (true == findSomething) { + // select new position + int32_t endSelectionPos = foundPos+mVectSearch.Size(); + SetInsertPosition(endSelectionPos); + m_EdnBuf.Select(SELECTION_PRIMARY, foundPos, endSelectionPos); + UpdateWindowsPosition(); + } + } else { + //EDN_INFO("search data Backward : " << data.GetDirectPointer() ); + int32_t foundPos; + bool findSomething = m_EdnBuf.SearchBackward(startSearchPos, mVectSearch, &foundPos, caseSensitive); + if( false == findSomething + && true == wrap) + { + //EDN_INFO("WrapMode !!! end ==> 0"); + findSomething = m_EdnBuf.SearchBackward(m_EdnBuf.Size(), mVectSearch, &foundPos, caseSensitive); + } + // if find data : + if (true == findSomething) { + // select new position + int32_t endSelectionPos = foundPos+mVectSearch.Size(); + SetInsertPosition(foundPos); + m_EdnBuf.Select(SELECTION_PRIMARY, foundPos, endSelectionPos); + UpdateWindowsPosition(); + } + } + + // NOTE : Need to be use in the highligner and the current buffer when we select Regular Expression ... +/* + // Test avec le truc de regExp : + char * myBuf = m_EdnBuf.GetRange(0, m_EdnBuf.Size()); + regexp *compiledRE; + char *compileMsg; + + compiledRE = CompileRE(data.GetDirectPointer(), &compileMsg, REDFLT_STANDARD); + if (compiledRE == NULL) { + EDN_ERROR("RegExpression : \"" << data.GetDirectPointer() << "\" error named : \"" << compileMsg << "\"" ); + } else { + EDN_DEBUG("RegExpression : \"" << data.GetDirectPointer() << "\" OK ... "); + if (true == ExecRE(compiledRE, NULL, myBuf, NULL, false, '\0', '\0', NULL, NULL)) { + EDN_INFO(" ==> top_branch=" << compiledRE->top_branch << "; extentpBW=" << (int32_t)(compiledRE->extentpBW - myBuf) << "; extentpFW=" << (int32_t)(compiledRE->extentpFW - myBuf)); + } else { + EDN_INFO(" ==> not fined ... "); + } + } + + // free copy of buffer ... + if (myBuf != NULL) { + free(myBuf); + } +*/ +} + + +void BufferText::Replace(Edn::String &data) +{ + int32_t SelectionStart, SelectionEnd, SelectionRectStart, SelectionRectEnd; + bool SelectionIsRect; + bool haveSelectionActive = m_EdnBuf.GetSelectionPos(SELECTION_PRIMARY, SelectionStart, SelectionEnd, SelectionIsRect, SelectionRectStart, SelectionRectEnd); + if (true == haveSelectionActive) { + // Replace Data : + // TODO : Reset this : ... m_EdnBuf.ReplaceSelected(SELECTION_PRIMARY, data.GetDirectPointer());//, strlen(data.GetDirectPointer())); + // TODO : Reset this : ... SetInsertPosition(SelectionStart + strlen(data.GetDirectPointer())); + + } + SetModify(true); +} + + +/** + * @brief request a copy of the selection in the named clipBoard ID + * + * @param[in] clipboardID Id of the buffer we want to get data [0..10] (0 copy normal / 10 middle button) + * + * @return --- + * + */ +void BufferText::Copy(int8_t clipboardID) +{ + EdnVectorBin mVect; + // get the curent selected data + if (true == m_EdnBuf.SelectHasSelection(SELECTION_PRIMARY) ) { + m_EdnBuf.GetSelectionText(SELECTION_PRIMARY, mVect); + } + // copy data in the click board : + ClipBoard::Set(clipboardID, mVect); +} + + +/** + * @brief Request a copy and a remove of the curent selection in the named clipBoard ID + * + * @param[in] clipboardID Id of the buffer we want to get data [0..10] (0 copy normal / 10 middle button) + * + * @return --- + * + */ +void BufferText::Cut(int8_t clipboardID) +{ + + int32_t SelectionStart, SelectionEnd, SelectionRectStart, SelectionRectEnd; + bool SelectionIsRect; + bool haveSelectionActive = m_EdnBuf.GetSelectionPos(SELECTION_PRIMARY, SelectionStart, SelectionEnd, SelectionIsRect, SelectionRectStart, SelectionRectEnd); + + // copy data + Copy(clipboardID); + // remove data : + if (true == haveSelectionActive ) { + EDN_INFO("REMOVE SELECTION"); + m_EdnBuf.RemoveSelected(SELECTION_PRIMARY); + m_cursorPos = SelectionStart; + } + UpdateWindowsPosition(); + ForceReDraw(true); + SetModify(true); +} + + +/** + * @brief request the past of a specific clipboard on the curent position or selection + * + * @param[in] clipboardID Id of the buffer we want to get data [0..10] (0 copy normal / 10 middle button) + * + * @return --- + * + */ +void BufferText::Paste(int8_t clipboardID) +{ + EdnVectorBin mVect; + // copy data from the click board : + ClipBoard::Get(clipboardID, mVect); + + int32_t SelectionStart, SelectionEnd, SelectionRectStart, SelectionRectEnd; + bool SelectionIsRect; + bool haveSelectionActive = m_EdnBuf.GetSelectionPos(SELECTION_PRIMARY, SelectionStart, SelectionEnd, SelectionIsRect, SelectionRectStart, SelectionRectEnd); + + if (true == haveSelectionActive ) { + // replace data + m_EdnBuf.ReplaceSelected(SELECTION_PRIMARY, mVect ); + m_cursorPos = SelectionStart + mVect.Size(); + } else { + // insert data + m_EdnBuf.Insert(m_cursorPos, mVect); + m_cursorPos += mVect.Size(); + } + + UpdateWindowsPosition(); + ForceReDraw(true); + SetModify(true); +} + + +void BufferText::Undo(void) +{ + int32_t newPos = m_EdnBuf.Undo(); + if (newPos >= 0) { + SetInsertPosition(newPos, true); + UpdateWindowsPosition(); + ForceReDraw(true); + SetModify(true); + } +} + +void BufferText::Redo(void) +{ + int32_t newPos = m_EdnBuf.Redo(); + if (newPos >= 0) { + SetInsertPosition(newPos, true); + UpdateWindowsPosition(); + ForceReDraw(true); + SetModify(true); + } +} + + +void BufferText::SetCharset(charset_te newCharset) +{ + m_EdnBuf.SetCharsetType(newCharset); + ForceReDraw(true); +} + diff --git a/Sources/Buffer/BufferText.h b/Sources/Buffer/BufferText.h new file mode 100644 index 0000000..4948304 --- /dev/null +++ b/Sources/Buffer/BufferText.h @@ -0,0 +1,129 @@ +/** + ******************************************************************************* + * @file BufferText.h + * @brief Editeur De N'ours : Text Buffer (edit only ASCII text File) (header) + * @author Edouard DUPIN + * @date 19/01/2011 + * @par Project + * Edn + * + * @par Copyright + * Copyright 2010 Edouard DUPIN, all right reserved + * + * This software is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY. + * + * Licence summary : + * You can modify and redistribute the sources code and binaries. + * You can send me the bug-fix + * You can not earn money with this Software (if the source extract from Edn + * represent less than 50% of original Sources) + * Term of the licence in in the file licence.txt. + * + ******************************************************************************* + */ + +#ifndef __BUFFER_TEXT_H__ +#define __BUFFER_TEXT_H__ + +#include +#include +#include "ColorizeManager.h" +#include "Buffer.h" +#include "EdnBuf.h" + +typedef enum { + CURSOR_DISPLAY_MODE_NORMAL = 259, + CURSOR_DISPLAY_MODE_INSERT, + CURSOR_DISPLAY_MODE_NOT_FOCUS, +} cursorDisplayMode_te; + +class BufferText : public Buffer { + public: + BufferText(void); + BufferText(Edn::String &filename); + virtual ~BufferText(void); + Edn::String GetName(void); + Edn::String GetShortName(void); + Edn::String GetFolder(void); + void SetName(Edn::String &newName); + void Save(void); + bool HaveName(void); + + void GetInfo(infoStatBuffer_ts &infoToUpdate); + void SetLineDisplay(uint32_t lineNumber); + + int32_t Display(DrawerManager &drawer); + void ForceReDraw(bool allElement); + void AddChar(char * UTF8data); + void cursorMove(int32_t gtkKey); + void MouseSelectFromCursorTo(int32_t width, int32_t height); + void MouseEvent(int32_t width, int32_t height); + void MouseEventDouble(void); + void MouseEventTriple(void); + void ScrollDown(void); + void ScrollUp(void); + + void Copy(int8_t clipboardID); + void Cut(int8_t clipboardID); + void Paste(int8_t clipboardID); + + void Search(Edn::String &data, bool back, bool caseSensitive, bool wrap, bool regExp); + void Replace(Edn::String &data); + int32_t FindLine(Edn::String &data); + void JumpAtLine(int32_t newLine); + void RemoveLine(void); + void SelectAll(void); + void SelectNone(void); + void Undo(void); + void Redo(void); + void SetCharset(charset_te newCharset); + + private: + // naming + Edn::String filename; //!< filename of the curent buffer + bool haveName; //!< to know if the file have a name or NOT + // Display + bool NeedToCleanEndPage; //!< if true, the end of the page need to be clean (arrive after a remove line) + uint32_t nbColoneForLineNumber; //!< number of colome used to display the line Number + ColorizeManager * myColorManager; //!< for the background color : + + + // Direct buffer IO + EdnBuf m_EdnBuf; //!< buffer associated on this displayer + position_ts m_displayStart; //!< position where the display is starting + position_ts m_displaySize; //!< number of char displayable in the screan + int32_t m_displayStartBufferPos; //!< position where the buffer start + // Cursor : + int32_t m_cursorPos; //!< position in the buffer of the cursor + int32_t m_cursorPreferredCol; //!< colomn of the last up and down ... + bool m_cursorOn; //!< the blink of the cursor ... + cursorDisplayMode_te m_cursorMode; //!< type of cursor Selected + + displayHLData_ts m_displayLocalSyntax; //!< for the display of the local elements (display HL mode) + + // internal function + void BasicInit(void); + void UpdateWindowsPosition(bool centerPage = false); + void displayLineNumber(DrawerManager &drawer); + + void CleanSelectLine(void); + + void SelectionStart(void); + void SelectionEnd(void); + void SelectionCheckMode(void); + + void CheckAndUpdateLineForModification(uint32_t lineID); + bool TextDMoveUp(int32_t offset); + bool TextDMoveDown(int32_t offset); + void SetInsertPosition(int32_t newPosition, bool insertChar = false); + + void GetMousePosition(int32_t width, int32_t height, int32_t &x, int32_t &y); + void MoveUpDown(int32_t ofset); + void DrawLineNumber(DrawerManager &drawer,char *myPrint, int32_t lineNumber, int32_t positionY); + +}; + +#endif + + diff --git a/Sources/Colorize/Colorize.cpp b/Sources/Colorize/Colorize.cpp new file mode 100644 index 0000000..72a49ba --- /dev/null +++ b/Sources/Colorize/Colorize.cpp @@ -0,0 +1,167 @@ +/** + ******************************************************************************* + * @file Colorise.cpp + * @brief Editeur De N'ours : Colirising system + * @author Edouard DUPIN + * @date 14/12/2010 + * @par Project + * Edn + * + * @par Copyright + * Copyright 2010 Edouard DUPIN, all right reserved + * + * This software is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY. + * + * Licence summary : + * You can modify and redistribute the sources code and binaries. + * You can send me the bug-fix + * You can not earn money with this Software (if the source extract from Edn + * represent less than 50% of original Sources) + * Term of the licence in in the file licence.txt. + * + ******************************************************************************* + */ + +#include "tools_debug.h" +#include "tools_globals.h" +#include "Colorize.h" +#include "Edn.h" + + +#undef __class__ +#define __class__ "Colorize" + + +Colorize::Colorize( Edn::String &newColorName) +{ + + m_colorFG.red=0; + m_colorFG.green=0; + m_colorFG.blue=0; + m_colorBG.red=0; + m_colorBG.green=0; + m_colorBG.blue=0; + + italic = false; + bold = false; + haveFG = false; + haveBG = false; + SetName(newColorName); + //EDN_INFO("New(Colorise)"); +} + +Colorize::Colorize(void) +{ + ColorName = "no_name"; + + m_colorFG.red=0; + m_colorFG.green=0; + m_colorFG.blue=0; + m_colorBG.red=0; + m_colorBG.green=0; + m_colorBG.blue=0; + + italic = false; + bold = false; + haveFG = false; + haveBG = false; + + //EDN_INFO("New(Colorise)"); +} + +Colorize::~Colorize(void) +{ + // nothing to do ... +} + + +void Colorize::SetName(const char *newColorName) +{ + //EDN_INFO("color change name : \"%s\" ==> \"%s\"",ColorName.c_str(), newColorName); + ColorName = newColorName; +} + +void Colorize::SetName(Edn::String &newColorName) +{ + //EDN_INFO("color change name : \"%s\" ==> \"%s\"",ColorName.c_str(), newColorName.c_str()); + ColorName = newColorName; +} + + +Edn::String Colorize::GetName(void) +{ + return ColorName; +} + + +void Colorize::SetFgColor(const char *myColor) +{ + haveFG = true; + unsigned int r=0; + unsigned int v=0; + unsigned int b=0; + sscanf(myColor, "#%02x%02x%02x", &r,&v,&b); + m_colorFG.red = (float)r/255.0; + m_colorFG.green = (float)v/255.0; + m_colorFG.blue = (float)b/255.0; + //EDN_INFO(myColor << " ==> r="<< r <<" v="<< v <<" b="<< b ); +} + +void Colorize::SetBgColor(const char *myColor) +{ + haveBG = true; + unsigned int r,v,b; + sscanf(myColor, "#%02x%02x%02x", &r,&v,&b); + m_colorBG.red = (float)r/255.0; + m_colorBG.green = (float)v/255.0; + m_colorBG.blue = (float)b/255.0; +} + +bool Colorize::HaveBg(void) +{ + return haveBG; +} + + +void Colorize::SetItalic(bool enable) +{ + italic = enable; + /* + if (true == enable) { + EDN_INFO("color : \"%s\" enable italic", ColorName.c_str()); + } else { + EDN_INFO("color : \"%s\" disable italic", ColorName.c_str()); + } + */ +} + +bool Colorize::GetItalic(void) +{ + return italic; +} + + +void Colorize::SetBold(bool enable) +{ + bold = enable; + /* + if (true == enable) { + EDN_INFO("color : \"%s\" enable bold", ColorName.c_str()); + } else { + EDN_INFO("color : \"%s\" disable bold", ColorName.c_str()); + } + */ +} + +bool Colorize::GetBold(void) +{ + return bold; +} + + + + + + + diff --git a/Sources/Colorize/Colorize.h b/Sources/Colorize/Colorize.h new file mode 100644 index 0000000..d8b1a94 --- /dev/null +++ b/Sources/Colorize/Colorize.h @@ -0,0 +1,81 @@ +/** + ******************************************************************************* + * @file Colorize.h + * @brief Editeur De N'ours : Colirizing system (header) + * @author Edouard DUPIN + * @date 14/12/2010 + * @par Project + * Edn + * + * @par Copyright + * Copyright 2010 Edouard DUPIN, all right reserved + * + * This software is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY. + * + * Licence summary : + * You can modify and redistribute the sources code and binaries. + * You can send me the bug-fix + * You can not earn money with this Software (if the source extract from Edn + * represent less than 50% of original Sources) + * Term of the licence in in the file licence.txt. + * + ******************************************************************************* + */ + +#ifndef __COLORIZE_H__ +#define __COLORIZE_H__ + +#include "Edn.h" + +extern "C" { + typedef struct { + float red; + float green; + float blue; + } color_ts; +} + + +class Colorize { + public: + // Constructeur + Colorize(void); + Colorize(Edn::String &newColorName); + ~Colorize(void); + + void SetName(Edn::String &newColorName); + void SetName(const char *newColorName); + Edn::String GetName(void); + void SetFgColor(const char *myColor); + void SetBgColor(const char *myColor); + void ApplyFG(cairo_t * cr) { cairo_set_source_rgb(cr, m_colorFG.red, m_colorFG.green, m_colorFG.blue); }; + void ApplyBG(cairo_t * cr) { cairo_set_source_rgb(cr, m_colorBG.red, m_colorBG.green, m_colorBG.blue); }; + + color_ts & GetFG(void) { return m_colorFG; }; + color_ts & GetBG(void) { return m_colorBG; }; + + bool HaveBg(void); + + void SetItalic(bool enable); + void SetBold(bool enable); + bool GetItalic(void); + bool GetBold(void); + + void Display(int32_t i) { EDN_INFO(" " << i << " : \"" << ColorName.c_str() << "\"" /*<< " fg="<< m_colorFG.red <<","<< m_colorFG.green <<","<< m_colorFG.blue <<" bg="<< m_colorBG.red <<","<< m_colorBG.green <<","<< m_colorBG.blue*/ ); }; + + private: + Edn::String ColorName; //!< curent color Name + color_ts m_colorFG; + color_ts m_colorBG; + + bool italic; + bool bold; + bool haveFG; + bool haveBG; + +}; + +#endif + + diff --git a/Sources/Colorize/ColorizeManager.cpp b/Sources/Colorize/ColorizeManager.cpp new file mode 100644 index 0000000..c2ebaa8 --- /dev/null +++ b/Sources/Colorize/ColorizeManager.cpp @@ -0,0 +1,256 @@ +/** + ******************************************************************************* + * @file ColoriseManager.cpp + * @brief Editeur De N'ours : Colorising Manager + * @author Edouard DUPIN + * @date 14/12/2010 + * @par Project + * Edn + * + * @par Copyright + * Copyright 2010 Edouard DUPIN, all right reserved + * + * This software is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY. + * + * Licence summary : + * You can modify and redistribute the sources code and binaries. + * You can send me the bug-fix + * You can not earn money with this Software (if the source extract from Edn + * represent less than 50% of original Sources) + * Term of the licence in in the file licence.txt. + * + ******************************************************************************* + */ +#include "tools_debug.h" +#include "tools_globals.h" +#include "ColorizeManager.h" +#include "tinyxml.h" + +#define PFX "ColorizeManager " + + +ColorizeManager::ColorizeManager(void) +{ +} + +ColorizeManager::~ColorizeManager(void) +{ + delete(errorColor); + // TODO : delete all color previously + listMyColor.clear(); +} + + +void ColorizeManager::LoadFile(Edn::String &xmlFilename) +{ + LoadFile(xmlFilename.c_str()); +} + +void ColorizeManager::LoadFile(const char * xmlFilename) +{ + errorColor = new Colorize(); + errorColor->SetBgColor("#000000"); + errorColor->SetFgColor("#FFFFFF"); + + // allocate the document in the stack + TiXmlDocument XmlDocument; + // open the curent File + XmlDocument.LoadFile(xmlFilename); + TiXmlElement* root = XmlDocument.FirstChildElement( "EdnColor" ); + if (NULL == root ) + { + EDN_ERROR(PFX"(l ?) main node not find: \"EdnColor\""); + return; + } + else + { + TiXmlNode * pNode = root->FirstChild(); + while(NULL != pNode) + { + if (pNode->Type()==TiXmlNode::TINYXML_COMMENT) { + // nothing to do, just proceed to next step + } else if (!strcmp(pNode->Value(), "gui")) { + TiXmlNode * pGuiNode = pNode->FirstChild(); + while(NULL != pGuiNode) + { + if (pGuiNode->Type()==TiXmlNode::TINYXML_COMMENT) { + // nothing to do, just proceed to next step + } else if (!strcmp(pGuiNode->Value(), "color")) { + //-------------------------------------------------------------------------------------------- + // + //-------------------------------------------------------------------------------------------- + const char *colorName = pGuiNode->ToElement()->Attribute("name"); + int32_t id = 0; + if (NULL == colorName) { + EDN_ERROR("(l "<< pGuiNode->Row() <<") node with no name"); + // get next node element + pGuiNode = pGuiNode->NextSibling(); + continue; + } + if (!strcmp(colorName, "CODE_space")) { + id = COLOR_CODE_SPACE; + } else if (!strcmp(colorName, "CODE_tabulation")) { + id = COLOR_CODE_TAB; + } else if (!strcmp(colorName, "CODE_basicBackgroung")) { + id = COLOR_CODE_BASIC_BG; + } else if (!strcmp(colorName, "CODE_cursor")) { + id = COLOR_CODE_CURSOR; + } else if (!strcmp(colorName, "CODE_lineNumber")) { + id = COLOR_CODE_LINE_NUMBER; + } else if (!strcmp(colorName, "LIST_backgroung1")) { + id = COLOR_LIST_BG_1; + } else if (!strcmp(colorName, "LIST_backgroung2")) { + id = COLOR_LIST_BG_2; + } else if (!strcmp(colorName, "LIST_backgroungSelected")) { + id = COLOR_LIST_BG_SELECTED; + } else if (!strcmp(colorName, "LIST_textNormal")) { + id = COLOR_LIST_TEXT_NORMAL; + } else if (!strcmp(colorName, "LIST_textModify")) { + id = COLOR_LIST_TEXT_MODIFY; + } else { + EDN_ERROR("(l "<Row()<<") Unknown basic gui color : \"" << colorName << "\"" ); + // get next node element + pGuiNode = pGuiNode->NextSibling(); + continue; + } + const char *color = pGuiNode->ToElement()->Attribute("val"); + if (NULL != color) { + unsigned int r=0; + unsigned int v=0; + unsigned int b=0; + sscanf(color, "#%02x%02x%02x", &r,&v,&b); + basicColors[id].red = (float)r/255.0; + basicColors[id].green = (float)v/255.0; + basicColors[id].blue = (float)b/255.0; + /* + EDN_INFO(" Specify color for system ID="<< id ); + EDN_INFO(" " << color << " ==> r="<< r <<" v="<< v <<" b="<< b ); + EDN_INFO(" " << color << " ==> r="<< basicColors[id].red <<" v="<< basicColors[id].green <<" b="<< basicColors[id].blue ); + */ + } + } else { + EDN_ERROR("(l "<Row()<<") node not suported : \""<Value()<<"\" must be [color]"); + } + // get next node element + pGuiNode = pGuiNode->NextSibling(); + } + } else if (!strcmp(pNode->Value(), "syntax")) { + TiXmlNode * pGuiNode = pNode->FirstChild(); + while(NULL != pGuiNode) + { + if (pGuiNode->Type()==TiXmlNode::TINYXML_COMMENT) { + // nothing to do, just proceed to next step + } else if (!strcmp(pGuiNode->Value(), "color")) { + Colorize *myNewColor = new Colorize(); + //-------------------------------------------------------------------------------------------- + // + //-------------------------------------------------------------------------------------------- + // get the name of the Chaine + const char *colorName = pGuiNode->ToElement()->Attribute("name"); + if (NULL == colorName) { + EDN_ERROR(PFX"(l "<< pGuiNode->Row() <<") node with no name"); + // get next node element + pGuiNode = pGuiNode->NextSibling(); + continue; + } else { + myNewColor->SetName(colorName); + //EDN_INFO(PFX"Add a new color in the panel : \"%s\"", colorName); + } + + const char *colorBG = pGuiNode->ToElement()->Attribute("BG"); + if (NULL != colorBG) { + myNewColor->SetBgColor(colorBG); + } + + const char *colorFG = pGuiNode->ToElement()->Attribute("FG"); + if (NULL != colorFG) { + myNewColor->SetFgColor(colorFG); + } + + const char *bold = pGuiNode->ToElement()->Attribute("bold"); + if (NULL != bold) { + if(0 == strcmp(bold, "yes") ) { + myNewColor->SetBold(true); + } + } + + const char *italic = pGuiNode->ToElement()->Attribute("italic"); + if (NULL != italic) { + if(0 == strcmp(italic, "yes") ) { + myNewColor->SetItalic(true); + } + } + listMyColor.push_back(myNewColor); + } else { + EDN_ERROR(PFX"(l "<Row()<<") node not suported : \""<Value()<<"\" must be [color]"); + } + pGuiNode = pGuiNode->NextSibling(); + } + } else { + EDN_ERROR(PFX"(l "<Row()<<") node not suported : \""<Value()<<"\" must be [gui,syntax]"); + } + // get next node element + pNode = pNode->NextSibling(); + } + } +} + +Colorize *ColorizeManager::Get(const char *colorName) +{ + uint32_t i; + for (i=0; iGetName(); + if (elementName == colorName) { + return listMyColor[i]; + } + } + EDN_ERROR(PFX"Color does not Existed ["<< colorName<<"]" ); + // an error + return errorColor; +} + +Colorize *ColorizeManager::Get(Edn::String &colorName) +{ + return Get(colorName.c_str()); +} + +color_ts & ColorizeManager::Get(basicColor_te myColor) +{ + if (myColor < COLOR_NUMBER_MAX) { + return basicColors[myColor]; + } else { + return basicColors[0]; + } +} + + +bool ColorizeManager::Exist(const char *colorName) +{ + uint32_t i; + for (i=0; iGetName(); + if (elementName == colorName) { + return true; + } + } + return false; +} +bool ColorizeManager::Exist(Edn::String &colorName) +{ + return Exist(colorName.c_str()); +} + +void ColorizeManager::DisplayListOfColor(void) +{ + uint32_t i; + EDN_INFO(PFX"List of ALL COLOR : "); + for (i=0; iGetName(); + //EDN_INFO(i << " : \"" << elementName.c_str() << "\"" ); + listMyColor[i]->Display(i); + } +} + + + diff --git a/Sources/Colorize/ColorizeManager.h b/Sources/Colorize/ColorizeManager.h new file mode 100644 index 0000000..cca6f34 --- /dev/null +++ b/Sources/Colorize/ColorizeManager.h @@ -0,0 +1,78 @@ +/** + ******************************************************************************* + * @file ColoriseManager.h + * @brief Editeur De N'ours : Colorising Manager (header) + * @author Edouard DUPIN + * @date 14/12/2010 + * @par Project + * Edn + * + * @par Copyright + * Copyright 2010 Edouard DUPIN, all right reserved + * + * This software is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY. + * + * Licence summary : + * You can modify and redistribute the sources code and binaries. + * You can send me the bug-fix + * You can not earn money with this Software (if the source extract from Edn + * represent less than 50% of original Sources) + * Term of the licence in in the file licence.txt. + * + ******************************************************************************* + */ + +#ifndef __COLORIZE_MANAGER_H__ +#define __COLORIZE_MANAGER_H__ + +#include "Singleton.h" +#include +#include +#include "Colorize.h" + +typedef enum { + // BASIC color for codeViewer + COLOR_CODE_SPACE, + COLOR_CODE_TAB, + COLOR_CODE_BASIC_BG, + COLOR_CODE_CURSOR, + COLOR_CODE_LINE_NUMBER, + // Basic color for list viewer + COLOR_LIST_BG_1, + COLOR_LIST_BG_2, + COLOR_LIST_BG_SELECTED, + COLOR_LIST_TEXT_NORMAL, + COLOR_LIST_TEXT_MODIFY, + // KNOW the number of BASIC color + COLOR_NUMBER_MAX, +}basicColor_te; + + + +class ColorizeManager: public Singleton +{ + friend class Singleton; + // specific for sigleton system... + private: + // Constructeur + ColorizeManager(void); + ~ColorizeManager(void); + public: + void LoadFile(Edn::String &xmlFilename); + void LoadFile(const char * xmlFilename); + Colorize * Get(const char *colorName); + Colorize * Get(Edn::String &colorName); + color_ts & Get(basicColor_te myColor); + bool Exist(Edn::String &colorName); + bool Exist(const char *colorName); + void DisplayListOfColor(void); + + private: + std::vector listMyColor; //!< List of ALL Color + Colorize* errorColor; + color_ts basicColors[COLOR_NUMBER_MAX]; +}; + +#endif + diff --git a/Sources/CustumWidget/BufferView/BufferView.cpp b/Sources/CustumWidget/BufferView/BufferView.cpp new file mode 100644 index 0000000..143ceeb --- /dev/null +++ b/Sources/CustumWidget/BufferView/BufferView.cpp @@ -0,0 +1,320 @@ +/** + ******************************************************************************* + * @file BufferViewer.cpp + * @brief Editeur De N'ours : main textViewer diplayer + * @author Edouard DUPIN + * @date 04/12/2010 + * @par Project + * Edn + * + * @par Copyright + * Copyright 2010 Edouard DUPIN, all right reserved + * + * This software is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY. + * + * Licence summary : + * You can modify and redistribute the sources code and binaries. + * You can send me the bug-fix + * You can not earn money with this Software (if the source extract from Edn + * represent less than 50% of original Sources) + * Term of the licence in in the file licence.txt. + * + ******************************************************************************* + */ + +#include "tools_debug.h" +#include "tools_globals.h" +#include "Display.h" +#include "BufferView.h" +#include "BufferManager.h" +#include "ColorizeManager.h" +#include "MainWindows.h" + +#undef __class__ +#define __class__ "BufferView" + +BufferView::BufferView(void) : MsgBroadcast("Buffer View", EDN_CAT_GUI) +{ + m_shawableAreaX = 0; + m_shawableAreaY = 0; + // Init link with the buffer Manager + m_bufferManager = BufferManager::getInstance(); + m_colorManager = ColorizeManager::getInstance(); + + m_widget = gtk_drawing_area_new(); + gtk_widget_set_size_request( m_widget, 250, 100); + + gtk_widget_add_events( m_widget, + GDK_KEY_PRESS_MASK + | GDK_BUTTON_PRESS_MASK + | GDK_BUTTON_RELEASE_MASK + | GDK_POINTER_MOTION_MASK + | GDK_POINTER_MOTION_HINT_MASK); + +# ifdef USE_GTK_VERSION_3_0 + g_object_set(m_widget,"can-focus", TRUE, NULL); +# elif defined( USE_GTK_VERSION_2_0 ) + GTK_WIDGET_SET_FLAGS(m_widget, GTK_CAN_FOCUS); +# endif + // Focus Event + g_signal_connect( G_OBJECT(m_widget), "focus_in_event", G_CALLBACK(CB_focusGet), this); + g_signal_connect( G_OBJECT(m_widget), "focus_out_event", G_CALLBACK(CB_focusLost), this); + // Keyboard Event + g_signal_connect_after( G_OBJECT(m_widget), "key_press_event", G_CALLBACK(CB_keyboardEvent), this); + g_signal_connect_after( G_OBJECT(m_widget), "key_release_event", G_CALLBACK(CB_keyboardEvent), this); + // Mouse Event + g_signal_connect( G_OBJECT(m_widget), "button_press_event", G_CALLBACK(CB_mouseButtonEvent), this); + g_signal_connect( G_OBJECT(m_widget), "button_release_event", G_CALLBACK(CB_mouseButtonEvent), this); + g_signal_connect( G_OBJECT(m_widget), "motion_notify_event", G_CALLBACK(CB_mouseMotionEvent), this); + // Display Event + g_signal_connect( G_OBJECT(m_widget), "realize", G_CALLBACK(CB_displayInit), this); +# ifdef USE_GTK_VERSION_3_0 + g_signal_connect( G_OBJECT(m_widget), "draw", G_CALLBACK(CB_displayDraw), this); +# elif defined( USE_GTK_VERSION_2_0 ) + g_signal_connect( G_OBJECT(m_widget), "expose_event", G_CALLBACK(CB_displayDraw), this); +# endif + m_selectedID = -1; + +} + +BufferView::~BufferView(void) +{ + +} + +GtkWidget * BufferView::GetMainWidget(void) +{ + return m_widget; +} + +void BufferView::OnMessage(int32_t id, int32_t dataID) +{ + switch (id) + { + case EDN_MSG__BUFFER_CHANGE_CURRENT: + m_selectedID = dataID; + case EDN_MSG__BUFFER_CHANGE_STATE: + case EDN_MSG__BUFFER_CHANGE_NAME: + case EDN_MSG__BUFFER_CHANGE_MODIFY: + // change Title : + gtk_widget_queue_draw(m_widget); + break; + } +} + + +gboolean BufferView::CB_displayDraw( GtkWidget *widget, GdkEventExpose *event, gpointer data) +{ + BufferView * self = reinterpret_cast(data); + +# ifdef USE_GTK_VERSION_3_0 + GtkAllocation allocation; + gtk_widget_get_allocation(widget, &allocation); + bool needRedrawAll = false; + if (self->m_shawableAreaX != allocation.width) { + needRedrawAll = true; + self->m_shawableAreaX = allocation.width; + } + if (self->m_shawableAreaY != allocation.height) { + needRedrawAll = true; + self->m_shawableAreaY = allocation.height; + } +# elif defined( USE_GTK_VERSION_2_0) + bool needRedrawAll = false; + if (self->m_shawableAreaX != widget->allocation.width) { + needRedrawAll = true; + self->m_shawableAreaX = widget->allocation.width; + } + if (self->m_shawableAreaY != widget->allocation.height) { + needRedrawAll = true; + self->m_shawableAreaY = widget->allocation.height; + } +#endif + if (true == needRedrawAll) { + //myBuffer->ForceReDraw(true); + } + EDN_INFO("=========================================================================="); + EDN_INFO("Request a display of : " << self->m_shawableAreaX << "px * "<< self->m_shawableAreaY<<"px"); + DrawerManager monDrawer(widget, self->m_shawableAreaX, self->m_shawableAreaY); + + // get the number of buffer open + int32_t nbBufferOpen = self->m_bufferManager->Size(); + int32_t i; + uint32_t lineID = 0; + uint32_t fontHeight = Display::GetFontHeight(); + basicColor_te selectFG = COLOR_LIST_TEXT_NORMAL; + basicColor_te selectBG = COLOR_LIST_BG_1; + for (i=0; i < nbBufferOpen; i++) { + Edn::String name; + bool isModify; + if (self->m_bufferManager->Exist(i)) { + isModify = self->m_bufferManager->Get(i)->IsModify(); + name = self->m_bufferManager->Get(i)->GetShortName(); + char *tmpModify = (char*)" "; + if (true == isModify) { + tmpModify = (char*)"M"; + } + char name2[1024] = ""; + sprintf(name2, "[%2d](%s) %s", i, tmpModify, name.c_str() ); + + if (true == isModify) { + selectFG = COLOR_LIST_TEXT_MODIFY; + } else { + selectFG = COLOR_LIST_TEXT_NORMAL; + } + if (lineID%2==0) { + selectBG = COLOR_LIST_BG_1; + } else { + selectBG = COLOR_LIST_BG_2; + } + if (self->m_selectedID == i) { + selectBG = COLOR_LIST_BG_SELECTED; + } + EDN_INFO("color fg=" << selectFG << " bg="<< selectBG); + monDrawer.Rectangle(self->m_colorManager->Get(selectBG), 0, lineID*fontHeight, self->m_shawableAreaX, Display::GetFontHeight()); + + monDrawer.Text(self->m_colorManager->Get(selectFG), 2, lineID*fontHeight, name2); + monDrawer.Flush(); + lineID ++; + } + + } + return TRUE; + +} + + + + +// sur : émis lors du premier affichage de la GtkDrawingArea +gboolean BufferView::CB_displayInit( GtkWidget *widget, gpointer data) +{ + BufferView * self = reinterpret_cast(data); + +# ifdef USE_GTK_VERSION_3_0 + GtkAllocation allocation; + gtk_widget_get_allocation(widget, &allocation); + int32_t size_x = allocation.width; + int32_t size_y = allocation.height; + + self->m_shawableAreaX = allocation.width; + self->m_shawableAreaY = allocation.height; +# elif defined( USE_GTK_VERSION_2_0) + int32_t size_x = widget->allocation.width; + int32_t size_y = widget->allocation.height; + + self->m_shawableAreaX = widget->allocation.width; + self->m_shawableAreaY = widget->allocation.height; +# endif + EDN_INFO("Request a diplay of : " << size_x << "px * " << size_y << "px"); + + //Display::InitDisplayParam(self->m_displayParameters, widget, 700, 1200); + + gtk_widget_queue_draw( widget ); + return TRUE; +} + +gint BufferView::CB_focusGet( GtkWidget *widget, GdkEventFocus *event, gpointer data) +{ + //BufferView * self = reinterpret_cast(data); + +# ifdef USE_GTK_VERSION_2_0 + GTK_WIDGET_SET_FLAGS (widget, GTK_HAS_FOCUS); +# endif + EDN_INFO("Focus - In"); + gtk_widget_queue_draw( widget ); + return FALSE; +} + +gint BufferView::CB_focusLost( GtkWidget *widget, GdkEventFocus *event, gpointer data) +{ + //BufferView * self = reinterpret_cast(data); + +# ifdef USE_GTK_VERSION_2_0 + GTK_WIDGET_UNSET_FLAGS (widget, GTK_HAS_FOCUS); +# endif + EDN_INFO("Focus - out"); + return FALSE; +} + +gint BufferView::CB_keyboardEvent( GtkWidget *widget, GdkEventKey *event, gpointer data) +{ + //BufferView * self = reinterpret_cast(data); + + if(event->type == GDK_KEY_PRESS) { + gtk_widget_queue_draw( widget ); + } + return true; +} + + +gint BufferView::CB_mouseButtonEvent(GtkWidget *widget, GdkEventButton *event, gpointer data) +{ + BufferView * self = reinterpret_cast(data); + + // get focus on the widget + gtk_widget_grab_focus(widget); + if (event->button == 1) { + /* + if (event->type == GDK_BUTTON_PRESS) { + EDN_INFO("mouse-event BT1 ==> One Clicked"); + }else*/ if (event->type == GDK_2BUTTON_PRESS) { + //EDN_INFO("mouse-event BT1 ==> Double Clicked %d, %d", (uint32_t)event->x, (uint32_t)event->y); + uint32_t fontHeight = Display::GetFontHeight(); + int32_t selectBuf = self->m_bufferManager->WitchBuffer((event->y / fontHeight) + 1); + //EDN_INFO(" plop %d / %d = %d ==> %d", (uint32_t)event->y, fontHeight, ((uint32_t)event->y / fontHeight), selectBuf); + if ( 0 <= selectBuf) { + self->SendMessage(EDN_MSG__CURRENT_CHANGE_BUFFER_ID, selectBuf); + /* + MainWindows *window = MainWindows::getInstance(); + EDN_INFO(" Event on Buffer " << selectBuf); + // set the new seected Buffer + window->SetSelected(selectBuf); + */ + } + }/* else if (event->type == GDK_3BUTTON_PRESS) { + EDN_INFO("mouse-event BT1 ==> Triple Clicked"); + }else if (event->type == GDK_BUTTON_RELEASE) { + EDN_INFO("mouse-event BT1 ==> Realease"); + }*/ + }/* else if (event->button == 2) { + if (event->type == GDK_BUTTON_PRESS) { + EDN_INFO("mouse-event BT2 PRESS"); + } + } else if (event->button == 3) { + if (event->type == GDK_BUTTON_PRESS) { + EDN_INFO("mouse-event BT3 PRESS"); + } + } else { + //EDN_INFO("mouse-event BT? PRESS"); + }*/ + gtk_widget_queue_draw( widget ); + return true; +} + + + +gint BufferView::CB_mouseMotionEvent( GtkWidget *widget, GdkEventMotion *event, gpointer data) +{ + //BufferView * self = reinterpret_cast(data); + +/* + if (true == ButtunOneSelected) { + int x, y; + GdkModifierType state; + + if (event->is_hint) { + gdk_window_get_pointer(event->window, &x, &y, &state); + } else { + x = event->x; + y = event->y; + state = (GdkModifierType)event->state; + } + EDN_INFO("mouse-motion BT1 %d, %d", x, y); + } +*/ + return true; +} + + diff --git a/Sources/CustumWidget/BufferView/BufferView.h b/Sources/CustumWidget/BufferView/BufferView.h new file mode 100644 index 0000000..9a4fdfe --- /dev/null +++ b/Sources/CustumWidget/BufferView/BufferView.h @@ -0,0 +1,72 @@ +/** + ******************************************************************************* + * @file BufferView.h + * @brief Editeur De N'ours : main List Buffer Viewer (header) + * @author Edouard DUPIN + * @date 09/12/2010 + * @par Project + * Edn + * + * @par Copyright + * Copyright 2010 Edouard DUPIN, all right reserved + * + * This software is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY. + * + * Licence summary : + * You can modify and redistribute the sources code and binaries. + * You can send me the bug-fix + * You can not earn money with this Software (if the source extract from Edn + * represent less than 50% of original Sources) + * Term of the licence in in the file licence.txt. + * + ******************************************************************************* + */ +#ifndef __BUFFER_VIEW_H__ +#define __BUFFER_VIEW_H__ + +#include "tools_debug.h" +#include +#include +#include "Singleton.h" +#include "CodeView.h" +#include "BufferManager.h" +#include "Display.h" +#include "MsgBroadcast.h" + + +class BufferView : public MsgBroadcast +{ + public: + // Constructeur + BufferView(void); + ~BufferView(void); + GtkWidget *GetMainWidget(void); + void OnMessage(int32_t id, int32_t dataID); + // sur : GTK+ callback : + static gboolean CB_displayDraw( GtkWidget *widget, GdkEventExpose *event, gpointer data); + static gboolean CB_displayInit( GtkWidget *widget, gpointer data); + static gint CB_focusGet( GtkWidget *widget, GdkEventFocus *event, gpointer data); + static gint CB_focusLost( GtkWidget *widget, GdkEventFocus *event, gpointer data); + static gint CB_keyboardEvent( GtkWidget *widget, GdkEventKey *event, gpointer data); + static gint CB_mouseButtonEvent(GtkWidget *widget, GdkEventButton *event, gpointer data); + static gint CB_mouseMotionEvent( GtkWidget *widget, GdkEventMotion *event, gpointer data); + static void CB_EventOnBufferManager(gpointer data); + + + + private: + // main windows widget : + GtkWidget * m_widget; + // récupération des proprieter général... + BufferManager * m_bufferManager; + ColorizeManager * m_colorManager; + int32_t m_shawableAreaX; + int32_t m_shawableAreaY; + int32_t m_selectedID; +}; + + +#endif + + diff --git a/Sources/CustumWidget/CodeView/CodeView.cpp b/Sources/CustumWidget/CodeView/CodeView.cpp new file mode 100644 index 0000000..3d699cd --- /dev/null +++ b/Sources/CustumWidget/CodeView/CodeView.cpp @@ -0,0 +1,424 @@ +/** + ******************************************************************************* + * @file CodeView.cpp + * @brief Editeur De N'ours : Code Viewer Widget + * This is an abstraction + * @author Edouard DUPIN + * @date 05/01/2011 + * @par Project + * Edn + * + * @par Copyright + * Copyright 2010 Edouard DUPIN, all right reserved + * + * This software is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY. + * + * Licence summary : + * You can modify and redistribute the sources code and binaries. + * You can send me the bug-fix + * You can not earn money with this Software (if the source extract from Edn + * represent less than 50% of original Sources) + * Term of the licence in in the file licence.txt. + * + ******************************************************************************* + */ + +#include "CodeView.h" + +#include "tools_debug.h" +#include "tools_globals.h" +#include "Display.h" +#include "CodeView.h" +#include "BufferManager.h" +#include "ColorizeManager.h" +#include "ClipBoard.h" +#include "SearchData.h" + + +CodeView::CodeView(void) : MsgBroadcast("Code View", EDN_CAT_WORK_AREA) +{ + m_bufferID = -1; + m_buttunOneSelected = false; + m_shawableAreaX = 0; + m_shawableAreaY = 0; + + // Init link with the buffer Manager + m_bufferManager = BufferManager::getInstance(); + m_colorManager = ColorizeManager::getInstance(); + + m_widget = gtk_drawing_area_new(); + gtk_widget_set_size_request( m_widget, 200, 100); + + gtk_widget_add_events( m_widget, + GDK_KEY_PRESS_MASK + | GDK_BUTTON_PRESS_MASK + | GDK_BUTTON_RELEASE_MASK + | GDK_POINTER_MOTION_MASK + | GDK_POINTER_MOTION_HINT_MASK); +# ifdef USE_GTK_VERSION_3_0 + g_object_set(m_widget,"can-focus", TRUE, NULL); +# elif defined( USE_GTK_VERSION_2_0 ) + GTK_WIDGET_SET_FLAGS(m_widget, GTK_CAN_FOCUS); +# endif + // Focus Event + g_signal_connect( G_OBJECT(m_widget), "focus_in_event", G_CALLBACK(CB_focusGet), this); + g_signal_connect( G_OBJECT(m_widget), "focus_out_event", G_CALLBACK(CB_focusLost), this); + // Keyboard Event + g_signal_connect_after( G_OBJECT(m_widget), "key_press_event", G_CALLBACK(CB_keyboardEvent), this); + g_signal_connect_after( G_OBJECT(m_widget), "key_release_event", G_CALLBACK(CB_keyboardEvent), this); + // Mouse Event + g_signal_connect( G_OBJECT(m_widget), "button_press_event", G_CALLBACK(CB_mouseButtonEvent), this); + g_signal_connect( G_OBJECT(m_widget), "button_release_event", G_CALLBACK(CB_mouseButtonEvent), this); + g_signal_connect( G_OBJECT(m_widget), "motion_notify_event", G_CALLBACK(CB_mouseMotionEvent), this); + g_signal_connect( G_OBJECT(m_widget), "scroll-event", G_CALLBACK(CB_mouseScrollEvent), this); + // Display Event + g_signal_connect( G_OBJECT(m_widget), "realize", G_CALLBACK(CB_displayInit), this); +# ifdef USE_GTK_VERSION_3_0 + g_signal_connect( G_OBJECT(m_widget), "draw", G_CALLBACK(CB_displayDraw), this); +# elif defined( USE_GTK_VERSION_2_0 ) + g_signal_connect( G_OBJECT(m_widget), "expose_event", G_CALLBACK(CB_displayDraw), this); +# endif +} + +CodeView::~CodeView(void) +{ + +} + +GtkWidget * CodeView::GetMainWidget(void) +{ + return m_widget; +} + + +void CodeView::OnMessage(int32_t id, int32_t dataID) +{ + switch (id) + { + case EDN_MSG__CURRENT_CHANGE_BUFFER_ID: + //EDN_INFO("Select a new Buffer ... " << dataID); + m_bufferID = dataID; + m_bufferManager->Get(m_bufferID)->ForceReDraw(true); + // request the dispplay of the curent Editor + SendMessage(EDN_MSG__BUFFER_CHANGE_CURRENT, m_bufferID); + break; + case EDN_MSG__CURRENT_SAVE: + if (m_bufferManager->Get(m_bufferID)->HaveName() == false) { + SendMessage(EDN_MSG__GUI_SHOW_SAVE_AS, m_bufferID); + } else { + m_bufferManager->Get(m_bufferID)->Save(); + } + break; + case EDN_MSG__CURRENT_SAVE_AS: + SendMessage(EDN_MSG__GUI_SHOW_SAVE_AS, m_bufferID); + break; + case EDN_MSG__CURRENT_REMOVE_LINE: + m_bufferManager->Get(m_bufferID)->RemoveLine(); + break; + case EDN_MSG__CURRENT_SELECT_ALL: + m_bufferManager->Get(m_bufferID)->SelectAll(); + break; + case EDN_MSG__CURRENT_UN_SELECT: + m_bufferManager->Get(m_bufferID)->SelectNone(); + break; + case EDN_MSG__CURRENT_COPY: + if (dataID == -1) { + dataID = COPY_STD; + } + m_bufferManager->Get(m_bufferID)->Copy(dataID); + break; + case EDN_MSG__CURRENT_CUT: + if (dataID == -1) { + dataID = COPY_STD; + } + m_bufferManager->Get(m_bufferID)->Cut(dataID); + break; + case EDN_MSG__CURRENT_PASTE: + if (dataID == -1) { + dataID = COPY_STD; + } + m_bufferManager->Get(m_bufferID)->Paste(dataID); + break; + case EDN_MSG__CURRENT_FIND_PREVIOUS: + { + Edn::String myDataString; + SearchData::GetSearch(myDataString); + m_bufferManager->Get(m_bufferID)->Search(myDataString, true, SearchData::GetCase(), SearchData::GetWrap(), SearchData::GetRegExp() ); + } + break; + case EDN_MSG__CURRENT_FIND_NEXT: + { + Edn::String myDataString; + SearchData::GetSearch(myDataString); + m_bufferManager->Get(m_bufferID)->Search(myDataString, false, SearchData::GetCase(), SearchData::GetWrap(), SearchData::GetRegExp() ); + } + break; + case EDN_MSG__CURRENT_REPLACE: + { + Edn::String myDataString; + SearchData::GetReplace(myDataString); + m_bufferManager->Get(m_bufferID)->Replace(myDataString); + } + break; + case EDN_MSG__CURRENT_REPLACE_ALL: + break; + case EDN_MSG__CURRENT_CLOSE: + m_bufferManager->Remove(m_bufferID); + m_bufferID = -1; + SendMessage(EDN_MSG__BUFFER_CHANGE_CURRENT, m_bufferID); + break; + case EDN_MSG__CURRENT_UNDO: + m_bufferManager->Get(m_bufferID)->Undo(); + break; + case EDN_MSG__CURRENT_REDO: + m_bufferManager->Get(m_bufferID)->Redo(); + break; + case EDN_MSG__CURRENT_GOTO_LINE: + if (dataID<0) { + dataID = 0; + } + m_bufferManager->Get(m_bufferID)->JumpAtLine(dataID); + break; + case EDN_MSG__REFRESH_DISPLAY: + break; + case EDN_MSG__CURRENT_SET_CHARSET: + m_bufferManager->Get(m_bufferID)->SetCharset((charset_te)dataID); + break; + } + // Force redraw of the widget + gtk_widget_queue_draw(m_widget); +} + + + +gboolean CodeView::CB_displayDraw( GtkWidget *widget, GdkEventExpose *event, gpointer data) +{ + CodeView * self = reinterpret_cast(data); + + //EDN_INFO("displayDraw_cb"); +# ifdef USE_GTK_VERSION_3_0 + GtkAllocation allocation; + gtk_widget_get_allocation(widget, &allocation); + bool needRedrawAll = false; + if (self->m_shawableAreaX != allocation.width) { + needRedrawAll = true; + self->m_shawableAreaX = allocation.width; + } + if (self->m_shawableAreaY != allocation.height) { + needRedrawAll = true; + self->m_shawableAreaY = allocation.height; + } +# elif defined( USE_GTK_VERSION_2_0) + bool needRedrawAll = false; + if (self->m_shawableAreaX != widget->allocation.width) { + needRedrawAll = true; + self->m_shawableAreaX = widget->allocation.width; + } + if (self->m_shawableAreaY != widget->allocation.height) { + needRedrawAll = true; + self->m_shawableAreaY = widget->allocation.height; + } +# endif + if (true == needRedrawAll) { + //updateScrollElement(); + self->m_bufferManager->Get(self->m_bufferID)->ForceReDraw(true); + } + EDN_INFO("Request a display of : " << self->m_shawableAreaX << "px * "<< self->m_shawableAreaY<<"px"); + /* + EDN_INFO("widget width=%d", widget->allocation.width); + EDN_INFO("widget height=%d", widget->allocation.height); + */ + + //EDN_INFO("BufferView Display"); + // Get the color Manager : + ColorizeManager *myColorManager = NULL; + myColorManager = ColorizeManager::getInstance(); + + //(void)m_bufferManager->Get(m_bufferID)->Display(m_displayParameters, m_shawableAreaX, m_shawableAreaY); + DrawerManager monDrawer(widget, self->m_shawableAreaX, self->m_shawableAreaY); + //EDN_INFO("Display buffer ID = " << m_bufferID); + (void)self->m_bufferManager->Get(self->m_bufferID)->Display(monDrawer); +// EDN_WARNING("Must display here ... "); + return TRUE; +} + + + + +// sur : émis lors du premier affichage de la GtkDrawingArea +gboolean CodeView::CB_displayInit( GtkWidget *widget, gpointer data) +{ + CodeView * self = reinterpret_cast(data); +# ifdef USE_GTK_VERSION_3_0 + GtkAllocation allocation; + gtk_widget_get_allocation(widget, &allocation); + int32_t size_x = allocation.width; + int32_t size_y = allocation.height; + + self->m_shawableAreaX = allocation.width; + self->m_shawableAreaY = allocation.height; +# elif defined( USE_GTK_VERSION_2_0) + int32_t size_x = widget->allocation.width; + int32_t size_y = widget->allocation.height; + + self->m_shawableAreaX = widget->allocation.width; + self->m_shawableAreaY = widget->allocation.height; +# endif + EDN_INFO("Request a diplay of : "<< size_x <<"px * "<< size_y <<"px"); + + gtk_widget_queue_draw( widget ); + + return TRUE; +} + +gint CodeView::CB_focusGet( GtkWidget *widget, GdkEventFocus *event, gpointer data) +{ + CodeView * self = reinterpret_cast(data); +# ifdef USE_GTK_VERSION_2_0 + GTK_WIDGET_SET_FLAGS (widget, GTK_HAS_FOCUS); +# endif + self->SendMessage(EDN_MSG__BUFFER_CHANGE_CURRENT, self->m_bufferID); + EDN_INFO("Focus - In"); + return FALSE; +} + +gint CodeView::CB_focusLost( GtkWidget *widget, GdkEventFocus *event, gpointer data) +{ + //CodeView * self = reinterpret_cast(data); + +# ifdef USE_GTK_VERSION_2_0 + GTK_WIDGET_UNSET_FLAGS (widget, GTK_HAS_FOCUS); +# endif + EDN_INFO("Focus - out"); + return FALSE; +} + +gint CodeView::CB_keyboardEvent(GtkWidget *widget, GdkEventKey *event, gpointer data) +{ + CodeView * self = reinterpret_cast(data); + + char Utf8Out[10]; + bool controlKey; + bool moveKey; + int32_t key; + // Convert input key : + ConvertInput(event, Utf8Out, controlKey, moveKey, key); + + if(event->type == GDK_KEY_PRESS) { + if(false==controlKey) { + self->m_bufferManager->Get(self->m_bufferID)->AddChar(Utf8Out); + gtk_widget_queue_draw( widget ); + } else if (true == moveKey) { + self->m_bufferManager->Get(self->m_bufferID)->cursorMove(key); + gtk_widget_queue_draw( widget ); + } + } + return true; +} + + +gint CodeView::CB_mouseButtonEvent(GtkWidget *widget, GdkEventButton *event, gpointer data) +{ + + CodeView * self = reinterpret_cast(data); + + // get focus on the widget + gtk_widget_grab_focus(widget); + if (event->button == 1) { + if (event->type == GDK_BUTTON_PRESS) { + //EDN_INFO("mouse-event BT1 ==> One Clicked %d, %d", (uint32_t)event->x, (uint32_t)event->y); + self->m_bufferManager->Get(self->m_bufferID)->MouseEvent(event->x, event->y); + gtk_widget_queue_draw( widget ); + self->m_buttunOneSelected = true; + }else if (event->type == GDK_2BUTTON_PRESS) { + //EDN_INFO("mouse-event BT1 ==> Double Clicked %d, %d", (uint32_t)event->x, (uint32_t)event->y); + self->m_bufferManager->Get(self->m_bufferID)->MouseEventDouble(); + gtk_widget_queue_draw( widget ); + self->m_buttunOneSelected = true; + }else if (event->type == GDK_3BUTTON_PRESS) { + //EDN_INFO("mouse-event BT1 ==> Triple Clicked"); + self->m_bufferManager->Get(self->m_bufferID)->MouseEventTriple(); + gtk_widget_queue_draw( widget ); + self->m_buttunOneSelected = true; + }else if (event->type == GDK_BUTTON_RELEASE) { + //EDN_INFO("mouse-event BT1 ==> Realease"); + self->m_buttunOneSelected = false; + self->m_bufferManager->Get(self->m_bufferID)->Copy(COPY_MIDDLE_BUTTON); + } + } else if (event->button == 2) { + if (event->type == GDK_BUTTON_PRESS) { + EDN_INFO("mouse-event BT2 PRESS"); + self->m_bufferManager->Get(self->m_bufferID)->MouseEvent(event->x, event->y); + self->m_bufferManager->Get(self->m_bufferID)->Paste(COPY_MIDDLE_BUTTON); + gtk_widget_queue_draw(widget); + } + } else if (event->button == 3) { + if (event->type == GDK_BUTTON_PRESS) { + EDN_INFO("mouse-event BT3 PRESS"); + } + } else { + EDN_INFO("mouse-event BT? PRESS"); + } + return true; +} + + + +gint CodeView::CB_mouseMotionEvent( GtkWidget *widget, GdkEventMotion *event, gpointer data) +{ + CodeView * self = reinterpret_cast(data); + + if (true == self->m_buttunOneSelected) { + int x, y; + GdkModifierType state; + + if (event->is_hint) { + gdk_window_get_pointer(event->window, &x, &y, &state); + } else { + x = event->x; + y = event->y; + state = (GdkModifierType)event->state; + } + if (x<0) { + x = 0; + } + if (y<0) { + y = 0; + } + //EDN_INFO("mouse-motion BT1 %d, %d", x, y); + self->m_bufferManager->Get(self->m_bufferID)->MouseSelectFromCursorTo(x, y); + gtk_widget_queue_draw( widget ); + } + return true; +} + + +gint CodeView::CB_mouseScrollEvent( GtkWidget *widget, GdkEventScroll *event, gpointer data) +{ + CodeView * self = reinterpret_cast(data); + + if (event->direction == GDK_SCROLL_UP) + { + // up code + //EDN_INFO("mouse-event GDK_SCROLL_UP"); + self->m_bufferManager->Get(self->m_bufferID)->ScrollUp(); + gtk_widget_queue_draw( widget ); + } + else if (event->direction == GDK_SCROLL_DOWN) + { + // down code + //EDN_INFO("mouse-event GDK_SCROLL_DOWN"); + self->m_bufferManager->Get(self->m_bufferID)->ScrollDown(); + gtk_widget_queue_draw( widget ); + } else { + EDN_INFO("mouse-event SCROLL"); + } + + return true; +} + + + + + diff --git a/Sources/CustumWidget/CodeView/CodeView.h b/Sources/CustumWidget/CodeView/CodeView.h new file mode 100644 index 0000000..d78ec3a --- /dev/null +++ b/Sources/CustumWidget/CodeView/CodeView.h @@ -0,0 +1,67 @@ +/** + ******************************************************************************* + * @file CodeView.h + * @brief Editeur De N'ours : Code Viewer Widget (header) + * @author Edouard DUPIN + * @date 05/01/2011 + * @par Project + * Edn + * + * @par Copyright + * Copyright 2010 Edouard DUPIN, all right reserved + * + * This software is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY. + * + * Licence summary : + * You can modify and redistribute the sources code and binaries. + * You can send me the bug-fix + * You can not earn money with this Software (if the source extract from Edn + * represent less than 50% of original Sources) + * Term of the licence in in the file licence.txt. + * + ******************************************************************************* + */ + +#ifndef __CODE_VIEW_H__ +#define __CODE_VIEW_H__ + +#include "tools_debug.h" +#include "Singleton.h" +#include "CodeView.h" +#include "BufferManager.h" +#include "Display.h" +#include "MsgBroadcast.h" + +class CodeView : public MsgBroadcast +{ + public: + // Constructeur + CodeView(void); + ~CodeView(void); + void OnMessage(int32_t id, int32_t dataID); + GtkWidget *GetMainWidget(void); + // sur : GTK+ callback : + static gboolean CB_displayDraw( GtkWidget *widget, GdkEventExpose *event, gpointer data); + static gboolean CB_displayInit( GtkWidget *widget, gpointer data); + static gint CB_focusGet( GtkWidget *widget, GdkEventFocus *event, gpointer data); + static gint CB_focusLost( GtkWidget *widget, GdkEventFocus *event, gpointer data); + static gint CB_keyboardEvent( GtkWidget *widget, GdkEventKey *event, gpointer data); + static gint CB_mouseButtonEvent(GtkWidget *widget, GdkEventButton *event, gpointer data); + static gint CB_mouseMotionEvent( GtkWidget *widget, GdkEventMotion *event, gpointer data); + static gint CB_mouseScrollEvent( GtkWidget *widget, GdkEventScroll *event, gpointer data); + + private: + // main windows widget : + GtkWidget * m_widget; + // récupération des proprieter général... + BufferManager * m_bufferManager; + ColorizeManager * m_colorManager; + int32_t m_shawableAreaX; + int32_t m_shawableAreaY; + int32_t m_bufferID; + bool m_buttunOneSelected; +}; +#endif + + diff --git a/Sources/CustumWidget/MainAreaView/MainAreaView.cpp b/Sources/CustumWidget/MainAreaView/MainAreaView.cpp new file mode 100644 index 0000000..ce57162 --- /dev/null +++ b/Sources/CustumWidget/MainAreaView/MainAreaView.cpp @@ -0,0 +1,60 @@ +/** + ******************************************************************************* + * @file Search.h + * @brief Editeur De N'ours : Search system (header) + * @author Edouard DUPIN + * @date 03/01/2011 + * @par Project + * Edn + * + * @par Copyright + * Copyright 2010 Edouard DUPIN, all right reserved + * + * This software is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY. + * + * Licence summary : + * You can modify and redistribute the sources code and binaries. + * You can send me the bug-fix + * You can not earn money with this Software (if the source extract from Edn + * represent less than 50% of original Sources) + * Term of the licence in in the file licence.txt. + * + ******************************************************************************* + */ + +#ifndef __SEARCH_H__ +#define __SEARCH_H__ + +#include "tools_debug.h" +#include "Singleton.h" +#include +#include + + +class MainAreaView: public Singleton +{ + friend class Singleton; + // specific for sigleton system... + private: + // Constructeur + MainAreaView(void); + ~MainAreaView(void); + + public: + GtkWidget * GetWidget(void); + void SplitV(void); // split current window vertically (max 1 by section) + void SplitH(void); // split current window horizontaly (max 3) + void Remove(void); // remove current selected element + //ViewArea * GetCurent(void); // Get a pointer on the current displayed area + + + private: + GtkWidget * m_localDialog; //!< local dialog element + ViewArea * m_EntrySearch[6]; + uint8_t m_CurentSelected +}; + + +#endif + diff --git a/Sources/CustumWidget/MainAreaView/MainAreaView.h b/Sources/CustumWidget/MainAreaView/MainAreaView.h new file mode 100644 index 0000000..e69de29 diff --git a/Sources/GuiTools/MainWindows/MainWindows.cpp b/Sources/GuiTools/MainWindows/MainWindows.cpp new file mode 100644 index 0000000..df8c74c --- /dev/null +++ b/Sources/GuiTools/MainWindows/MainWindows.cpp @@ -0,0 +1,159 @@ +/** + ******************************************************************************* + * @file MainWindows.cpp + * @brief Editeur De N'ours : main Windows diplayer + * @author Edouard DUPIN + * @date 04/01/2011 + * @par Project + * Edn + * + * @par Copyright + * Copyright 2010 Edouard DUPIN, all right reserved + * + * This software is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY. + * + * Licence summary : + * You can modify and redistribute the sources code and binaries. + * You can send me the bug-fix + * You can not earn money with this Software (if the source extract from Edn + * represent less than 50% of original Sources) + * Term of the licence in in the file licence.txt. + * + ******************************************************************************* + */ + +#include "tools_debug.h" +#include "tools_globals.h" +#include "MainWindows.h" +#include "CodeView.h" +#include "ClipBoard.h" +//#include "SearchData.h" +//#include "MsgBroadcast.h" +#include "BufferView.h" +#include "AccelKey.h" + +#undef __class__ +#define __class__ "MainWindows" + +MainWindows::MainWindows(void) : MsgBroadcast("Main Windows", EDN_CAT_GUI) +{ + + m_mainWindow = gtk_window_new(GTK_WINDOW_TOPLEVEL); + + // select the program icone + gtk_window_set_default_icon_name("text-editor"); + + // Default size open windows + gtk_window_set_default_size(GTK_WINDOW(m_mainWindow), 800, 600); + + // enable the close signal of the windows + g_signal_connect(G_OBJECT(m_mainWindow), "destroy", G_CALLBACK(gtk_main_quit), NULL); + + // Create a vertical box for stacking the menu and editor widgets in. + GtkWidget *vbox = gtk_vbox_new (FALSE, 0); + gtk_container_add(GTK_CONTAINER(m_mainWindow), vbox); + + // Set key Accelerator : + AccelKey::getInstance()->LinkCommonAccel(GTK_WINDOW(m_mainWindow)); + + // Create the menu bar. + gtk_box_pack_start( GTK_BOX (vbox), m_MenuBar.GetWidget(), FALSE, FALSE, 0); + + // ********************************************************** + // * Horizontal ELEMENTS : * + // ********************************************************** + // Create a vertical box for stacking the menu and editor widgets in. + GtkWidget *hbox = gtk_hbox_new (FALSE, 0); + gtk_container_add(GTK_CONTAINER (vbox), hbox); + // create the toolbar : +# if USE_GTK_VERSION_2_0 + gtk_box_pack_start(GTK_BOX(hbox), m_ToolBar.GetWidget(), FALSE, FALSE, 0); +# endif + // TreeView : + gtk_box_pack_start(GTK_BOX(hbox), m_BufferView.GetMainWidget(), FALSE, TRUE, 1); + + // Tex displayer : + gtk_box_pack_start( GTK_BOX (hbox), m_CodeView.GetMainWidget(), TRUE, TRUE, 0); + + // Create the status bar + gtk_box_pack_end(GTK_BOX(vbox), m_StatusBar.GetWidget(), FALSE, FALSE, 0); + + // recursive version of gtk_widget_show + gtk_widget_show_all(m_mainWindow); + +} + +MainWindows::~MainWindows(void) +{ + /* + if (NULL != m_DlgSearch) { + delete m_DlgSearch; + } + */ +} + + +void MainWindows::SetTitle(Edn::String &fileName, bool isModify) +{ + Edn::String tmp = ""; + if (fileName != "") { + tmp += fileName; + tmp += " - "; + } + tmp += "Edn"; + gtk_window_set_title(GTK_WINDOW(m_mainWindow), tmp.c_str()); +} + +void MainWindows::OnMessage(int32_t id, int32_t dataID) +{ + switch (id) + { + case EDN_MSG__BUFFER_CHANGE_CURRENT: + // change Title : + // TODO : String error when remove the error with -1; + if (-1 == dataID) { + Edn::String plop = ""; + SetTitle(plop, false ); + } else { + Buffer *mybuf = BufferManager::getInstance()->Get(dataID); + if (NULL != mybuf) { + Edn::String plop = mybuf->GetName(); + SetTitle(plop, mybuf->IsModify() ); + } + } + break; + } +} + + + + +#if 0 + +void MainWindows::OnMenuAbout(wxCommandEvent & WXUNUSED(event)) +{ + //EDN_INFO("MainWindows::OnMenuAbout (event)"); + wxAboutDialogInfo info; + info.SetName(wxT("edn")); + info.SetVersion(wxT("0.1.0 pre-Beta")); + info.SetDescription(wxT("Editeur De N'ours, l'Editeur Desoxyribo-Nucleique\n" + "Source Code Editor")); + info.SetCopyright(wxT( "Copyright 2010 Edouard DUPIN, all right reserved\n" + "This software is distributed in the hope that it will be useful, but WITHOUT\n" + "ANY WARRANTY\n\n" + "Licence summary : \n" + " You can modify and redistribute the sources code and binaries.\n" + " You can send me the bug-fix\n" + " You can not earn money with this Software (if the source extract from Edn\n" + " represent less than 50% of original Sources)\n" + "Term of the licence in in the file licence.txt")); + wxAboutBox(info); + +} + +#endif + + + + diff --git a/Sources/GuiTools/MainWindows/MainWindows.h b/Sources/GuiTools/MainWindows/MainWindows.h new file mode 100644 index 0000000..bb16d87 --- /dev/null +++ b/Sources/GuiTools/MainWindows/MainWindows.h @@ -0,0 +1,67 @@ +/** + ******************************************************************************* + * @file MainWindows.h + * @brief Editeur De N'ours : main Windows diplayer (header) + * @author Edouard DUPIN + * @date 04/01/2011 + * @par Project + * Edn + * + * @par Copyright + * Copyright 2010 Edouard DUPIN, all right reserved + * + * This software is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY. + * + * Licence summary : + * You can modify and redistribute the sources code and binaries. + * You can send me the bug-fix + * You can not earn money with this Software (if the source extract from Edn + * represent less than 50% of original Sources) + * Term of the licence in in the file licence.txt. + * + ******************************************************************************* + */ + + +#include "tools_debug.h" +#include "Singleton.h" +#include "MsgBroadcast.h" + +#include "CodeView.h" +#include "BufferView.h" +#include "BufferManager.h" +#include "MenuBar.h" +#include "StatusBar.h" +#include "ToolBar.h" + + +#ifndef __MAIN_WINDOWS_H__ +#define __MAIN_WINDOWS_H__ + +class MainWindows: public Singleton, public MsgBroadcast +{ + friend class Singleton; + // specific for sigleton system... + private: + // Constructeur + MainWindows(void); + ~MainWindows(void); + public: + GtkWidget * GetWidget(void) { return m_mainWindow;}; + void OnMessage(int32_t id, int32_t dataID); + + private: + void SetTitle(Edn::String &fileName, bool isModify); + // main windows widget : + GtkWidget * m_mainWindow; + BufferView m_BufferView; + CodeView m_CodeView; + MenuBar m_MenuBar; + StatusBar m_StatusBar; + ToolBar m_ToolBar; +}; + +#endif + + diff --git a/Sources/GuiTools/MainWindows/MenuBar.cpp b/Sources/GuiTools/MainWindows/MenuBar.cpp new file mode 100644 index 0000000..8fd9fde --- /dev/null +++ b/Sources/GuiTools/MainWindows/MenuBar.cpp @@ -0,0 +1,333 @@ +/** + ******************************************************************************* + * @file MenuBar.cpp + * @brief Editeur De N'ours : abstraction of the menu bar (Sources) + * @author Edouard DUPIN + * @date 17/06/2011 + * @par Project + * Edn + * + * @par Copyright + * Copyright 2010 Edouard DUPIN, all right reserved + * + * This software is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY. + * + * Licence summary : + * You can modify and redistribute the sources code and binaries. + * You can send me the bug-fix + * You can not earn money with this Software (if the source extract from Edn + * represent less than 50% of original Sources) + * Term of the licence in in the file licence.txt. + * + ******************************************************************************* + */ + + +#include "tools_debug.h" +#include "MenuBar.h" +#include "ClipBoard.h" +#include "charset.h" + +#define MENU_MSG +const char * MSG_TogleDisplayChar = "Request a Togle of char displaying"; +const char * MSG_TogleDisplayEOL = "Request a Togle of displaying EndOfLine"; +const char * MSG_TogleAutoIndent = "Request a Togle of Auto Indent"; +const char * MSG_SetCharsetIso559_1 = "Set ISO 5589-1"; +const char * MSG_SetCharsetIso559_15 = "Set ISO 5589-15"; +const char * MSG_SetCharsetUTF8 = "Set UTF 8"; +#define MSG_LINK(data) + + +static void CB_menuGenerique(GtkMenuItem *menu_item, gpointer data) +{ + //EDN_INFO("basic menue_event"); + messageData_ts * msg = (messageData_ts*)data; + GeneralSendMessage(msg->msgId, msg->dataId); +} + +static void CB_menuInternal(GtkMenuItem *menu_item, gpointer data) +{ + //EDN_INFO("basic menue_event"); + const char * myPointer = (const char*)data; + if (myPointer == MSG_TogleDisplayChar) { + if (globals::IsSetDisplaySpaceChar() == true) { + globals::SetDisplaySpaceChar(false); + } else { + globals::SetDisplaySpaceChar(true); + } + } else if (myPointer == MSG_TogleDisplayEOL) { + if (globals::IsSetDisplayEndOfLine() == true) { + globals::SetDisplayEndOfLine(false); + } else { + globals::SetDisplayEndOfLine(true); + } + } else if (myPointer == MSG_TogleAutoIndent) { + if (globals::IsSetAutoIndent() == true) { + globals::SetAutoIndent(false); + } else { + globals::SetAutoIndent(true); + } + } else if (myPointer == MSG_SetCharsetIso559_1) { + GeneralSendMessage(EDN_MSG__CURRENT_SET_CHARSET, EDN_CHARSET_ISO_8859_1); + } else if (myPointer == MSG_SetCharsetIso559_15) { + GeneralSendMessage(EDN_MSG__CURRENT_SET_CHARSET, EDN_CHARSET_ISO_8859_15); + } else if (myPointer == MSG_SetCharsetUTF8) { + GeneralSendMessage(EDN_MSG__CURRENT_SET_CHARSET, EDN_CHARSET_UTF8); + } +} + +#undef __class__ +#define __class__ "MenuBarMain" + +class MenuBarMain +{ + public: + MenuBarMain(const char * title, GtkWidget * parent) : m_parent(NULL), m_menu(NULL), m_menuListe(NULL) + { + m_parent = parent; + m_menu = gtk_menu_item_new_with_mnemonic(title); + gtk_menu_shell_append( GTK_MENU_SHELL (parent), m_menu); + } + + ~MenuBarMain(void) + { + + } + private: + void CheckSubMenu(void) + { + if (NULL == m_menuListe) { + m_menuListe = gtk_menu_new(); + if (NULL != m_menuListe) { + gtk_menu_item_set_submenu( GTK_MENU_ITEM (m_menu), m_menuListe); + } else { + EDN_ERROR("Can not create sub menu"); + } + } + } + + public: + + void AddInternal(const char * title, const char * accelKey, const char * msg, bool enable = false) + { + CheckSubMenu(); + if (NULL == m_menuListe) { + return; + } + // create ITEM + GtkWidget *tmpWidget = gtk_menu_item_new_with_mnemonic(title); + // set grisage : + gtk_widget_set_sensitive(tmpWidget, enable); + // add to the menu : + gtk_menu_shell_append(GTK_MENU_SHELL(m_menuListe), tmpWidget); + // accel KEY : + AccelKey::getInstance()->SetAccel(tmpWidget, (char *)accelKey); + // set callback + g_signal_connect(G_OBJECT(tmpWidget), "activate", G_CALLBACK(CB_menuInternal), (void*)msg); + } + + + void Add(const char * title, const char * accelKey, messageType_te id = EDN_MSG__NONE, bool enable = false, int32_t dataSpecificID = -1) + { + CheckSubMenu(); + if (NULL == m_menuListe) { + return; + } + messageData_ts * message = new messageData_ts; + message->msgId = id; + message->dataId = dataSpecificID; + m_message.PushBack(message); + // create ITEM + GtkWidget *tmpWidget = gtk_menu_item_new_with_mnemonic(title); + // set grisage : + gtk_widget_set_sensitive(tmpWidget, enable); + // add to the menu : + gtk_menu_shell_append(GTK_MENU_SHELL(m_menuListe), tmpWidget); + // accel KEY : + AccelKey::getInstance()->SetAccel(tmpWidget, (char *)accelKey); + // set callback + if(EDN_MSG__NONE!=id) { + g_signal_connect(G_OBJECT(tmpWidget), "activate", G_CALLBACK(CB_menuGenerique), message); + } + } + + void AddGen(const char * title, const char * accelKey, messageType_te id = EDN_MSG__NONE, bool enable = false, int32_t dataSpecificID = -1) + { + CheckSubMenu(); + if (NULL == m_menuListe) { + return; + } + messageData_ts * message = new messageData_ts; + message->msgId = id; + message->dataId = dataSpecificID; + m_message.PushBack(message); + // create ITEM + GtkWidget *tmpWidget = gtk_image_menu_item_new_from_stock( title, AccelKey::getInstance()->GetAccel() ); + // set grisage : + gtk_widget_set_sensitive(tmpWidget, enable); + // add to the menu : + gtk_menu_shell_append(GTK_MENU_SHELL(m_menuListe), tmpWidget); + // accel KEY : + AccelKey::getInstance()->SetAccel(tmpWidget, (char *)accelKey); + // set callback + if(EDN_MSG__NONE!=id) { + g_signal_connect(G_OBJECT(tmpWidget), "activate", G_CALLBACK(CB_menuGenerique), message); + } + } + + void AddSeparator(void) + { + CheckSubMenu(); + if (NULL == m_menuListe) { + return; + } + gtk_menu_shell_append(GTK_MENU_SHELL (m_menuListe), gtk_separator_menu_item_new() ); + } + + private: + GtkWidget * m_parent; + GtkWidget * m_menu; + GtkWidget * m_menuListe; + EdnVectorBin m_message; +}; + +#undef __class__ +#define __class__ "MenuBar" + +MenuBar::MenuBar(void) : MsgBroadcast("Menu bar", EDN_CAT_GUI) +{ + m_mainWidget = gtk_menu_bar_new(); + MenuBarMain *tmp = NULL; + + tmp = new MenuBarMain("_File", m_mainWidget); + tmp->AddGen(GTK_STOCK_NEW, "ctrl+n", EDN_MSG__NEW, true); + tmp->AddGen(GTK_STOCK_OPEN, "ctrl+o", EDN_MSG__GUI_SHOW_OPEN_FILE, true); + tmp->AddSeparator(); + tmp->AddGen("Close file", NULL, EDN_MSG__CURRENT_CLOSE, true); + tmp->AddSeparator(); + tmp->AddGen(GTK_STOCK_SAVE, "ctrl+s", EDN_MSG__CURRENT_SAVE, true); + tmp->AddGen(GTK_STOCK_SAVE_AS, "ctrl+shift+s", EDN_MSG__CURRENT_SAVE_AS, true); + tmp->AddSeparator(); + tmp->AddGen(GTK_STOCK_QUIT, "ctrl+q", EDN_MSG__QUIT, true); + m_listMenu.PushBack(tmp); + + tmp = new MenuBarMain("_Edit", m_mainWidget); + tmp->AddGen(GTK_STOCK_UNDO, "ctrl+z", EDN_MSG__CURRENT_UNDO, true); + tmp->AddGen(GTK_STOCK_REDO, "ctrl+shift+z", EDN_MSG__CURRENT_REDO, true); + tmp->AddSeparator(); + tmp->AddGen(GTK_STOCK_CUT, "ctrl+x", EDN_MSG__CURRENT_CUT, true, COPY_STD); + tmp->AddGen(GTK_STOCK_COPY, "ctrl+c", EDN_MSG__CURRENT_COPY, true, COPY_STD); + tmp->AddGen(GTK_STOCK_PASTE, "ctrl+v", EDN_MSG__CURRENT_PASTE, true, COPY_STD); +// tmp->AddGen(GTK_STOCK_DELETE, NULL); + tmp->AddGen("Remove line", "ctrl+d", EDN_MSG__CURRENT_REMOVE_LINE, true); + tmp->AddSeparator(); + tmp->AddGen(GTK_STOCK_SELECT_ALL, "ctrl+a", EDN_MSG__CURRENT_SELECT_ALL, true); + tmp->AddGen("Unselect", "ctrl+shift+a", EDN_MSG__CURRENT_UN_SELECT, true); +// tmp->AddSeparator(); +// tmp->AddGen(GTK_STOCK_PREFERENCES, NULL, EDN_MSG__GUI_SHOW_PREFERENCE, true); + m_listMenu.PushBack(tmp); + + tmp = new MenuBarMain("Display", m_mainWidget); + tmp->AddInternal("Show space & tabs", NULL, MSG_TogleDisplayChar, true); + tmp->AddInternal("Show end of lines", NULL, MSG_TogleDisplayEOL, true); + tmp->AddInternal("Audo Indent", NULL, MSG_TogleAutoIndent, true); + tmp->AddInternal("Set charset Occidental (ISO-8859-1)", NULL, MSG_SetCharsetIso559_1, true); + tmp->AddInternal("Set charset Occidental (ISO-8859-15)", NULL, MSG_SetCharsetIso559_15, true); + tmp->AddInternal("Set charset Internationnal (UTF 8)", NULL, MSG_SetCharsetUTF8, true); + m_listMenu.PushBack(tmp); + + tmp = new MenuBarMain("_Search", m_mainWidget); + tmp->AddGen(GTK_STOCK_FIND, "ctrl+f", EDN_MSG__GUI_SHOW_SEARCH, true); + tmp->AddGen(GTK_STOCK_FIND_AND_REPLACE, "ctrl+r", EDN_MSG__GUI_SHOW_REPLACE, true); + tmp->AddSeparator(); + tmp->AddGen("Find next", "ctrl+h", EDN_MSG__CURRENT_FIND_NEXT, true); + tmp->AddGen("Find previous", "ctrl+shift+h", EDN_MSG__CURRENT_FIND_PREVIOUS, true); +// tmp->AddGen("Find old next", "ctrl+g", EDN_MSG__CURRENT_FIND_OLD_NEXT, true); +// tmp->AddGen("Find old previous", "ctrl+shift+g", EDN_MSG__CURRENT_FIND_OLD_PREVIOUS, true); +// tmp->AddSeparator(); +// tmp->AddGen("Suprimer colorisation", NULL); +// tmp->AddSeparator(); +// tmp->AddGen("Goto Line", "ctrl+l", EDN_MSG__CURRENT_GOTO_LINE, true); + m_listMenu.PushBack(tmp); + /* + tmp = new MenuBarMain("Project", m_mainWidget); + m_listMenu.PushBack(tmp); + */ + tmp = new MenuBarMain("Ctags", m_mainWidget); + tmp->AddGen("load Ctags file", NULL, EDN_MSG__OPEN_CTAGS, true); + tmp->AddGen("re-load Ctags file", NULL, EDN_MSG__RELOAD_CTAGS, true); + tmp->AddSeparator(); + tmp->AddGen("Find Definition", "ctrl+u", EDN_MSG__JUMP_TO_CURRENT_SELECTION, true); + tmp->AddGen("Back previous", "ctrl+y", EDN_MSG__JUMP_BACK, true); + /* + tmp->AddGen("Gestion Ctags", NULL); + tmp->AddGen("Add Ctags Folder", NULL); + tmp->AddSeparator(); + tmp->AddGen("Trouver la definition", NULL); + tmp->AddGen("Trouver la declaration", NULL); + tmp->AddGen("Retour...", NULL); + tmp->AddSeparator(); + tmp->AddGen("Tout desactiver", NULL); + */ + m_listMenu.PushBack(tmp); + /* + tmp = new MenuBarMain("Macros", m_mainWidget); + m_listMenu.PushBack(tmp); + */ + /* + tmp = new MenuBarMain("Tools", m_mainWidget); + tmp->AddGen("Execute Commande", "ctrl+e"); + tmp->AddGen("Set Command", NULL); + m_listMenu.PushBack(tmp); + */ + tmp = new MenuBarMain("Internal ClipBoard", m_mainWidget); +// tmp->AddGen("Cut 1", "ctrl+alt+1", EDN_MSG__CURRENT_CUT, true, 1); + tmp->AddGen("Copy 1", "ctrl+1", EDN_MSG__CURRENT_COPY, true, 1); + tmp->AddGen("Paste 1", "alt+1", EDN_MSG__CURRENT_PASTE, true, 1); + tmp->AddSeparator(); +// tmp->AddGen("Cut 2", "ctrl+alt+2", EDN_MSG__CURRENT_CUT, true, 2); + tmp->AddGen("Copy 2", "ctrl+2", EDN_MSG__CURRENT_COPY, true, 2); + tmp->AddGen("Paste 2", "alt+2", EDN_MSG__CURRENT_PASTE, true, 2); + tmp->AddSeparator(); +// tmp->AddGen("Cut 3", "ctrl+alt+3", EDN_MSG__CURRENT_CUT, true, 3); + tmp->AddGen("Copy 3", "ctrl+3", EDN_MSG__CURRENT_COPY, true, 3); + tmp->AddGen("Paste 3", "alt+3", EDN_MSG__CURRENT_PASTE, true, 3); + tmp->AddSeparator(); +// tmp->AddGen("Cut 4", "ctrl+alt+4", EDN_MSG__CURRENT_CUT, true, 4); + tmp->AddGen("Copy 4", "ctrl+4", EDN_MSG__CURRENT_COPY, true, 4); + tmp->AddGen("Paste 4", "alt+4", EDN_MSG__CURRENT_PASTE, true, 4); + tmp->AddSeparator(); +// tmp->AddGen("Cut 5", "ctrl+alt+5", EDN_MSG__CURRENT_CUT, true, 5); + tmp->AddGen("Copy 5", "ctrl+5", EDN_MSG__CURRENT_COPY, true, 5); + tmp->AddGen("Paste 5", "alt+5", EDN_MSG__CURRENT_PASTE, true, 5); + tmp->AddSeparator(); +// tmp->AddGen("Cut 6", "ctrl+alt+6", EDN_MSG__CURRENT_CUT, true, 6); + tmp->AddGen("Copy 6", "ctrl+6", EDN_MSG__CURRENT_COPY, true, 6); + tmp->AddGen("Paste 6", "alt+6", EDN_MSG__CURRENT_PASTE, true, 6); + tmp->AddSeparator(); +// tmp->AddGen("Cut 7", "ctrl+alt+7", EDN_MSG__CURRENT_CUT, true, 7); + tmp->AddGen("Copy 7", "ctrl+7", EDN_MSG__CURRENT_COPY, true, 7); + tmp->AddGen("Paste 7", "alt+7", EDN_MSG__CURRENT_PASTE, true, 7); + tmp->AddSeparator(); +// tmp->AddGen("Cut 8", "ctrl+alt+8", EDN_MSG__CURRENT_CUT, true, 8); + tmp->AddGen("Copy 8", "ctrl+8", EDN_MSG__CURRENT_COPY, true, 8); + tmp->AddGen("Paste 8", "alt+8", EDN_MSG__CURRENT_PASTE, true, 8); + tmp->AddSeparator(); +// tmp->AddGen("Cut 9", "ctrl+alt+9", EDN_MSG__CURRENT_CUT, true, 9); + tmp->AddGen("Copy 9", "ctrl+9", EDN_MSG__CURRENT_COPY, true, 9); + tmp->AddGen("Paste 9", "alt+9", EDN_MSG__CURRENT_PASTE, true, 9); + m_listMenu.PushBack(tmp); +} + +MenuBar::~MenuBar(void) +{ + +} + +void MenuBar::OnMessage(int32_t id, int32_t dataID) +{ + //EDN_INFO("ReceiveMessage"); +} + + diff --git a/Sources/GuiTools/MainWindows/MenuBar.h b/Sources/GuiTools/MainWindows/MenuBar.h new file mode 100644 index 0000000..7b0f063 --- /dev/null +++ b/Sources/GuiTools/MainWindows/MenuBar.h @@ -0,0 +1,53 @@ +/** + ******************************************************************************* + * @file MenuBar.h + * @brief Editeur De N'ours : abstraction of the menu bar (Header) + * @author Edouard DUPIN + * @date 17/06/2011 + * @par Project + * Edn + * + * @par Copyright + * Copyright 2010 Edouard DUPIN, all right reserved + * + * This software is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY. + * + * Licence summary : + * You can modify and redistribute the sources code and binaries. + * You can send me the bug-fix + * You can not earn money with this Software (if the source extract from Edn + * represent less than 50% of original Sources) + * Term of the licence in in the file licence.txt. + * + ******************************************************************************* + */ + +#include "tools_debug.h" +#include "tools_globals.h" +#include "MsgBroadcast.h" +#include "EdnVectorBin.h" +#include "AccelKey.h" + +#ifndef __MENU_BAR_H__ +#define __MENU_BAR_H__ + +class MenuBarMain; + +class MenuBar: public MsgBroadcast +{ + public: + // Constructeur + MenuBar(void); + ~MenuBar(void); + GtkWidget * GetWidget(void) { return m_mainWidget; }; + void OnMessage(int32_t id, int32_t dataID); + + private: + GtkWidget * m_mainWidget; + GtkAccelGroup * m_accelGroup; + EdnVectorBin m_listMenu; +}; + + +#endif diff --git a/Sources/GuiTools/MainWindows/StatusBar.cpp b/Sources/GuiTools/MainWindows/StatusBar.cpp new file mode 100644 index 0000000..ff3e678 --- /dev/null +++ b/Sources/GuiTools/MainWindows/StatusBar.cpp @@ -0,0 +1,52 @@ +/** + ******************************************************************************* + * @file StatusBar.cpp + * @brief Editeur De N'ours : abstraction of the status bar (Sources) + * @author Edouard DUPIN + * @date 17/06/2011 + * @par Project + * Edn + * + * @par Copyright + * Copyright 2010 Edouard DUPIN, all right reserved + * + * This software is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY. + * + * Licence summary : + * You can modify and redistribute the sources code and binaries. + * You can send me the bug-fix + * You can not earn money with this Software (if the source extract from Edn + * represent less than 50% of original Sources) + * Term of the licence in in the file licence.txt. + * + ******************************************************************************* + */ + +#include "tools_debug.h" +#include "StatusBar.h" + + + +StatusBar::StatusBar(void) : MsgBroadcast("Status bar", EDN_CAT_GUI) +{ + m_mainWidget = gtk_statusbar_new(); + // pas très bien compris pourquoi mais ca marche... + m_iContextId = gtk_statusbar_get_context_id(GTK_STATUSBAR(m_mainWidget), "ExitMsg"); + // ajout d'un message : + gtk_statusbar_push(GTK_STATUSBAR (m_mainWidget), GPOINTER_TO_INT(m_iContextId), "Edn Editeur de n'ours"); + // Supression du précédent message : + //gtk_statusbar_pop(GTK_STATUSBAR(m_mainWidget), GPOINTER_TO_INT(m_iContextId)); +} + +StatusBar::~StatusBar(void) +{ + +} + +void StatusBar::OnMessage(int32_t id, int32_t dataID) +{ + //EDN_INFO("ReceiveMessage"); +} + + diff --git a/Sources/GuiTools/MainWindows/StatusBar.h b/Sources/GuiTools/MainWindows/StatusBar.h new file mode 100644 index 0000000..a9af6cc --- /dev/null +++ b/Sources/GuiTools/MainWindows/StatusBar.h @@ -0,0 +1,46 @@ +/** + ******************************************************************************* + * @file StatusBar.h + * @brief Editeur De N'ours : abstraction of the status bar (Header) + * @author Edouard DUPIN + * @date 17/06/2011 + * @par Project + * Edn + * + * @par Copyright + * Copyright 2010 Edouard DUPIN, all right reserved + * + * This software is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY. + * + * Licence summary : + * You can modify and redistribute the sources code and binaries. + * You can send me the bug-fix + * You can not earn money with this Software (if the source extract from Edn + * represent less than 50% of original Sources) + * Term of the licence in in the file licence.txt. + * + ******************************************************************************* + */ + +#include "MsgBroadcast.h" + +#ifndef __STATUS_BAR_H__ +#define __STATUS_BAR_H__ + +class StatusBar: public MsgBroadcast +{ + public: + // Constructeur + StatusBar(void); + ~StatusBar(void); + GtkWidget * GetWidget(void) { return m_mainWidget; }; + void OnMessage(int32_t id, int32_t dataID); + + private: + GtkWidget * m_mainWidget; + guint m_iContextId; +}; + + +#endif diff --git a/Sources/GuiTools/MainWindows/ToolBar.cpp b/Sources/GuiTools/MainWindows/ToolBar.cpp new file mode 100644 index 0000000..0f9bd67 --- /dev/null +++ b/Sources/GuiTools/MainWindows/ToolBar.cpp @@ -0,0 +1,93 @@ +/** + ******************************************************************************* + * @file ToolBar.cpp + * @brief Editeur De N'ours : abstraction of the tool bar (Sources) + * @author Edouard DUPIN + * @date 17/06/2011 + * @par Project + * Edn + * + * @par Copyright + * Copyright 2010 Edouard DUPIN, all right reserved + * + * This software is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY. + * + * Licence summary : + * You can modify and redistribute the sources code and binaries. + * You can send me the bug-fix + * You can not earn money with this Software (if the source extract from Edn + * represent less than 50% of original Sources) + * Term of the licence in in the file licence.txt. + * + ******************************************************************************* + */ + +#include "tools_debug.h" +#include "ToolBar.h" +#include "ClipBoard.h" + +static void CB_menuGenerique(GtkMenuItem *menu_item, gpointer data) +{ + //EDN_INFO("basic menue_event"); + messageData_ts * msg = (messageData_ts*)data; + // broacast message : + GeneralSendMessage(msg->msgId, msg->dataId); +} + + + +ToolBar::ToolBar(void) : MsgBroadcast("Tool bar", EDN_CAT_GUI) +{ + m_mainWidget = gtk_toolbar_new(); +# ifdef USE_GTK_VERSION_2_0 + gtk_toolbar_set_orientation(GTK_TOOLBAR(m_mainWidget), GTK_ORIENTATION_VERTICAL); +# endif + // Modification de la taille des icones + gtk_toolbar_set_icon_size(GTK_TOOLBAR(m_mainWidget), GTK_ICON_SIZE_BUTTON); + // Affichage uniquement des icones + gtk_toolbar_set_style(GTK_TOOLBAR(m_mainWidget), GTK_TOOLBAR_ICONS); + + Add(GTK_STOCK_NEW, "Nouveau", EDN_MSG__NEW); + Add(GTK_STOCK_OPEN, "Ouvrir", EDN_MSG__GUI_SHOW_OPEN_FILE); + AddSeparator(); + Add(GTK_STOCK_SAVE, "Enregistrer", EDN_MSG__CURRENT_SAVE); + Add(GTK_STOCK_SAVE_AS, "Enregistrer sous", EDN_MSG__CURRENT_SAVE_AS); + AddSeparator(); + Add(GTK_STOCK_QUIT, "Quitter"); +} + +ToolBar::~ToolBar(void) +{ + +} + +void ToolBar::OnMessage(int32_t id, int32_t dataID) +{ + //EDN_INFO("ReceiveMessage"); +} + +void ToolBar::AddSeparator(void) +{ +# ifdef USE_GTK_VERSION_3_0 +# elif defined( USE_GTK_VERSION_2_0) + gtk_toolbar_append_space(GTK_TOOLBAR(m_mainWidget)); +# endif +} + + +void ToolBar::Add(const char * title, const char * labelHelp, messageType_te id, bool enable) +{ + messageData_ts * message = new messageData_ts; + message->msgId = id; + message->dataId = -1; + m_message.PushBack(message); +# ifdef USE_GTK_VERSION_3_0 +# elif defined( USE_GTK_VERSION_2_0) + gtk_toolbar_insert_stock(GTK_TOOLBAR(m_mainWidget), title, labelHelp, NULL, G_CALLBACK(CB_menuGenerique), message, -1); +# endif +} + + + + diff --git a/Sources/GuiTools/MainWindows/ToolBar.h b/Sources/GuiTools/MainWindows/ToolBar.h new file mode 100644 index 0000000..7386788 --- /dev/null +++ b/Sources/GuiTools/MainWindows/ToolBar.h @@ -0,0 +1,49 @@ +/** + ******************************************************************************* + * @file ToolBar.h + * @brief Editeur De N'ours : abstraction of the tool bar (Header) + * @author Edouard DUPIN + * @date 17/06/2011 + * @par Project + * Edn + * + * @par Copyright + * Copyright 2010 Edouard DUPIN, all right reserved + * + * This software is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY. + * + * Licence summary : + * You can modify and redistribute the sources code and binaries. + * You can send me the bug-fix + * You can not earn money with this Software (if the source extract from Edn + * represent less than 50% of original Sources) + * Term of the licence in in the file licence.txt. + * + ******************************************************************************* + */ + +#include "MsgBroadcast.h" + +#ifndef __TOOL_BAR_H__ +#define __TOOL_BAR_H__ + + +class ToolBar: public MsgBroadcast +{ + public: + // Constructeur + ToolBar(void); + ~ToolBar(void); + GtkWidget * GetWidget(void) { return m_mainWidget; }; + void OnMessage(int32_t id, int32_t dataID); + + private: + void AddSeparator(void); + void Add(const char * title, const char * labelHelp, messageType_te id = EDN_MSG__NONE, bool enable = false); + GtkWidget * m_mainWidget; + EdnVectorBin m_message; +}; + + +#endif diff --git a/Sources/GuiTools/Search/Search.cpp b/Sources/GuiTools/Search/Search.cpp new file mode 100644 index 0000000..680db2a --- /dev/null +++ b/Sources/GuiTools/Search/Search.cpp @@ -0,0 +1,344 @@ +/** + ******************************************************************************* + * @file Search.cpp + * @brief Editeur De N'ours : Search system + * @author Edouard DUPIN + * @date 03/01/2011 + * @par Project + * Edn + * + * @par Copyright + * Copyright 2010 Edouard DUPIN, all right reserved + * + * This software is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY. + * + * Licence summary : + * You can modify and redistribute the sources code and binaries. + * You can send me the bug-fix + * You can not earn money with this Software (if the source extract from Edn + * represent less than 50% of original Sources) + * Term of the licence in in the file licence.txt. + * + ******************************************************************************* + */ + + +#include "tools_globals.h" +#include "Search.h" +#include "SearchData.h" +#include "BufferManager.h" +#include "MainWindows.h" +#include "MsgBroadcast.h" + +#undef __class__ +#define __class__ "Search" + + +Search::Search(void) + : m_localDialog(NULL), + m_searchLabel(NULL), + m_searchEntry(NULL), + m_replaceLabel(NULL), + m_replaceEntry(NULL), + m_CkMatchCase(NULL), + m_CkWrapAround(NULL) +{ + // nothing to do ... +} + +Search::~Search(void) +{ + if (NULL!=m_localDialog) { + gtk_widget_hide(m_localDialog); + gtk_widget_destroy(m_localDialog); + m_localDialog = NULL; + } +} + +void Search::Display(void) +{ + if(NULL == m_localDialog) { + m_localDialog = gtk_window_new(GTK_WINDOW_TOPLEVEL); + gtk_window_set_resizable(GTK_WINDOW(m_localDialog), FALSE); + gtk_window_set_keep_above(GTK_WINDOW(m_localDialog), TRUE); + + // select the program icone + //gtk_window_set_default_icon_name("Replace"); + + // set default title : + gtk_window_set_title(GTK_WINDOW(m_localDialog), "Search / Replace"); + + // Default size open windows + //gtk_window_set_default_size(GTK_WINDOW(m_localDialog), 300, 400); + + // enable the close signal of the windows + g_signal_connect(G_OBJECT(m_localDialog), "destroy", G_CALLBACK(OnButtonQuit), this); + + // Create a vertical box for stacking the menu and editor widgets in. + GtkWidget *vbox = gtk_vbox_new (FALSE, 0); + gtk_container_add(GTK_CONTAINER(m_localDialog), vbox); + + // Set key Accelerator : + //AccelKey::getInstance()->LinkCommonAccel(GTK_WINDOW(m_localDialog)); + + // ********************************************************** + // * Search Entry + // ********************************************************** + { + GtkWidget *hbox = gtk_hbox_new (FALSE, 0); + gtk_container_add(GTK_CONTAINER (vbox), hbox); + // search label + m_searchLabel = gtk_label_new("Search "); + gtk_box_pack_start(GTK_BOX(hbox), m_searchLabel, FALSE, TRUE, 0); + // Search entry + m_searchEntry = gtk_entry_new(); + gtk_box_pack_start(GTK_BOX(hbox), m_searchEntry, TRUE, TRUE, 0); + // Connect signals : + g_signal_connect(G_OBJECT(m_searchEntry), "activate", G_CALLBACK(OnButtonNext), this); + g_signal_connect(G_OBJECT(m_searchEntry), "changed", G_CALLBACK(OnEntrySearchChange), this); + } + // ********************************************************** + // * Replace Entry + // ********************************************************** + { + GtkWidget *hbox = gtk_hbox_new (FALSE, 0); + gtk_container_add(GTK_CONTAINER (vbox), hbox); + // search label + m_replaceLabel = gtk_label_new("Replace"); + gtk_box_pack_start(GTK_BOX(hbox), m_replaceLabel, FALSE, TRUE, 0); + // Search entry + m_replaceEntry = gtk_entry_new(); + gtk_box_pack_start(GTK_BOX(hbox), m_replaceEntry, TRUE, TRUE, 0); + // Connect signals : + g_signal_connect(G_OBJECT(m_replaceEntry), "changed", G_CALLBACK(OnEntryReplaceChange), this); + } + + // ********************************************************** + // * mode Selection + // ********************************************************** + m_CkMatchCase = gtk_check_button_new_with_label("Case Sensitive"); + gtk_container_add(GTK_CONTAINER (vbox), m_CkMatchCase); + m_CkWrapAround = gtk_check_button_new_with_label("Wrap arround"); + gtk_container_add(GTK_CONTAINER (vbox), m_CkWrapAround); + m_CkRegularExpression = gtk_check_button_new_with_label("Regular Expression"); + gtk_container_add(GTK_CONTAINER (vbox), m_CkRegularExpression); + + // connect signals : + g_signal_connect(G_OBJECT(m_CkMatchCase), "activate", G_CALLBACK(OnCheckBoxEventCase), this); + g_signal_connect(G_OBJECT(m_CkMatchCase), "clicked", G_CALLBACK(OnCheckBoxEventCase), this); + g_signal_connect(G_OBJECT(m_CkWrapAround), "activate", G_CALLBACK(OnCheckBoxEventWrap), this); + g_signal_connect(G_OBJECT(m_CkWrapAround), "clicked", G_CALLBACK(OnCheckBoxEventWrap), this); + g_signal_connect(G_OBJECT(m_CkRegularExpression), "activate", G_CALLBACK(OnCheckBoxEventRegExp), this); + g_signal_connect(G_OBJECT(m_CkRegularExpression), "clicked", G_CALLBACK(OnCheckBoxEventRegExp), this); + + + // ********************************************************** + // * Search / Replace button + // ********************************************************** + { + GtkWidget *hbox = gtk_hbox_new (FALSE, 0); + gtk_container_add(GTK_CONTAINER (vbox), hbox); + // Find previous + m_BtPrevious = gtk_button_new_with_label("Previous"); + gtk_container_add(GTK_CONTAINER (hbox), m_BtPrevious); + // Find Next + m_BtNext = gtk_button_new_with_label("Next"); + gtk_container_add(GTK_CONTAINER (hbox), m_BtNext); + // Replace + m_BtReplace = gtk_button_new_with_label("Replace"); + gtk_container_add(GTK_CONTAINER (hbox), m_BtReplace); + // Replace & next + m_BtReplaceAndNext = gtk_button_new_with_label("Replace & Find"); + gtk_container_add(GTK_CONTAINER (hbox), m_BtReplaceAndNext); + // Exit + m_BtQuit = gtk_button_new_with_label("Quit"); + gtk_container_add(GTK_CONTAINER (hbox), m_BtQuit); + + // Connect signals : + g_signal_connect(G_OBJECT(m_BtPrevious), "activate", G_CALLBACK(OnButtonPrevious), this); + g_signal_connect(G_OBJECT(m_BtPrevious), "released", G_CALLBACK(OnButtonPrevious), this); + g_signal_connect(G_OBJECT(m_BtNext), "activate", G_CALLBACK(OnButtonNext), this); + g_signal_connect(G_OBJECT(m_BtNext), "released", G_CALLBACK(OnButtonNext), this); + g_signal_connect(G_OBJECT(m_BtReplace), "activate", G_CALLBACK(OnButtonReplace), this); + g_signal_connect(G_OBJECT(m_BtReplace), "released", G_CALLBACK(OnButtonReplace), this); + g_signal_connect(G_OBJECT(m_BtReplaceAndNext), "activate", G_CALLBACK(OnButtonReplaceAndNext), this); + g_signal_connect(G_OBJECT(m_BtReplaceAndNext), "released", G_CALLBACK(OnButtonReplaceAndNext), this); + g_signal_connect(G_OBJECT(m_BtQuit), "activate", G_CALLBACK(OnButtonQuit), this); + g_signal_connect(G_OBJECT(m_BtQuit), "released", G_CALLBACK(OnButtonQuit), this); + } + + // recursive version of gtk_widget_show + gtk_widget_show_all(m_localDialog); + } + if(NULL == m_localDialog) { + EDN_ERROR("No search-dialog instance"); + } else { + // update datas : + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(m_CkWrapAround), SearchData::GetWrap()); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(m_CkMatchCase), SearchData::GetCase()); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(m_CkRegularExpression), SearchData::GetRegExp()); + if (true == SearchData::GetRegExp()) { + gtk_widget_set_sensitive(m_CkMatchCase, false); + } else { + gtk_widget_set_sensitive(m_CkMatchCase, true); + } + + Edn::String myDataString; + SearchData::GetSearch(myDataString); + gtk_entry_set_text(GTK_ENTRY(m_searchEntry), myDataString.c_str()); + if (0 == strlen(myDataString.c_str())) { + m_haveSearchData = false; + } else { + m_haveSearchData = true; + } + + SearchData::GetReplace(myDataString); + gtk_entry_set_text(GTK_ENTRY(m_replaceEntry), myDataString.c_str()); + if (0 == strlen(myDataString.c_str())) { + m_haveReplaceData = false; + } else { + m_haveReplaceData = true; + } + + gtk_widget_set_sensitive(m_BtPrevious, m_haveSearchData); + gtk_widget_set_sensitive(m_BtNext, m_haveSearchData); + if (false == m_haveSearchData) { + gtk_widget_set_sensitive(m_BtReplace, false); + gtk_widget_set_sensitive(m_BtReplaceAndNext, false); + } else { + gtk_widget_set_sensitive(m_BtReplace, m_haveReplaceData); + gtk_widget_set_sensitive(m_BtReplaceAndNext, m_haveReplaceData); + } + + // display the dialogue box + gtk_widget_show_all(m_localDialog); + + // hide regular expression + gtk_widget_hide(m_CkRegularExpression); + } +} + +void Search::Destroy(void) +{ + if (NULL!=m_localDialog) { + gtk_widget_destroy(m_localDialog); + m_localDialog = NULL; + } +} + + +void Search::Hide(void) +{ + gtk_widget_hide(m_localDialog); +} + +void Search::OnButtonPrevious(GtkWidget *widget, gpointer data) +{ + //EDN_INFO("CALLBACK"); + GeneralSendMessage(EDN_MSG__CURRENT_FIND_PREVIOUS); +} + +void Search::OnButtonNext(GtkWidget *widget, gpointer data) +{ + //EDN_INFO("CALLBACK"); + GeneralSendMessage(EDN_MSG__CURRENT_FIND_NEXT); +} + +void Search::OnButtonReplace(GtkWidget *widget, gpointer data) +{ + //EDN_INFO("CALLBACK"); + GeneralSendMessage(EDN_MSG__CURRENT_REPLACE); +} + +void Search::OnButtonReplaceAndNext(GtkWidget *widget, gpointer data) +{ + //EDN_INFO("CALLBACK"); + GeneralSendMessage(EDN_MSG__CURRENT_REPLACE); + GeneralSendMessage(EDN_MSG__CURRENT_FIND_NEXT); +} + +void Search::OnButtonQuit(GtkWidget *widget, gpointer data) +{ + //EDN_INFO("CALLBACK"); + Search * self = reinterpret_cast(data); + self->Destroy(); +} + +void Search::OnCheckBoxEventWrap(GtkWidget *widget, gpointer data) +{ + //EDN_INFO("CALLBACK"); + if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget))) { + SearchData::SetWrap(true); + } else { + SearchData::SetWrap(false); + } +} + +void Search::OnCheckBoxEventCase(GtkWidget *widget, gpointer data) +{ + //EDN_INFO("CALLBACK"); + if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget))) { + SearchData::SetCase(true); + } else { + SearchData::SetCase(false); + } +} + +void Search::OnCheckBoxEventRegExp(GtkWidget *widget, gpointer data) +{ + //EDN_INFO("CALLBACK"); + Search * self = reinterpret_cast(data); + if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget))) { + SearchData::SetRegExp(true); + gtk_widget_set_sensitive(self->m_CkMatchCase, false); + } else { + SearchData::SetRegExp(false); + gtk_widget_set_sensitive(self->m_CkMatchCase, true); + } +} + +void Search::OnEntrySearchChange(GtkWidget *widget, gpointer data) +{ + //EDN_INFO("CALLBACK"); + Search * self = reinterpret_cast(data); + // update research data + const char *testData = gtk_entry_get_text(GTK_ENTRY(widget)); + if (NULL != testData) { + Edn::String myDataString = testData; + SearchData::SetSearch(myDataString); + if (0 == strlen(testData)) { + self->m_haveSearchData = false; + } else { + self->m_haveSearchData = true; + } + gtk_widget_set_sensitive(self->m_BtPrevious, self->m_haveSearchData); + gtk_widget_set_sensitive(self->m_BtNext, self->m_haveSearchData); + if (false == self->m_haveSearchData) { + gtk_widget_set_sensitive(self->m_BtReplace, false); + gtk_widget_set_sensitive(self->m_BtReplaceAndNext, false); + } else { + gtk_widget_set_sensitive(self->m_BtReplace, self->m_haveReplaceData); + gtk_widget_set_sensitive(self->m_BtReplaceAndNext, self->m_haveReplaceData); + } + } +} + +void Search::OnEntryReplaceChange(GtkWidget *widget, gpointer data) +{ + //EDN_INFO("CALLBACK"); + Search * self = reinterpret_cast(data); + // update replace data + const char *testData = gtk_entry_get_text(GTK_ENTRY(widget)); + if (NULL != testData) { + Edn::String myDataString = testData; + SearchData::SetReplace(myDataString); + if (0 == strlen(testData)) { + self->m_haveReplaceData = false; + } else { + self->m_haveReplaceData = true; + } + gtk_widget_set_sensitive(self->m_BtReplace, self->m_haveReplaceData); + gtk_widget_set_sensitive(self->m_BtReplaceAndNext, self->m_haveReplaceData); + } +} diff --git a/Sources/GuiTools/Search/Search.h b/Sources/GuiTools/Search/Search.h new file mode 100644 index 0000000..3cafdc7 --- /dev/null +++ b/Sources/GuiTools/Search/Search.h @@ -0,0 +1,86 @@ +/** + ******************************************************************************* + * @file Search.h + * @brief Editeur De N'ours : Search system (header) + * @author Edouard DUPIN + * @date 03/01/2011 + * @par Project + * Edn + * + * @par Copyright + * Copyright 2010 Edouard DUPIN, all right reserved + * + * This software is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY. + * + * Licence summary : + * You can modify and redistribute the sources code and binaries. + * You can send me the bug-fix + * You can not earn money with this Software (if the source extract from Edn + * represent less than 50% of original Sources) + * Term of the licence in in the file licence.txt. + * + ******************************************************************************* + */ + +#ifndef __SEARCH_H__ +#define __SEARCH_H__ + +#include "tools_debug.h" +#include "Singleton.h" +#include +#include + + +class Search: public Singleton +{ + friend class Singleton; + // specific for sigleton system... + private: + // Constructeur + Search(void); + ~Search(void); + + public: + void Destroy(void); + void Display(void); + void Hide(void); + + private: + GtkWidget * m_localDialog; //!< local dialog element + // entry + GtkWidget * m_searchLabel; //!< gtk label of the search section + GtkWidget * m_searchEntry; //!< gtk entry of the search section + GtkWidget * m_replaceLabel; //!< gtk label of the replace section + GtkWidget * m_replaceEntry; //!< gtk entry of the replace section + // checkbox + GtkWidget * m_CkMatchCase; //!< tick of the case matching + GtkWidget * m_CkWrapAround; //!< tick of the wrap the file + GtkWidget * m_CkRegularExpression; //!< the test is a regular expression + // button + GtkWidget * m_BtPrevious; //!< Button Previous + GtkWidget * m_BtNext; //!< Button Next + GtkWidget * m_BtReplace; //!< Button Replace + GtkWidget * m_BtReplaceAndNext; //!< Button Replace and find next + GtkWidget * m_BtQuit; //!< Button Quit + bool m_haveSearchData; + bool m_haveReplaceData; + // CallBack for GTK+ gui + private : + static void OnButtonPrevious(GtkWidget *widget, gpointer user_data); + static void OnButtonNext(GtkWidget *widget, gpointer user_data); + static void OnButtonReplace(GtkWidget *widget, gpointer user_data); + static void OnButtonReplaceAndNext(GtkWidget *widget, gpointer user_data); + static void OnButtonQuit(GtkWidget *widget, gpointer user_data); + static void OnCheckBoxEventCase(GtkWidget *widget, gpointer user_data); + static void OnCheckBoxEventWrap(GtkWidget *widget, gpointer user_data); + static void OnCheckBoxEventRegExp(GtkWidget *widget, gpointer user_data); + static void OnEntrySearchChange(GtkWidget *widget, gpointer user_data); + static void OnEntryReplaceChange(GtkWidget *widget, gpointer user_data); + +}; + + +#endif + + diff --git a/Sources/GuiTools/Search/SearchData.cpp b/Sources/GuiTools/Search/SearchData.cpp new file mode 100644 index 0000000..5238fcd --- /dev/null +++ b/Sources/GuiTools/Search/SearchData.cpp @@ -0,0 +1,103 @@ +/** + ******************************************************************************* + * @file SearchData.cpp + * @brief Editeur De N'ours : Search Data element (Sources) + * @author Edouard DUPIN + * @date 02/02/2011 + * @par Project + * Edn + * + * @par Copyright + * Copyright 2010 Edouard DUPIN, all right reserved + * + * This software is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY. + * + * Licence summary : + * You can modify and redistribute the sources code and binaries. + * You can send me the bug-fix + * You can not earn money with this Software (if the source extract from Edn + * represent less than 50% of original Sources) + * Term of the licence in in the file licence.txt. + * + ******************************************************************************* + */ + +#include "tools_globals.h" +#include "SearchData.h" +#include "Edn.h" + + +#undef __class__ +#define __class__ "SearchData" + + +static Edn::String m_findRequest = ""; + +void SearchData::SetSearch(Edn::String &myData) +{ + m_findRequest = myData; +} +void SearchData::GetSearch(Edn::String &myData) +{ + myData = m_findRequest; +} +bool SearchData::IsSearchEmpty(void) +{ + if(m_findRequest.Size() > 0) { + return false; + } + return true; +} + +static Edn::String m_replaceRequest = ""; +void SearchData::SetReplace(Edn::String &myData) +{ + m_replaceRequest = myData; +} +void SearchData::GetReplace(Edn::String &myData) +{ + myData = m_replaceRequest; +} +bool SearchData::IsReplaceEmpty(void) +{ + if(m_replaceRequest.Size() > 0) { + return false; + } + return true; +} + + +static bool m_case = false; +void SearchData::SetCase(bool value) +{ + m_case = value; +} +bool SearchData::GetCase(void) +{ + return m_case; +} + + +static bool m_wrap = true; +void SearchData::SetWrap(bool value) +{ + m_wrap = value; +} +bool SearchData::GetWrap(void) +{ + return m_wrap; +} + + +static bool m_RegExp = false; +void SearchData::SetRegExp(bool value) +{ + m_RegExp = value; +} +bool SearchData::GetRegExp(void) +{ + return m_RegExp; +} + + diff --git a/Sources/GuiTools/Search/SearchData.h b/Sources/GuiTools/Search/SearchData.h new file mode 100644 index 0000000..05e8e8f --- /dev/null +++ b/Sources/GuiTools/Search/SearchData.h @@ -0,0 +1,49 @@ +/** + ******************************************************************************* + * @file SearchData.h + * @brief Editeur De N'ours : Search Data element (header) + * @author Edouard DUPIN + * @date 02/02/2011 + * @par Project + * Edn + * + * @par Copyright + * Copyright 2010 Edouard DUPIN, all right reserved + * + * This software is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY. + * + * Licence summary : + * You can modify and redistribute the sources code and binaries. + * You can send me the bug-fix + * You can not earn money with this Software (if the source extract from Edn + * represent less than 50% of original Sources) + * Term of the licence in in the file licence.txt. + * + ******************************************************************************* + */ + +#ifndef __SEARCH_DATA_H__ +#define __SEARCH_DATA_H__ + +#include "tools_debug.h" +#include "Edn.h" + +namespace SearchData +{ + void SetSearch(Edn::String &myData); + void GetSearch(Edn::String &myData); + bool IsSearchEmpty(void); + void SetReplace(Edn::String &myData); + void GetReplace(Edn::String &myData); + bool IsReplaceEmpty(void); + void SetCase(bool value); + bool GetCase(void); + void SetWrap(bool value); + bool GetWrap(void); + void SetRegExp(bool value); + bool GetRegExp(void); +} + + +#endif diff --git a/Sources/GuiTools/WindowsManager/WindowsManager.cpp b/Sources/GuiTools/WindowsManager/WindowsManager.cpp new file mode 100644 index 0000000..7fc10e8 --- /dev/null +++ b/Sources/GuiTools/WindowsManager/WindowsManager.cpp @@ -0,0 +1,157 @@ +/** + ******************************************************************************* + * @file WindowsManager.cpp + * @brief Editeur De N'ours : Windows creation, pop up, destruction ... (Sources) + * @author Edouard DUPIN + * @date 20/06/2011 + * @par Project + * Edn + * + * @par Copyright + * Copyright 2010 Edouard DUPIN, all right reserved + * + * This software is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY. + * + * Licence summary : + * You can modify and redistribute the sources code and binaries. + * You can send me the bug-fix + * You can not earn money with this Software (if the source extract from Edn + * represent less than 50% of original Sources) + * Term of the licence in in the file licence.txt. + * + ******************************************************************************* + */ + + +#include "tools_debug.h" +#include "tools_globals.h" +#include "WindowsManager.h" +#include "MainWindows.h" +#include "Edn.h" +#include "Search.h" + + +#undef __class__ +#define __class__ "WindowsManager" + +/** + * @brief + * + * @param[in,out] --- + * + * @return --- + * + */ +WindowsManager::WindowsManager(void) : MsgBroadcast("Windows Manager", EDN_CAT_GUI_MANAGER) +{ + m_currentBufferID = -1; +} + +/** + * @brief + * + * @param[in,out] --- + * + * @return --- + * + */ +WindowsManager::~WindowsManager(void) +{ + +} + +void WindowsManager::OnMessage(int32_t id, int32_t dataID) +{ + switch (id) + { + case EDN_MSG__BUFFER_CHANGE_CURRENT: + m_currentBufferID = dataID; + break; + case EDN_MSG__GUI_SHOW_MAIN_WINDOWS: + EDN_INFO("Request opening MAIN_WINDOWS"); + m_mainWindow = MainWindows::getInstance(); + break; + case EDN_MSG__GUI_SHOW_SEARCH: + EDN_INFO("Request opening SEARCH"); + { + Search *myInstance = Search::getInstance(); + myInstance->Display(); + } + break; + case EDN_MSG__GUI_SHOW_PREFERENCE: + EDN_INFO("Request opening PREFERENCE"); + break; + case EDN_MSG__GUI_SHOW_REPLACE: + EDN_INFO("Request opening REPLACE"); + break; + case EDN_MSG__GUI_SHOW_OPEN_FILE: + EDN_INFO("Request opening OPEN_FILE"); + { + BufferManager *myBufferManager = NULL; + myBufferManager = BufferManager::getInstance(); + + GtkWidget *dialog = gtk_file_chooser_dialog_new( "Open File", NULL, + GTK_FILE_CHOOSER_ACTION_OPEN, + GTK_STOCK_CANCEL, // button text + GTK_RESPONSE_CANCEL, // response id + GTK_STOCK_OPEN, // button text + GTK_RESPONSE_ACCEPT, // response id + NULL); // end button/response list + if( -1 != m_currentBufferID + && true == myBufferManager->Exist(m_currentBufferID) ) + { + Edn::String fileFolder = myBufferManager->Get(m_currentBufferID)->GetFolder(); + gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER(dialog), fileFolder.c_str()); + //gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER(dialog), "Untitled document"); + } + if (gtk_dialog_run(GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT) + { + Edn::String myfilename; + myfilename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER (dialog)); + + if (false == myBufferManager->Exist(myfilename) ) { + int32_t openID = myBufferManager->Open(myfilename); + SendMessage(EDN_MSG__CURRENT_CHANGE_BUFFER_ID, openID); + } else { + SendMessage(EDN_MSG__CURRENT_CHANGE_BUFFER_ID, myBufferManager->GetId(myfilename)); + } + } + gtk_widget_destroy(dialog); + } + break; + case EDN_MSG__GUI_SHOW_SAVE_AS: + EDN_INFO("Request opening SAVE_AS"); + // save only if one element is selected + if (BufferManager::getInstance()->Size() > 0) { + int32_t idSelected; + if(-1 == dataID) { + idSelected = BufferManager::getInstance()->GetSelected(); + } else { + idSelected = dataID; + } + Buffer *myBuffer = BufferManager::getInstance()->Get(idSelected); + Edn::String tmpString = "Save as file : "; + tmpString += myBuffer->GetShortName().c_str(); + GtkWidget *dialog = gtk_file_chooser_dialog_new( tmpString.c_str(), NULL, + GTK_FILE_CHOOSER_ACTION_SAVE, + GTK_STOCK_CANCEL, // button text + GTK_RESPONSE_CANCEL, // response id + GTK_STOCK_SAVE, // button text + GTK_RESPONSE_ACCEPT, // response id + NULL); // end button/response list + if (gtk_dialog_run(GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT) + { + Edn::String myfilename; + myfilename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER (dialog)); + + myBuffer->SetName(myfilename); + myBuffer->Save(); + + SendMessage(EDN_MSG__CURRENT_CHANGE_BUFFER_ID, idSelected); + } + gtk_widget_destroy(dialog); // implicitly hides dialog + } + break; + } +} \ No newline at end of file diff --git a/Sources/GuiTools/WindowsManager/WindowsManager.h b/Sources/GuiTools/WindowsManager/WindowsManager.h new file mode 100644 index 0000000..042262b --- /dev/null +++ b/Sources/GuiTools/WindowsManager/WindowsManager.h @@ -0,0 +1,50 @@ +/** + ******************************************************************************* + * @file WindowsManager.h + * @brief Editeur De N'ours : Windows creation, pop up, destruction ... (header) + * @author Edouard DUPIN + * @date 20/06/2011 + * @par Project + * Edn + * + * @par Copyright + * Copyright 2010 Edouard DUPIN, all right reserved + * + * This software is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY. + * + * Licence summary : + * You can modify and redistribute the sources code and binaries. + * You can send me the bug-fix + * You can not earn money with this Software (if the source extract from Edn + * represent less than 50% of original Sources) + * Term of the licence in in the file licence.txt. + * + ******************************************************************************* + */ + +#ifndef __WINDOWS_MANAGER_H__ +#define __WINDOWS_MANAGER_H__ + +#include "Singleton.h" +#include "MsgBroadcast.h" +#include "MainWindows.h" + +class WindowsManager: public Singleton, public MsgBroadcast +{ + friend class Singleton; + // specific for sigleton system... + private: + // Constructeur + WindowsManager(void); + ~WindowsManager(void); + + public: + void OnMessage(int32_t id, int32_t dataID); + private: + MainWindows * m_mainWindow; + int32_t m_currentBufferID; +}; + +#endif + diff --git a/Sources/Highlight/Highlight.cpp b/Sources/Highlight/Highlight.cpp new file mode 100644 index 0000000..c13f430 --- /dev/null +++ b/Sources/Highlight/Highlight.cpp @@ -0,0 +1,297 @@ +/** + ******************************************************************************* + * @file Highlight.c + * @brief Editeur De N'ours : Hightlightning Specific + * @author Edouard DUPIN + * @date 14/12/2010 + * @par Project + * Edn + * + * @par Copyright + * Copyright 2010 Edouard DUPIN, all right reserved + * + * This software is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY. + * + * Licence summary : + * You can modify and redistribute the sources code and binaries. + * You can send me the bug-fix + * You can not earn money with this Software (if the source extract from Edn + * represent less than 50% of original Sources) + * Term of the licence in in the file licence.txt. + * + ******************************************************************************* + */ + +#include "tools_debug.h" +#include "tools_globals.h" +#include "Highlight.h" +#include "tinyxml.h" + + +#undef __class__ +#define __class__ "Highlight" + + +void Highlight::ParseRules(TiXmlNode *child, std::vector &mListPatern, int32_t level) +{ + // Create the patern ... + HighlightPattern *myPattern = new HighlightPattern(); + // parse under Element + myPattern->ParseRules(child, level); + // add element in the list + mListPatern.push_back(myPattern); +} + + + +Highlight::Highlight(Edn::String &xmlFilename) +{ + + TiXmlDocument XmlDocument; + // open the curent File + bool loadError = XmlDocument.LoadFile(xmlFilename.c_str()); + if (false == loadError) { + EDN_ERROR( "can not load Hightlight XML: PARSING error: "); + return; + } + TiXmlElement* root = XmlDocument.FirstChildElement( "EdnLang" ); + if (NULL == root) { + EDN_ERROR( "can not load Hightlight XML: main node not find: \"EdnLang\""); + return; + } + + int32_t level1 = 0; + int32_t level2 = 0; + TiXmlNode * child = root->FirstChild(); + while(NULL != child) + { + if (child->Type()==TiXmlNode::TINYXML_COMMENT) { + // nothing to do ... + } else if (!strcmp(child->Value(), "ext")) { + const char *myData = child->ToElement()->GetText(); + if (NULL != myData) { + //EDN_INFO(PFX"(l %d) node fined : %s=\"%s\"", child->Row(), child->Value() , myData); + Edn::String myEdnData = myData; + m_listExtentions.push_back(myEdnData); + } + } else if (!strcmp(child->Value(), "pass1")) { + // Get sub Nodes ... + TiXmlNode *passChild = child->FirstChild(); + while (NULL != passChild) { + if (passChild->Type()==TiXmlNode::TINYXML_COMMENT) { + // nothing to do ... + } else if (!strcmp(passChild->Value(), "rule")) { + ParseRules(passChild, m_listHighlightPass1, level1++); + } else { + EDN_ERROR("(l "<< passChild->Row() << ") node not suported : \""<< passChild->Value() << "\" must be [rule]" ); + } + // get the next node element : + passChild = passChild->NextSibling(); + } + } else if (!strcmp(child->Value(), "pass2")) { + // Get sub Nodes ... + TiXmlNode *passChild = child->FirstChild(); + while (NULL != passChild) { + if (passChild->Type()==TiXmlNode::TINYXML_COMMENT) { + // nothing to do ... + } else if (!strcmp(passChild->Value(), "rule")) { + ParseRules(passChild, m_listHighlightPass2, level2++); + } else { + EDN_ERROR("(l "<< passChild->Row() << ") node not suported : \""<< passChild->Value() << "\" must be [rule]" ); + } + // get the next node element : + passChild = passChild->NextSibling(); + } + } else { + EDN_ERROR("(l "<< child->Row() << ") node not suported : \""<< child->Value() << "\" must be [ext,pass1,pass2]" ); + } + // get the next node element : + child = child->NextSibling(); + } +} + +Highlight::~Highlight(void) +{ + uint32_t i; + // clean all Element + for (i=0; i< m_listHighlightPass1.size(); i++) { + delete(m_listHighlightPass1[i]); + } + // clear the compleate list + m_listHighlightPass1.clear(); +} + + +bool Highlight::HasExtention(Edn::String &ext) +{ + uint32_t i; + for (i=0; iGetName().c_str() ); + //m_listHighlightPass1[i]->Display(); + } + // Display all elements + for (i=0; i< m_listHighlightPass2.size(); i++) { + EDN_INFO(" " << i << " Pass 2 : " << m_listHighlightPass2[i]->GetName().c_str() ); + //m_listHighlightPass2[i]->Display(); + } +} + + +void Highlight::Parse(int32_t start, int32_t stop, std::vector &metaData, int32_t &addingPos, EdnVectorBuf &buffer, int32_t elementID) +{ + if (0 > addingPos) { + addingPos = 0; + } + /*int32_t emptyId = -1; + for (i=0; i< (int32_t)metaData.size(); i++) { + + }*/ + //EDN_DEBUG("Parse element " << elementID << " / " << m_listHighlightPass1.size() << " ==> position search: (" << start << "," << stop << ")" ); + if (elementID >= (int32_t)m_listHighlightPass1.size() ){ + //EDN_DEBUG("Return at " << elementID << " / " << m_listHighlightPass1.size() ); + return; + } + int32_t elementStart = start; + int32_t elementStop = stop; + resultFind_te ret = HLP_FIND_OK; + colorInformation_ts resultat; + while (HLP_FIND_ERROR != ret && elementStartFind(elementStart, elementStop, resultat, buffer); + if (HLP_FIND_ERROR != ret) { + //EDN_INFO("Find Pattern in the Buffer : (" << resultat.beginStart << "," << resultat.endStop << ")" ); + // Add curent element in the list ... + if (HLP_FIND_OK_NO_END == ret) { + // find if we have a next element with th save Pointer and not higher the this one + int32_t findNextElement = -1; + int32_t i; + int32_t curentLevel = ((HighlightPattern*)resultat.patern)->GetLevel(); + for (i=addingPos; i< (int32_t)metaData.size(); i++) { + if (curentLevel > ((HighlightPattern*)metaData[i].patern)->GetLevel() ) { + //EDN_DEBUG(" -> Find upper element at "<< i ); + break; + } else if (curentLevel < ((HighlightPattern*)metaData[i].patern)->GetLevel() ) { + findNextElement = i; + //EDN_DEBUG(" -> Find under element at "<< i ); + } + if (metaData[i].patern == resultat.patern) + { + findNextElement = i; + //EDN_DEBUG(" -> Find a same element at "<< i ); + break; + } + } + + if (-1 != findNextElement) { + // if not find a end, we need to search the end of this one and parse all data inside... + int32_t newEnd = buffer.Size(); + if (findNextElement >= (int32_t)metaData.size()-1) { + // Remove old element : + //EDN_DEBUG(" --> Remove : " << addingPos << "==>" << (int32_t)metaData.size() << " (end)" ); + metaData.erase(metaData.begin()+addingPos,metaData.end()); + } else { + // Remove old element : + //EDN_DEBUG(" --> Remove : " << addingPos << "==>" << findNextElement+1 ); + metaData.erase(metaData.begin()+addingPos,metaData.begin()+findNextElement+1); + newEnd = metaData[addingPos].beginStart-1; + } + // Regenerate a local parsing : in a higher range of text + Parse(elementStart, edn_max(newEnd, stop), metaData, addingPos, buffer, elementID); + // Break the curent process, beacause we reparse the data in all range... + return; + } else { + //EDN_DEBUG(" --> No element removed " ); + metaData.insert(metaData.begin() + addingPos, resultat); + //EDN_DEBUG("INSERT at "<< addingPos << " S=" << resultat.beginStart << " E=" << resultat.endStop ); + } + } else { + metaData.insert(metaData.begin() + addingPos, resultat); + //EDN_DEBUG("INSERT at "<< addingPos << " S=" << resultat.beginStart << " E=" << resultat.endStop ); + } + // parse the under element : + Parse(elementStart, resultat.beginStart-1, metaData, addingPos, buffer, elementID+1); + addingPos++; + elementStart = resultat.endStop; + } + } + // parse the under element : + Parse(elementStart, elementStop, metaData, addingPos, buffer, elementID+1); +} + +/** + * @brief second pass of the hightlight + * + */ +void Highlight::Parse2(int32_t start, int32_t stop, std::vector &metaData, EdnVectorBuf &buffer, int32_t elementID) +{ + if (elementID >= (int32_t)m_listHighlightPass2.size() ){ + return; + } + int32_t elementStart = start; + int32_t elementStop = stop; + resultFind_te ret = HLP_FIND_OK; + colorInformation_ts resultat; + while (HLP_FIND_ERROR != ret && elementStartFind(elementStart, elementStop, resultat, buffer); + } else { + ret = HLP_FIND_ERROR; + } + if (HLP_FIND_ERROR != ret) { + //EDN_INFO("Find Pattern in the Buffer : (" << resultat.beginStart << "," << resultat.endStop << ")" ); + // parse the under element : + Parse2(elementStart, resultat.beginStart, metaData, buffer, elementID+1); + // Add curent element in the list ... + metaData.push_back(resultat); + elementStart = resultat.endStop; + } + } + // parse the under element : + Parse2(elementStart, elementStop, metaData, buffer, elementID+1); +} + + diff --git a/Sources/Highlight/Highlight.h b/Sources/Highlight/Highlight.h new file mode 100644 index 0000000..4f922b0 --- /dev/null +++ b/Sources/Highlight/Highlight.h @@ -0,0 +1,77 @@ +/** + ******************************************************************************* + * @file Highlight.h + * @brief Editeur De N'ours : Hightlightning Specific (header) + * @author Edouard DUPIN + * @date 14/12/2010 + * @par Project + * Edn + * + * @par Copyright + * Copyright 2010 Edouard DUPIN, all right reserved + * + * This software is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY. + * + * Licence summary : + * You can modify and redistribute the sources code and binaries. + * You can send me the bug-fix + * You can not earn money with this Software (if the source extract from Edn + * represent less than 50% of original Sources) + * Term of the licence in in the file licence.txt. + * + ******************************************************************************* + */ + +#ifndef __HIGHLIGHT_H__ +#define __HIGHLIGHT_H__ + + +class Highlight; +class HighlightPattern; + +extern "C" { + typedef struct + { + int32_t beginStart; + int32_t beginStop; + int32_t endStart; + int32_t endStop; + bool notEnded; + HighlightPattern * patern; // pointer on class : + } colorInformation_ts; +} + +#include +#include "HighlightPattern.h" +#include "Colorize.h" +#include "Edn.h" +#include "EdnVectorBuf.h" +#include "tinyxml.h" + +class Highlight { + public: + // Constructeur + Highlight(Edn::String &xmlFilename); + ~Highlight(void); + bool HasExtention(Edn::String &ext); + bool FileNameCompatible(Edn::String &fileName); + void Display(void); + void Parse( int32_t start, int32_t stop, std::vector &metaData, int32_t &addingPos, EdnVectorBuf &buffer, int32_t elementID=0); + void Parse2(int32_t start, int32_t stop, std::vector &metaData, EdnVectorBuf &buffer, int32_t elementID=0); + + private: + void ParseRules(TiXmlNode *child, std::vector &mListPatern, int32_t level); + Edn::String m_styleName; //!< curent style name (like "c++" or "c" or "script Bash") + std::vector m_listExtentions; //!< List of possible extention for this high-light, like : ".c", ".cpp", ".h" + std::vector m_listHighlightPass1; //!< List of ALL hightlight modules (pass 1 ==> when we load and wride data on the buffer) + std::vector m_listHighlightPass2; //!< List of ALL hightlight modules (pass 2 ==> When we display the buffer( only the display area (100 lines)) ) +}; + + + + + +#endif + + diff --git a/Sources/Highlight/HighlightManager.cpp b/Sources/Highlight/HighlightManager.cpp new file mode 100644 index 0000000..0502e2c --- /dev/null +++ b/Sources/Highlight/HighlightManager.cpp @@ -0,0 +1,83 @@ +/** + ******************************************************************************* + * @file HighlightManager.cpp + * @brief Editeur De N'ours : Hightlining Manager + * @author Edouard DUPIN + * @date 16/12/2010 + * @par Project + * Edn + * + * @par Copyright + * Copyright 2010 Edouard DUPIN, all right reserved + * + * This software is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY. + * + * Licence summary : + * You can modify and redistribute the sources code and binaries. + * You can send me the bug-fix + * You can not earn money with this Software (if the source extract from Edn + * represent less than 50% of original Sources) + * Term of the licence in in the file licence.txt. + * + ******************************************************************************* + */ + +#include "tools_debug.h" +#include "tools_globals.h" +#include "HighlightManager.h" + +#undef __class__ +#define __class__ "HighlightManager" + +HighlightManager::HighlightManager(void) +{ + +} + +HighlightManager::~HighlightManager(void) +{ + listHighlight.clear(); +} + + +Highlight *HighlightManager::Get(Edn::String &fileName) +{ + uint32_t i; + for (i=0; iFileNameCompatible(fileName) ) { + return listHighlight[i]; + } + } + return NULL; +} + +bool HighlightManager::Exist(Edn::String &fileName) +{ + uint32_t i; + for (i=0; iFileNameCompatible(fileName) ) { + return true; + } + } + return false; +} + + +void HighlightManager::loadLanguages(void) +{ + Edn::String xmlFilename = "./data/lang_c.xml"; + Highlight *myHightline = new Highlight(xmlFilename); + listHighlight.push_back(myHightline); + + xmlFilename = "./data/lang_boo.xml"; + myHightline = new Highlight(xmlFilename); + listHighlight.push_back(myHightline); + + xmlFilename = "./data/lang_Makefile.xml"; + myHightline = new Highlight(xmlFilename); + listHighlight.push_back(myHightline); + + myHightline->Display(); +} + diff --git a/Sources/Highlight/HighlightManager.h b/Sources/Highlight/HighlightManager.h new file mode 100644 index 0000000..af42ae2 --- /dev/null +++ b/Sources/Highlight/HighlightManager.h @@ -0,0 +1,56 @@ +/** + ******************************************************************************* + * @file HighlightManager.h + * @brief Editeur De N'ours : Hightlining Manager (header) + * @author Edouard DUPIN + * @date 14/12/2010 + * @par Project + * Edn + * + * @par Copyright + * Copyright 2010 Edouard DUPIN, all right reserved + * + * This software is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY. + * + * Licence summary : + * You can modify and redistribute the sources code and binaries. + * You can send me the bug-fix + * You can not earn money with this Software (if the source extract from Edn + * represent less than 50% of original Sources) + * Term of the licence in in the file licence.txt. + * + ******************************************************************************* + */ + +#ifndef __HIGHLIGHT_MANAGER_H__ +#define __HIGHLIGHT_MANAGER_H__ + +class HighlightManager; + +#include "Singleton.h" +#include +#include +#include "Highlight.h" + + +class HighlightManager: public Singleton +{ + friend class Singleton; + // specific for sigleton system... + private: + // Constructeur + HighlightManager(void); + ~HighlightManager(void); + + public: + void loadLanguages(void); + Highlight * Get(Edn::String &fileName); + bool Exist(Edn::String &fileName); + + private: + std::vector listHighlight; //!< List of ALL hightlight modules +}; + +#endif + diff --git a/Sources/Highlight/HighlightPattern.cpp b/Sources/Highlight/HighlightPattern.cpp new file mode 100644 index 0000000..fa37110 --- /dev/null +++ b/Sources/Highlight/HighlightPattern.cpp @@ -0,0 +1,232 @@ +/** + ******************************************************************************* + * @file HighlightPattern.cpp + * @brief Editeur De N'ours : Hightlight Patern (header) + * @author Edouard DUPIN + * @date 14/12/2010 + * @par Project + * Edn + * + * @par Copyright + * Copyright 2010 Edouard DUPIN, all right reserved + * + * This software is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY. + * + * Licence summary : + * You can modify and redistribute the sources code and binaries. + * You can send me the bug-fix + * You can not earn money with this Software (if the source extract from Edn + * represent less than 50% of original Sources) + * Term of the licence in in the file licence.txt. + * + ******************************************************************************* + */ +#include "tools_debug.h" +#include "tools_globals.h" +#include "HighlightPattern.h" +#include "ColorizeManager.h" + + +#undef __class__ +#define __class__ "HighlightPattern" + + + +HighlightPattern::HighlightPattern(void) +{ + m_haveStopPatern = false; + m_multiline = false; + ColorizeManager *myColorManager = ColorizeManager::getInstance(); + m_color = myColorManager->Get("normal"); + m_regExpStart = new EdnRegExp(); + m_regExpStop = new EdnRegExp(); + m_escapeChar = 0; +} + +HighlightPattern::~HighlightPattern(void) +{ + delete(m_regExpStart); + delete(m_regExpStop); +} + +void HighlightPattern::SetPaternStart(Edn::String ®Exp) +{ + m_regExpStart->SetRegExp(regExp); +} + +void HighlightPattern::SetPaternStop(Edn::String ®Exp) +{ + if (regExp.Size() != 0) { + m_regExpStop->SetRegExp(regExp); + m_haveStopPatern = true; + } else { + m_haveStopPatern = false; + } +} + +void HighlightPattern::SetEscapeChar(Edn::String &EscapeChar) +{ + if (EscapeChar.Size()>0) { + m_escapeChar = EscapeChar.c_str()[0]; + } else { + m_escapeChar = 0; + } +} + + +void HighlightPattern::SetColor(Edn::String &colorName) +{ + m_colorName = colorName; + ColorizeManager *myColorManager = ColorizeManager::getInstance(); + m_color = myColorManager->Get(m_colorName); +} + +bool HighlightPattern::IsEnable(void) +{ + return true; +} + +/** + * @brief + * + * @param[in,out] + * + * @eturn + * + */ +void HighlightPattern::Display(void) +{ + /* + EDN_INFO("patern : \"" << m_paternName.c_str() << "\" level=" << m_level ); + EDN_INFO(" ==> colorName \"" << m_colorName.c_str() << "\""); + EDN_INFO(" ==> regExpStart \"" << m_regExpStart->GetRegExp().c_str() << "\""); + EDN_INFO(" ==> regExpStop \"" << m_regExpStop->GetRegExp().c_str() << "\""); + if (true == m_haveStopPatern) { + EDN_INFO(" ==> stop pattern: YES"); + } else { + EDN_INFO(" ==> stop pattern: NO"); + } + if (true == m_multiline) { + EDN_INFO(" ==> multiline pattern: YES"); + } else { + EDN_INFO(" ==> multiline pattern: NO"); + } + */ + // Display all elements + for (int32_t i=0; i< m_subPatern.Size(); i++) { + EDN_INFO(" " << i << " SubPattern : " << m_subPatern[i]->GetName().c_str() ); + m_subPatern[i]->Display(); + } +} +void HighlightPattern::ParseRules(TiXmlNode *child, int32_t level) +{ + //-------------------------------------------------------------------------------------------- + /* + + preprocesseur + # + $ + yes + + */ + //-------------------------------------------------------------------------------------------- + // process attribute + const char *highLightName = child->ToElement()->Attribute("name"); + Edn::String myEdnDataTmp = "???"; + if (NULL != highLightName) { + myEdnDataTmp = highLightName; + } + SetName(myEdnDataTmp); + SetLevel(level); + + TiXmlElement *xChild = child->FirstChildElement("color"); + if (NULL != xChild) { + const char *myData = xChild->GetText(); + if (myData) { + //EDN_INFO(PFX"(l %d) node fined : %s=\"%s\"", xChild->Row(), xChild->Value() , myData); + Edn::String myEdnData = myData; + SetColor(myEdnData); + } + } + xChild = child->FirstChildElement("start"); + if (NULL != xChild) { + const char *myData = xChild->GetText(); + if (myData) { + //EDN_INFO(PFX"(l %d) node fined : %s=\"%s\"", xChild->Row(), xChild->Value() , myData); + Edn::String myEdnData = myData; + SetPaternStart(myEdnData); + } + } + xChild = child->FirstChildElement("end"); + if (NULL != xChild) { + const char *myData = xChild->GetText(); + if (myData) { + //EDN_INFO(PFX"(l %d) node fined : %s=\"%s\"", xChild->Row(), xChild->Value() , myData); + Edn::String myEdnData = myData; + SetPaternStop(myEdnData); + } + } + xChild = child->FirstChildElement("EscapeChar"); + if (NULL != xChild) { + const char *myData = xChild->GetText(); + if (myData) { + //EDN_INFO(PFX"(l %d) node fined : %s=\"%s\"", xChild->Row(), xChild->Value() , myData); + Edn::String myEdnData = myData; + SetEscapeChar(myEdnData); + } + } + xChild = child->FirstChildElement("rule"); + if (NULL != xChild) { + /* + // Create the patern ... + HighlightPattern *myPattern = new HighlightPattern(); + // parse under Element + myPattern->ParseRules(ruleChild, level+1); + // add element in the list + m_subPatern.PushBack(myPattern); + //ParseRules(passChild, m_listHighlightPass1, level1++); + */ + } +} + +resultFind_te HighlightPattern::Find(int32_t start, int32_t stop, colorInformation_ts &resultat, EdnVectorBuf &buffer) +{ + //EDN_DEBUG(" try to find the element"); + resultat.beginStart = -1; + resultat.beginStop = -1; + resultat.endStart = -1; + resultat.endStop = -1; + resultat.notEnded = false; + resultat.patern = this; + + // when we have only one element : + if (false == m_haveStopPatern) { + if (true == m_regExpStart->Process(buffer, start, stop)) { + resultat.beginStart = m_regExpStart->Start(); + resultat.beginStop = m_regExpStart->Stop(); + resultat.endStart = m_regExpStart->Start(); + resultat.endStop = m_regExpStart->Stop(); + return HLP_FIND_OK; + } + //EDN_DEBUG("NOT find hightlightpatern ..."); + } else { + // try while we find the first element + if (true == m_regExpStart->Process(buffer, start, stop, m_escapeChar)) { + resultat.beginStart = m_regExpStart->Start(); + resultat.beginStop = m_regExpStart->Stop(); + if (true == m_regExpStop->Process(buffer, resultat.beginStop, stop, m_escapeChar)) { + resultat.endStart = m_regExpStop->Start(); + resultat.endStop = m_regExpStop->Stop(); + return HLP_FIND_OK; + } else { + resultat.endStart = stop+1; + resultat.endStop = stop+1; + resultat.notEnded = true; + return HLP_FIND_OK_NO_END; + } + } + //EDN_DEBUG("NOT find start hightlightpatern ..."); + } + return HLP_FIND_ERROR; +} diff --git a/Sources/Highlight/HighlightPattern.h b/Sources/Highlight/HighlightPattern.h new file mode 100644 index 0000000..e60d11e --- /dev/null +++ b/Sources/Highlight/HighlightPattern.h @@ -0,0 +1,85 @@ +/** + ******************************************************************************* + * @file HighlightPattern.h + * @brief Editeur De N'ours : Hightlight Patern (header) + * @author Edouard DUPIN + * @date 14/12/2010 + * @par Project + * Edn + * + * @par Copyright + * Copyright 2010 Edouard DUPIN, all right reserved + * + * This software is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY. + * + * Licence summary : + * You can modify and redistribute the sources code and binaries. + * You can send me the bug-fix + * You can not earn money with this Software (if the source extract from Edn + * represent less than 50% of original Sources) + * Term of the licence in in the file licence.txt. + * + ******************************************************************************* + */ + +#ifndef __HIGHLIGHT_PATTERN_H__ +#define __HIGHLIGHT_PATTERN_H__ + +class HighlightPattern; + +#include "Edn.h" +#include "EdnRegExp.h" +#include "Colorize.h" +#include "EdnVectorBin.h" +#include "tinyxml.h" + +typedef enum { + HLP_FIND_ERROR, + HLP_FIND_OK, + HLP_FIND_OK_NO_END, +}resultFind_te; + +class HighlightPattern; + +class HighlightPattern { + public: + // Constructeur + HighlightPattern(void); + ~HighlightPattern(void); + + void SetName(Edn::String &name) { m_paternName = name;}; + Edn::String GetName(void) { return m_paternName;}; + + void SetPaternStart(Edn::String ®Exp); + void SetPaternStop(Edn::String ®Exp); + void SetColor(Edn::String &colorName); + void SetEscapeChar(Edn::String &EscapeChar); + void SetMultiline(bool enable) { m_multiline = enable; }; + + void SetLevel(int32_t newLevel) { m_level = newLevel; }; + int32_t GetLevel(void) { return m_level; }; + + bool IsEnable(void); + void Display(void); + resultFind_te Find(int32_t start, int32_t stop, colorInformation_ts &resultat, EdnVectorBuf &buffer); + Colorize * GetColor(void) { return m_color; }; + void ParseRules(TiXmlNode *child, int32_t level); + + private: + int32_t m_level; //!< Level of the pattern ==> this is to overwrite next pattern when we create an higher .... + Edn::String m_paternName; //!< Current style name (like "c++" or "c" or "script Bash") + Edn::String m_colorName; //!< Current color name + Colorize * m_color; //!< Link to the color manager + EdnRegExp * m_regExpStart; //!< Start of Regular expression + EdnRegExp * m_regExpStop; //!< Stop of Regular Expression + bool m_haveStopPatern; //!< Stop patern presence + bool m_multiline; //!< The patern is multiline + char m_escapeChar; //!< Escape char to prevent exeit of patern .... + EdnVectorBin m_subPatern; //!< Under patern of this one +// EdnVectorBin m_subColor; //!< Under Color in the start RegExp ... +}; + +#endif + + diff --git a/Sources/ctags/CTagsManager.cpp b/Sources/ctags/CTagsManager.cpp new file mode 100644 index 0000000..f01a347 --- /dev/null +++ b/Sources/ctags/CTagsManager.cpp @@ -0,0 +1,235 @@ +/** + ******************************************************************************* + * @file CTagsManager.cpp + * @brief Editeur De N'ours : Ctags manager : acces to the ctags file (Sources) + * @author Edouard DUPIN + * @date 15/07/2011 + * @par Project + * Edn + * + * @par Copyright + * Copyright 2010 Edouard DUPIN, all right reserved + * + * This software is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY. + * + * Licence summary : + * You can modify and redistribute the sources code and binaries. + * You can send me the bug-fix + * You can not earn money with this Software (if the source extract from Edn + * represent less than 50% of original Sources) + * Term of the licence in in the file licence.txt. + * + ******************************************************************************* + */ + +#include "tools_debug.h" +#include "tools_globals.h" +#include "Edn.h" +#include "CTagsManager.h" +#include "ClipBoard.h" +#include "BufferManager.h" + + + +#undef __class__ +#define __class__ "CTagsManager" + +/** + * @brief + * + * @param[in,out] --- + * + * @return --- + * + */ +CTagsManager::CTagsManager(void) : MsgBroadcast("C-Tags Manager", EDN_CAT_CTAGS) +{ + m_tagFilename = ""; + m_tagFolderBase = ""; + m_ctagFile = NULL; + m_historyPos = 0; +} + +/** + * @brief + * + * @param[in,out] --- + * + * @return --- + * + */ +CTagsManager::~CTagsManager(void) +{ + if(0 != m_historyList.Size()) { + for (int32_t iii=0; iii< m_historyList.Size(); iii++) { + delete(m_historyList[iii]); + } + m_historyList.Clear(); + } +} + +Edn::String CTagsManager::GetFolder(Edn::String &inputString) +{ + char tmpVal[4096]; + strncpy(tmpVal, inputString.c_str(), 4096); + tmpVal[4096-1] = '\0'; + char *ptr = strrchr(tmpVal, '/'); + if (NULL == ptr) { + ptr = strrchr(tmpVal, '\\'); + } + Edn::String out = "./"; + if (NULL != ptr) { + *ptr = '\0'; + out = tmpVal; + out+= '/'; + } + return out; +} + +void CTagsManager::OnMessage(int32_t id, int32_t dataID) +{ + switch (id) + { + case EDN_MSG__BUFFER_CHANGE_CURRENT: + m_currentSelectedID = dataID; + break; + case EDN_MSG__OPEN_CTAGS: + EDN_INFO("Request opening ctag file"); + { + GtkWidget *dialog = gtk_file_chooser_dialog_new( "Open Exuberant Ctags File", NULL, + GTK_FILE_CHOOSER_ACTION_OPEN, + GTK_STOCK_CANCEL, // button text + GTK_RESPONSE_CANCEL, // response id + GTK_STOCK_OPEN, // button text + GTK_RESPONSE_ACCEPT, // response id + NULL); // end button/response list + if (gtk_dialog_run(GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT) + { + // open the new one : + m_tagFilename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER (dialog)); + m_tagFolderBase = GetFolder(m_tagFilename); + LoadTagFile(); + } + gtk_widget_destroy(dialog); + } + break; + case EDN_MSG__RELOAD_CTAGS: + LoadTagFile(); + break; + case EDN_MSG__JUMP_TO_CURRENT_SELECTION: + JumpTo(); + break; + case EDN_MSG__JUMP_BACK: + EDN_INFO("TODO .... jump back"); + break; + + } +} + + +void CTagsManager::LoadTagFile(void) +{ + tagFileInfo info; + + // close previous tag file + if (NULL != m_ctagFile) { + tagsClose(m_ctagFile); + m_ctagFile = NULL; + } + if (m_tagFilename == "") { + return; + } + // load (open) the tag file : + EDN_INFO("try to open tag file : " << m_tagFilename.c_str()); + m_ctagFile = tagsOpen(m_tagFilename.c_str(), &info); + if (NULL != m_ctagFile) { + EDN_INFO("open exuberant Ctags file is OK ..."); + } else { + EDN_INFO("Error to open ctags file ..."); + } +} + +void CTagsManager::AddToHistory(int32_t bufferID) +{ + // check tho history position : remove if needed + if (m_historyPos < edn_max(m_historyList.Size()-1, 0) ) { + for(int32_t iii= m_historyPos; iii < m_historyList.Size(); iii++) { + delete(m_historyList[iii]); + } + m_historyList.Erase(m_historyPos, m_historyList.Size() - m_historyPos); + } + // add the current element + BufferManager *myBufferManager = BufferManager::getInstance(); + Edn::String currentFilename = myBufferManager->Get(bufferID)->GetName(); + int32_t currentLineId = 0; + Edn::File * currentFile = new Edn::File(currentFilename); + +} + + +void CTagsManager::JumpTo(void) +{ + if (NULL != m_ctagFile) { + EdnVectorBin data; + // get the middle button of the clipboard ==> represent the current selection ... + ClipBoard::Get(COPY_MIDDLE_BUTTON, data); + if (data.Size() == 0) { + EDN_INFO("No current Sélection"); + } + tagEntry entry; + data.PushBack('\0'); + EDN_INFO("try to find the tag : " << (const char *)&data[0]); + if (tagsFind (m_ctagFile, &entry, (const char *)&data[0], 0) == TagSuccess) { + //EDN_INFO("find the tag"); + BufferManager *myBufferManager = BufferManager::getInstance(); + Edn::String destinationFilename = m_tagFolderBase; + destinationFilename += entry.file; + EDN_INFO(" OPEN the TAG file Destination : " << destinationFilename.c_str() ); + if (false == myBufferManager->Exist(destinationFilename) ) { + // need to open the file : + int32_t openID = myBufferManager->Open(destinationFilename); + SendMessage(EDN_MSG__CURRENT_CHANGE_BUFFER_ID, openID); + } else { + SendMessage(EDN_MSG__CURRENT_CHANGE_BUFFER_ID, myBufferManager->GetId(destinationFilename)); + } + int32_t localId = myBufferManager->GetId(destinationFilename); + Edn::String pattern = entry.address.pattern; + EDN_DEBUG("try to find line with : \"" << pattern.c_str() << "\"" ); + if (pattern.Size() > 4) { + pattern.Remove(0,2); + pattern.Remove(pattern.Size()-1,2); + } + // TODO : remove '\' char when needed ... + EDN_DEBUG("try to find line with : \"" << pattern.c_str() << "\"" ); + int32_t destLine = myBufferManager->Get(localId)->FindLine(pattern); + SendMessage(EDN_MSG__CURRENT_GOTO_LINE, destLine); + /* + do { + PrintTag (&entry); + } while (tagsFindNext (m_ctagFile, &entry) == TagSuccess); + */ + } else { + EDN_INFO("no tag find ..."); + } + } +} + +void CTagsManager::PrintTag (const tagEntry *entry) +{ + int i; + EDN_INFO("find Tag file : name=\"" << entry->name << "\" in file=\"" << entry->file + << "\" pattern=\"" <address.pattern + << "\" at line="<address.lineNumber); + + EDN_INFO("Extention field : "); + if (entry->kind != NULL && entry->kind [0] != '\0') { + EDN_INFO(" kind : " << entry->kind); + } + if (entry->fileScope) { + EDN_INFO(" file : "); + } + for (i = 0 ; i < entry->fields.count ; ++i) { + EDN_INFO(" " << entry->fields.list[i].key << ":" << entry->fields.list[i].value ); + } +} \ No newline at end of file diff --git a/Sources/ctags/CTagsManager.h b/Sources/ctags/CTagsManager.h new file mode 100644 index 0000000..54be46e --- /dev/null +++ b/Sources/ctags/CTagsManager.h @@ -0,0 +1,62 @@ +/** + ******************************************************************************* + * @file CTagsManager.h + * @brief Editeur De N'ours : Ctags manager : acces to the ctags file (header) + * @author Edouard DUPIN + * @date 15/07/2011 + * @par Project + * Edn + * + * @par Copyright + * Copyright 2010 Edouard DUPIN, all right reserved + * + * This software is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY. + * + * Licence summary : + * You can modify and redistribute the sources code and binaries. + * You can send me the bug-fix + * You can not earn money with this Software (if the source extract from Edn + * represent less than 50% of original Sources) + * Term of the licence in in the file licence.txt. + * + ******************************************************************************* + */ + +#ifndef __C_TAGS_MANAGER_H__ +#define __C_TAGS_MANAGER_H__ + + +#include "Singleton.h" +#include "MsgBroadcast.h" +#include "readtags.h" +#include "Edn.h" + + +class CTagsManager: public Singleton, public MsgBroadcast +{ + friend class Singleton; + // specific for sigleton system... + private: + // Constructeur + CTagsManager(void); + ~CTagsManager(void); + + public: + void OnMessage(int32_t id, int32_t dataID); + private: + int32_t m_currentSelectedID; + void LoadTagFile(void); + void JumpTo(void); + void PrintTag(const tagEntry *entry); + Edn::String GetFolder(Edn::String &inputString); + Edn::String m_tagFolderBase; + Edn::String m_tagFilename; + tagFile * m_ctagFile; + // history system + void AddToHistory(int32_t bufferID); + int32_t m_historyPos; + EdnVectorBin m_historyList; +}; + +#endif diff --git a/Sources/ctags/readtags.cpp b/Sources/ctags/readtags.cpp new file mode 100644 index 0000000..86442d1 --- /dev/null +++ b/Sources/ctags/readtags.cpp @@ -0,0 +1,959 @@ +/* +* $Id: readtags.c 592 2007-07-31 03:30:41Z dhiebert $ +* +* Copyright (c) 1996-2003, Darren Hiebert +* +* This source code is released into the public domain. +* +* This module contains functions for reading tag files. +*/ + +/* +* INCLUDE FILES +*/ +#include +#include +#include +#include +#include +#include /* to declare off_t */ + +#include "readtags.h" + +/* +* MACROS +*/ +#define TAB '\t' + + +/* +* DATA DECLARATIONS +*/ +typedef struct { + size_t size; + char *buffer; +} vstring; + +/* Information about current tag file */ +struct sTagFile { + /* has the file been opened and this structure initialized? */ + short initialized; + /* format of tag file */ + short format; + /* how is the tag file sorted? */ + sortType sortMethod; + /* pointer to file structure */ + FILE* fp; + /* file position of first character of `line' */ + off_t pos; + /* size of tag file in seekable positions */ + off_t size; + /* last line read */ + vstring line; + /* name of tag in last line read */ + vstring name; + /* defines tag search state */ + struct { + /* file position of last match for tag */ + off_t pos; + /* name of tag last searched for */ + char *name; + /* length of name for partial matches */ + size_t nameLength; + /* peforming partial match */ + short partial; + /* ignoring case */ + short ignorecase; + } search; + /* miscellaneous extension fields */ + struct { + /* number of entries in `list' */ + unsigned short max; + /* list of key value pairs */ + tagExtensionField *list; + } fields; + /* buffers to be freed at close */ + struct { + /* name of program author */ + char *author; + /* name of program */ + char *name; + /* URL of distribution */ + char *url; + /* program version */ + char *version; + } program; +}; + +/* +* DATA DEFINITIONS +*/ +const char *const EmptyString = ""; +const char *const PseudoTagPrefix = "!_"; + +/* +* FUNCTION DEFINITIONS +*/ + +/* + * Compare two strings, ignoring case. + * Return 0 for match, < 0 for smaller, > 0 for bigger + * Make sure case is folded to uppercase in comparison (like for 'sort -f') + * This makes a difference when one of the chars lies between upper and lower + * ie. one of the chars [ \ ] ^ _ ` for ascii. (The '_' in particular !) + */ +static int struppercmp (const char *s1, const char *s2) +{ + int result; + do + { + result = toupper ((int) *s1) - toupper ((int) *s2); + } while (result == 0 && *s1++ != '\0' && *s2++ != '\0'); + return result; +} + +static int strnuppercmp (const char *s1, const char *s2, size_t n) +{ + int result; + do + { + result = toupper ((int) *s1) - toupper ((int) *s2); + } while (result == 0 && --n > 0 && *s1++ != '\0' && *s2++ != '\0'); + return result; +} + +static int growString (vstring *s) +{ + int result = 0; + size_t newLength; + char *newLine; + if (s->size == 0) + { + newLength = 128; + newLine = (char*) malloc (newLength); + *newLine = '\0'; + } + else + { + newLength = 2 * s->size; + newLine = (char*) realloc (s->buffer, newLength); + } + if (newLine == NULL) + perror ("string too large"); + else + { + s->buffer = newLine; + s->size = newLength; + result = 1; + } + return result; +} + +/* Copy name of tag out of tag line */ +static void copyName (tagFile *const file) +{ + size_t length; + const char *end = strchr (file->line.buffer, '\t'); + if (end == NULL) + { + end = strchr (file->line.buffer, '\n'); + if (end == NULL) + end = strchr (file->line.buffer, '\r'); + } + if (end != NULL) + length = end - file->line.buffer; + else + length = strlen (file->line.buffer); + while (length >= file->name.size) + growString (&file->name); + strncpy (file->name.buffer, file->line.buffer, length); + file->name.buffer [length] = '\0'; +} + +static int readTagLineRaw (tagFile *const file) +{ + int result = 1; + int reReadLine; + + /* If reading the line places any character other than a null or a + * newline at the last character position in the buffer (one less than + * the buffer size), then we must resize the buffer and reattempt to read + * the line. + */ + do + { + char *const pLastChar = file->line.buffer + file->line.size - 2; + char *line; + + file->pos = ftell (file->fp); + reReadLine = 0; + *pLastChar = '\0'; + line = fgets (file->line.buffer, (int) file->line.size, file->fp); + if (line == NULL) + { + /* read error */ + if (! feof (file->fp)) + perror ("readTagLine"); + result = 0; + } + else if (*pLastChar != '\0' && + *pLastChar != '\n' && *pLastChar != '\r') + { + /* buffer overflow */ + growString (&file->line); + fseek (file->fp, file->pos, SEEK_SET); + reReadLine = 1; + } + else + { + size_t i = strlen (file->line.buffer); + while (i > 0 && + (file->line.buffer [i - 1] == '\n' || file->line.buffer [i - 1] == '\r')) + { + file->line.buffer [i - 1] = '\0'; + --i; + } + } + } while (reReadLine && result); + if (result) + copyName (file); + return result; +} + +static int readTagLine (tagFile *const file) +{ + int result; + do + { + result = readTagLineRaw (file); + } while (result && *file->name.buffer == '\0'); + return result; +} + +static tagResult growFields (tagFile *const file) +{ + tagResult result = TagFailure; + unsigned short newCount = (unsigned short) 2 * file->fields.max; + tagExtensionField *newFields = (tagExtensionField*) + realloc (file->fields.list, newCount * sizeof (tagExtensionField)); + if (newFields == NULL) + perror ("too many extension fields"); + else + { + file->fields.list = newFields; + file->fields.max = newCount; + result = TagSuccess; + } + return result; +} + +static void parseExtensionFields (tagFile *const file, tagEntry *const entry, + char *const string) +{ + char *p = string; + while (p != NULL && *p != '\0') + { + while (*p == TAB) + *p++ = '\0'; + if (*p != '\0') + { + char *colon; + char *field = p; + p = strchr (p, TAB); + if (p != NULL) + *p++ = '\0'; + colon = strchr (field, ':'); + if (colon == NULL) + entry->kind = field; + else + { + const char *key = field; + const char *value = colon + 1; + *colon = '\0'; + if (strcmp (key, "kind") == 0) + entry->kind = value; + else if (strcmp (key, "file") == 0) + entry->fileScope = 1; + else if (strcmp (key, "line") == 0) + entry->address.lineNumber = atol (value); + else + { + if (entry->fields.count == file->fields.max) + growFields (file); + file->fields.list [entry->fields.count].key = key; + file->fields.list [entry->fields.count].value = value; + ++entry->fields.count; + } + } + } + } +} + +static void parseTagLine (tagFile *file, tagEntry *const entry) +{ + int i; + char *p = file->line.buffer; + char *tab = strchr (p, TAB); + + entry->fields.list = NULL; + entry->fields.count = 0; + entry->kind = NULL; + entry->fileScope = 0; + + entry->name = p; + if (tab != NULL) + { + *tab = '\0'; + p = tab + 1; + entry->file = p; + tab = strchr (p, TAB); + if (tab != NULL) + { + int fieldsPresent; + *tab = '\0'; + p = tab + 1; + if (*p == '/' || *p == '?') + { + /* parse pattern */ + int delimiter = *(unsigned char*) p; + entry->address.lineNumber = 0; + entry->address.pattern = p; + do + { + p = strchr (p + 1, delimiter); + } while (p != NULL && *(p - 1) == '\\'); + if (p == NULL) + { + /* invalid pattern */ + } + else + ++p; + } + else if (isdigit ((int) *(unsigned char*) p)) + { + /* parse line number */ + entry->address.pattern = p; + entry->address.lineNumber = atol (p); + while (isdigit ((int) *(unsigned char*) p)) + ++p; + } + else + { + /* invalid pattern */ + } + fieldsPresent = (strncmp (p, ";\"", 2) == 0); + *p = '\0'; + if (fieldsPresent) + parseExtensionFields (file, entry, p + 2); + } + } + if (entry->fields.count > 0) + entry->fields.list = file->fields.list; + for (i = entry->fields.count ; i < file->fields.max ; ++i) + { + file->fields.list [i].key = NULL; + file->fields.list [i].value = NULL; + } +} + +static char *duplicate (const char *str) +{ + char *result = NULL; + if (str != NULL) + { + result = strdup (str); + if (result == NULL) + perror (NULL); + } + return result; +} + +static void readPseudoTags (tagFile *const file, tagFileInfo *const info) +{ + fpos_t startOfLine; + const size_t prefixLength = strlen (PseudoTagPrefix); + if (info != NULL) + { + info->file.format = 1; + info->file.sort = TAG_UNSORTED; + info->program.author = NULL; + info->program.name = NULL; + info->program.url = NULL; + info->program.version = NULL; + } + while (1) + { + fgetpos (file->fp, &startOfLine); + if (! readTagLine (file)) + break; + if (strncmp (file->line.buffer, PseudoTagPrefix, prefixLength) != 0) + break; + else + { + tagEntry entry; + const char *key, *value; + parseTagLine (file, &entry); + key = entry.name + prefixLength; + value = entry.file; + if (strcmp (key, "TAG_FILE_SORTED") == 0) + file->sortMethod = (sortType) atoi (value); + else if (strcmp (key, "TAG_FILE_FORMAT") == 0) + file->format = (short) atoi (value); + else if (strcmp (key, "TAG_PROGRAM_AUTHOR") == 0) + file->program.author = duplicate (value); + else if (strcmp (key, "TAG_PROGRAM_NAME") == 0) + file->program.name = duplicate (value); + else if (strcmp (key, "TAG_PROGRAM_URL") == 0) + file->program.url = duplicate (value); + else if (strcmp (key, "TAG_PROGRAM_VERSION") == 0) + file->program.version = duplicate (value); + if (info != NULL) + { + info->file.format = file->format; + info->file.sort = file->sortMethod; + info->program.author = file->program.author; + info->program.name = file->program.name; + info->program.url = file->program.url; + info->program.version = file->program.version; + } + } + } + fsetpos (file->fp, &startOfLine); +} + +static void gotoFirstLogicalTag (tagFile *const file) +{ + fpos_t startOfLine; + const size_t prefixLength = strlen (PseudoTagPrefix); + rewind (file->fp); + while (1) + { + fgetpos (file->fp, &startOfLine); + if (! readTagLine (file)) + break; + if (strncmp (file->line.buffer, PseudoTagPrefix, prefixLength) != 0) + break; + } + fsetpos (file->fp, &startOfLine); +} + +static tagFile *initialize (const char *const filePath, tagFileInfo *const info) +{ + tagFile *result = (tagFile*) calloc ((size_t) 1, sizeof (tagFile)); + if (result != NULL) + { + growString (&result->line); + growString (&result->name); + result->fields.max = 20; + result->fields.list = (tagExtensionField*) calloc ( + result->fields.max, sizeof (tagExtensionField)); + result->fp = fopen (filePath, "r"); + if (result->fp == NULL) + { + free (result); + result = NULL; + info->status.error_number = errno; + } + else + { + fseek (result->fp, 0, SEEK_END); + result->size = ftell (result->fp); + rewind (result->fp); + readPseudoTags (result, info); + info->status.opened = 1; + result->initialized = 1; + } + } + return result; +} + +static void terminate (tagFile *const file) +{ + fclose (file->fp); + + free (file->line.buffer); + free (file->name.buffer); + free (file->fields.list); + + if (file->program.author != NULL) + free (file->program.author); + if (file->program.name != NULL) + free (file->program.name); + if (file->program.url != NULL) + free (file->program.url); + if (file->program.version != NULL) + free (file->program.version); + if (file->search.name != NULL) + free (file->search.name); + + memset (file, 0, sizeof (tagFile)); + + free (file); +} + +static tagResult readNext (tagFile *const file, tagEntry *const entry) +{ + tagResult result; + if (file == NULL || ! file->initialized) + result = TagFailure; + else if (! readTagLine (file)) + result = TagFailure; + else + { + if (entry != NULL) + parseTagLine (file, entry); + result = TagSuccess; + } + return result; +} + +static const char *readFieldValue ( + const tagEntry *const entry, const char *const key) +{ + const char *result = NULL; + int i; + if (strcmp (key, "kind") == 0) + result = entry->kind; + else if (strcmp (key, "file") == 0) + result = EmptyString; + else for (i = 0 ; i < entry->fields.count && result == NULL ; ++i) + if (strcmp (entry->fields.list [i].key, key) == 0) + result = entry->fields.list [i].value; + return result; +} + +static int readTagLineSeek (tagFile *const file, const off_t pos) +{ + int result = 0; + if (fseek (file->fp, pos, SEEK_SET) == 0) + { + result = readTagLine (file); /* read probable partial line */ + if (pos > 0 && result) + result = readTagLine (file); /* read complete line */ + } + return result; +} + +static int nameComparison (tagFile *const file) +{ + int result; + if (file->search.ignorecase) + { + if (file->search.partial) + result = strnuppercmp (file->search.name, file->name.buffer, + file->search.nameLength); + else + result = struppercmp (file->search.name, file->name.buffer); + } + else + { + if (file->search.partial) + result = strncmp (file->search.name, file->name.buffer, + file->search.nameLength); + else + result = strcmp (file->search.name, file->name.buffer); + } + return result; +} + +static void findFirstNonMatchBefore (tagFile *const file) +{ +#define JUMP_BACK 512 + int more_lines; + int comp; + off_t start = file->pos; + off_t pos = start; + do + { + if (pos < (off_t) JUMP_BACK) + pos = 0; + else + pos = pos - JUMP_BACK; + more_lines = readTagLineSeek (file, pos); + comp = nameComparison (file); + } while (more_lines && comp == 0 && pos > 0 && pos < start); +} + +static tagResult findFirstMatchBefore (tagFile *const file) +{ + tagResult result = TagFailure; + int more_lines; + off_t start = file->pos; + findFirstNonMatchBefore (file); + do + { + more_lines = readTagLine (file); + if (nameComparison (file) == 0) + result = TagSuccess; + } while (more_lines && result != TagSuccess && file->pos < start); + return result; +} + +static tagResult findBinary (tagFile *const file) +{ + tagResult result = TagFailure; + off_t lower_limit = 0; + off_t upper_limit = file->size; + off_t last_pos = 0; + off_t pos = upper_limit / 2; + while (result != TagSuccess) + { + if (! readTagLineSeek (file, pos)) + { + /* in case we fell off end of file */ + result = findFirstMatchBefore (file); + break; + } + else if (pos == last_pos) + { + /* prevent infinite loop if we backed up to beginning of file */ + break; + } + else + { + const int comp = nameComparison (file); + last_pos = pos; + if (comp < 0) + { + upper_limit = pos; + pos = lower_limit + ((upper_limit - lower_limit) / 2); + } + else if (comp > 0) + { + lower_limit = pos; + pos = lower_limit + ((upper_limit - lower_limit) / 2); + } + else if (pos == 0) + result = TagSuccess; + else + result = findFirstMatchBefore (file); + } + } + return result; +} + +static tagResult findSequential (tagFile *const file) +{ + tagResult result = TagFailure; + if (file->initialized) + { + while (result == TagFailure && readTagLine (file)) + { + if (nameComparison (file) == 0) + result = TagSuccess; + } + } + return result; +} + +static tagResult find (tagFile *const file, tagEntry *const entry, + const char *const name, const int options) +{ + tagResult result; + if (file->search.name != NULL) + free (file->search.name); + file->search.name = duplicate (name); + file->search.nameLength = strlen (name); + file->search.partial = (options & TAG_PARTIALMATCH) != 0; + file->search.ignorecase = (options & TAG_IGNORECASE) != 0; + fseek (file->fp, 0, SEEK_END); + file->size = ftell (file->fp); + rewind (file->fp); + if ((file->sortMethod == TAG_SORTED && !file->search.ignorecase) || + (file->sortMethod == TAG_FOLDSORTED && file->search.ignorecase)) + { +#ifdef DEBUG + printf ("\n"); +#endif + result = findBinary (file); + } + else + { +#ifdef DEBUG + printf ("\n"); +#endif + result = findSequential (file); + } + + if (result != TagSuccess) + file->search.pos = file->size; + else + { + file->search.pos = file->pos; + if (entry != NULL) + parseTagLine (file, entry); + } + return result; +} + +static tagResult findNext (tagFile *const file, tagEntry *const entry) +{ + tagResult result; + if ((file->sortMethod == TAG_SORTED && !file->search.ignorecase) || + (file->sortMethod == TAG_FOLDSORTED && file->search.ignorecase)) + { + result = tagsNext (file, entry); + if (result == TagSuccess && nameComparison (file) != 0) + result = TagFailure; + } + else + { + result = findSequential (file); + if (result == TagSuccess && entry != NULL) + parseTagLine (file, entry); + } + return result; +} + +/* +* EXTERNAL INTERFACE +*/ + +extern tagFile *tagsOpen (const char *const filePath, tagFileInfo *const info) +{ + return initialize (filePath, info); +} + +extern tagResult tagsSetSortType (tagFile *const file, const sortType type) +{ + tagResult result = TagFailure; + if (file != NULL && file->initialized) + { + file->sortMethod = type; + result = TagSuccess; + } + return result; +} + +extern tagResult tagsFirst (tagFile *const file, tagEntry *const entry) +{ + tagResult result = TagFailure; + if (file != NULL && file->initialized) + { + gotoFirstLogicalTag (file); + result = readNext (file, entry); + } + return result; +} + +extern tagResult tagsNext (tagFile *const file, tagEntry *const entry) +{ + tagResult result = TagFailure; + if (file != NULL && file->initialized) + result = readNext (file, entry); + return result; +} + +extern const char *tagsField (const tagEntry *const entry, const char *const key) +{ + const char *result = NULL; + if (entry != NULL) + result = readFieldValue (entry, key); + return result; +} + +extern tagResult tagsFind (tagFile *const file, tagEntry *const entry, + const char *const name, const int options) +{ + tagResult result = TagFailure; + if (file != NULL && file->initialized) + result = find (file, entry, name, options); + return result; +} + +extern tagResult tagsFindNext (tagFile *const file, tagEntry *const entry) +{ + tagResult result = TagFailure; + if (file != NULL && file->initialized) + result = findNext (file, entry); + return result; +} + +extern tagResult tagsClose (tagFile *const file) +{ + tagResult result = TagFailure; + if (file != NULL && file->initialized) + { + terminate (file); + result = TagSuccess; + } + return result; +} + +/* +* TEST FRAMEWORK +*/ + +#ifdef READTAGS_MAIN + +static const char *TagFileName = "tags"; +static const char *ProgramName; +static int extensionFields; +static int SortOverride; +static sortType SortMethod; + +static void printTag (const tagEntry *entry) +{ + int i; + int first = 1; + const char* separator = ";\""; + const char* const empty = ""; +/* "sep" returns a value only the first time it is evaluated */ +#define sep (first ? (first = 0, separator) : empty) + printf ("%s\t%s\t%s", + entry->name, entry->file, entry->address.pattern); + if (extensionFields) + { + if (entry->kind != NULL && entry->kind [0] != '\0') + printf ("%s\tkind:%s", sep, entry->kind); + if (entry->fileScope) + printf ("%s\tfile:", sep); +#if 0 + if (entry->address.lineNumber > 0) + printf ("%s\tline:%lu", sep, entry->address.lineNumber); +#endif + for (i = 0 ; i < entry->fields.count ; ++i) + printf ("%s\t%s:%s", sep, entry->fields.list [i].key, + entry->fields.list [i].value); + } + putchar ('\n'); +#undef sep +} + +static void findTag (const char *const name, const int options) +{ + tagFileInfo info; + tagEntry entry; + tagFile *const file = tagsOpen (TagFileName, &info); + if (file == NULL) + { + fprintf (stderr, "%s: cannot open tag file: %s: %s\n", + ProgramName, strerror (info.status.error_number), name); + exit (1); + } + else + { + if (SortOverride) + tagsSetSortType (file, SortMethod); + if (tagsFind (file, &entry, name, options) == TagSuccess) + { + do + { + printTag (&entry); + } while (tagsFindNext (file, &entry) == TagSuccess); + } + tagsClose (file); + } +} + +static void listTags (void) +{ + tagFileInfo info; + tagEntry entry; + tagFile *const file = tagsOpen (TagFileName, &info); + if (file == NULL) + { + fprintf (stderr, "%s: cannot open tag file: %s: %s\n", + ProgramName, strerror (info.status.error_number), TagFileName); + exit (1); + } + else + { + while (tagsNext (file, &entry) == TagSuccess) + printTag (&entry); + tagsClose (file); + } +} + +const char *const Usage = + "Find tag file entries matching specified names.\n\n" + "Usage: %s [-ilp] [-s[0|1]] [-t file] [name(s)]\n\n" + "Options:\n" + " -e Include extension fields in output.\n" + " -i Perform case-insensitive matching.\n" + " -l List all tags.\n" + " -p Perform partial matching.\n" + " -s[0|1|2] Override sort detection of tag file.\n" + " -t file Use specified tag file (default: \"tags\").\n" + "Note that options are acted upon as encountered, so order is significant.\n"; + +extern int main (int argc, char **argv) +{ + int options = 0; + int actionSupplied = 0; + int i; + ProgramName = argv [0]; + if (argc == 1) + { + fprintf (stderr, Usage, ProgramName); + exit (1); + } + for (i = 1 ; i < argc ; ++i) + { + const char *const arg = argv [i]; + if (arg [0] != '-') + { + findTag (arg, options); + actionSupplied = 1; + } + else + { + size_t j; + for (j = 1 ; arg [j] != '\0' ; ++j) + { + switch (arg [j]) + { + case 'e': extensionFields = 1; break; + case 'i': options |= TAG_IGNORECASE; break; + case 'p': options |= TAG_PARTIALMATCH; break; + case 'l': listTags (); actionSupplied = 1; break; + + case 't': + if (arg [j+1] != '\0') + { + TagFileName = arg + j + 1; + j += strlen (TagFileName); + } + else if (i + 1 < argc) + TagFileName = argv [++i]; + else + { + fprintf (stderr, Usage, ProgramName); + exit (1); + } + break; + case 's': + SortOverride = 1; + ++j; + if (arg [j] == '\0') + SortMethod = TAG_SORTED; + else if (strchr ("012", arg[j]) != NULL) + SortMethod = (sortType) (arg[j] - '0'); + else + { + fprintf (stderr, Usage, ProgramName); + exit (1); + } + break; + default: + fprintf (stderr, "%s: unknown option: %c\n", + ProgramName, arg[j]); + exit (1); + break; + } + } + } + } + if (! actionSupplied) + { + fprintf (stderr, + "%s: no action specified: specify tag name(s) or -l option\n", + ProgramName); + exit (1); + } + return 0; +} + +#endif + +/* vi:set tabstop=4 shiftwidth=4: */ diff --git a/Sources/ctags/readtags.h b/Sources/ctags/readtags.h new file mode 100644 index 0000000..724f250 --- /dev/null +++ b/Sources/ctags/readtags.h @@ -0,0 +1,252 @@ +/* +* $Id: readtags.h 443 2006-05-30 04:37:13Z darren $ +* +* Copyright (c) 1996-2003, Darren Hiebert +* +* This source code is released for the public domain. +* +* This file defines the public interface for looking up tag entries in tag +* files. +* +* The functions defined in this interface are intended to provide tag file +* support to a software tool. The tag lookups provided are sufficiently fast +* enough to permit opening a sorted tag file, searching for a matching tag, +* then closing the tag file each time a tag is looked up (search times are +* on the order of hundreths of a second, even for huge tag files). This is +* the recommended use of this library for most tool applications. Adhering +* to this approach permits a user to regenerate a tag file at will without +* the tool needing to detect and resynchronize with changes to the tag file. +* Even for an unsorted 24MB tag file, tag searches take about one second. +*/ +#ifndef READTAGS_H +#define READTAGS_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* +* MACROS +*/ + +/* Options for tagsSetSortType() */ +typedef enum { + TAG_UNSORTED, TAG_SORTED, TAG_FOLDSORTED +} sortType ; + +/* Options for tagsFind() */ +#define TAG_FULLMATCH 0x0 +#define TAG_PARTIALMATCH 0x1 + +#define TAG_OBSERVECASE 0x0 +#define TAG_IGNORECASE 0x2 + +/* +* DATA DECLARATIONS +*/ + +typedef enum { TagFailure = 0, TagSuccess = 1 } tagResult; + +struct sTagFile; + +typedef struct sTagFile tagFile; + +/* This structure contains information about the tag file. */ +typedef struct { + + struct { + /* was the tag file successfully opened? */ + int opened; + + /* errno value when 'opened' is false */ + int error_number; + } status; + + /* information about the structure of the tag file */ + struct { + /* format of tag file (1 = original, 2 = extended) */ + short format; + + /* how is the tag file sorted? */ + sortType sort; + } file; + + + /* information about the program which created this tag file */ + struct { + /* name of author of generating program (may be null) */ + const char *author; + + /* name of program (may be null) */ + const char *name; + + /* URL of distribution (may be null) */ + const char *url; + + /* program version (may be null) */ + const char *version; + } program; + +} tagFileInfo; + +/* This structure contains information about an extension field for a tag. + * These exist at the end of the tag in the form "key:value"). + */ +typedef struct { + + /* the key of the extension field */ + const char *key; + + /* the value of the extension field (may be an empty string) */ + const char *value; + +} tagExtensionField; + +/* This structure contains information about a specific tag. */ +typedef struct { + + /* name of tag */ + const char *name; + + /* path of source file containing definition of tag */ + const char *file; + + /* address for locating tag in source file */ + struct { + /* pattern for locating source line + * (may be NULL if not present) */ + const char *pattern; + + /* line number in source file of tag definition + * (may be zero if not known) */ + unsigned long lineNumber; + } address; + + /* kind of tag (may by name, character, or NULL if not known) */ + const char *kind; + + /* is tag of file-limited scope? */ + short fileScope; + + /* miscellaneous extension fields */ + struct { + /* number of entries in `list' */ + unsigned short count; + + /* list of key value pairs */ + tagExtensionField *list; + } fields; + +} tagEntry; + + +/* +* FUNCTION PROTOTYPES +*/ + +/* +* This function must be called before calling other functions in this +* library. It is passed the path to the tag file to read and a (possibly +* null) pointer to a structure which, if not null, will be populated with +* information about the tag file. If successful, the function will return a +* handle which must be supplied to other calls to read information from the +* tag file, and info.status.opened will be set to true. If unsuccessful, +* info.status.opened will be set to false and info.status.error_number will +* be set to the errno value representing the system error preventing the tag +* file from being successfully opened. +*/ +extern tagFile *tagsOpen (const char *const filePath, tagFileInfo *const info); + +/* +* This function allows the client to override the normal automatic detection +* of how a tag file is sorted. Permissible values for `type' are +* TAG_UNSORTED, TAG_SORTED, TAG_FOLDSORTED. Tag files in the new extended +* format contain a key indicating whether or not they are sorted. However, +* tag files in the original format do not contain such a key even when +* sorted, preventing this library from taking advantage of fast binary +* lookups. If the client knows that such an unmarked tag file is indeed +* sorted (or not), it can override the automatic detection. Note that +* incorrect lookup results will result if a tag file is marked as sorted when +* it actually is not. The function will return TagSuccess if called on an +* open tag file or TagFailure if not. +*/ +extern tagResult tagsSetSortType (tagFile *const file, const sortType type); + +/* +* Reads the first tag in the file, if any. It is passed the handle to an +* opened tag file and a (possibly null) pointer to a structure which, if not +* null, will be populated with information about the first tag file entry. +* The function will return TagSuccess another tag entry is found, or +* TagFailure if not (i.e. it reached end of file). +*/ +extern tagResult tagsFirst (tagFile *const file, tagEntry *const entry); + +/* +* Step to the next tag in the file, if any. It is passed the handle to an +* opened tag file and a (possibly null) pointer to a structure which, if not +* null, will be populated with information about the next tag file entry. The +* function will return TagSuccess another tag entry is found, or TagFailure +* if not (i.e. it reached end of file). It will always read the first tag in +* the file immediately after calling tagsOpen(). +*/ +extern tagResult tagsNext (tagFile *const file, tagEntry *const entry); + +/* +* Retrieve the value associated with the extension field for a specified key. +* It is passed a pointer to a structure already populated with values by a +* previous call to tagsNext(), tagsFind(), or tagsFindNext(), and a string +* containing the key of the desired extension field. If no such field of the +* specified key exists, the function will return null. +*/ +extern const char *tagsField (const tagEntry *const entry, const char *const key); + +/* +* Find the first tag matching `name'. The structure pointed to by `entry' +* will be populated with information about the tag file entry. If a tag file +* is sorted using the C locale, a binary search algorithm is used to search +* the tag file, resulting in very fast tag lookups, even in huge tag files. +* Various options controlling the matches can be combined by bit-wise or-ing +* certain values together. The available values are: +* +* TAG_PARTIALMATCH +* Tags whose leading characters match `name' will qualify. +* +* TAG_FULLMATCH +* Only tags whose full lengths match `name' will qualify. +* +* TAG_IGNORECASE +* Matching will be performed in a case-insenstive manner. Note that +* this disables binary searches of the tag file. +* +* TAG_OBSERVECASE +* Matching will be performed in a case-senstive manner. Note that +* this enables binary searches of the tag file. +* +* The function will return TagSuccess if a tag matching the name is found, or +* TagFailure if not. +*/ +extern tagResult tagsFind (tagFile *const file, tagEntry *const entry, const char *const name, const int options); + +/* +* Find the next tag matching the name and options supplied to the most recent +* call to tagsFind() for the same tag file. The structure pointed to by +* `entry' will be populated with information about the tag file entry. The +* function will return TagSuccess if another tag matching the name is found, +* or TagFailure if not. +*/ +extern tagResult tagsFindNext (tagFile *const file, tagEntry *const entry); + +/* +* Call tagsTerminate() at completion of reading the tag file, which will +* close the file and free any internal memory allocated. The function will +* return TagFailure is no file is currently open, TagSuccess otherwise. +*/ +extern tagResult tagsClose (tagFile *const file); + +#ifdef __cplusplus +}; +#endif + +#endif + +/* vi:set tabstop=4 shiftwidth=4: */ diff --git a/Sources/init.cpp b/Sources/init.cpp new file mode 100644 index 0000000..cfa1d21 --- /dev/null +++ b/Sources/init.cpp @@ -0,0 +1,141 @@ +/** + ******************************************************************************* + * @file init.cpp + * @brief Editeur De N'ours : main fonction + * @author Edouard DUPIN + * @date 26/01/2011 + * @par Project + * Edn + * + * @par Copyright + * Copyright 2010 Edouard DUPIN, all right reserved + * + * This software is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY. + * + * Licence summary : + * You can modify and redistribute the sources code and binaries. + * You can send me the bug-fix + * You can not earn money with this Software (if the source extract from Edn + * represent less than 50% of original Sources) + * Term of the licence in in the file licence.txt. + * + ******************************************************************************* + */ + +#include "tools_debug.h" +#include "tools_globals.h" +#include "Display.h" +#include "BufferManager.h" +#include "ColorizeManager.h" +#include "HighlightManager.h" +#include "ClipBoard.h" +#include +#include "WindowsManager.h" +#include "Search.h" +#include +#include "readtags.h" +#include "CTagsManager.h" + + +#include "Edn.h" + + +/** + * @brief Main start function of the system + * + * @param[in] argc number of argument when called + * @param[in] argv sus nomer arguments + * + * @return EXIT_SUCCESS, all time + * + */ +int main (int argc, char *argv[]) +{ + EDN_INFO("Start Edn"); + + //Edn::TestUntaire_String(); + //return 0; + + + // Use and remove GTK arguments from the application argument list. + gtk_init (&argc, &argv); + + // init internal global value + globals::init(); + ClipBoard::Init(); + Display::Init(); + + //MainWindows *window = MainWindows::getInstance(); + + + // init ALL Singleton : + (void)MsgBroadcastCore::getInstance(); + (void)AccelKey::getInstance(); + (void)WindowsManager::getInstance(); + (void)CTagsManager::getInstance(); + BufferManager *myBufferManager = BufferManager::getInstance(); + + // set color and other trucs... + ColorizeManager *myColorManager = NULL; + myColorManager = ColorizeManager::getInstance(); + myColorManager->LoadFile("./data/color_black.xml"); + myColorManager->DisplayListOfColor(); + + HighlightManager *myHighlightManager = NULL; + myHighlightManager = HighlightManager::getInstance(); + myHighlightManager->loadLanguages(); + + // open display + MsgBroadcastCore::getInstance()->SendMessage(NULL, EDN_MSG__GUI_SHOW_MAIN_WINDOWS); + + // get the curent program folder + char cCurrentPath[FILENAME_MAX]; + if (!getcwd(cCurrentPath, FILENAME_MAX)) { + return -1; + } + cCurrentPath[FILENAME_MAX - 1] = '\0'; + //EDN_INFO("The current working directory is " << cCurrentPath); + + + // add files + EDN_INFO("show list of files : "); + for( int32_t i=1 ; iExist(myfile) ) { + int32_t idBuffOpened = myBufferManager->Open(myfile); + if (1==i) { + MsgBroadcastCore::getInstance()->SendMessage(NULL, EDN_MSG__CURRENT_CHANGE_BUFFER_ID, idBuffOpened); + } + } + } + + EDN_INFO("Start gtk main"); + gtk_main(); + EDN_INFO("Stop gtk main"); + + //Kill all singleton + EDN_INFO("Stop BufferManager"); + BufferManager::kill(); + EDN_INFO("Stop ColorizeManager"); + ColorizeManager::kill(); + EDN_INFO("Stop Search"); + Search::kill(); + EDN_INFO("Stop Accel key"); + AccelKey::kill(); + EDN_INFO("Stop Display"); + Display::UnInit(); + + + + EDN_INFO("Stop Edn"); + return EXIT_SUCCESS; +} + diff --git a/Sources/tools/AL/AL_Mutex.cpp b/Sources/tools/AL/AL_Mutex.cpp new file mode 100644 index 0000000..d476f27 --- /dev/null +++ b/Sources/tools/AL/AL_Mutex.cpp @@ -0,0 +1,179 @@ +/** + ******************************************************************************* + * @file AL_Mutex.c + * @brief Editeur De N'ours : Abstraction Layer Mutex + * @author Edouard DUPIN + * @date 04/12/2010 + * @par Project + * Edn + * + * @par Copyright + * Copyright 2010 Edouard DUPIN, all right reserved + * + * This software is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY. + * + * Licence summary : + * You can modify and redistribute the sources code and binaries. + * You can send me the bug-fix + * You can not earn money with this Software (if the source extract from Edn + * represent less than 50% of original Sources) + * Term of the licence in in the file licence.txt. + * + ******************************************************************************* + */ + + +#include "tools_debug.h" +#include "AL_Mutex.h" +// /usr/include/pthread.h + + +/** + * @brief initialize the curent Mutex + * + * @param[in,out] pointerMutex Pointer on the mutex that might be init + * @param[in] recursive Enable the possibility that one thread can lock multiple time the same Mutex + * + * @return an standard Error Code (ERR_NONE / ERR_FAIL) + * + */ +erreurCode_te AL_mutex_init(AL_MUTEX * pointerMutex,bool recursive) +{ + int systemRet; + pthread_mutexattr_t mutexattr; + erreurCode_te myError= ERR_NONE; + EDN_CHECK_INOUT(pointerMutex); + // init mutex attributes + systemRet = pthread_mutexattr_init(&mutexattr); + if (0 == systemRet) { + if (true == recursive) { + systemRet = pthread_mutexattr_settype(&mutexattr, PTHREAD_MUTEX_RECURSIVE_NP); + EDN_ASSERT(!systemRet, "pthread_mutexattr_settype Error"); + } + else { + systemRet = pthread_mutexattr_settype(&mutexattr, PTHREAD_MUTEX_ERRORCHECK_NP); + EDN_ASSERT(!systemRet, "pthread_mutexattr_settype Error"); + } + } + if (0 == systemRet) { + systemRet = pthread_mutex_init(pointerMutex, &mutexattr); + EDN_ASSERT(!systemRet, "pthread_mutex_init Error Mutex Init"); + if (systemRet) { + myError = ERR_FAIL; + } + } + systemRet = pthread_mutexattr_destroy(&mutexattr); + EDN_ASSERT(0 == systemRet, "pthread_mutexattr_destroy Error"); + return myError; +} + + +/** + * @brief Destroy the current Mutex + * + * @param[in,out] pointerMutex Pointer on the mutex that might be init + * + * @return an standard Error Code (ERR_NONE / ERR_FAIL) + * + */ +erreurCode_te AL_mutex_destroy(AL_MUTEX * pointerMutex) +{ + int systemRet; + EDN_CHECK_INOUT(pointerMutex); + systemRet = pthread_mutex_destroy(pointerMutex); + EDN_ASSERT(!systemRet, "pthread_mutex_destroy Error Mutex Destroy"); + if (systemRet) { + return ERR_FAIL; + } + return ERR_NONE; +} + + +/** + * @brief Lock the curent Mutex. Lock call + * + * @param[in,out] pointerMutex Pointer on the mutex that might be init + * + * @return --- + * + */ +void AL_mutex_lock(AL_MUTEX * pointerMutex) +{ + int systemRet; + EDN_CHECK_INOUT(pointerMutex); + systemRet = pthread_mutex_lock(pointerMutex); + EDN_ASSERT(!systemRet, "pthread_mutex_lock Error Mutex lock"); +} + + +/** + * @brief Unlock the current Mutex + * + * @param[in,out] pointerMutex Pointer on the mutex that might be init + * + * @return --- + * + */ +void AL_mutex_unlock(AL_MUTEX * pointerMutex) +{ + int systemRet; + EDN_CHECK_INOUT(pointerMutex); + systemRet = pthread_mutex_unlock(pointerMutex); + EDN_ASSERT(!systemRet, "pthread_mutex_unlock Error Mutex unlock"); +} + + +/** + * @brief Try the lock of the curent Mutex + * + * @param[in,out] pointerMutex Pointer on the mutex that might be init + * + * @return an standard Error Code (ERR_NONE / ERR_BUSY) + * + */ +erreurCode_te AL_mutex_trylock(AL_MUTEX * pointerMutex) +{ + int systemRet; + EDN_CHECK_INOUT(pointerMutex); + systemRet = pthread_mutex_trylock(pointerMutex); + EDN_ASSERT(0==systemRet || EBUSY==systemRet, "pthread_mutex_trylock Error Mutex unlock"); + if (EBUSY==systemRet) { + return ERR_BUSY; + } + return ERR_NONE; +} + + +/** + * @brief try lock in a periode of time + * + * @param[in,out] pointerMutex Pointer on the mutex that might be init + * + * @return an standard Error Code (ERR_NONE / ERR_TIMEOUT) + * + */ +erreurCode_te AL_mutex_timedlock(AL_MUTEX * pointerMutex, int32_t delay) +{ +/* + int systemRet; + EDN_CHECK_INOUT(pointerMutex); + if (0 == delay) { + return ERR_NONE; + } + // TODO ... check is it OK... + systemRet = pthread_mutex_timedlock(pointerMutex, delay); + EDN_ASSERT(0 == systemRet || ETIMEDOUT == systemRet, "pthread_mutex_timedlock Error"); + if (ETIMEDOUT == systemRet) { + return ERR_TIMEOUT; + } +*/ + return ERR_NONE; +} + + + + + + + diff --git a/Sources/tools/AL/AL_Mutex.h b/Sources/tools/AL/AL_Mutex.h new file mode 100644 index 0000000..e6ac8a9 --- /dev/null +++ b/Sources/tools/AL/AL_Mutex.h @@ -0,0 +1,45 @@ +/** + ******************************************************************************* + * @file AL_Mutex.h + * @brief Editeur De N'ours : Abstraction Layer Mutex + * @author Edouard DUPIN + * @date 04/12/2010 + * @par Project + * Edn + * + * @par Copyright + * Copyright 2010 Edouard DUPIN, all right reserved + * + * This software is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY. + * + * Licence summary : + * You can modify and redistribute the sources code and binaries. + * You can send me the bug-fix + * You can not earn money with this Software (if the source extract from Edn + * represent less than 50% of original Sources) + * Term of the licence in in the file licence.txt. + * + ******************************************************************************* + */ + +#ifndef __AL_MUTEX_H__ +#define __AL_MUTEX_H__ + +//basic mutex with pthread system +#include +#include + + +typedef pthread_mutex_t AL_MUTEX; + +erreurCode_te AL_mutex_init(AL_MUTEX * pointerMutex,bool recursive); +erreurCode_te AL_mutex_destroy(AL_MUTEX * pointerMutex); +void AL_mutex_lock(AL_MUTEX * pointerMutex); +void AL_mutex_unlock(AL_MUTEX * pointerMutex); +erreurCode_te AL_mutex_trylock(AL_MUTEX * pointerMutex); +//erreurCode_te AL_mutex_timedlock(AL_MUTEX * pointerMutex, int32_t delay); + +#endif + + diff --git a/Sources/tools/ClipBoard/ClipBoard.cpp b/Sources/tools/ClipBoard/ClipBoard.cpp new file mode 100644 index 0000000..894d55d --- /dev/null +++ b/Sources/tools/ClipBoard/ClipBoard.cpp @@ -0,0 +1,95 @@ +/** + ******************************************************************************* + * @file ClipBoard.cpp + * @brief Editeur De N'ours : copy / past main system + * @author Edouard DUPIN + * @date 05/12/2010 + * @par Project + * Edn + * + * @par Copyright + * Copyright 2010 Edouard DUPIN, all right reserved + * + * This software is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY. + * + * Licence summary : + * You can modify and redistribute the sources code and binaries. + * You can send me the bug-fix + * You can not earn money with this Software (if the source extract from Edn + * represent less than 50% of original Sources) + * Term of the licence in in the file licence.txt. + * + ******************************************************************************* + */ + +#include "tools_globals.h" +#include "ClipBoard.h" + +#undef __class__ +#define __class__ "ClipBoard" + +/* +note: la copy dans le : + 0 : copy standard + [1..9] : copy interne + 10 : bouton du milieux +*/ +static EdnVectorBin mesCopy[TOTAL_OF_CLICKBOARD]; + + +void ClipBoard::Init(void) +{ + EDN_INFO("Initialyse ClipBoards"); + for(int32_t i=0; i &data) +{ + // check if ID is correct + if(clipboardID >= TOTAL_OF_CLICKBOARD) { + EDN_WARNING("request ClickBoard id error"); + } else if(0 == data.Size()) { + EDN_WARNING("request a copy of nothing"); + } else if (COPY_STD == clipboardID) { + GtkClipboard * clipboard = gtk_clipboard_get(GDK_SELECTION_CLIPBOARD); + gtk_clipboard_set_text(clipboard, (const gchar*)&data[0], data.Size() ); + } else if (COPY_MIDDLE_BUTTON == clipboardID) { + GtkClipboard * clipboard = gtk_clipboard_get(GDK_SELECTION_PRIMARY); + gtk_clipboard_set_text(clipboard, (const gchar*)&data[0], data.Size() ); + } + // Copy datas ... + mesCopy[clipboardID] = data; +} + + +void ClipBoard::Get(uint8_t clipboardID, EdnVectorBin &data) +{ + if(clipboardID >= TOTAL_OF_CLICKBOARD) { + EDN_WARNING("request ClickBoard id error"); + } else if (COPY_STD == clipboardID) { + GtkClipboard * clipboard = gtk_clipboard_get(GDK_SELECTION_CLIPBOARD ); + gchar *text = gtk_clipboard_wait_for_text(clipboard); + if (text != NULL) { + mesCopy[COPY_STD].Clear(); + mesCopy[COPY_STD].PushBack((int8_t*)text, strlen(text) ); + } + } else if (COPY_MIDDLE_BUTTON == clipboardID) { + GtkClipboard * clipboard = gtk_clipboard_get(GDK_SELECTION_PRIMARY ); + gchar *text = gtk_clipboard_wait_for_text(clipboard); + if (text != NULL) { + mesCopy[COPY_MIDDLE_BUTTON].Clear(); + mesCopy[COPY_MIDDLE_BUTTON].PushBack((int8_t*)text, strlen(text) ); + } + } + // Copy datas ... + data = mesCopy[clipboardID]; +} + + + + + diff --git a/Sources/tools/ClipBoard/ClipBoard.h b/Sources/tools/ClipBoard/ClipBoard.h new file mode 100644 index 0000000..3a9976d --- /dev/null +++ b/Sources/tools/ClipBoard/ClipBoard.h @@ -0,0 +1,45 @@ +/** + ******************************************************************************* + * @file ClipBoard.h + * @brief Editeur De N'ours : copy / past main system (header) + * @author Edouard DUPIN + * @date 30/12/2010 + * @par Project + * Edn + * + * @par Copyright + * Copyright 2010 Edouard DUPIN, all right reserved + * + * This software is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY. + * + * Licence summary : + * You can modify and redistribute the sources code and binaries. + * You can send me the bug-fix + * You can not earn money with this Software (if the source extract from Edn + * represent less than 50% of original Sources) + * Term of the licence in in the file licence.txt. + * + ******************************************************************************* + */ + +#ifndef __CLIP_BOARD_H__ +#define __CLIP_BOARD_H__ + + #include "tools_debug.h" + #include "EdnVectorBin.h" + + #define TOTAL_OF_CLICKBOARD (11) + #define COPY_MIDDLE_BUTTON (10) + #define COPY_STD (0) + + namespace ClipBoard + { + void Init(void); + void Set(uint8_t clipboardID, EdnVectorBin &data); + void Get(uint8_t clipboardID, EdnVectorBin &data); + } + +#endif + + diff --git a/Sources/tools/Display/Display.cpp b/Sources/tools/Display/Display.cpp new file mode 100644 index 0000000..2495ef4 --- /dev/null +++ b/Sources/tools/Display/Display.cpp @@ -0,0 +1,623 @@ +/** + ******************************************************************************* + * @file Display.cpp + * @brief Editeur De N'ours : Basic Pixbuf display function + * @author Edouard DUPIN + * @date 21/01/2010 + * @par Project + * Edn + * + * @par Copyright + * Copyright 2010 Edouard DUPIN, all right reserved + * + * This software is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY. + * + * Licence summary : + * You can modify and redistribute the sources code and binaries. + * You can send me the bug-fix + * You can not earn money with this Software (if the source extract from Edn + * represent less than 50% of original Sources) + * Term of the licence in in the file licence.txt. + * + ******************************************************************************* + */ + +#include "tools_debug.h" +#include "tools_globals.h" +#include "Display.h" +#include "ColorizeManager.h" +#include "charset.h" +#include + +#undef __class__ +#define __class__ "Display" + + +#define FONT_BOLD_NO (0) +#define FONT_BOLD_YES (1) +#define FONT_ITALIC_NO (0) +#define FONT_ITALIC_YES (1) + + +// Variables privé du namespace +#define POLICE_NAME "Monospace" + +#ifdef USE_GTK_VERSION_3_0 + #define POLICE_SIZE 15 + static int32_t m_pangoFontWidth = 9; + static int32_t m_pangoFontHeight = 19; +#elif USE_GTK_VERSION_2_0 + #define POLICE_SIZE 12 + static int32_t m_pangoFontWidth = 7; + static int32_t m_pangoFontHeight = 15; +#endif +/* + #define POLICE_SIZE 11 + static int32_t m_pangoFontWidth = 7; + static int32_t m_pangoFontHeight = 11; +static cairo_font_face_t * m_cairoFont[2][2] = {{NULL, NULL},{ NULL, NULL}}; +*/ +static cairo_font_face_t * m_cairoFont[2][2] = {{NULL, NULL},{ NULL, NULL}}; +void Display::Init(void) +{ + /* + charWidth = gdk_char_width(myFont[FONT_ITALIC_YES][FONT_BOLD_NO], 'Z'); + EDN_INFO("Font Width = %d", charWidth); + charHeignt = gdk_char_height(myFont[FONT_ITALIC_YES][FONT_BOLD_NO], 'Z'); + EDN_INFO("Font Height = %d", charHeignt); + */ + + m_cairoFont[FONT_ITALIC_NO][FONT_BOLD_NO] = cairo_toy_font_face_create(POLICE_NAME, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL); + m_cairoFont[FONT_ITALIC_YES][FONT_BOLD_NO] = cairo_toy_font_face_create(POLICE_NAME, CAIRO_FONT_SLANT_ITALIC, CAIRO_FONT_WEIGHT_NORMAL); + m_cairoFont[FONT_ITALIC_NO][FONT_BOLD_YES] = cairo_toy_font_face_create(POLICE_NAME, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD); + m_cairoFont[FONT_ITALIC_YES][FONT_BOLD_YES] = cairo_toy_font_face_create(POLICE_NAME, CAIRO_FONT_SLANT_ITALIC, CAIRO_FONT_WEIGHT_BOLD); + if ( NULL == m_cairoFont[FONT_ITALIC_NO][FONT_BOLD_NO]) { + EDN_ASSERT(FALSE, "basic font ERROR"); + } + if ( NULL == m_cairoFont[FONT_ITALIC_YES][FONT_BOLD_NO]) { + EDN_ERROR("Italic font error ... link with basic font"); + m_cairoFont[FONT_ITALIC_YES][FONT_BOLD_NO] = m_cairoFont[FONT_ITALIC_NO][FONT_BOLD_NO]; + } + if ( NULL == m_cairoFont[FONT_ITALIC_NO][FONT_BOLD_YES]) { + EDN_ERROR("Bold font error ... link with basic font"); + m_cairoFont[FONT_ITALIC_NO][FONT_BOLD_YES] = m_cairoFont[FONT_ITALIC_NO][FONT_BOLD_NO]; + } + if ( NULL == m_cairoFont[FONT_ITALIC_YES][FONT_BOLD_YES]) { + EDN_ERROR("Italic & Bold font error ... link with basic font"); + m_cairoFont[FONT_ITALIC_YES][FONT_BOLD_YES] = m_cairoFont[FONT_ITALIC_NO][FONT_BOLD_NO]; + } +} + + + + + +void Display::UnInit(void) +{ + // clean the builder... + free(m_cairoFont[FONT_ITALIC_NO][FONT_BOLD_NO]); + free(m_cairoFont[FONT_ITALIC_YES][FONT_BOLD_NO]); + free(m_cairoFont[FONT_ITALIC_NO][FONT_BOLD_YES]); + free(m_cairoFont[FONT_ITALIC_YES][FONT_BOLD_YES]); +} + + +int32_t Display::GetFontHeight(void) +{ + return m_pangoFontHeight; +} + +int32_t Display::GetFontWidth(void) +{ + return m_pangoFontWidth; +} + + + +cairo_font_face_t * Display::GetFont(bool bold, bool italic) +{ + if( false == bold + && false == italic) { + return m_cairoFont[FONT_ITALIC_NO][FONT_BOLD_NO]; + } else if( true == bold + && false == italic) { + return m_cairoFont[FONT_ITALIC_NO][FONT_BOLD_YES]; + } else if ( false == bold + && true == italic) { + return m_cairoFont[FONT_ITALIC_YES][FONT_BOLD_NO]; + } + return m_cairoFont[FONT_ITALIC_YES][FONT_BOLD_YES]; +} + + +#undef __class__ +#define __class__ "DrawerManager" + +/** + * @brief DrawerManager constructor : generate a memoryDC where we can draw everything... + * + * @param [in] window Current windows where the memoryDC must be paint + * @param [in] x Current width of the Display + * @param [in] y Current Height of the Display + * + * @note : No exeption + * + * @return --- + * + */ +DrawerManager::DrawerManager(GtkWidget * widget, int32_t x, int32_t y) +{ + + m_size.x = x; + m_size.y = y; + m_haveWork = false; + // Create the Cairo Element +# if USE_GTK_VERSION_3_0 + m_cairo = gdk_cairo_create(gtk_widget_get_window(widget)); +# elif USE_GTK_VERSION_2_0 + m_cairo = gdk_cairo_create(widget->window); +# endif + //cairo_translate(m_cairo, 0, 7); + cairo_set_source_rgb(m_cairo, 0, 0, 0); + cairo_paint(m_cairo); + cairo_set_font_size(m_cairo, POLICE_SIZE); + m_dataToDisplay[0] = '\0'; + + cairo_scale(m_cairo, 1.0, 1.0); + +} + + +/** + * @brief main DrawerManager destructor : Copy data on the curent screen + * + * @param --- + * + * @note : No exeption + * + * @return --- + * + */ +DrawerManager::~DrawerManager() +{ + cairo_destroy(m_cairo); +} + + +/** + * @brief Draw Text with the specify color + * + * This function does not display the text directly, it save it while a flush appare or the y position differ, or the color differ. + * This is for the char by char writing ==> more efficient when we write multiple char. + * + * @param [in] SelectColor Color that is used to display data + * @param [in] x Horizontal position to display data + * @param [in] y Vertical position to display data + * @param [in] myText Text to write in UTF8 ... + * @param [in] displayBG unused + * + * @return --- + * + */ +void DrawerManager::Text(Colorize *SelectColor, int32_t x, int32_t y,const char *myUTF8Text, int32_t len) +{ + EDN_CHECK_INOUT(NULL!=SelectColor); + // check if flush is needed : + if (true == m_haveWork) { + if( m_pos.y != y + || m_selectColor != SelectColor) + { + Flush(); + } + } + + // check change + if (false == m_haveWork) { + m_pos.x = x; + m_pos.y = y; + m_selectColor = SelectColor; + } + //EDN_WARNING("add data : \"" << myText << "\" x=" << x << " y=" << y ); + // process : + m_haveWork = true; + strcat(m_dataToDisplay, myUTF8Text); + if (len != -1 ) { + m_nbElement+=len; + } else { + m_nbElement+=strUtf8Len(myUTF8Text); + } +} + +void DrawerManager::Text(color_ts & SelectColorFg, color_ts & SelectColorBg, int32_t x, int32_t y,const char *myText) +{ + Flush(); + cairo_set_font_face(m_cairo, Display::GetFont(false, false)); + int32_t letterHeight = Display::GetFontHeight(); + int32_t letterWidth = Display::GetFontWidth(); + int32_t stringLen = strUtf8Len(myText); + DirectRectangle(SelectColorBg, x, y, letterWidth*strlen(myText), letterHeight); + cairo_fill(m_cairo); + cairo_move_to(m_cairo, x, y+letterHeight-4); + cairo_set_source_rgb(m_cairo, SelectColorFg.red, SelectColorFg.green, SelectColorFg.blue); + cairo_show_text(m_cairo, myText); + cairo_fill(m_cairo); +} + +void DrawerManager::Text(color_ts & SelectColorFg, int32_t x, int32_t y,const char *myText) +{ + Flush(); + cairo_set_font_face(m_cairo, Display::GetFont(false, false)); + int32_t letterHeight = Display::GetFontHeight(); + cairo_move_to(m_cairo, x, y+letterHeight-4); + cairo_set_source_rgb(m_cairo, SelectColorFg.red, SelectColorFg.green, SelectColorFg.blue); + cairo_show_text(m_cairo, myText); + cairo_fill(m_cairo); + +} + +void DrawerManager::SpaceText(color_ts & SelectColor, int32_t x, int32_t y,int32_t nbChar) +{ + Flush(); + int32_t letterHeight = Display::GetFontHeight(); + int32_t letterWidth = Display::GetFontWidth(); + DirectRectangle(SelectColor, x, y, letterWidth*nbChar, letterHeight); + cairo_fill(m_cairo); +} + + +/** + * @brief Force de display of the curent Text + * + * The flush is to be more performent with the Pango display methode... + * + * @param --- + * + * @return --- + * + */ +void DrawerManager::Flush(void) +{ + if (true == m_haveWork) { + //EDN_WARNING("flush : \"" << m_dataToDisplay << "\""); + m_haveWork = false; + + cairo_set_font_face(m_cairo, Display::GetFont(m_selectColor->GetBold(), m_selectColor->GetItalic())); + int32_t letterHeight = Display::GetFontHeight(); + if (true == m_selectColor->HaveBg() ) { + int32_t letterWidth = Display::GetFontWidth(); + int32_t stringLen = m_nbElement; + // generate Clean BG: + DirectRectangle(m_selectColor, m_pos.x, m_pos.y, letterWidth*stringLen, letterHeight); + } + cairo_move_to(m_cairo, m_pos.x, m_pos.y+letterHeight-4); + m_selectColor->ApplyFG(m_cairo); + cairo_show_text(m_cairo, m_dataToDisplay); + cairo_fill(m_cairo); + + m_dataToDisplay[0] = '\0'; + m_nbElement = 0; + } +} + + +/** + * @brief display a rectangle with the curent bgColor and no border + * + * This function in the open API to drow the rectangle, it flush the curent Text in the buffer + * + * @param [in] SelectColor Color that is used to display rectangle + * @param [in] x Horizontal position to display rectangle + * @param [in] y Vertical position to display rectangle + * @param [in] width Width of the rectangle + * @param [in] height Height of the rectangle + * + * @return --- + * + */ +void DrawerManager::Rectangle(Colorize *SelectColor, int32_t x, int32_t y, int32_t width, int32_t height) +{ + Flush(); + DirectRectangle(SelectColor, x, y, width, height); +} + + +/** + * @brief Real function to display the rectangle (no flush done (expectially for the Background display) + * + * @param [in] SelectColor Color that is used to display rectangle + * @param [in] x Horizontal position to display rectangle + * @param [in] y Vertical position to display rectangle + * @param [in] width Width of the rectangle + * @param [in] height Height of the rectangle + * + * @return --- + * + */ +void DrawerManager::DirectRectangle(Colorize *SelectColor, int32_t x, int32_t y, int32_t width, int32_t height) +{ + EDN_CHECK_INOUT(NULL!=SelectColor); + //EDN_INFO("x="<< x <<" y="<< y <<" width="<< width <<" height="<< height); + //gdk_draw_rectangle( p_pixmap, SelectColor->GetColorBG(), TRUE, x, y, width, height); + // set color + SelectColor->ApplyBG(m_cairo); + // set postion + cairo_rectangle(m_cairo, x, y, width, height); + //cairo_stroke(m_cairo); + // flush + cairo_fill(m_cairo); +} +void DrawerManager::DirectRectangle(color_ts &SelectColor, int32_t x, int32_t y, int32_t width, int32_t height) +{ + + cairo_set_source_rgb(m_cairo, SelectColor.red, SelectColor.green, SelectColor.blue); + // set postion + cairo_rectangle(m_cairo, x, y, width, height); + //cairo_stroke(m_cairo); + // flush + cairo_fill(m_cairo); +} + + +/** + * @brief Clean the curent Windows with the curent color + * + * @param [in] SelectColor Color that is used to display background + * + * @return --- + * + */ +void DrawerManager::Clean(Colorize *SelectColor) +{ + m_haveWork = false; + DirectRectangle(SelectColor, 0, 0, m_size.x, m_size.y); +} + +/** + * @brief Clean the curent Windows with the curent color + * + * @param [in] SelectColor Color that is used to display background + * + * @return --- + * + */ +void DrawerManager::Clean(color_ts & SelectColor) +{ + m_haveWork = false; + DirectRectangle(SelectColor, 0, 0, m_size.x, m_size.y); +} + +/** + * @brief Display a cursor with the cortect form. + * + * Automatic selection of the XML color "cursorColor" + * + * @param [in] x Horizontal position to display cursor + * @param [in] y Vertical position to display cursor + * + * @return --- + * + */ +#define CURSOR_WIDTH (4) +void DrawerManager::Cursor(int32_t x, int32_t y) +{ + Flush(); + // get the cursor Color : + color_ts myColor = ColorizeManager::getInstance()->Get(COLOR_CODE_CURSOR); + cairo_set_source_rgb(m_cairo, myColor.red, myColor.green, myColor.blue); + + // draw cursor + int32_t letterHeight = Display::GetFontHeight(); + int32_t letterWidth = Display::GetFontWidth(); + // depending on the inserting mode + if (false == globals::IsSetInsert()) { + cairo_set_line_width(m_cairo, 2); + cairo_move_to(m_cairo, x-CURSOR_WIDTH, y - letterHeight+1); + cairo_rel_line_to(m_cairo, CURSOR_WIDTH*2, 0); + cairo_rel_move_to(m_cairo, -CURSOR_WIDTH, 0); + cairo_rel_line_to(m_cairo, 0, letterHeight-2); + cairo_rel_move_to(m_cairo, -CURSOR_WIDTH, 0); + cairo_rel_line_to(m_cairo, CURSOR_WIDTH*2, 0); + } else { + cairo_set_line_width(m_cairo, 1); + cairo_move_to(m_cairo, x, y - letterHeight + 1); + cairo_rel_line_to(m_cairo, letterWidth, 0); + cairo_rel_line_to(m_cairo, 0, letterHeight); + cairo_rel_line_to(m_cairo, -letterWidth, 0); + cairo_rel_line_to(m_cairo, 0, -letterHeight); + } + cairo_stroke(m_cairo); + cairo_fill(m_cairo); +} + +/** + * @brief Display a end of the curent line ... + * + * Automatic draw the end of line with the curent XML color "cursorColor" + * + * @param [in] x Horizontal position to display cursor + * @param [in] y Vertical position to display cursor + * + * @return --- + * + */ +void DrawerManager::EndOfLine(int32_t x, int32_t y) +{ + if (true == globals::IsSetDisplayEndOfLine() ) { + Flush(); + // get the cursor Color : + color_ts myColor = ColorizeManager::getInstance()->Get(COLOR_CODE_CURSOR); + cairo_set_source_rgb(m_cairo, myColor.red, myColor.green, myColor.blue); + // draw cursor + int32_t letterHeight = Display::GetFontHeight(); + // depending on the inserting mode + /* + x1 x2 + y1 | |----- + | |----- + | | + y2 | | + */ + cairo_set_line_width(m_cairo, 2); + cairo_move_to(m_cairo, x, y - letterHeight+1); + cairo_rel_line_to(m_cairo, 0, letterHeight); + cairo_move_to(m_cairo, x+2, y - letterHeight+1); + cairo_rel_line_to(m_cairo, 0, letterHeight); + cairo_arc(m_cairo, x+3, y - letterHeight/4*3, 3.0, -3.149/2, 3.149/2); + cairo_stroke(m_cairo); + cairo_fill(m_cairo); + } +} + + + +/** + * @brief Display a Tabulation with the user form selection. + * + * @param [in] SelectColor Color that is used to display Tabulation + * @param [in] x Horizontal position to display cursor + * @param [in] y Vertical position to display cursor + * @param [in] mbColomn Width of the current Tabulation caracter (in number of Char) + * + * @return --- + * + */ +void DrawerManager::Tabulation(Colorize *SelectColor, int32_t x, int32_t y, int32_t mbColomn) +{ + Flush(); + int32_t letterWidth = Display::GetFontWidth(); + int32_t letterHeight = Display::GetFontHeight(); + + // generate Clean BG: + DirectRectangle(SelectColor, x, y-letterHeight, letterWidth*mbColomn, letterHeight); + + // set the pen for the display + SelectColor->ApplyFG(m_cairo); + + uint32_t yCalc = y - (letterHeight+1)/2; + + cairo_move_to(m_cairo, x + 3, yCalc); + cairo_line_to(m_cairo, x + letterWidth*mbColomn - 2 , yCalc); + cairo_rel_line_to(m_cairo, -6 , -2); + cairo_move_to(m_cairo, x + letterWidth*mbColomn - 2 , yCalc); + cairo_rel_line_to(m_cairo, -6 , +2); + + cairo_stroke(m_cairo); + cairo_fill(m_cairo); +} + + +/** + * @brief Display an unknow UTF8 character (a special rectangle) + * + * @param [in] SelectColor Color that is used to display Tabulation + * @param [in] x Horizontal position to display cursor + * @param [in] y Vertical position to display cursor + * @param [in] utf8Size number of char used by the UTF8 character + * @param [in] ValidUtf8 true if the character UTF8 is well encoded + * + * @return --- + * + */ +void DrawerManager::UTF8UnknownElement(Colorize *SelectColor, int32_t x, int32_t y, int8_t utf8Size, bool ValidUtf8) +{ + Flush(); + int32_t letterWidth = Display::GetFontWidth(); + int32_t letterHeight = Display::GetFontHeight(); + + // generate Clean BG: + DirectRectangle(SelectColor, x, y-letterHeight, letterWidth*2, letterHeight); + + SelectColor->ApplyFG(m_cairo); + + /* + y1 y2 + x1 |-------| + | | + | | + x2 |-------| + */ + uint32_t x1 = x + 2; + uint32_t x2 = x + letterWidth*2 - 2; + uint32_t y1 = y - letterHeight + 2; + uint32_t y2 = y - 2; + // Box + cairo_move_to(m_cairo, x1 , y1); + cairo_line_to(m_cairo, x2 , y1); + cairo_line_to(m_cairo, x2 , y2); + cairo_line_to(m_cairo, x1 , y2); + cairo_line_to(m_cairo, x1 , y1); + // croix in the middle + switch(utf8Size) + { + case 1: + break; + case 2: + cairo_line_to(m_cairo, x2 , y2); + break; + case 3: + cairo_move_to(m_cairo, x1 , y2); + cairo_line_to(m_cairo, x2 , y1); + break; + default: + cairo_line_to(m_cairo, x2 , y2); + cairo_move_to(m_cairo, x1 , y2); + cairo_line_to(m_cairo, x2 , y1); + break; + } + if (false == ValidUtf8) { + cairo_move_to(m_cairo, x1 , y2-2); + cairo_line_to(m_cairo, x2 , y2-2); + } + cairo_stroke(m_cairo); + cairo_fill(m_cairo); +} + + + + +/* Basic axample with cairo and pango... + cairo_t *cr; + + cr = gdk_cairo_create(widget->window); + + cairo_translate(cr, 0, 7); + + cairo_set_source_rgb(cr, 0, 0, 0); + cairo_paint(cr); + + gint pos = 18;//GTK_CPU(widget)->sel; + gint rect = pos / 5; + + cairo_set_source_rgb(cr, 0.2, 0.4, 0); + + gint i; + for ( i = 1; i <= 20; i++) { + if (i > 20 - rect) { + cairo_set_source_rgb(cr, 0.6, 1.0, 0); + } else { + cairo_set_source_rgb(cr, 0.2, 0.4, 0); + } + cairo_rectangle(cr, 8, i*4, 30, 3); + cairo_rectangle(cr, 42, i*4, 30, 3); + cairo_fill(cr); + } +//---- + PangoLayout *layout; + PangoFontDescription *desc; + + cairo_translate(cr, 10, 20); + layout = pango_cairo_create_layout(cr); + pango_layout_set_text(layout, "Hello World!", -1); + desc = pango_font_description_from_string("Sans Bold 12"); + pango_layout_set_font_description(layout, desc); + pango_font_description_free(desc); + + cairo_set_source_rgb(cr, 0.0, 0.0, 1.0); + pango_cairo_update_layout(cr, layout); + pango_cairo_show_layout(cr, layout); + + g_object_unref(layout); +//----- + cairo_destroy(cr); +*/ \ No newline at end of file diff --git a/Sources/tools/Display/Display.h b/Sources/tools/Display/Display.h new file mode 100644 index 0000000..2c5b20b --- /dev/null +++ b/Sources/tools/Display/Display.h @@ -0,0 +1,95 @@ +/** + ******************************************************************************* + * @file Display.h + * @brief Editeur De N'ours : Basic Pixbuf display function (header) + * @author Edouard DUPIN + * @date 21/01/2010 + * @par Project + * Edn + * + * @par Copyright + * Copyright 2010 Edouard DUPIN, all right reserved + * + * This software is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY. + * + * Licence summary : + * You can modify and redistribute the sources code and binaries. + * You can send me the bug-fix + * You can not earn money with this Software (if the source extract from Edn + * represent less than 50% of original Sources) + * Term of the licence in in the file licence.txt. + * + ******************************************************************************* + */ + +#ifndef __TOOLS_DISPLAY_H__ +#define __TOOLS_DISPLAY_H__ + + #include "tools_debug.h" + #include "Colorize.h" + #include "ColorizeManager.h" + #include + #include + + +/** + * Basic namespace for the font display system + */ +namespace Display +{ + void Init(void); + void UnInit(void); + cairo_font_face_t * GetFont(bool bold, bool italic); + int32_t GetFontHeight(void); + int32_t GetFontWidth(void); +}; + +#define MAX_CARACTER_CYCLE (512) +/** + * class to abstrate the writing on the curent GUI (INTEFACE to be no dependent of the one chosen) + */ +class DrawerManager; + +class DrawerManager { + public: + // Constructeur + DrawerManager(GtkWidget * widget, int32_t x, int32_t y); + ~DrawerManager(); + + void Rectangle(Colorize *SelectColor, int32_t x, int32_t y, int32_t width, int32_t height); + void Rectangle(color_ts & SelectColor, int32_t x, int32_t y, int32_t width, int32_t height) { + DirectRectangle(SelectColor, x, y, width, height); + } + void Clean(Colorize *SelectColor); + void Clean(color_ts & SelectColor); + void Text(Colorize *SelectColor, int32_t x, int32_t y,const char *myUTF8Text, int32_t len = -1); + void Text(color_ts & SelectColorFg, color_ts & SelectColorBg, int32_t x, int32_t y,const char *myText); + void Text(color_ts & SelectColorFg, int32_t x, int32_t y,const char *myText); + void SpaceText(color_ts & SelectColor, int32_t x, int32_t y,int32_t nbChar); + void Cursor(int32_t x, int32_t y); + void EndOfLine(int32_t x, int32_t y); + void Tabulation(Colorize *SelectColor, int32_t x, int32_t y, int32_t mbColomn); + void UTF8UnknownElement(Colorize *SelectColor, int32_t x, int32_t y, int8_t utf8Size, bool ValidUtf8); + void Flush(void); + int32_t GetWidth(void) { return m_size.x; }; + int32_t GetHeight(void) { return m_size.y; }; + + private: + void DirectRectangle(Colorize *SelectColor, int32_t x, int32_t y, int32_t width, int32_t height); + void DirectRectangle(color_ts & SelectColor, int32_t x, int32_t y, int32_t width, int32_t height); + + bool m_haveWork; //!< if data might be print (true) + char m_dataToDisplay[MAX_CARACTER_CYCLE]; //!< curent string to display + uint32_t m_nbElement; //!< nb element in the string + position_ts m_pos; //!< position where start the string display (X,Y) + Colorize * m_selectColor; //!< curent color to display + + position_ts m_size; //!< Total size + cairo_t * m_cairo; //!< Cairo Layout pointer + +}; + + +#endif + diff --git a/Sources/tools/EdnBuf/EdnBuf.cpp b/Sources/tools/EdnBuf/EdnBuf.cpp new file mode 100644 index 0000000..a17cdf0 --- /dev/null +++ b/Sources/tools/EdnBuf/EdnBuf.cpp @@ -0,0 +1,1097 @@ +/** + ******************************************************************************* + * @file EdnBuf.cpp + * @brief Editeur De N'ours : Buffer for internal Data (Sources) + * @author Edouard DUPIN + * @date 23/03/2011 + * @par Project + * Edn + * + * @par Copyright + * Copyright 2010 Edouard DUPIN, all right reserved + * + * This software is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY. + * + * Licence summary : + * You can modify and redistribute the sources code and binaries. + * You can send me the bug-fix + * You can not earn money with this Software (if the source extract from Edn + * represent less than 50% of original Sources) + * Term of the licence in in the file licence.txt. + * + ******************************************************************************* + */ + +#include "tools_debug.h" +#include "tools_globals.h" +#include "EdnBuf.h" + + +#undef __class__ +#define __class__ "EdnBuf" + +/** + * @brief convertion table for non printable control caracters + */ +static const char *ControlCodeTable[32] = { + "NUL", "soh", "stx", "etx", "eot", "enq", "ack", "bel", "bs", "ht", "nl", "vt", "np", "cr", "so", "si", + "dle", "dc1", "dc2", "dc3", "dc4", "nak", "syn", "etb", "can", "em", "sub", "esc", "fs", "gs", "rs", "us"}; + + + +/** + * @brief Constructor of the Edn buffer Text : + * + * Create an empty text buffer of a pre-determined size + * + * @param[in] requestedSize use this to avoid unnecessary re-allocation if you know exactly how much the buffer will need to hold + * + */ +EdnBuf::EdnBuf(void) +{ + m_tabDist = 4; + m_useTabs = true; + + // Current selection + m_selectionList[SELECTION_PRIMARY].selected = false; + m_selectionList[SELECTION_PRIMARY].zeroWidth = false; + m_selectionList[SELECTION_PRIMARY].rectangular = false; + m_selectionList[SELECTION_PRIMARY].start = m_selectionList[SELECTION_PRIMARY].end = 0; + m_selectionList[SELECTION_SECONDARY].selected = false; + m_selectionList[SELECTION_SECONDARY].zeroWidth = false; + m_selectionList[SELECTION_SECONDARY].rectangular = false; + m_selectionList[SELECTION_SECONDARY].start = m_selectionList[SELECTION_SECONDARY].end = 0; + m_selectionList[SELECTION_HIGHTLIGHT].selected = false; + m_selectionList[SELECTION_HIGHTLIGHT].zeroWidth = false; + m_selectionList[SELECTION_HIGHTLIGHT].rectangular = false; + m_selectionList[SELECTION_HIGHTLIGHT].start = m_selectionList[SELECTION_HIGHTLIGHT].end = 0; + + // charset : + m_isUtf8 = false; + m_charsetType = EDN_CHARSET_ISO_8859_15; + + m_isUndoProcessing = false; + m_isRedoProcessing = false; + + // basicly no HL system ... + m_Highlight = NULL; + m_nbLine = 1; + m_HLDataSequence = 0; +} + +/** + * @brief Destructor of the Edn buffer Text : + */ +EdnBuf::~EdnBuf(void) +{ + // TODO : Remove history and Future +} + +/** + * @brief Save in the current file open + * + * @param[in,out] myFile pointer on the file where data might be writed + * + * @return true if OK / false if an error occured + * + */ +bool EdnBuf::DumpIn(FILE *myFile) +{ + // write Data + return m_data.DumpIn(myFile); +} + + +/** + * @brief Load in the current file open + * + * @param[in,out] myFile pointer on the file where data might be read + * + * @return true if OK / false if an error occured + * + */ +bool EdnBuf::DumpFrom(FILE *myFile) +{ + if (true == m_data.DumpFrom(myFile) ) { + // set no selection + UpdateSelections(0, 0, m_data.Size() ); + // generate HighLight + CleanHighLight(); + GenerateHighLightAt(0, m_data.Size()); + CountNumberOfLines(); + return true; + } + return false; +} + + +void EdnBuf::GetAll(EdnVectorBin &text) +{ + // Clean output vector + text.Clear(); + // Set data on the vector + m_data.Get(0, m_data.Size(), text); +} + + +void EdnBuf::SetAll(EdnVectorBin &text) +{ + EdnVectorBin deletedText; + + // extract all data of the buffer : + GetAll(deletedText); + + // Remove all data in the buffer: + m_data.Clear(); + + // inset text data : + m_data.Insert(0, text); + + // Zero all of the existing selections + UpdateSelections(0, deletedText.Size(), 0); + + // Call the modification Event Manager + eventModification(0, m_data.Size(), deletedText); +} + +void EdnBuf::GetRange(int32_t start, int32_t end, EdnVectorBin &output) +{ + // Remove all data ... + output.Clear(); + // import data : + m_data.Get(start, end-start, output); + //EDN_DEBUG("request start=" << start << " end="<< end << " size="<< end-start << " result size=" << output.Size() ); +} + + +/** + * @brief Get an element at the selected position + * + * @param[in] pos Charecters Position, [0..n] + * + * @return The character at buffer position "pos" + * + */ +int8_t EdnBuf::operator[] (int32_t pos) +{ + int8_t res = m_data.Get(pos); + return res; +} + + +/** + * @brief Insert Data in the Buffer + * + * @param[in] pos Position in the Buffer + * @param[in] insertText Text to insert + * + * @return --- + * + */ +void EdnBuf::Insert(int32_t pos, EdnVectorBin &insertText) +{ + // if pos is not contiguous to existing text, make it + pos = edn_average(0, pos, m_data.Size() ); + // insert Data + insert(pos, insertText); + + // Call the redisplay ... + EdnVectorBin deletedText; + eventModification(pos, insertText.Size(), deletedText); +} + + +/** + * @brief Replace data in the buffer + * + * @param[in] start Position started in the buffer + * @param[in] end Position ended in the buffer + * @param[in] insertText Test to set in the range [start..end] + * + * @return --- + * + */ +void EdnBuf::Replace(int32_t start, int32_t end, EdnVectorBin &insertText) +{ + EdnVectorBin deletedText; + GetRange(start, end, deletedText); + m_data.Replace(start, end-start, insertText); + // update internal elements + eventModification(start, insertText.Size(), deletedText); +} + + +/** + * @brief Remove data between [start..end] + * + * @param[in] start Position started in the buffer + * @param[in] end Position ended in the buffer + * + * @return --- + * + */ +void EdnBuf::Remove(int32_t start, int32_t end) +{ + + EdnVectorBin deletedText; + // Make sure the arguments make sense + if (start > end) { + int32_t temp = start; + start = end; + end = temp; + } + start = edn_average(0 , start, m_data.Size()); + end = edn_average(0 , end, m_data.Size()); + + // Remove and redisplay + GetRange(start, end, deletedText); + m_data.Remove(start, end - start); + eventModification(start, 0, deletedText); +} + + +int32_t EdnBuf::Indent(selectionType_te select) +{ + int32_t SelectionStart, SelectionEnd, SelectionRectStart, SelectionRectEnd; + bool SelectionIsRect; + bool haveSelectionActive = GetSelectionPos(select, SelectionStart, SelectionEnd, SelectionIsRect, SelectionRectStart, SelectionRectEnd); + + if (false == haveSelectionActive) { + return SelectionEnd; + } + // Disable selection: + Unselect(select); + // Get Range : + int32_t l_start = StartOfLine(SelectionStart); + int32_t l_end = EndOfLine(SelectionEnd); + EdnVectorBin l_tmpData; + GetRange(l_start, l_end, l_tmpData); + + l_tmpData.Insert(0, '\n'); + for (int32_t i=1; i l_tmpData; + GetRange(l_start, l_end, l_tmpData); + + l_tmpData.Insert(0, '\n'); + for (int32_t i=1; i &text) +{ + GetRange( StartOfLine(pos), EndOfLine(pos), text); +} + + +/** + * @brief Find the position of the start of the current line + * + * @param[in] pos position inside the line whe we need to find the start + * + * @return position of the start of the line + * + */ +int32_t EdnBuf::StartOfLine(int32_t pos) +{ + int32_t startPos; + if (false == SearchBackward(pos, '\n', &startPos)) { + return 0; + } + return startPos + 1; +} + + +/** + * @brief Find the position of the end of the current line + * + * @param[in] pos position inside the line whe we need to find the end + * + * @return position of the end of the line + * + */ +int32_t EdnBuf::EndOfLine(int32_t pos) +{ + int32_t endPos; + if (false == SearchForward(pos, '\n', &endPos)) { + endPos = m_data.Size(); + } + return endPos; +} + + +/** + * @brief Transform the current caracter in the buffer in a displayable vector of char + * + * @param[in,out] pos position of the char that might be converted (incremented to the next char (in case of UTF8) + * @param[in] indent Curent indentation befor the curent char + * @param[out] outUTF8 string of the displayed element + * @param[out] currentChar curent unicode output char + * + * @return number of displayable char (display char width) + * + */ +int32_t EdnBuf::GetExpandedChar(int32_t &pos, int32_t indent, char outUTF8[MAX_EXP_CHAR_LEN], uint32_t ¤tChar) +{ + int32_t i, nSpaces; + char c = m_data.Get(pos); + currentChar = (uint32_t)c & 0xFF; + /* Convert tabs to spaces */ + if (c == '\t') { + nSpaces = m_tabDist - (indent % m_tabDist); + for (i=0; i"); + } + if (0 == size) { + EDN_ERROR("plop"); + } + pos+=size; + return strlen(outUTF8); + } + return 1; +} + + +/** + * @brief generate the real display of character of the output (ex : \t ==> 4 spaces or less ...) + * + * @param[in] c Char that might be converted + * @param[in] indent Curent indentation befor the curent char + * @param[out] outStr string of the displayed element + * + * @return size of the display + * + */ +int32_t EdnBuf::ExpandCharacter(char c, int32_t indent, char outUTF8[MAX_EXP_CHAR_LEN]) +{ + int32_t i, nSpaces; + + /* Convert tabs to spaces */ + if (c == '\t') { + nSpaces = m_tabDist - (indent % m_tabDist); + for (i=0; i m_data.Size() ) { + return m_data.Size(); + } + EdnVectorBuf::Iterator myPosIt = m_data.Position(startPos); + int32_t lineCount = 0; + //EDN_INFO("startPos=" << startPos << " nLines=" << nLines); + while(myPosIt) + { + if ('\n' == *myPosIt) { + lineCount++; + if (lineCount == nLines) { + //EDN_INFO(" ==> (1) at position=" << myPosIt.Position()+1 ); + return myPosIt.Position()+1; + } + } + myPosIt++; + } + //EDN_INFO(" ==> (2) at position=" << myPosIt.Position() ); + return myPosIt.Position(); +} + + +/** + * @brief Find the first character of the line "nLines" backwards + * + * @param[in,out] startPos Start position to count (this caracter is not counted) + * @param[in,out] nLines number of line to count (if ==0 means find the beginning of the line) + * + * @return position of the starting the line + * + */ +int32_t EdnBuf::CountBackwardNLines(int32_t startPos, int32_t nLines) +{ + if (startPos <= 0) { + return 0; + } else if (startPos > m_data.Size() ) { + startPos = m_data.Size(); + } + //EDN_INFO("startPos=" << startPos << " nLines=" << nLines); + + EdnVectorBuf::Iterator myPosIt = m_data.Position(startPos-1); + int32_t lineCount = -1; + + while(myPosIt) { + if ('\n' == *myPosIt) { + lineCount++; + if (lineCount >= nLines) { + //EDN_INFO(" ==> (1) at position=" << myPosIt.Position()+1 ); + return myPosIt.Position()+1; + } + } + myPosIt--; + } + //EDN_INFO(" ==> (2) at position=0"); + return 0; +} + + +bool EdnBuf::charMatch(char first, char second, bool caseSensitive) +{ + if (false == caseSensitive) { + if ('A' <= first && 'Z' >= first) { + first = first - 'A' + 'a'; + } + if ('A' <= second && 'Z' >= second) { + second = second - 'A' + 'a'; + } + } + if(first == second) { + //EDN_DEBUG("charMatch(" << first << ", " << second << ", " << caseSensitive << ") ==> true"); + return true; + } else { + //EDN_DEBUG("charMatch(" << first << ", " << second << ", " << caseSensitive << ") ==> false"); + return false; + } +} + +/** + * @brief Search forwards in buffer + * + * @param[in] startPos Position to start the search + * @param[in] searchVect String to search + * @param[out] foundPos Current position founded + * + * @return true ==> found data + * @return false ==> not found data + * + */ +bool EdnBuf::SearchForward(int32_t startPos, EdnVectorBin &searchVect, int32_t *foundPos, bool caseSensitive) +{ + int32_t position; + int32_t searchLen = searchVect.Size(); + int32_t dataLen = m_data.Size(); + char currentChar = '\0'; + //EDN_INFO(" startPos=" << startPos << " searchLen=" << searchLen); + for (position=startPos; position found data + * @return false ==> not found data + * + */ +bool EdnBuf::SearchBackward(int32_t startPos, EdnVectorBin &searchVect, int32_t *foundPos, bool caseSensitive) +{ + int32_t position; + int32_t searchLen = searchVect.Size(); + char currentChar = '\0'; + //EDN_INFO(" startPos=" << startPos << " searchLen=" << searchLen); + for (position=startPos; position>=searchLen-1; position--) { + currentChar = m_data[position]; + if (true == charMatch(currentChar, searchVect[searchLen-1], caseSensitive)) { + int32_t i; + bool found = true; + for (i=searchLen-1; i>=0; i--) { + currentChar = m_data[position - (searchLen-1) + i]; + if (false == charMatch(currentChar, searchVect[i], caseSensitive)) { + found = false; + break; + } + } + if (true == found) { + *foundPos = position - (searchLen-1); + return true; + } + } + } + *foundPos = m_data.Size(); + return false; +} + +static bool isChar(char value) +{ + if( ('a' <= value && 'z' >= value) + || ('A' <= value && 'Z' >= value) + || ('0' <= value && '9' >= value) + || '_' == value + || '~' == value) + { + //EDN_DEBUG(" is a char \"" << value << "\""); + return true; + } + //EDN_DEBUG(" is NOT a char \"" << value << "\""); + return false; +} + + +bool EdnBuf::SelectAround(int32_t startPos, int32_t &beginPos, int32_t &endPos) +{ + char currentChar = m_data[startPos]; + if( '\t' == currentChar + || ' ' == currentChar) + { + EDN_DEBUG("select spacer"); + // special case we are looking for separation + for (beginPos=startPos; beginPos>=0; beginPos--) { + currentChar = m_data[beginPos]; + if( '\t' != currentChar + && ' ' != currentChar) + { + beginPos++; + break; + } + } + // special case we are looking for separation + for (endPos=startPos; endPos=0; beginPos--) { + currentChar = m_data[beginPos]; + if( false == isChar(currentChar)) { + beginPos++; + break; + } + } + // Search forward + for (endPos=startPos; endPos=0; beginPos--) { + currentChar = m_data[beginPos]; + if(comparechar != currentChar) + { + beginPos++; + break; + } + } + // Search forward + for (endPos=startPos; endPos &insertText) +{ + // Insert data in buffer + m_data.Insert(pos, insertText); + // update the current selected area + UpdateSelections(pos, 0, insertText.Size() ); + // return the number of element inserted ... + return insertText.Size(); +} + + +/** + * @brief when modification appeare in the buffer we save it in the undo vector... + * + * @param[in] pos position of the add or remove + * @param[in] nInserted nb element inserted + * @param[in] deletedText Deleted elevent in a vector + * + * @return --- + * + */ +void EdnBuf::eventModification(int32_t pos, int32_t nInserted, EdnVectorBin &deletedText) +{ + if( 0 == deletedText.Size() + && 0 == nInserted) + { + // we do nothing ... + //EDN_INFO("EdnBuf::eventModification(pos="< not efficent methode ... + // ==> better methode : just update the number of line added and removed ... + //EDN_INFO(" add=" << CountLines(pos, pos+nInserted) << " lines | remove="<< CountLines(deletedText) << " lines"); + m_nbLine += CountLines(pos, pos+nInserted) - CountLines(deletedText); + // Update histories + if (false == m_isUndoProcessing) { + // normal or Redo processing + EdnBufHistory *exempleHistory = new EdnBufHistory(pos, nInserted, deletedText); + m_historyUndo.PushBack(exempleHistory); + if (false == m_isRedoProcessing) { + // remove all element in the redo system ... + int32_t i; + for (i=m_historyRedo.Size()-1; i>=0; i--) { + if (NULL != m_historyRedo[i]) { + delete(m_historyRedo[i]); + } + m_historyRedo.PopBack(); + } + } + } else { + // undo processing ==> add element in Redo vector ... + EdnBufHistory *exempleHistory = new EdnBufHistory(pos, nInserted, deletedText); + m_historyRedo.PushBack(exempleHistory); + } + // Regenerate the Highlight : + RegenerateHighLightAt(pos, deletedText.Size(), nInserted); + } +} + + + + + +/** + * @brief Search a character in the current buffer + * + * @param[in] startPos Position to start the search of the element + * @param[in] searchChar Character to search + * @param[out] foundPos Position where it was found + * + * @return true when find element + * + */ +bool EdnBuf::SearchForward(int32_t startPos, char searchChar, int32_t *foundPos) +{ + // Create iterator + EdnVectorBuf::Iterator myPosIt = m_data.Position(startPos); + // move in the string + while (myPosIt) { + if (*myPosIt == searchChar) { + *foundPos = myPosIt.Position(); + return true; + } + myPosIt++; + } + *foundPos = m_data.Size(); + return false; +} + + +/** + * @brief Search a character in the current buffer (backward + * + * @param[in] startPos Position to start the search of the element + * @param[in] searchChar Character to search + * @param[out] foundPos Position where it was found + * + * @return true when find element + * + */ +bool EdnBuf::SearchBackward(int32_t startPos, char searchChar, int32_t *foundPos) +{ + // Create iterator + EdnVectorBuf::Iterator myPosIt = m_data.Position(startPos-1); + // move in the string + while (myPosIt) { + if (*myPosIt == searchChar) { + *foundPos = myPosIt.Position(); + return true; + } + myPosIt--; + } + *foundPos = 0; + return false; +} + + diff --git a/Sources/tools/EdnBuf/EdnBuf.h b/Sources/tools/EdnBuf/EdnBuf.h new file mode 100644 index 0000000..18497c1 --- /dev/null +++ b/Sources/tools/EdnBuf/EdnBuf.h @@ -0,0 +1,212 @@ +/** + ******************************************************************************* + * @file EdnBuf.h + * @brief Editeur De N'ours : Buffer for internal Data (header) + * @author Edouard DUPIN + * @date 23/03/2011 + * @par Project + * Edn + * + * @par Copyright + * Copyright 2010 Edouard DUPIN, all right reserved + * + * This software is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY. + * + * Licence summary : + * You can modify and redistribute the sources code and binaries. + * You can send me the bug-fix + * You can not earn money with this Software (if the source extract from Edn + * represent less than 50% of original Sources) + * Term of the licence in in the file licence.txt. + * + ******************************************************************************* + */ +#ifndef __EDN_BUF_H__ +#define __EDN_BUF_H__ + +/* Maximum length in characters of a tab or control character expansion + of a single buffer character */ +#define MAX_EXP_CHAR_LEN 20*4 + +class EdnBuf; + +#include "EdnVectorBuf.h" +#include "EdnBufHistory.h" +#include "HighlightManager.h" +#include "charset.h" + +/* + + rectStart rectStart +start ************* ************* + ********** * xxxx*xxxxxx * + * ******** xxxx*xxxxxxxxxxx*xxxxx +end *************** ************* + rectEnd rectEnd + + + +*/ +typedef struct { + bool selected; //!< True if the selection is active + bool rectangular; //!< True if the selection is rectangular + bool zeroWidth; //!< Width 0 selections aren't "real" selections, but they can be useful when creating rectangular selections from the keyboard. + int32_t start; //!< Pos. of start of selection, or if rectangular start of line containing it. + int32_t end; //!< Pos. of end of selection, or if rectangular end of line containing it. + int32_t rectStart; //!< Indent of left edge of rect. selection + int32_t rectEnd; //!< Indent of right edge of rect. selection +} selection; + +typedef enum{ + SELECTION_PRIMARY, + SELECTION_SECONDARY, + SELECTION_HIGHTLIGHT, + SELECTION_SIZE +}selectionType_te; + + +typedef struct { + std::vector HLData; + int32_t idSequence; + int32_t posHLPass1; + int32_t posHLPass2; +}displayHLData_ts; + + + +class EdnBuf { + public: + // constructer + EdnBuf(void); + // destructer + ~EdnBuf(void); + // public function : + void GetAll( EdnVectorBin &text); + void SetAll( EdnVectorBin &text); + void GetRange( int32_t start, int32_t end, EdnVectorBin &output); + bool DumpIn( FILE *myFile); + bool DumpFrom( FILE *myFile); + // replace with operator [] ... + int8_t operator[] (int32_t); + void Insert( int32_t pos, EdnVectorBin &insertText); + void Replace( int32_t start, int32_t end, EdnVectorBin &insertText); + void Remove( int32_t start, int32_t end); + int32_t Indent( selectionType_te select); + int32_t UnIndent( selectionType_te select); + + + void GetLineText( int32_t pos, EdnVectorBin &text); + int32_t StartOfLine( int32_t pos); + int32_t EndOfLine( int32_t pos); + + int32_t GetExpandedChar( int32_t &pos, int32_t indent, char outUTF8[MAX_EXP_CHAR_LEN], uint32_t ¤tChar); + int32_t ExpandCharacter( char c, int32_t indent, char outUTF8[MAX_EXP_CHAR_LEN]); // TODO : rework this + int32_t CharWidth( char c, int32_t indent); // TODO : rework this + int32_t CountDispChars( int32_t lineStartPos, int32_t targetPos); + 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( EdnVectorBin &data); + int32_t CountForwardNLines( int32_t startPos, int32_t nLines); + int32_t CountBackwardNLines( int32_t startPos, int32_t nLines); + + bool SearchForward( int32_t startPos, EdnVectorBin &searchVect, int32_t *foundPos, bool caseSensitive = true); + bool SearchBackward( int32_t startPos, EdnVectorBin &searchVect, int32_t *foundPos, bool caseSensitive = true); + bool SearchForward( int32_t startPos, char searchChar, int32_t *foundPos); + bool SearchBackward( int32_t startPos, char searchChar, int32_t *foundPos); + bool SelectAround( int32_t startPos, int32_t &beginPos, int32_t &endPos); + + // Buffer Size system : + int32_t Size(void) { return m_data.Size(); }; + int32_t NumberOfLines(void) {return m_nbLine;}; + + // ----------------------------------------- + // selection remember... + // ----------------------------------------- + public: + bool SelectHasSelection( selectionType_te select); + void Select( selectionType_te select, int32_t start, int32_t end); + void Unselect( selectionType_te select); + void RectSelect( selectionType_te select, int32_t start, int32_t end, int32_t rectStart, int32_t rectEnd); + bool GetSelectionPos( selectionType_te select, int32_t &start, int32_t &end, bool &isRect, int32_t &rectStart, int32_t &rectEnd); + void GetSelectionText( selectionType_te select, EdnVectorBin &text); + void RemoveSelected( selectionType_te select); + void ReplaceSelected( selectionType_te select, EdnVectorBin &text); + private: + // current selection of the buffer + selection m_selectionList[SELECTION_SIZE]; //!< Selection area of the buffer + void UpdateSelection( selectionType_te select, int32_t pos, int32_t nDeleted, int32_t nInserted); + void UpdateSelections( int32_t pos, int32_t nDeleted, int32_t nInserted); + + // ----------------------------------------- + // History section : + // ----------------------------------------- + public: + int32_t Undo( void); + int32_t Redo( void); + private: + bool m_isUndoProcessing; + bool m_isRedoProcessing; + EdnVectorBin m_historyUndo; + EdnVectorBin m_historyRedo; + + // ----------------------------------------- + // hightlight section : + // ----------------------------------------- + private: + Highlight * m_Highlight; //!< internal link with the Highlight system + std::vector 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 + 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); + void FindMainHighLightPosition(int32_t startPos, int32_t endPos, int32_t &startId, int32_t &stopId, bool backPreviousNotEnded); + public: + void SetHLSystem( Highlight * newHLSystem); + void HightlightGenerateLines(displayHLData_ts & MData, int32_t startPos, int32_t nbLines); + colorInformation_ts * GetElementColorAtPosition(displayHLData_ts & MData, int32_t pos); + private: + colorInformation_ts * GetElementColorAtPosition(int32_t pos, int32_t &starPos); + + private: + EdnVectorBuf m_data; //!< buffer of the data in the mode int8_t + void CountNumberOfLines(void); + int32_t m_nbLine; //!< Number of line in the biffer + + // ----------------------------------------- + // Display property and charset ... + // ----------------------------------------- + public: + int32_t GetTabDistance(void) { return m_tabDist; } ; + void SetTabDistance(int32_t tabDist) { m_tabDist = tabDist; }; + charset_te GetCharsetType(void) { return m_charsetType; }; + void SetCharsetType(charset_te newOne) { m_charsetType = newOne; if (EDN_CHARSET_UTF8==newOne){m_isUtf8=true;} else {m_isUtf8=false;} }; + bool GetUTF8Mode(void) { return m_isUtf8; }; + void SetUTF8Mode(bool newOne) { m_isUtf8 = newOne; m_charsetType=EDN_CHARSET_UTF8; }; + private: + // Special mode of the buffer : + bool m_isUtf8; //!< true if we are in UTF8 mode ==> if true the size of a char is 0, otherwise .. 1->4 ( TODO : not now) + charset_te m_charsetType; //!< if UTF8 mode is at false : the charset type of the buffer + // Local Tabulation policies + int32_t m_tabDist; //!< equiv. number of characters in a tab + bool m_useTabs; //!< True if buffer routines are allowed to use tabs for padding in rectangular operations + + // ----------------------------------------- + // Local function : + // ----------------------------------------- + private: + void findRectSelBoundariesForCopy( int32_t lineStartPos, int32_t rectStart, int32_t rectEnd, int32_t *selStart, int32_t *selEnd); + char *getSelectionText( selection &sel); + void removeSelected( selection &sel); + void replaceSelected( selection &sel, const char *text); + + void eventModification( int32_t pos, int32_t nInserted, EdnVectorBin &deletedText); + + + int32_t insert( int32_t pos, EdnVectorBin &insertText); + + bool charMatch( char first, char second, bool caseSensitive = true); +}; + +#endif diff --git a/Sources/tools/EdnBuf/EdnBufHistory.cpp b/Sources/tools/EdnBuf/EdnBufHistory.cpp new file mode 100644 index 0000000..36bf6cd --- /dev/null +++ b/Sources/tools/EdnBuf/EdnBufHistory.cpp @@ -0,0 +1,82 @@ +/** + ******************************************************************************* + * @file EdnBufHistory.cpp + * @brief Editeur De N'ours : history of buffer modification (sources) + * @author Edouard DUPIN + * @date 24/03/2011 + * @par Project + * Edn + * + * @par Copyright + * Copyright 2010 Edouard DUPIN, all right reserved + * + * This software is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY. + * + * Licence summary : + * You can modify and redistribute the sources code and binaries. + * You can send me the bug-fix + * You can not earn money with this Software (if the source extract from Edn + * represent less than 50% of original Sources) + * Term of the licence in in the file licence.txt. + * + ******************************************************************************* + */ + + +#include "tools_debug.h" +#include "tools_globals.h" +#include "EdnBufHistory.h" + + +#undef __class__ +#define __class__ "EdnBufHistory" + +EdnBufHistory::EdnBufHistory(void) +{ + //EDN_INFO("EdnBufHistory new"); + m_pos = 0; + m_nInserted = 0; +} + +EdnBufHistory::EdnBufHistory(int32_t pos, int32_t nInserted, EdnVectorBin &deletedText) +{ + //EDN_INFO("EdnBufHistory new + data"); + m_pos = pos; + m_nInserted = nInserted; + m_deletedText = deletedText; +} + +void EdnBufHistory::Set(int32_t pos, int32_t nInserted, EdnVectorBin &deletedText) +{ + //EDN_INFO("EdnBufHistory new + data"); + m_pos = pos; + m_nInserted = nInserted; + m_deletedText = deletedText; +} + +EdnBufHistory::~EdnBufHistory(void) +{ + // nothing to do ... +} + +int32_t EdnBufHistory::getPos(void) +{ + return m_pos; +} + +int32_t EdnBufHistory::getnbDeleted(void) +{ + return m_deletedText.Size(); +} + +int32_t EdnBufHistory::getnbInserted(void) +{ + return m_nInserted; +} + +void EdnBufHistory::getData(EdnVectorBin &deletedText) +{ + deletedText = m_deletedText; +} + diff --git a/Sources/tools/EdnBuf/EdnBufHistory.h b/Sources/tools/EdnBuf/EdnBufHistory.h new file mode 100644 index 0000000..8ef16b4 --- /dev/null +++ b/Sources/tools/EdnBuf/EdnBufHistory.h @@ -0,0 +1,49 @@ +/** + ******************************************************************************* + * @file EdnBufHistory.h + * @brief Editeur De N'ours : history of buffer modification (header) + * @author Edouard DUPIN + * @date 24/03/2011 + * @par Project + * Edn + * + * @par Copyright + * Copyright 2010 Edouard DUPIN, all right reserved + * + * This software is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY. + * + * Licence summary : + * You can modify and redistribute the sources code and binaries. + * You can send me the bug-fix + * You can not earn money with this Software (if the source extract from Edn + * represent less than 50% of original Sources) + * Term of the licence in in the file licence.txt. + * + ******************************************************************************* + */ + +#ifndef __EDN_BUFFER_HISTORY_H__ +#define __EDN_BUFFER_HISTORY_H__ + + +#include "EdnVectorBin.h" + +class EdnBufHistory{ + public: + EdnBufHistory(void); + EdnBufHistory(int32_t pos, int32_t nInserted, EdnVectorBin &deletedText); + ~EdnBufHistory(void); + void Set(int32_t pos, int32_t nInserted, EdnVectorBin &deletedText); + int32_t getPos(void); + int32_t getnbDeleted(void); + int32_t getnbInserted(void); + void getData(EdnVectorBin &deletedText); + private: + int32_t m_pos; + int32_t m_nInserted; + EdnVectorBin m_deletedText; +}; + +#endif + diff --git a/Sources/tools/EdnBuf/EdnBuf_HighLight.cpp b/Sources/tools/EdnBuf/EdnBuf_HighLight.cpp new file mode 100644 index 0000000..e3fc91f --- /dev/null +++ b/Sources/tools/EdnBuf/EdnBuf_HighLight.cpp @@ -0,0 +1,348 @@ +/** + ******************************************************************************* + * @file EdnBuf_HighLight.cpp + * @brief Editeur De N'ours : Buffer for internal Data - section highlight (Sources) + * @author Edouard DUPIN + * @date 23/03/2011 + * @par Project + * Edn + * + * @par Copyright + * Copyright 2010 Edouard DUPIN, all right reserved + * + * This software is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY. + * + * Licence summary : + * You can modify and redistribute the sources code and binaries. + * You can send me the bug-fix + * You can not earn money with this Software (if the source extract from Edn + * represent less than 50% of original Sources) + * Term of the licence in in the file licence.txt. + * + ******************************************************************************* + */ + +#include "tools_debug.h" +#include "tools_globals.h" +#include "EdnBuf.h" + + +#undef __class__ +#define __class__ "EdnBuf{HighLight}" + +void EdnBuf::SetHLSystem(Highlight * newHLSystem) +{ + if (m_Highlight != newHLSystem) { + m_Highlight = newHLSystem; + m_HLDataPass1.clear(); + RegenerateHighLightAt(0, 0, m_data.Size()); + } +} + + +void EdnBuf::RegenerateHighLightAt(int32_t pos, int32_t nbDeleted, int32_t nbAdded) +{ + GTimeVal timeStart; + g_get_current_time(&timeStart); + + // remove display HL... + m_HLDataSequence++; + + // prevent ERROR... + if (NULL == m_Highlight) { + return; + } + // prevent No data Call + if( 0 == nbDeleted + && 0 == nbAdded) + { + return; + } + // normal case + EDN_INFO("(pos="<GetName(); + } + //EDN_DEBUG("HighLight element id=" << i << " S=" << m_HLDataPass1[i].beginStart << " E=" << m_HLDataPass1[i].endStop << " patern name=" << ploppp.c_str() ); + } + GTimeVal timeStop; + g_get_current_time(&timeStop); + EDN_DEBUG("HL General = " << timeStop.tv_usec - timeStart.tv_usec << " micro-s"); +} + +void EdnBuf::FindMainHighLightPosition(int32_t startPos, int32_t endPos, int32_t &startId, int32_t &stopId, bool backPreviousNotEnded) +{ + startId = -1; + stopId = -1; + /* rules to start stop: + HighLight data ---- + Remove area **** + Start pos S + End pos E + + Some Case : + ----------- ------------ ------------- ---------- + S **** E + + ----------- ------------ ------------- ---------- + S ********** E + + ----------- ------------ ------------- ---------- + S **** E + + ----------- ------------ ------------- ---------- + S ********* E + + ----------- ------------ ------------- ---------- + S ********************* E + + ----------- ------------ ------------- ---------- + S ************************ E + + ----------- ------------ ------------- ---------- + S ***************** E + + ----------- ------------ ------------- ---------- + S *************** E + + ----------- ------------ + S *************** E=-1 + + ------------ ------------- ---------- + S=-1 *************** E + */ + int32_t i; + for (i=0; i< (int32_t)m_HLDataPass1.size(); i++) { + if (m_HLDataPass1[i].endStop > startPos) { + break; + } + startId = i; + } + // go back while the previous element is not eneded + if (true == backPreviousNotEnded) { + for (i=startId; i>=0; i--) { + if (m_HLDataPass1[i].notEnded == false) { + break; + } + startId = i-1; + } + } + int32_t elemStart; + if(-1 == startId) { + elemStart = 0; + } else { + elemStart = startId+1; + } + for (i=elemStart; i< (int32_t)m_HLDataPass1.size(); i++) { + if (m_HLDataPass1[i].beginStart > endPos) + { + stopId = i; + break; + } + } + /* + if (-1 != startId && startId < (int32_t)m_HLDataPass1.size()) { + EDN_DEBUG("==> BEGIN : start="< BEGIN : start=???, stop=??? id=" << startId); + } + if (-1 != stopId && stopId < (int32_t)m_HLDataPass1.size()) { + EDN_DEBUG("==> END : start="< END : start=???, stop=??? id=" << stopId); + } + */ +} + + + + +void EdnBuf::GenerateHighLightAt(int32_t pos, int32_t endPos, int32_t addinPos) +{ + if (NULL == m_Highlight) { + return; + } + //EDN_DEBUG("area : ("<Parse(pos, endPos, m_HLDataPass1, addinPos, m_data); +} + + + +void EdnBuf::CleanHighLight(void) +{ + // Remove all element in the list... + m_HLDataPass1.clear(); +} + + +colorInformation_ts *EdnBuf::GetElementColorAtPosition(int32_t pos, int32_t &starPos) +{ + int32_t i; + int32_t start = edn_max(0, starPos-1); + for (i=start; i<(int32_t)m_HLDataPass1.size(); i++) { + starPos = i; + if( m_HLDataPass1[i].beginStart <= pos + && m_HLDataPass1[i].endStop > pos) + { + return &m_HLDataPass1[i]; + } + if(m_HLDataPass1[i].beginStart > pos) { + return NULL; + } + } + return NULL; +} + + + +void EdnBuf::HightlightGenerateLines(displayHLData_ts & MData, int32_t HLStart, int32_t nbLines) +{ + MData.posHLPass1 = 0; + MData.posHLPass2 = 0; + if (NULL == m_Highlight) { + return; + } + if (MData.idSequence != m_HLDataSequence) { + GTimeVal timeStart; + g_get_current_time(&timeStart); + MData.idSequence = m_HLDataSequence; + HLStart = StartOfLine(HLStart); + MData.HLData.clear(); + int32_t HLStop = CountForwardNLines(HLStart, nbLines); + int32_t startId, stopId; + // find element previous + FindMainHighLightPosition(HLStart, HLStop, startId, stopId, true); + + int32_t k; + //EDN_DEBUG("List of section between : "<< startId << " & " << stopId); + int32_t endSearch = stopId+1; + if (-1 == stopId) { + endSearch = m_HLDataPass1.size(); + } + for (k=edn_max(startId, 0); k (empty section 1 ) k="< (empty section 2 ) k="< (under section ) k="< (empty section 3 ) k="< (empty section 4 ) k="< pos) + { + return &MData.HLData[i]; + } + if(MData.HLData[i].beginStart > pos) { + return GetElementColorAtPosition(pos, MData.posHLPass1); + } + } + return GetElementColorAtPosition(pos, MData.posHLPass1); +} \ No newline at end of file diff --git a/Sources/tools/EdnBuf/EdnBuf_History.cpp b/Sources/tools/EdnBuf/EdnBuf_History.cpp new file mode 100644 index 0000000..5614ef4 --- /dev/null +++ b/Sources/tools/EdnBuf/EdnBuf_History.cpp @@ -0,0 +1,133 @@ +/** + ******************************************************************************* + * @file EdnBuf_History.cpp + * @brief Editeur De N'ours : Buffer for internal Data - section history (Sources) + * @author Edouard DUPIN + * @date 23/03/2011 + * @par Project + * Edn + * + * @par Copyright + * Copyright 2010 Edouard DUPIN, all right reserved + * + * This software is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY. + * + * Licence summary : + * You can modify and redistribute the sources code and binaries. + * You can send me the bug-fix + * You can not earn money with this Software (if the source extract from Edn + * represent less than 50% of original Sources) + * Term of the licence in in the file licence.txt. + * + ******************************************************************************* + */ + +#include "tools_debug.h" +#include "tools_globals.h" +#include "EdnBuf.h" + + +#undef __class__ +#define __class__ "EdnBuf{History}" + + + + +int32_t EdnBuf::Undo(void) +{ + int32_t nbElement = m_historyUndo.Size(); + //EDN_DEBUG("EdnBuf::Undo Request id="< remove it"); + m_historyUndo.PopBack(); + return -1; + } + int32_t pos = m_historyUndo[nbElement]->getPos(); + int32_t nbDeleted = m_historyUndo[nbElement]->getnbDeleted(); + int32_t nbInserted = m_historyUndo[nbElement]->getnbInserted(); + EdnVectorBin deletedText; + m_historyUndo[nbElement]->getData(deletedText); + m_isUndoProcessing = true; + if (0 == nbInserted) { + // just add data at position ... + if (0 == nbDeleted) { + EDN_ERROR("EdnBuf::Undo nothing to do in UNDO"); + } else { + Insert(pos, deletedText); + posDest = pos + nbDeleted; + } + } else { + if (0 == nbDeleted) { + // only remove data + Remove(pos, pos+nbInserted); + posDest = pos; + } else { + // replace data + Replace(pos, pos+nbInserted, deletedText); + posDest = pos + nbDeleted; + } + } + // remove element in the list : + delete(m_historyUndo[nbElement]); + m_historyUndo.PopBack(); + m_isUndoProcessing = false; + return posDest; +} + +int32_t EdnBuf::Redo(void) +{ + int32_t nbElement = m_historyRedo.Size(); + //EDN_DEBUG("EdnBuf::Redo Request id="< remove it"); + m_historyRedo.PopBack(); + return -1; + } + int32_t pos = m_historyRedo[nbElement]->getPos(); + int32_t nbDeleted = m_historyRedo[nbElement]->getnbDeleted(); + int32_t nbInserted = m_historyRedo[nbElement]->getnbInserted(); + EdnVectorBin deletedText; + m_historyRedo[nbElement]->getData(deletedText); + m_isRedoProcessing = true; + if (0 == nbInserted) { + // just add data at position ... + if (0 == nbDeleted) { + EDN_ERROR("EdnBuf::Redo nothing to do in REDO"); + } else { + Insert(pos, deletedText); + posDest = pos + nbDeleted; + } + } else { + if (0 == nbDeleted) { + // only remove data + Remove(pos, pos+nbInserted); + posDest = pos; + } else { + // replace data + Replace(pos, pos+nbInserted, deletedText); + posDest = pos + nbDeleted; + } + } + // remove element in the list : + delete(m_historyRedo[nbElement]); + m_historyRedo.PopBack(); + m_isRedoProcessing = false; + return posDest; +} + + diff --git a/Sources/tools/EdnBuf/EdnBuf_Selection.cpp b/Sources/tools/EdnBuf/EdnBuf_Selection.cpp new file mode 100644 index 0000000..9484ccc --- /dev/null +++ b/Sources/tools/EdnBuf/EdnBuf_Selection.cpp @@ -0,0 +1,284 @@ +/** + ******************************************************************************* + * @file EdnBuf_Selection.cpp + * @brief Editeur De N'ours : Buffer for internal Data - section selection (Sources) + * @author Edouard DUPIN + * @date 23/03/2011 + * @par Project + * Edn + * + * @par Copyright + * Copyright 2010 Edouard DUPIN, all right reserved + * + * This software is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY. + * + * Licence summary : + * You can modify and redistribute the sources code and binaries. + * You can send me the bug-fix + * You can not earn money with this Software (if the source extract from Edn + * represent less than 50% of original Sources) + * Term of the licence in in the file licence.txt. + * + ******************************************************************************* + */ + +#include "tools_debug.h" +#include "tools_globals.h" +#include "EdnBuf.h" + + +#undef __class__ +#define __class__ "EdnBuf{Selection}" + + +/** + * @brief + * + * @param[in,out] --- + * @param[in,out] --- + * + * @return --- + * + */ +bool EdnBuf::SelectHasSelection(selectionType_te select) +{ + return m_selectionList[select].selected; +} + + +/** + * @brief + * + * @param[in,out] --- + * @param[in,out] --- + * + * @return --- + * + */ +void EdnBuf::Select(selectionType_te select, int32_t start, int32_t end) +{ + selection oldSelection = m_selectionList[select]; + m_selectionList[select].selected = start != end; + m_selectionList[select].zeroWidth = (start == end) ? true : false; + m_selectionList[select].rectangular = false; + m_selectionList[select].start = edn_min(start, end); + m_selectionList[select].end = edn_max(start, end); +} + + +/** + * @brief + * + * @param[in,out] --- + * + * @return --- + * + */ +void EdnBuf::Unselect(selectionType_te select) +{ + selection oldSelection = m_selectionList[select]; + m_selectionList[select].selected = false; + m_selectionList[select].zeroWidth = false; +} + + +/** + * @brief + * + * @param[in,out] --- + * @param[in,out] --- + * @param[in,out] --- + * @param[in,out] --- + * + * @return --- + * + */ +void EdnBuf::RectSelect(selectionType_te select, int32_t start, int32_t end, int32_t rectStart, int32_t rectEnd) +{ + m_selectionList[select].selected = rectStart < rectEnd; + m_selectionList[select].zeroWidth = (rectStart == rectEnd) ? false : true; + m_selectionList[select].rectangular = true; + m_selectionList[select].start = start; + m_selectionList[select].end = end; + m_selectionList[select].rectStart = rectStart; + m_selectionList[select].rectEnd = rectEnd; +} + + +/** + * @brief + * + * @param[in,out] --- + * + * @return --- + * + */ +bool EdnBuf::GetSelectionPos(selectionType_te select, int32_t &start, int32_t &end, bool &isRect, int32_t &rectStart, int32_t &rectEnd) +{ + /* Always fill in the parameters (zero-width can be requested too). */ + isRect = m_selectionList[select].rectangular; + start = m_selectionList[select].start; + end = m_selectionList[select].end; + if (m_selectionList[select].rectangular) { + rectStart = m_selectionList[select].rectStart; + rectEnd = m_selectionList[select].rectEnd; + } + return m_selectionList[select].selected; +} + + +/** + * @brief + * + * @param[in,out] --- + * + * @return --- + * + */ +void EdnBuf::GetSelectionText(selectionType_te select, EdnVectorBin &text) +{ + int32_t start, end, rectStart, rectEnd; + bool isRect; + // remove output data + text.Clear(); + + bool isSelected = GetSelectionPos(select, start, end, isRect, rectStart, rectEnd); + + // No data selected ... + if (false == isSelected) { + return; + } + + // Rectangular selection + if (true == isRect) { + //GetTextInRect(start, end, rectStart, rectEnd, text); + // TODO : ... + } else { + GetRange(start, end, text); + } +} + + +/** + * @brief + * + * @param[in,out] --- + * + * @return --- + * + */ +void EdnBuf::RemoveSelected(selectionType_te select) +{ + int32_t start, end; + int32_t rectStart, rectEnd; + bool isRect; + bool isSelected = GetSelectionPos(select, start, end, isRect, rectStart, rectEnd); + + // No data selected ... + if (false == isSelected) { + return; + } + // Rectangular selection + if (true == isRect) { + //RemoveRect(start, end, rectStart, rectEnd); + // TODO : ... + } else { + Remove(start, end); + } + Unselect(select); +} + + +/** + * @brief + * + * @param[in,out] --- + * + * @return --- + * + */ +void EdnBuf::ReplaceSelected(selectionType_te select, EdnVectorBin &text) +{ + int32_t start, end, rectStart, rectEnd; + bool isRect; + bool isSelected = GetSelectionPos(select, start, end, isRect, rectStart, rectEnd); + + // No data selected ... + if (false == isSelected) { + return; + } + // Rectangular selection + if (true == isRect) { + //ReplaceRect(start, end, rectStart, rectEnd, text); + // TODO : ... + } else { + Replace(start, end, text); + } + // Clean selection + m_selectionList[select].selected = false; +} + + + +/* +** Update all of the selections in "buf" for changes in the buffer's text +*/ +/** + * @brief + * + * @param[in,out] --- + * + * @return --- + * + */ +void EdnBuf::UpdateSelections(int32_t pos, int32_t nDeleted, int32_t nInserted) +{ + UpdateSelection(SELECTION_PRIMARY , pos, nDeleted, nInserted); + UpdateSelection(SELECTION_SECONDARY , pos, nDeleted, nInserted); + UpdateSelection(SELECTION_HIGHTLIGHT, pos, nDeleted, nInserted); +} + + +/* +** Update an individual selection for changes in the corresponding text +*/ +/** + * @brief + * + * @param[in,out] --- + * + * @return --- + * + */ +void EdnBuf::UpdateSelection(selectionType_te select, int32_t pos, int32_t nDeleted, int32_t nInserted) +{ + if( ( false == m_selectionList[select].selected + && false == m_selectionList[select].zeroWidth) + || pos > m_selectionList[select].end ) + { + return; + } + if (pos+nDeleted <= m_selectionList[select].start) { + m_selectionList[select].start += nInserted - nDeleted; + m_selectionList[select].end += nInserted - nDeleted; + } else if( pos <= m_selectionList[select].start + && pos+nDeleted >= m_selectionList[select].end) + { + m_selectionList[select].start = pos; + m_selectionList[select].end = pos; + m_selectionList[select].selected = false; + m_selectionList[select].zeroWidth = false; + } else if( pos <= m_selectionList[select].start + && pos+nDeleted < m_selectionList[select].end) + { + m_selectionList[select].start = pos; + m_selectionList[select].end = nInserted + m_selectionList[select].end - nDeleted; + } else if(pos < m_selectionList[select].end) { + m_selectionList[select].end += nInserted - nDeleted; + if (m_selectionList[select].end <= m_selectionList[select].start) { + m_selectionList[select].selected = false; + } + } +} + diff --git a/Sources/tools/EdnRegExp/EdnRegExp.cpp b/Sources/tools/EdnRegExp/EdnRegExp.cpp new file mode 100644 index 0000000..c550af0 --- /dev/null +++ b/Sources/tools/EdnRegExp/EdnRegExp.cpp @@ -0,0 +1,1786 @@ +/** + ******************************************************************************* + * @file EdnRegExp.cpp + * @brief Editeur De N'ours : Regular expression annalyser (sources) + * @author Edouard DUPIN + * @date 04/04/2011 + * @par Project + * Edn + * + * @par Copyright + * Copyright 2010 Edouard DUPIN, all right reserved + * + * This software is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY. + * + * Licence summary : + * You can modify and redistribute the sources code and binaries. + * You can send me the bug-fix + * You can not earn money with this Software (if the source extract from Edn + * represent less than 50% of original Sources) + * Term of the licence in in the file licence.txt. + * + ******************************************************************************* + */ + +#include "tools_debug.h" +#include "tools_globals.h" +#include "toolsMemory.h" +#include "EdnRegExp.h" + + +// internal define to permit to have all neeed system +#define OPCODE_PTHESE_IN (-300) /* ( */ +#define OPCODE_PTHESE_OUT ( 300) /* ) */ +#define OPCODE_BRACKET_IN (-301) /* [ */ +#define OPCODE_BRACKET_OUT ( 301) /* ] */ +#define OPCODE_BRACE_IN (-302) /* { */ +#define OPCODE_BRACE_OUT ( 302) /* } */ +#define OPCODE_TO (-305) /* - */ +#define OPCODE_STAR (-306) /* * */ +#define OPCODE_DOT (-307) /* . */ +#define OPCODE_QUESTION (-308) /* ? */ +#define OPCODE_PLUS (-309) /* + */ +#define OPCODE_PIPE (-310) /* | */ +#define OPCODE_START_OF_LINE (-311) /* ^ this is also NOT, but not manage */ +#define OPCODE_END_OF_LINE (-312) /* $ */ +#define OPCODE_DIGIT ( 313) /* \d */ +#define OPCODE_DIGIT_NOT (-313) /* \D */ +#define OPCODE_LETTER ( 314) /* \l */ +#define OPCODE_LETTER_NOT (-314) /* \L */ +#define OPCODE_SPACE ( 315) /* \s */ +#define OPCODE_SPACE_NOT (-315) /* \S */ +#define OPCODE_WORD ( 316) /* \w */ +#define OPCODE_WORD_NOT (-316) /* \W */ +#define OPCODE_NO_CHAR (-317) /* \@ */ + +typedef struct { + bool haveBackSlash; + char inputValue; + int16_t newValue; +}convertionTable_ts; + +const convertionTable_ts constConvertionTable[] = { + // haveBackSlash, inputValue, newValue + { false , '(' , OPCODE_PTHESE_IN}, + { true , '(' , (int16_t)'('}, + { false , ')' , OPCODE_PTHESE_OUT}, + { true , ')' , (int16_t)')'}, + { false , '[' , OPCODE_BRACKET_IN}, + { true , '[' , (int16_t)'['}, + { false , ']' , OPCODE_BRACKET_OUT}, + { true , ']' , (int16_t)']'}, + { false , '{' , OPCODE_BRACE_IN}, + { true , '{' , (int16_t)'{'}, + { false , '}' , OPCODE_BRACE_OUT}, + { true , '}' , (int16_t)'}'}, + { false , '-' , OPCODE_TO}, + { true , '-' , (int16_t)'-'}, + { false , '*' , OPCODE_STAR}, + { true , '*' , (int16_t)'*'}, + { false , '.' , OPCODE_DOT}, + { true , '.' , (int16_t)'.'}, + { false , '?' , OPCODE_QUESTION}, + { true , '?' , (int16_t)'?'}, + { false , '+' , OPCODE_PLUS}, + { true , '+' , (int16_t)'+'}, + { false , '|' , OPCODE_PIPE}, + { true , '|' , (int16_t)'|'}, + { false , '^' , OPCODE_START_OF_LINE}, + { true , '^' , (int16_t)'^'}, + { false , '$' , OPCODE_END_OF_LINE}, + { true , '$' , (int16_t)'$'}, + { true , 'd' , OPCODE_DIGIT}, + { true , 'D' , OPCODE_DIGIT_NOT}, + { true , 'l' , OPCODE_LETTER}, + { true , 'L' , OPCODE_LETTER_NOT}, + { true , 's' , OPCODE_SPACE}, + { true , 'S' , OPCODE_SPACE_NOT}, + { true , 'w' , OPCODE_WORD}, + { true , 'W' , OPCODE_WORD_NOT}, + { true , 'a' , (int16_t)'\a'}, + { true , 'b' , (int16_t)'\b'}, + { true , 'e' , 0x001B}, // Escape character + { true , 'f' , (int16_t)'\f'}, + { true , 'n' , (int16_t)'\n'}, + { true , 'r' , (int16_t)'\r'}, + { true , 't' , (int16_t)'\t'}, + { true , 'v' , (int16_t)'\v'}, + { true , '\\' , (int16_t)'\\'}, + { true , '&' , (int16_t)'&'}, + { true , '0' , (int16_t)'\0'}, + { true , '@' , OPCODE_NO_CHAR}, +}; +const int32_t constConvertionTableSize = sizeof(constConvertionTable) / sizeof(convertionTable_ts) ; + + +/** + * @brief Display the internal data of a node + * + * @param[in] data element do display in the console + * + * @return --- + * + */ +static void DisplayData(EdnVectorBin &data) +{ + int32_t i; + for (i=0; i<(int32_t)data.Size() ; i++) { + std::cout<< (char)(data[i]&0x00FF ); + } +} + +/** + * @brief Display of a part of the Regexp element + * + * @param[in] data Vector where data is constain + * @param[in] start Position where the display might start + * @param[in] stop Position where the display might stop + * + * @return --- + * + */ +static void DisplayElem(EdnVectorBin &data, int32_t start=0, int32_t stop=0x7FFFFFFF) +{ + int32_t i; + std::cout<< COLOR_NORMAL; + for (i=start; i<(int32_t)data.Size() && i &data, int32_t startPos) +{ + int32_t pos = startPos; + int32_t nbOpen = 0; + // special case of the (...) or | ==> we search '|' or ')' + if( OPCODE_PTHESE_OUT == data[pos] + || OPCODE_PIPE == data[pos]) { + return 0; + } + // find size ... + while (pos < (int32_t)data.Size() ) { + if(OPCODE_PTHESE_IN == data[pos]) { + // find a sub section : + nbOpen++; + } else if(0 < nbOpen) { + if (OPCODE_PTHESE_OUT == data[pos]) + { + nbOpen--; + if (0 > nbOpen) { + EDN_ERROR("Error in the (...) find element at "<< pos); + return -1; + } + } + } else if( OPCODE_PTHESE_OUT == data[pos] + || OPCODE_PIPE == data[pos]) + { + // Find the end of the (...) + // just return the size inside + int32_t sizeInside = pos - startPos; + if (0 >= sizeInside) { + EDN_ERROR("Error in the (...) no data at "<< pos-1); + return -1; + } else { + return sizeInside; + } + } + pos++; + } + return pos - startPos; +} + +/** + * @brief + * + * @param[in,out] --- + * + * @return --- + * + */ +static int32_t GetLenOfPThese(EdnVectorBin &data, int32_t startPos) +{ + int32_t pos = startPos; + int32_t nbOpen = 0; + // special case of the (...) or | ==> we search '|' or ')' + if( OPCODE_PTHESE_OUT == data[pos]) { + return 0; + } else if( OPCODE_PTHESE_IN == data[pos]) + { + pos++; + // find size ... + while (pos < (int32_t)data.Size() ) { + if(OPCODE_PTHESE_IN == data[pos]) { + // find a sub section : + nbOpen++; + } else if(0 < nbOpen) { + if (OPCODE_PTHESE_OUT == data[pos]) + { + nbOpen--; + if (0 > nbOpen) { + EDN_ERROR("Error in the (...) find element at "<< pos); + return -1; + } + } + } else if( OPCODE_PTHESE_OUT == data[pos]) + { + // Find the end of the (...) + // just return the size inside + int32_t sizeInside = pos - startPos-1; + if (0 >= sizeInside) { + EDN_ERROR("Error in the (...) no data at "<< pos-1); + return -1; + } else { + return sizeInside; + } + } + pos++; + } + } else { + return -1; + } + return 0; +} + + +/** + * @brief + * + * @param[in,out] --- + * + * @return --- + * + */ +static int32_t GetLenOfBracket(EdnVectorBin &data, int32_t startPos) +{ + int32_t pos = startPos; + // special case of the (...) or | ==> we search '|' or ')' + if( OPCODE_BRACKET_OUT == data[pos]) { + return 0; + } else if( OPCODE_BRACKET_IN == data[pos]) { + pos++; + // find size ... + while (pos < (int32_t)data.Size() ) { + if(OPCODE_BRACKET_OUT == data[pos]) { + // Find the end of the [...] + // just return the size inside + int32_t sizeInside = pos - startPos -1 ; + if (0 >= sizeInside) { + EDN_ERROR("Error in the [...] no data at "<< pos-1); + return sizeInside; + } else { + return sizeInside; + } + } else if( OPCODE_TO != data[pos] + && ( 0 > data[pos] + || 0xFF < data[pos]) ) + { + EDN_ERROR("Error in the [...] not permited element at "<< pos << " '" << (char)data[pos] << "'"); + return false; + } + pos++; + } + } else { + return -1; + } + return 0; +} + + +/** + * @brief + * + * @param[in,out] --- + * + * @return --- + * + */ +static int32_t GetLenOfBrace(EdnVectorBin &data, int32_t startPos) +{ + int32_t pos = startPos; + // special case of the (...) or | ==> we search '|' or ')' + if( OPCODE_BRACE_OUT == data[pos]) { + return 0; + } else if( OPCODE_BRACE_IN == data[pos]) { + pos++; + // find size ... + while (pos < (int32_t)data.Size() ) { + if(OPCODE_BRACE_OUT == data[pos]) { + // Find the end of the [...] + // just return the size inside + int32_t sizeInside = pos - startPos -1 ; + if (0 >= sizeInside) { + EDN_ERROR("Error in the {...} no data at "<< pos-1); + return sizeInside; + } else { + return sizeInside; + } + } else if( ',' != data[pos] + && ( '0' > data[pos] + || '9' < data[pos]) ) + { + EDN_ERROR("Error in the {...} not permited element at "<< pos << " '" << (char)data[pos] << "'"); + return false; + } + pos++; + } + } else { + return -1; + } + return 0; +} + + +/** + * @brief + * + * @param[in,out] --- + * + * @return --- + * + */ +static int32_t GetLenOfNormal(EdnVectorBin &data, int32_t startPos) +{ + int32_t pos = startPos; + + // find size ... + while (pos < (int32_t)data.Size() ) { + switch(data[pos]) + { + case OPCODE_PTHESE_IN: + case OPCODE_PTHESE_OUT: + case OPCODE_BRACKET_IN: + case OPCODE_BRACKET_OUT: + case OPCODE_BRACE_IN: + case OPCODE_BRACE_OUT: + case OPCODE_TO: + case OPCODE_STAR: + case OPCODE_DOT: + case OPCODE_QUESTION: + case OPCODE_PLUS: + case OPCODE_PIPE: + case OPCODE_START_OF_LINE: + case OPCODE_END_OF_LINE: + case OPCODE_DIGIT: + case OPCODE_DIGIT_NOT: + case OPCODE_LETTER: + case OPCODE_LETTER_NOT: + case OPCODE_SPACE: + case OPCODE_SPACE_NOT: + case OPCODE_WORD: + case OPCODE_WORD_NOT: + { + // just return the size inside + int32_t sizeInside = pos - startPos; + if (0 >= sizeInside) { + EDN_ERROR("Error in the normal data : no data ..."); + } + return sizeInside; + } + break; + default : + // nothing to do ... + break; + } + pos++; + } + return pos - startPos ; +} + + +/** + * @brief + * + * @param[in,out] --- + * + * @return --- + * + */ +static bool ParseBrace(EdnVectorBin &data, int32_t &min, int32_t &max) +{ + //EDN_INFO("parse {...} in "; DisplayElem(data); ); + int32_t k=0; + + int32_t firstElement = 0; + int32_t SecondElement = 0; + + while(k= (char)data[k]) { + firstElement *=10; + firstElement += (char)data[k] - '0'; + } else { + EDN_ERROR("Can not parse this element " << (char)data[k] << " at pos " << k); + return false; + } + k++; + } + if (k==data.Size()) { + SecondElement = firstElement; + } + while(k= (char)data[k]) { + SecondElement *=10; + SecondElement += (char)data[k] - '0'; + } else { + EDN_ERROR("Can not parse this element " << (char)data[k] << " at pos " << k); + return false; + } + k++; + } + +allIsSet: + if (SecondElement == 0 && firstElement != 0) { + min = 0; + max = firstElement; + } else { + min = firstElement; + max = SecondElement; + } + if (min > max) { + EDN_ERROR("Minimum=" << min << " can not be < maximum=" << max ); + return false; + } + return true; +} + + + + + + + + + + + + + + +/* ******************************************************************************************************************************************************************************************** */ +#undef __class__ +#define __class__ "RegExpNode" + +RegExpNode::RegExpNode(void) +{ + SetMult(1,1); +} + + +int32_t RegExpNode::Generate(EdnVectorBin &data, int32_t start, int32_t stop) +{ + return 0; +} + +bool RegExpNode::Parse(EdnVectorBuf &data, int32_t currentPos, int32_t lenMax, int32_t &findLen) +{ + findLen = 0; + return false; +} + +void RegExpNode::Display(int32_t level) +{ + EDN_INFO("Find NODE : " << levelSpace(level) << "@???@ {" << GetMultMin() << "," << GetMultMax() << "} subdata="; DisplayElem(m_RegExpData);); +} + +void RegExpNode::SetMult(int32_t min, int32_t max) +{ + m_multipleMin = edn_max(min, 0); + m_multipleMax = edn_max(max, 1); +} +/* ******************************************************************************************************************************************************************************************** */ +#undef __class__ +#define __class__ "RegExpNodePThese" +RegExpNodePThese::~RegExpNodePThese(void) +{ + +} +int32_t RegExpNodePThese::Generate(EdnVectorBin &data) +{ + m_RegExpData = data; + //EDN_DEBUG("Request Parse (...) data="; DisplayElem(m_RegExpData);); + //Find all the '|' in the string (and at the good level ...) + int32_t pos = 0; + int32_t elementSize = GetLenOfPTheseElem(m_RegExpData, pos); + // generate all the "elemTypePTheseElem" of the Node + while (elementSize>0) { + // geerate output deta ... + EdnVectorBin tmpData; + for (int32_t k=pos; kGenerate(tmpData); + // add to the subnode list : + m_subNode.PushBack(myElem); + pos += elementSize+1; + //EDN_DEBUG("plop="; DisplayElem(data, pos, pos+1);); + elementSize = GetLenOfPTheseElem(m_RegExpData, pos); + //EDN_DEBUG("find " << elementSize << " elements"); + } + if (0 == pos && 0 == elementSize) { + EDN_ERROR("No data in the (...) element at " << pos); + return false; + } + return data.Size(); +} +bool RegExpNodePThese::Parse(EdnVectorBuf &data, int32_t currentPos, int32_t lenMax, int32_t &findLen) +{ + findLen = 0; + //EDN_INFO("Parse node : (...){" << m_multipleMin << "," << m_multipleMax << "}"); + if (0 == m_subNode.Size()) { + return false; + } + bool tmpFind = true; + int32_t j; + for (j=0; jParse(data, currentPos+findLen, lenMax, tmpFindLen)) { + findLen += tmpFindLen; + tmpFind = true; + } + } + } + if( j>=m_multipleMin + && j<=m_multipleMax + && findLen>0 ) + { + //EDN_DEBUG("find " << findLen); + return true; + } else if( 0 == m_multipleMin ) { + //EDN_DEBUG("find size=0"); + return true; + } + return false; +} +void RegExpNodePThese::Display(int32_t level) +{ + if (-1 == level) { + EDN_INFO("regExp :"; DisplayElem(m_RegExpData);); + } else { + EDN_INFO("Find NODE : " << levelSpace(level) << "@(...)@ {" << m_multipleMin << "," << m_multipleMax << "} subdata="; DisplayElem(m_RegExpData);); + for(int32_t i=0; iDisplay(level+1); + } + } +} + + + + +/* ******************************************************************************************************************************************************************************************** */ +#undef __class__ +#define __class__ "RegExpNodePTheseElem" +RegExpNodePTheseElem::~RegExpNodePTheseElem(void) +{ + +} +int32_t RegExpNodePTheseElem::Generate(EdnVectorBin &data) +{ + m_RegExpData = data; + //EDN_DEBUG("Request Parse (elem) data="; DisplayElem(m_RegExpData);); + + int32_t pos = 0; + int32_t elementSize = 0; + EdnVectorBin tmpData; + while (pos < m_RegExpData.Size()) { + tmpData.Clear(); + switch (m_RegExpData[pos]) + { + case OPCODE_PTHESE_IN: + { + elementSize=GetLenOfPThese(m_RegExpData, pos); + for (int32_t k=pos+1; kGenerate(tmpData); + // add to the subnode list : + m_subNode.PushBack(myElem); + // move current position ... + pos += elementSize+1; + } + break; + case OPCODE_PTHESE_OUT: + EDN_ERROR("Impossible case : ')' " << pos); + return false; + + case OPCODE_BRACKET_IN: + { + elementSize=GetLenOfBracket(m_RegExpData, pos); + for (int32_t k=pos+1; kGenerate(tmpData); + // add to the subnode list : + m_subNode.PushBack(myElem); + // move current position ... + pos += elementSize+1; + } + break; + case OPCODE_BRACKET_OUT: + EDN_ERROR("Impossible case : ']' " << pos); + return false; + + case OPCODE_BRACE_IN: + { + elementSize=GetLenOfBrace(m_RegExpData, pos); + for (int32_t k=pos+1; kGenerate(tmpData); + // add to the subnode list : + m_subNode.PushBack(myElem); + // move current position ... + pos += elementSize-1; + } + break; + } + pos++; + } + return data.Size(); +} +/** + * @brief Set the number of repeate time on a the last node in the list ... + * + * @param[in] min Minimum of the multiplicity + * @param[in] max Maximum of the multiplicity + * + * @return true if we find the node, false otherwise + * + */ +bool RegExpNodePTheseElem::SetMultiplicityOnLastNode(int32_t min, int32_t max) +{ + if (0==m_subNode.Size()) { + EDN_ERROR("Set multiplicity on an inexistant element ...."); + return false; + } + RegExpNode * myNode = m_subNode[m_subNode.Size()-1]; + if (NULL==myNode) { + EDN_ERROR("INTERNAL error ==> node not generated"); + return false; + } + myNode->SetMult(min, max); + return true; +} + + +bool RegExpNodePTheseElem::Parse(EdnVectorBuf &data, int32_t currentPos, int32_t lenMax, int32_t &findLen) +{ + findLen = 0; + //EDN_INFO("Parse node : (Elem){" << m_multipleMin << "," << m_multipleMax << "}"); + // NOTE 1 : Must done only one time in EVERY case ... + // NOTE 2 : All element inside must be OK + if (0 == m_subNode.Size()) { + return false; + } + int32_t tmpCurrentPos = currentPos; + for (int32_t i=0; iParse(data, tmpCurrentPos, lenMax, tmpFindLen)) { + findLen = 0; + return false; + } else { + tmpCurrentPos += tmpFindLen; + } + } + findLen = tmpCurrentPos - currentPos; + return true; +} + +void RegExpNodePTheseElem::Display(int32_t level) +{ + EDN_INFO("Find NODE : " << levelSpace(level) << "@(Elem)@ {" << m_multipleMin << "," << m_multipleMax << "} subdata="; DisplayElem(m_RegExpData);); + for(int32_t i=0; iDisplay(level+1); + } +} + + + +/* ******************************************************************************************************************************************************************************************** */ +#undef __class__ +#define __class__ "RegExpNodeValue" +int32_t RegExpNodeValue::Generate(EdnVectorBin &data) +{ + m_RegExpData = data; + //EDN_DEBUG("Request Parse \"Value\" data="; DisplayElem(m_RegExpData);); + m_data.Clear(); + for (int32_t i=0; i=m_multipleMin + && j<=m_multipleMax + && findLen>0 ) + { + //EDN_DEBUG("find " << findLen); + return true; + } else if( 0 == m_multipleMin ) { + //EDN_DEBUG("find size=0"); + return true; + } + return false; +} +void RegExpNodeValue::Display(int32_t level) +{ + EDN_INFO("Find NODE : " << levelSpace(level) << "@Value@ {" << m_multipleMin << "," << m_multipleMax << "} subdata="; DisplayElem(m_RegExpData); std::cout<< " data: "; DisplayData(m_data); ); +} + + + + +/* ******************************************************************************************************************************************************************************************** */ +#undef __class__ +#define __class__ "RegExpNodeBracket" +int32_t RegExpNodeBracket::Generate(EdnVectorBin &data) +{ + m_RegExpData = data; + //EDN_DEBUG("Request Parse [...] data="; DisplayElem(m_RegExpData);); + m_data.Clear(); + + char lastElement = 'a'; + bool multipleElement = false; + // + for (int32_t k=0; km_data);); + bool tmpFind = true; + int32_t j; + for (j=0; j=m_multipleMin + && j<=m_multipleMax + && findLen>0 ) + { + //EDN_DEBUG("find " << findLen); + return true; + } else if( 0 == m_multipleMin ) { + //EDN_DEBUG("find size=0"); + return true; + } + return false; +} +void RegExpNodeBracket::Display(int32_t level) +{ + EDN_INFO("Find NODE : " << levelSpace(level) << "@[...]@ {" << m_multipleMin << "," << m_multipleMax << "} subdata="; DisplayElem(m_RegExpData); std::cout<< " data: "; DisplayData(m_data); ); +} + + + + +/* ******************************************************************************************************************************************************************************************** */ +#undef __class__ +#define __class__ "RegExpNodeDigit" +bool RegExpNodeDigit::Parse(EdnVectorBuf &data, int32_t currentPos, int32_t lenMax, int32_t &findLen) +{ + findLen = 0; + //EDN_INFO("Parse node : Digit{" << m_multipleMin << "," << m_multipleMax << "} : "<< data[currentPos] << " lenMax=" << lenMax); + bool tmpFind = true; + int32_t j; + for (j=0; j= tmpVal) + { + //EDN_DEBUG("find ++"); + findLen += 1; + } else { + tmpFind=false; + } + } + if( j>=m_multipleMin + && j<=m_multipleMax + && findLen>0 ) + { + //EDN_DEBUG("find " << findLen); + return true; + } else if( 0 == m_multipleMin ) { + //EDN_DEBUG("find size=0"); + return true; + } + return false; +} +void RegExpNodeDigit::Display(int32_t level) +{ + EDN_INFO("Find NODE : " << levelSpace(level) << "@Digit@ {" << m_multipleMin << "," << m_multipleMax << "} subdata="; DisplayElem(m_RegExpData);); +} + + + + +/* ******************************************************************************************************************************************************************************************** */ +#undef __class__ +#define __class__ "RegExpNodeDigitNot" +bool RegExpNodeDigitNot::Parse(EdnVectorBuf &data, int32_t currentPos, int32_t lenMax, int32_t &findLen) +{ + findLen = 0; + //EDN_INFO("Parse node : DigitNot{" << m_multipleMin << "," << m_multipleMax << "}"); + bool tmpFind = true; + int32_t j; + for (j=0; j tmpVal + || '9' < tmpVal) + { + findLen += 1; + } else { + tmpFind=false; + } + } + if( j>=m_multipleMin + && j<=m_multipleMax + && findLen>0 ) + { + //EDN_DEBUG("find " << findLen); + return true; + } else if( 0 == m_multipleMin ) { + //EDN_DEBUG("find size=0"); + return true; + } + return false; +} +void RegExpNodeDigitNot::Display(int32_t level) +{ + EDN_INFO("Find NODE : " << levelSpace(level) << "@DigitNot@ {" << m_multipleMin << "," << m_multipleMax << "} subdata="; DisplayElem(m_RegExpData);); +} + + + +/* ******************************************************************************************************************************************************************************************** */ +#undef __class__ +#define __class__ "RegExpNodeLetter" +bool RegExpNodeLetter::Parse(EdnVectorBuf &data, int32_t currentPos, int32_t lenMax, int32_t &findLen) +{ + findLen = 0; + //EDN_INFO("Parse node : Letter{" << m_multipleMin << "," << m_multipleMax << "}"); + bool tmpFind = true; + int32_t j; + for (j=0; j= tmpVal ) + || ( 'A' <= tmpVal + && 'Z' >= tmpVal )) + { + findLen += 1; + } else { + tmpFind=false; + } + } + if( j>=m_multipleMin + && j<=m_multipleMax + && findLen>0 ) + { + //EDN_DEBUG("find " << findLen); + return true; + } else if( 0 == m_multipleMin ) { + //EDN_DEBUG("find size=0"); + return true; + } + return false; +} +void RegExpNodeLetter::Display(int32_t level) +{ + EDN_INFO("Find NODE : " << levelSpace(level) << "@Letter@ {" << m_multipleMin << "," << m_multipleMax << "} subdata="; DisplayElem(m_RegExpData);); +} + + + +/* ******************************************************************************************************************************************************************************************** */ +#undef __class__ +#define __class__ "RegExpNodeLetterNot" +bool RegExpNodeLetterNot::Parse(EdnVectorBuf &data, int32_t currentPos, int32_t lenMax, int32_t &findLen) +{ + findLen = 0; + //EDN_INFO("Parse node : LetterNot{" << m_multipleMin << "," << m_multipleMax << "}"); + bool tmpFind = true; + int32_t j; + for (j=0; j tmpVal + && 'Z' < tmpVal ) + || 'A' > tmpVal + || 'z' < tmpVal ) + { + findLen += 1; + } else { + tmpFind=false; + } + } + if( j>=m_multipleMin + && j<=m_multipleMax + && findLen>0 ) + { + //EDN_DEBUG("find " << findLen); + return true; + } else if( 0 == m_multipleMin ) { + //EDN_DEBUG("find size=0"); + return true; + } + return false; +} +void RegExpNodeLetterNot::Display(int32_t level) +{ + EDN_INFO("Find NODE : " << levelSpace(level) << "@LetterNot@ {" << m_multipleMin << "," << m_multipleMax << "} subdata="; DisplayElem(m_RegExpData);); +} + + + +/* ******************************************************************************************************************************************************************************************** */ +#undef __class__ +#define __class__ "RegExpNodeWhiteSpace" +bool RegExpNodeWhiteSpace::Parse(EdnVectorBuf &data, int32_t currentPos, int32_t lenMax, int32_t &findLen) +{ + findLen = 0; + //EDN_INFO("Parse node : Space{" << m_multipleMin << "," << m_multipleMax << "}"); + bool tmpFind = true; + int32_t j; + for (j=0; j=m_multipleMin + && j<=m_multipleMax + && findLen>0 ) + { + //EDN_DEBUG("find " << findLen); + return true; + } else if( 0 == m_multipleMin ) { + //EDN_DEBUG("find size=0"); + return true; + } + return false; +} +void RegExpNodeWhiteSpace::Display(int32_t level) +{ + EDN_INFO("Find NODE : " << levelSpace(level) << "@Space@ {" << m_multipleMin << "," << m_multipleMax << "} subdata="; DisplayElem(m_RegExpData);); +} +/* ******************************************************************************************************************************************************************************************** */ +#undef __class__ +#define __class__ "RegExpNodeWhiteSpaceNot" +bool RegExpNodeWhiteSpaceNot::Parse(EdnVectorBuf &data, int32_t currentPos, int32_t lenMax, int32_t &findLen) +{ + findLen = 0; + //EDN_INFO("Parse node : SpaceNot{" << m_multipleMin << "," << m_multipleMax << "}"); + bool tmpFind = true; + int32_t j; + for (j=0; j=m_multipleMin + && j<=m_multipleMax + && findLen>0 ) + { + //EDN_DEBUG("find " << findLen); + return true; + } else if( 0 == m_multipleMin ) { + //EDN_DEBUG("find size=0"); + return true; + } + return false; +} +void RegExpNodeWhiteSpaceNot::Display(int32_t level) +{ + EDN_INFO("Find NODE : " << levelSpace(level) << "@SpaceNot@ {" << m_multipleMin << "," << m_multipleMax << "} subdata="; DisplayElem(m_RegExpData);); +} +/* ******************************************************************************************************************************************************************************************** */ +#undef __class__ +#define __class__ "RegExpNodeWordChar" +bool RegExpNodeWordChar::Parse(EdnVectorBuf &data, int32_t currentPos, int32_t lenMax, int32_t &findLen) +{ + findLen = 0; + //EDN_INFO("Parse node : Word{" << m_multipleMin << "," << m_multipleMax << "}"); + bool tmpFind = true; + int32_t j; + for (j=0; j= tmpVal ) + || ( 'A' <= tmpVal + && 'Z' >= tmpVal ) + || ( '0' <= tmpVal + && '9' >= tmpVal )) + { + findLen += 1; + } else { + tmpFind=false; + } + } + if( j>=m_multipleMin + && j<=m_multipleMax + && findLen>0 ) + { + //EDN_DEBUG("find " << findLen); + return true; + } else if( 0 == m_multipleMin ) { + //EDN_DEBUG("find size=0"); + return true; + } + return false; +} +void RegExpNodeWordChar::Display(int32_t level) +{ + EDN_INFO("Find NODE : " << levelSpace(level) << "@Word@ {" << m_multipleMin << "," << m_multipleMax << "} subdata="; DisplayElem(m_RegExpData);); +} +/* ******************************************************************************************************************************************************************************************** */ +#undef __class__ +#define __class__ "RegExpNodeWordCharNot" +bool RegExpNodeWordCharNot::Parse(EdnVectorBuf &data, int32_t currentPos, int32_t lenMax, int32_t &findLen) +{ + findLen = 0; + //EDN_INFO("Parse node : WordNot{" << m_multipleMin << "," << m_multipleMax << "}"); + bool tmpFind = true; + int32_t j; + for (j=0; j tmpVal + && '9' < tmpVal ) + || ( 'a' > tmpVal + && 'Z' < tmpVal ) + || '0' > tmpVal + || 'z' < tmpVal ) + { + findLen += 1; + } else { + tmpFind=false; + } + } + if( j>=m_multipleMin + && j<=m_multipleMax + && findLen>0 ) + { + //EDN_DEBUG("find " << findLen); + return true; + } else if( 0 == m_multipleMin ) { + //EDN_DEBUG("find size=0"); + return true; + } + return false; +} +void RegExpNodeWordCharNot::Display(int32_t level) +{ + EDN_INFO("Find NODE : " << levelSpace(level) << "@WordNot@ {" << m_multipleMin << "," << m_multipleMax << "} subdata="; DisplayElem(m_RegExpData);); +} +/* ******************************************************************************************************************************************************************************************** */ +#undef __class__ +#define __class__ "RegExpNodeDot" +bool RegExpNodeDot::Parse(EdnVectorBuf &data, int32_t currentPos, int32_t lenMax, int32_t &findLen) +{ + findLen = 0; + //EDN_INFO("Parse node : '.'{" << m_multipleMin << "," << m_multipleMax << "}"); + // equivalent a : [^\x00-\x08\x0A-\x1F\x7F] + bool tmpFind = true; + int32_t j; + for (j=0; j tmpVal ) + || ( 0x1F < tmpVal + && 0x7F > tmpVal ) + || ( 0x7F < tmpVal + && 0xFF > tmpVal )) + { + findLen += 1; + } else { + tmpFind=false; + } + } + if( j>=m_multipleMin + && j<=m_multipleMax + && findLen>0 ) + { + //EDN_DEBUG("find " << findLen); + return true; + } else if( 0 == m_multipleMin ) { + //EDN_DEBUG("find size=0"); + return true; + } + return false; +} +void RegExpNodeDot::Display(int32_t level) +{ + EDN_INFO("Find NODE : " << levelSpace(level) << "@.@ {" << m_multipleMin << "," << m_multipleMax << "} subdata="; DisplayElem(m_RegExpData);); +} + +/* ******************************************************************************************************************************************************************************************** */ +#undef __class__ +#define __class__ "RegExpNodeSOL" +bool RegExpNodeSOL::Parse(EdnVectorBuf &data, int32_t currentPos, int32_t lenMax, int32_t &findLen) +{ + findLen = 0; + EDN_INFO("Parse node : SOL{" << m_multipleMin << "," << m_multipleMax << "}"); + return false; +} +void RegExpNodeSOL::Display(int32_t level) +{ + EDN_INFO("Find NODE : " << levelSpace(level) << "@SOL@ {" << m_multipleMin << "," << m_multipleMax << "} subdata="; DisplayElem(m_RegExpData);); +} + +/* ******************************************************************************************************************************************************************************************** */ +#undef __class__ +#define __class__ "RegExpNodeEOL" + +bool RegExpNodeEOL::Parse(EdnVectorBuf &data, int32_t currentPos, int32_t lenMax, int32_t &findLen) +{ + findLen = 0; + EDN_INFO("Parse node : EOL{" << m_multipleMin << "," << m_multipleMax << "}"); + return false; +} +void RegExpNodeEOL::Display(int32_t level) +{ + EDN_INFO("Find NODE : " << levelSpace(level) << "@EOL@ {" << m_multipleMin << "," << m_multipleMax << "} subdata="; DisplayElem(m_RegExpData);); +} + + + + + + +/* ******************************************************************************************************************************************************************************************** */ +#undef __class__ +#define __class__ "EdnRegExp" + +EdnRegExp::EdnRegExp(void) +{ + m_isOk = false; + m_areaFind.start=0; + m_areaFind.stop=0; + m_notBeginWithChar = false; + m_notEndWithChar = false; +} + +EdnRegExp::~EdnRegExp(void) +{ + // TODO : remove all under nodes... + m_isOk = false; +} + +void EdnRegExp::SetRegExp(const char *exp) +{ + EDN_CHECK_INOUT(exp); + Edn::String expressionRequested = exp; + SetRegExp(expressionRequested); +} + +void EdnRegExp::SetRegExp(Edn::String &expressionRequested) +{ + m_expressionRequested = expressionRequested; // TODO : Must be deprecated ... + EdnVectorBin tmpExp; + + //EDN_DEBUG("Parse RegExp : " << expressionRequested.c_str() ); + m_isOk = false; + m_areaFind.start=0; + m_areaFind.stop=0; + m_notBeginWithChar = false; + m_notEndWithChar = false; + + char * exp = expressionRequested.c_str(); + int32_t regExpLen = strlen(exp); + // change in the regular Opcode ==> replace \x with the corect element ... x if needed + int32_t iii; + int32_t countBraceIn = 0; + int32_t countBraceOut = 0; + int32_t countPTheseIn = 0; + int32_t countPTheseOut = 0; + int32_t countBracketIn = 0; + int32_t countBracketOut = 0; + for (iii=0; iii=regExpLen) { + EDN_ERROR("Dangerous parse of the element pos " << iii << " \\ with nothing after"); + // TODO : Generate Exeption ... + return; + } + int32_t j; + // Find the element in the list... + for (j=0; j0 + && OPCODE_NO_CHAR == tmpExp[0]) + { + //EDN_DEBUG("=> must not begin with char"); + m_notBeginWithChar = true; + // remove element + tmpExp.Erase(0); + } + if( tmpExp.Size()>0 + && OPCODE_NO_CHAR == tmpExp[tmpExp.Size()-1]) + { + //EDN_DEBUG("=> must not end with char"); + m_notEndWithChar = true; + // remove element + tmpExp.Erase(tmpExp.Size()-1); + } + + if (tmpExp.Size() != m_exprRootNode.Generate(tmpExp) ) { + return; + } + // TODO : optimize node here ... + + //Display(); + + // all OK ... play again + m_isOk = true; +} + + + +/** + * @brief + * + * @param[in,out] --- + * + * @return --- + * + */ +bool EdnRegExp::CheckGoodPosition(EdnVectorBin tmpExp, int32_t &pos) +{ + int16_t curentCode = tmpExp[pos]; + int16_t endCode = OPCODE_PTHESE_OUT; + char *input = (char*)"(...)"; + if (OPCODE_BRACKET_IN == curentCode) { + endCode = OPCODE_BRACKET_OUT; + input = (char*)"[...]"; + } else if (OPCODE_BRACE_IN == curentCode){ + endCode = OPCODE_BRACE_OUT; + input = (char*)"{x,x}"; + } + pos++; + if (pos >= (int32_t)tmpExp.Size()) { + EDN_ERROR("ended with: ( or { or [ ... not permited"); + return false; + } + //EDN_DEBUG(" ==> Find ELEMENT : ([{"); + // case dependent : + if( OPCODE_BRACKET_IN == curentCode + || OPCODE_BRACE_IN == curentCode) { + while(pos< (int32_t)tmpExp.Size()) { + //EDN_DEBUG("check : " << tmpExp[pos]); + // if we find the end : + if (endCode == tmpExp[pos]) { + return true; + } else { + // otherwise, we check the error in the element ... + char *find = NULL; + switch (tmpExp[pos]) + { + case OPCODE_PTHESE_IN: find = (char*)"("; break; + case OPCODE_BRACKET_IN: find = (char*)"["; break; + case OPCODE_BRACE_IN: find = (char*)"{"; break; + case OPCODE_PTHESE_OUT: find = (char*)")"; break; + case OPCODE_BRACKET_OUT: find = (char*)"]"; break; + case OPCODE_BRACE_OUT: find = (char*)"}"; break; + case OPCODE_STAR: find = (char*)"*"; break; + case OPCODE_DOT: find = (char*)"."; break; + case OPCODE_QUESTION: find = (char*)"?"; break; + case OPCODE_PLUS: find = (char*)"+"; break; + case OPCODE_PIPE: find = (char*)"|"; break; + case OPCODE_START_OF_LINE: find = (char*)"^"; break; + case OPCODE_END_OF_LINE: find = (char*)"$"; break; + case OPCODE_DIGIT: find = (char*)"\\d"; break; + case OPCODE_DIGIT_NOT: find = (char*)"\\D"; break; + case OPCODE_LETTER: find = (char*)"\\l"; break; + case OPCODE_LETTER_NOT: find = (char*)"\\L"; break; + case OPCODE_SPACE: find = (char*)"\\s"; break; + case OPCODE_SPACE_NOT: find = (char*)"\\S"; break; + case OPCODE_WORD: find = (char*)"\\w"; break; + case OPCODE_WORD_NOT: find = (char*)"\\W"; break; + case OPCODE_NO_CHAR: find = (char*)"\\@"; break; + default: break; + } + if (NULL != find) { + EDN_ERROR("can not have : '" << find << "' inside " << input << " element"); + return false; + } + } + pos++; + } + } else { + while(pos< (int32_t)tmpExp.Size()) { + if (endCode == tmpExp[pos]) { + // find the last element + return true; + } else if ( OPCODE_BRACE_OUT == tmpExp[pos]) { + EDN_ERROR("find } inside a (...) without start {"); + return false; + } else if ( OPCODE_BRACKET_OUT == tmpExp[pos]) { + EDN_ERROR("find ] inside a (...) without start ["); + return false; + } else { + if( OPCODE_PTHESE_IN == tmpExp[pos] + || OPCODE_BRACKET_IN == tmpExp[pos] + || OPCODE_BRACE_IN == tmpExp[pos]) + { + if (false==CheckGoodPosition(tmpExp, pos) ) { + return false; + } + } + } + pos++; + } + } + + // we did not find the cloder . ... + if (endCode == OPCODE_BRACKET_OUT) { + EDN_ERROR("Missing ']' at the end"); + } + if (endCode == OPCODE_BRACE_OUT) { + EDN_ERROR("Missing '}' at the end"); + } + if (endCode == OPCODE_PTHESE_OUT) { + EDN_ERROR("Missing ')' at the end"); + } + return false; +} + + + +/** + * @brief + * + * @param[in,out] --- + * + * @return --- + * + */ +bool EdnRegExp::CheckGoodPosition(EdnVectorBin tmpExp) +{ + int32_t pos = 0; + while (pos < (int32_t)tmpExp.Size()) { + //EDN_DEBUG("check : " << tmpExp[pos]); + if( OPCODE_PTHESE_IN == tmpExp[pos] + || OPCODE_BRACKET_IN == tmpExp[pos] + || OPCODE_BRACE_IN == tmpExp[pos]) + { + // attention the i position change inside the finction... + if (false==CheckGoodPosition(tmpExp, pos) ) { + EDN_ERROR("Error at position : " << pos+1 ); + return false; + } else { + //EDN_DEBUG(" <== Find ELEMENT : ]})"); + } + } else if(OPCODE_PTHESE_OUT == tmpExp[pos]) { + EDN_ERROR("can find ')' with no start : ')'"); + return false; + } else if(OPCODE_BRACKET_OUT == tmpExp[pos]) { + EDN_ERROR("can find ']' with no start : '['"); + return false; + } else if(OPCODE_BRACE_OUT == tmpExp[pos]) { + EDN_ERROR("can find '}' with no start : '{'"); + return false; + } + pos++; + } + return true; +} + + + + + +// process the regular expression +bool EdnRegExp::Process( EdnVectorBuf &SearchIn, + int32_t startPos, + int32_t endPos, + char escapeChar) +{ + if (false == m_isOk) { + return false; + } + int32_t buflen = SearchIn.Size(); + if (endPos > buflen) { + endPos = buflen; + } + if (startPos > endPos) { + return false; + } + int32_t i = 0; + for (i=startPos; i0) { + char tmpVal = SearchIn[i-1]; + if( ( 'a' <= tmpVal + && 'z' >= tmpVal ) + || ( 'A' <= tmpVal + && 'Z' >= tmpVal ) + || ( '0' <= tmpVal + && '9' >= tmpVal ) + || ( '_' == tmpVal ) ) + { + // go on the next char ... + continue; + } + } + } + if (true == m_exprRootNode.Parse(SearchIn, i, maxlen, findLen)) { + if( 0!=escapeChar + && i>0) + { + if (escapeChar == (char)SearchIn[i-1]) { + //==> detected escape char ==> try find again ... + continue; + } + } + // Check end : + if (true == m_notEndWithChar) { + if (i+findLen < SearchIn.Size() ) { + char tmpVal = SearchIn[i+findLen]; + if( ( 'a' <= tmpVal + && 'z' >= tmpVal ) + || ( 'A' <= tmpVal + && 'Z' >= tmpVal ) + || ( '0' <= tmpVal + && '9' >= tmpVal ) + || ( '_' == tmpVal ) ) + { + // go on the next char ... + continue; + } + } + } + m_areaFind.start = i; + m_areaFind.stop = i + findLen; + /* + if (i == 812) { + std::cout << std::endl; + for(int32_t k=startPos; k check if \w is not present (other regExp will be <> ...) + [anjdi] or [a-gt-j] range + . dot [^\x00-\x08\x0A-\x1F\x7F] +==> TODO : + $ End / Start of line of line ==> ce sera un truc suplémentaire comme le \@ + ^in the [] invertion of the range element + +multiplicity : + * ==> {0, 2147483647} + ? ==> {0, 1} + + ==> {1, 2147483647} + {x} ==> {x, x} + {x,y} ==> {x, y} +*/ + +class RegExpNode; + +/** + * @brief Node Elements for every-one + */ +class RegExpNode{ + public : + RegExpNode(void); + virtual ~RegExpNode(void) { }; + virtual int32_t Generate(EdnVectorBin &data, int32_t startPos, int32_t nbElement); + virtual bool Parse(EdnVectorBuf &data, int32_t currentPos, int32_t lenMax, int32_t &findLen); + virtual void Display(int32_t level); + void SetMult(int32_t min, int32_t max); + protected: + int32_t GetMultMin(void) { return m_multipleMin; }; + int32_t GetMultMax(void) { return m_multipleMax; }; + protected : + int32_t m_multipleMin; //!< minimum repetition (included) + int32_t m_multipleMax; //!< maximum repetition (included) + // Data Section ... (can have no data...) + EdnVectorBin m_RegExpData; //!< data to parse and compare in some case ... +}; + + +class RegExpNodePThese : public RegExpNode { + public : + RegExpNodePThese(void) { }; + ~RegExpNodePThese(void); + int32_t Generate(EdnVectorBin &data); + bool Parse(EdnVectorBuf &data, int32_t currentPos, int32_t lenMax, int32_t &findLen); + void Display(int32_t level); + protected : + // SubNodes : + EdnVectorBin m_subNode; + //int32_t m_posPthese; //!< position of the element is detected in the output element +}; + +class RegExpNodePTheseElem : public RegExpNode { + public : + RegExpNodePTheseElem(void) { }; + ~RegExpNodePTheseElem(void); + int32_t Generate(EdnVectorBin &data); + bool Parse(EdnVectorBuf &data, int32_t currentPos, int32_t lenMax, int32_t &findLen); + void Display(int32_t level); + protected : + // SubNodes : + EdnVectorBin m_subNode; + private : + bool SetMultiplicityOnLastNode(int32_t min, int32_t max); +}; + + +class RegExpNodeValue : public RegExpNode { + public : + RegExpNodeValue(void) { }; + ~RegExpNodeValue(void) { }; + int32_t Generate(EdnVectorBin &data); + bool Parse(EdnVectorBuf &data, int32_t currentPos, int32_t lenMax, int32_t &findLen); + void Display(int32_t level); + protected : + // SubNodes : + EdnVectorBin m_data; +}; + +class RegExpNodeBracket : public RegExpNode { + public : + RegExpNodeBracket(void) { }; + ~RegExpNodeBracket(void) { }; + int32_t Generate(EdnVectorBin &data); + bool Parse(EdnVectorBuf &data, int32_t currentPos, int32_t lenMax, int32_t &findLen); + void Display(int32_t level); + protected : + // SubNodes : + EdnVectorBin m_data; +}; + +class RegExpNodeDigit : public RegExpNode { + public : + RegExpNodeDigit(void) { }; + ~RegExpNodeDigit(void) { }; + bool Parse(EdnVectorBuf &data, int32_t currentPos, int32_t lenMax, int32_t &findLen); + void Display(int32_t level); +}; +class RegExpNodeDigitNot : public RegExpNode { + public : + RegExpNodeDigitNot(void) { }; + ~RegExpNodeDigitNot(void) { }; + bool Parse(EdnVectorBuf &data, int32_t currentPos, int32_t lenMax, int32_t &findLen); + void Display(int32_t level); +}; +class RegExpNodeLetter : public RegExpNode { + public : + RegExpNodeLetter(void) { }; + ~RegExpNodeLetter(void) { }; + bool Parse(EdnVectorBuf &data, int32_t currentPos, int32_t lenMax, int32_t &findLen); + void Display(int32_t level); +}; +class RegExpNodeLetterNot : public RegExpNode { + public : + RegExpNodeLetterNot(void) { }; + ~RegExpNodeLetterNot(void) { }; + bool Parse(EdnVectorBuf &data, int32_t currentPos, int32_t lenMax, int32_t &findLen); + void Display(int32_t level); +}; +class RegExpNodeWhiteSpace : public RegExpNode { + public : + RegExpNodeWhiteSpace(void) { }; + ~RegExpNodeWhiteSpace(void) { }; + bool Parse(EdnVectorBuf &data, int32_t currentPos, int32_t lenMax, int32_t &findLen); + void Display(int32_t level); +}; +class RegExpNodeWhiteSpaceNot : public RegExpNode { + public : + RegExpNodeWhiteSpaceNot(void) { }; + ~RegExpNodeWhiteSpaceNot(void) { }; + bool Parse(EdnVectorBuf &data, int32_t currentPos, int32_t lenMax, int32_t &findLen); + void Display(int32_t level); +}; +class RegExpNodeWordChar : public RegExpNode { + public : + RegExpNodeWordChar(void) { }; + ~RegExpNodeWordChar(void) { }; + bool Parse(EdnVectorBuf &data, int32_t currentPos, int32_t lenMax, int32_t &findLen); + void Display(int32_t level); +}; +class RegExpNodeWordCharNot : public RegExpNode { + public : + RegExpNodeWordCharNot(void) { }; + ~RegExpNodeWordCharNot(void) { }; + bool Parse(EdnVectorBuf &data, int32_t currentPos, int32_t lenMax, int32_t &findLen); + void Display(int32_t level); +}; +class RegExpNodeDot : public RegExpNode { + public : + RegExpNodeDot(void) { }; + ~RegExpNodeDot(void) { }; + bool Parse(EdnVectorBuf &data, int32_t currentPos, int32_t lenMax, int32_t &findLen); + void Display(int32_t level); +}; + +class RegExpNodeSOL : public RegExpNode { + public : + RegExpNodeSOL(void) { }; + ~RegExpNodeSOL(void) { }; + bool Parse(EdnVectorBuf &data, int32_t currentPos, int32_t lenMax, int32_t &findLen); + void Display(int32_t level); +}; + +class RegExpNodeEOL : public RegExpNode { + public : + RegExpNodeEOL(void) { }; + ~RegExpNodeEOL(void) { }; + bool Parse(EdnVectorBuf &data, int32_t currentPos, int32_t lenMax, int32_t &findLen); + void Display(int32_t level); +}; + +typedef struct { + int32_t start; + int32_t stop; +}elementPos_ts; + + +// Regular expression manager +class EdnRegExp { + // public API : + public: + // create the regular expression + EdnRegExp(const char *exp); + EdnRegExp(Edn::String &exp); + EdnRegExp(void); + ~EdnRegExp(void); + void SetRegExp(const char *exp); + void SetRegExp(Edn::String &exp); + Edn::String GetRegExp(void) { return m_expressionRequested;}; + bool GetStatus(void) { return m_isOk;}; + // process the regular expression + bool Process( EdnVectorBuf &SearchIn, + int32_t startPos, + int32_t endPos, + char escapeChar=0); + int32_t Start(void) { return m_areaFind.start; }; + int32_t Stop(void) { return m_areaFind.stop; }; + void Display(void); + // internal parameters + private: + Edn::String m_expressionRequested; // TODO : Remove ... + elementPos_ts m_areaFind; //!< position around selection + RegExpNodePThese m_exprRootNode; //!< The tree where data is set + bool m_isOk; //!< Known if we can process with this regExp + bool m_notBeginWithChar; //!< The regular expression must not have previously a char [a-zA-Z0-9_] + bool m_notEndWithChar; //!< The regular expression must not have after the end a char [a-zA-Z0-9_] + // internal access + private: + bool CheckGoodPosition(EdnVectorBin tmpExp, int32_t &pos); + bool CheckGoodPosition(EdnVectorBin tmpExp); + + +}; + +#endif diff --git a/Sources/tools/EdnTemplate/EdnTemplateTest.cpp b/Sources/tools/EdnTemplate/EdnTemplateTest.cpp new file mode 100644 index 0000000..c4c29c8 --- /dev/null +++ b/Sources/tools/EdnTemplate/EdnTemplateTest.cpp @@ -0,0 +1,29 @@ + +#include "tools_debug.h" +#include "tools_globals.h" + +#include "EdnVectorBin.h" + +void TestTemplate(void) +{ + + EDN_WARNING("Start Template Test ..."); + EdnVectorBin plop; + EdnVectorBin plop2; + + plop.PushBack(15365); + plop.PushBack(1); + plop.PushBack(2); + plop.PushBack(3); + plop.PushBack(4); + + EDN_INFO("data is : " << plop[0]); + EDN_INFO("data is : " << plop[1]); + EDN_INFO("data is : " << plop[2]); + EDN_INFO("data is : " << plop[3]); + + plop2.PushBack(65); + + EDN_INFO("data is : " << plop2[0]); + +} diff --git a/Sources/tools/EdnTemplate/EdnTree.h b/Sources/tools/EdnTemplate/EdnTree.h new file mode 100644 index 0000000..c03d698 --- /dev/null +++ b/Sources/tools/EdnTemplate/EdnTree.h @@ -0,0 +1,186 @@ +/** + ******************************************************************************* + * @file EdnTree.h + * @brief Editeur De N'ours : Basic tree in a vector For none expensive tree (template) + * @author Edouard DUPIN + * @date 04/04/2011 + * @par Project + * Edn + * + * @par Copyright + * Copyright 2010 Edouard DUPIN, all right reserved + * + * This software is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY. + * + * Licence summary : + * You can modify and redistribute the sources code and binaries. + * You can send me the bug-fix + * You can not earn money with this Software (if the source extract from Edn + * represent less than 50% of original Sources) + * Term of the licence in in the file licence.txt. + * + ******************************************************************************* + */ +#ifndef __EDN_TREE_H__ +#define __EDN_TREE_H__ + +#undef __class__ +#define __class__ "EdnTreeElement" + +template < class T > class EdnTreeElement +{ + public: + EdnTreeElement(int32_t parent, int32_t id, T &maNouvelleClass) : elementPtr(NULL), m_parent(parent), m_id(id) + { + elementPtr = new T(maNouvelleClass); + }; + ~EdnTreeElement(void) + { + delete(elementPtr); + }; + EdnTreeElement(const EdnTreeElement &mustCopy ) : elementPtr(NULL), m_parent(mustCopy.m_parent), m_id(mustCopy.m_id) + { + elementPtr = new T(*mustCopy.elementPtr); + } + int32_t GetParrent(void) { return m_parent;}; + int32_t GetId(void) { return m_id;}; + T* GetPtr() const + { + return elementPtr; + }; + + private: + T* elementPtr; // pointer on the curent element + int32_t m_parent; + int32_t m_id; +}; + +#undef __class__ +#define __class__ "EdnTree" + +#define ROOT_NODE_ID (-1) + +template < class T > class EdnTree +{ + public: + // constructeur et destructeur + EdnTree(void) + { + m_LastId = 0; + }; + + ~EdnTree(void) + { + + }; + // Common function ... + int32_t GetNumberNode(void) + { + return m_listElement.size(); + }; + + int32_t GetDepth(void) + { + // TODO : ... + return 0; + }; + //!< add an element in the tree + int32_t Add(T &maNouvelleClass, int32_t parent=-1) + { + if (true == CheckPresenceParrent(parent)) { + // create the local element + EdnTreeElement nouvelElement(parent, m_LastId, maNouvelleClass); + // add it in the list + m_listElement.push_back(nouvelElement); + // increment the ID of the element + m_LastId++; + // Add is Ok, in theory ... + return m_LastId-1; + } + return -2; + }; + + bool Remove(int32_t id) + { + return false; + }; + + bool Clear(void) + { + return false; + }; + + T* Get(int32_t id) + { + // try to find ID + int32_t realID = FindElementWithId(id); + // when we find it, check it + if (0 > realID || realID >= m_LastId) { + return NULL; + } + // Return the element : + return m_listElement[realID].GetPtr(); + }; + + std::vector GetListSubNode( int32_t parentId = ROOT_NODE_ID) + { + std::vector res; + int32_t i; + for (i=0; i<(int32_t)m_listElement.size(); i++) { + if (m_listElement[i].GetParrent() == parentId) { + // Add the element ID in the list ... + res.push_back(m_listElement[i].GetId()); + } + } + return res; + }; + + std::vector Root(void) + { + return GetListSubNode(ROOT_NODE_ID); + }; + + + private: + int32_t m_LastId; + std::vector< EdnTreeElement > m_listElement; //!< list of element... + + bool CheckPresence(int32_t id) + { + int32_t i; + for (i=0; i<(int32_t)m_listElement.size(); i++) { + if (m_listElement[i].GetId() == id) { + return true; + } + } + return false; + }; + + bool CheckPresenceParrent(int32_t parrentId) + { + if (ROOT_NODE_ID == parrentId) { + return true; + } + return CheckPresence(parrentId); + }; + + int32_t FindElementWithId(int32_t id) + { + int32_t i; + for (i=0; i<(int32_t)m_listElement.size(); i++) { + if (m_listElement[i].GetId() == id) { + return i; + } + } + return ROOT_NODE_ID; + }; +}; + + + +#undef __class__ +#define __class__ NULL + +#endif + diff --git a/Sources/tools/EdnTemplate/EdnVector.h b/Sources/tools/EdnTemplate/EdnVector.h new file mode 100644 index 0000000..24a5e6c --- /dev/null +++ b/Sources/tools/EdnTemplate/EdnVector.h @@ -0,0 +1,497 @@ +/** + ******************************************************************************* + * @file EdnEdnVector.h + * @brief Editeur De N'ours : Basic EdnVector (template) + * @author Edouard DUPIN + * @date 07/04/2011 + * @par Project + * Edn + * + * @par Copyright + * Copyright 2010 Edouard DUPIN, all right reserved + * + * This software is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY. + * + * Licence summary : + * You can modify and redistribute the sources code and binaries. + * You can send me the bug-fix + * You can not earn money with this Software (if the source extract from Edn + * represent less than 50% of original Sources) + * Term of the licence in in the file licence.txt. + * + ******************************************************************************* + */ +#ifndef __EDN_EdnVector_H__ +#define __EDN_EdnVector_H__ + +#undef __class__ +#define __class__ "EdnEdnVector" + +/** + * @brief EdnVector classes ... + * + * @tparam[in] T The type of objects to store. + * @tparam[in] INC Incrementation mode (0 : Exponential to 200 and increment by stemp of 200) + * + * @todo : Need to add : popBack / Assign / Insert / Erase / Swap / Clear + * + * m_data + * ---------- |-----------------------| + * | 0 |-------->| Class Data | + * |--------| |-----------------------| + * | 1 |----| + * |--------| | + * | 2 |====|==============| |-----------------------| + * |--------| | --->| Class Data | + * m_count | 3 |-| | |-----------------------| + * |--------| | | + * | x | | | |-----------------------| + * |--------| | -------->| Class Data | + * | x | | |-----------------------| + * |--------| | + * | x | | + * |--------| | |-----------------------| + * | x | --------------------->| Class Data | + * |--------| |-----------------------| + * | x | + * |--------| + * | x | + * |--------| + * m_size | x | + * ---------- + * + */ +template class EdnVector: +{ + public: + class Iterator: + { + // Private data : + private: + int32_t m_current; // curent Id on the vector + EdnVector * m_EdnVector; // Pointer on the curent element of the vector + public: + /** + * @brief Basic itarator constructor with no link with an EdnVector + */ + Iterator(): + m_current(-1), + m_EdnVector(NULL) + { + // nothing to do ... + } + /** + * @brief Recopy constructor on a specific EdnVector. + * @param[in] otherIterator The Iterator that might be copy + */ + Iterator(const Iterator & otherIterator): + m_current(otherIterator.m_current), + m_EdnVector(otherIterator.m_EdnVector) + { + // nothing to do ... + } + /** + * @brief Asignation operator. + * @param[in] otherIterator The Iterator that might be copy + * @return reference on the curent Iterator + */ + Iterator& operator=(const Iterator & otherIterator) + { + m_current = otherIterator.m_current; + m_EdnVector = otherIterator.m_EdnVector; + return *this; + } + /** + * @brief Basic destructor + */ + ~Iterator() + { + m_current = -1; + m_EdnVector = NULL; + } + /** + * @brief basic boolean cast + * @return true if the element is present in the EdnVector size + */ + operator bool () + { + if( 0 <= m_current + && m_current < m_EdnVector->Size() ) + { + return true; + } else { + return false; + } + } + /** + * @brief Incremental operator + * @return Reference on the current iterator incremented + */ + Iterator& operator++ () + { + if( NULL != m_EdnVector + && m_current < m_EdnVector->Size() ) + { + m_current++; + } + return *this; + } + /** + * @brief Decremental operator + * @return Reference on the current iterator decremented + */ + Iterator& operator-- () + { + if (m_current >= 0) { + m_current--; + } + return *this; + } + /** + * @brief Incremental operator + * @return Reference on a new iterator and increment the other one + */ + Iterator operator++ (int32_t) + { + Iterator it(*this); + ++(*this); + return it; + } + /** + * @brief Decremental operator + * @return Reference on a new iterator and decrement the other one + * + */ + Iterator operator-- (int32_t) + { + Iterator it(*this); + --(*this); + return it; + } + /** + * @brief + * + * @param[in,out] --- + * + * @return --- + * + */ + T * operator-> () const + { + EDN_CHECK_INOUT(m_current >= 0 && m_current < m_EdnVector->Size()); + return &m_EdnVector->Get(m_current); + } + /** + * @brief + * + * @param[in,out] --- + * + * @return --- + * + */ + T & operator* () const + { + EDN_CHECK_INOUT(m_current >= 0 && m_current < m_EdnVector->Size()); + return m_EdnVector->Get(m_current); + } + private: + /** + * @brief + * + * @param[in,out] --- + * + * @return --- + * + */ + Iterator(EdnVector * EdnVector, int pos): + m_current(pos), + m_EdnVector(EdnVector) + { + // nothing to do ... + } + friend class EdnVector; + }; + + /** + * @brief + * + * @param[in,out] --- + * + * @return --- + * + */ + EdnVector(int count = 0): + m_data(NULL), + m_count(0), + m_size(0) + { + Resize(count); + } + + /** + * @brief + * + * @param[in,out] --- + * + * @return --- + * + */ + EdnVector(const EdnVector & EdnVector): + m_size(EdnVector.m_size), + m_count(EdnVector.m_count), + m_data(NULL) + { + int32_t i; + EDN_MALLOC_CAST(m_data, m_size, T, reinterpret_cast); + for(i=0; i & EdnVector) + { + int32_t i; + this->~EdnVector(); + m_size = EdnVector.m_size; + m_count = EdnVector.m_count; + EDN_MALLOC_CAST(m_data, m_size, T, reinterpret_cast); + for(i=0; i res + || res >= Size()) + { + return -1 + } else { + return res; + } + } + + /** + * @brief + * + * @param[in,out] --- + * + * @return --- + * + */ + void PushBack(const T& item) + { + int32_t idx = Size(); + Resize(idx+1); + Get(idx) = item; + } + + /** + * @brief + * + * @param[in,out] --- + * + * @return --- + * + */ + Iterator Get(int pos) + { + return Iterator(this, pos); + } + + /** + * @brief + * + * @param[in,out] --- + * + * @return --- + * + */ + Iterator Begin() + { + return Get(0); + } + + /** + * @brief + * + * @param[in,out] --- + * + * @return --- + * + */ + Iterator End() + { + return Get( Size()-1 ); + } + + /** + * @brief + * + * @param[in,out] --- + * + * @return --- + * + */ + void Resize(int32_t count) + { + int32_t i; + // Reallocate memory + if (count > m_size) { + ChangeAllocation(count); + } + + // Remove deprecated element + for(i=count; i m_size) { + // generate new size + while(count > m_size) { + if (INC) { + m_size = (m_size + INC) + } else if (m_size==0) { + m_size = 1; + } else { + m_size = m_size * 2; + } + } + // Allocate the curent element + T * data = NULL; + EDN_MALLOC_CAST(data, m_size, T, reinterpret_cast); + for(int i=0; i + * ---------------------------------------- + * | 0 | + * |--------------------------------------| + * | 1 | + * |--------------------------------------| + * | 2 | + * |--------------------------------------| + * m_size | 3 | + * |--------------------------------------| + * | x | + * |--------------------------------------| + * | x | + * |--------------------------------------| + * | x | + * |--------------------------------------| + * | x | + * |--------------------------------------| + * | x | + * |--------------------------------------| + * | x | + * |--------------------------------------| + * m_allocated | x | + * ---------------------------------------- + * + */ +template class EdnVectorBin +{ + public: + class Iterator + { + // Private data : + private: + int32_t m_current; // curent Id on the vector + EdnVectorBin * m_EdnVectorBin; // Pointer on the curent element of the vectorBin + public: + /** + * @brief Basic itarator constructor with no link with an EdnVector + */ + Iterator(): + m_current(-1), + m_EdnVectorBin(NULL) + { + // nothing to do ... + } + /** + * @brief Recopy constructor on a specific EdnVector. + * @param[in] otherIterator The Iterator that might be copy + */ + Iterator(const Iterator & otherIterator): + m_current(otherIterator.m_current), + m_EdnVectorBin(otherIterator.m_EdnVectorBin) + { + // nothing to do ... + } + /** + * @brief Asignation operator. + * @param[in] otherIterator The Iterator that might be copy + * @return reference on the curent Iterator + */ + Iterator& operator=(const Iterator & otherIterator) + { + m_current = otherIterator.m_current; + m_EdnVectorBin = otherIterator.m_EdnVectorBin; + return *this; + } + /** + * @brief Basic destructor + */ + ~Iterator() + { + m_current = -1; + m_EdnVectorBin = NULL; + } + /** + * @brief basic boolean cast + * @return true if the element is present in the EdnVector size + */ + operator bool () + { + if( 0 <= m_current + && m_current < m_EdnVectorBin->Size() ) + { + return true; + } else { + return false; + } + } + /** + * @brief Incremental operator + * @return Reference on the current iterator incremented + */ + Iterator& operator++ () + { + if( NULL != m_EdnVectorBin + && m_current < m_EdnVectorBin->Size() ) + { + m_current++; + } + return *this; + } + /** + * @brief Decremental operator + * @return Reference on the current iterator decremented + */ + Iterator& operator-- () + { + if (m_current >= 0) { + m_current--; + } + return *this; + } + /** + * @brief Incremental operator + * @return Reference on a new iterator and increment the other one + */ + Iterator operator++ (int32_t) + { + Iterator it(*this); + ++(*this); + return it; + } + /** + * @brief Decremental operator + * @return Reference on a new iterator and decrement the other one + */ + Iterator operator-- (int32_t) + { + Iterator it(*this); + --(*this); + return it; + } + /** + * @brief Get reference on the current Element + * @return the reference on the current Element + */ + MY_TYPE & operator-> () const + { + EDN_CHECK_INOUT(m_current >= 0 && m_current < m_EdnVectorBin->Size()); + return &m_EdnVectorBin->Get(m_current); + } + /** + * @brief Get reference on the current Element + * @return the reference on the current Element + */ + MY_TYPE & operator* () const + { + EDN_CHECK_INOUT(m_current >= 0 && m_current < m_EdnVectorBin->Size()); + return m_EdnVectorBin->Get(m_current); + } + private: + /** + * @brief + * + * @param[in,out] --- + * + * @return --- + * + */ + Iterator(EdnVectorBin * Evb, int32_t pos): + m_current(pos), + m_EdnVectorBin(Evb) + { + // nothing to do ... + } + friend class EdnVectorBin; + }; + + private: + MY_TYPE * m_data; //!< pointer on the curetn table of Data + int32_t m_size; //!< nb Element in the buffer + int32_t m_allocated; //!< Current allocated size + int32_t m_increment; //!< methode of increment + public: + /** + * @brief Create an empty vector + * @param[in] count Minimum request size of the Buffer + */ + EdnVectorBin(int32_t count = 0): + m_data(NULL), + m_size(0), + m_allocated(0), + m_increment(1) + { + ChangeAllocation(count); + } + + /** + * @brief Re-copy constructor (copy all needed data) + * @param[in] Evb Vector that might be copy + */ + EdnVectorBin(const EdnVectorBin & Evb) + { + m_allocated = Evb.m_allocated; + m_size = Evb.m_size; + m_increment = Evb.m_increment; + m_data = NULL; + //EDN_DEBUG("USE Specific vector allocator ... Evb.m_size=" << Evb.m_size << " Evb.m_increment=" << Evb.m_increment); + // allocate all same data + EDN_MALLOC(m_data, m_allocated, MY_TYPE); + EDN_ASSERT(NULL!=m_data, "Error in data allocation"); + // Copy all data ... + memcpy(m_data, Evb.m_data, m_allocated * sizeof(MY_TYPE) ); + } + + /** + * @brief Destructor of the current Class + */ + ~EdnVectorBin() + { + if (NULL!=m_data) { + EDN_FREE(m_data); + m_data = NULL; + m_allocated = 0; + m_size = 0; + m_increment = 0; + } + } + + /** + * @brief Re-copy operator + * @param[in] Evb Vector that might be copy + * @return reference on the curent re-copy vector + */ + EdnVectorBin& operator=(const EdnVectorBin & Evb) + { + //EDN_DEBUG("USE RECOPY vector ... Evb.m_size=" << Evb.m_size << " Evb.m_increment=" << Evb.m_increment); + if( this != &Evb ) // avoid copy to itself + { + if (NULL!=m_data) { + EDN_FREE(m_data); + m_data = NULL; + } + // Set the new value + m_allocated = Evb.m_allocated; + m_size = Evb.m_size; + m_increment = Evb.m_increment; + // allocate all same data + EDN_MALLOC(m_data, m_allocated, MY_TYPE); + EDN_ASSERT(NULL!=m_data, "Error in data allocation"); + // Copy all data ... + memcpy(m_data, Evb.m_data, m_allocated * sizeof(MY_TYPE) ); + } + // Return the curent pointer + return *this; + } + + /** + * @brief Add at the Last position of the Vector + * @param[in] item Element to add at the end of vector + */ + EdnVectorBin& operator+= (const EdnVectorBin & Evb) // += operator + { + int32_t nbElememt = Evb.Size(); + int32_t idx = m_size; + Resize(m_size+nbElememt); + memcpy(&m_data[idx], &Evb.m_data[0], nbElememt*sizeof(MY_TYPE) ); + // Return the curent pointer + return *this; + } + + /** + * @brief Set increment mode of this vector (default it match corectly with the number of element inside) + * @param[in] newIncrementNumber methode requested + */ + void SetIncrement(int32_t newIncrementNumber) + { + m_increment = newIncrementNumber; + } + + /** + * @brief Get the number of element in the vector + * @return The number requested + */ + int32_t Size() const + { + return m_size; + } + + /** + * @brief Get the Allocated size in the vector + * @return The size of allocation + */ + int32_t AllocatedSize() const + { + return m_allocated; + } + + /** + * @brief Get a current element in the vector + * @param[in] pos Desired position read + * @return Reference on the Element + */ + MY_TYPE& Get(int32_t pos) + { + return m_data[pos]; + } + + /** + * @brief Get an copy Element an a special position + * @param[in] pos Position in the vector that might be get [0..Size()] + * @return An reference on the copy of selected element + */ + MY_TYPE& operator[] (int32_t pos) + { + return Get(pos); + } + + /** + * @brief Get an Element an a special position + * @param[in] pos Position in the vector that might be get [0..Size()] + * @return An reference on the selected element + */ + const MY_TYPE& operator[] (int32_t pos) const + { + return m_data[pos]; + } + + /** + * @brief Add at the Last position of the Vector + * @param[in] item Element to add at the end of vector + */ + void PushBack(const MY_TYPE& item) + { + int32_t idx = m_size; + Resize(m_size+1); + m_data[idx] = item; + } + + /** + * @brief Add at the Last position of the Vector + * @param[in] item Element to add at the end of vector + */ + void PushBack(const MY_TYPE * item, int32_t nbElement) + { + if (NULL == item) { + return; + } + int32_t idx = m_size; + Resize(m_size+nbElement); + memcpy(&m_data[idx], item, nbElement*sizeof(MY_TYPE) ); + } + + /** + * @brief Remove the last element of the vector + */ + void PopBack(void) + { + if(m_size>0) { + Resize(m_size-1); + } + } + + /** + * @brief Remove all alement in the current vector + */ + void Clear(void) + { + if(m_size>0) { + Resize(0); + } + } + + /** + * @brief + * + * @param[in,out] --- + * + * @return --- + * + */ + void Insert(int32_t pos, const MY_TYPE& item) + { + if (pos>m_size) { + EDN_ERROR(" can not insert Element at this position : " << pos << " > " << m_size<< " add it at the end ... "); + PushBack(item); + return; + } + int32_t tmpSize = m_size; + // Request resize of the current buffer + Resize(m_size+1); + // move curent data + memmove((m_data + pos + 1), (m_data + pos), (tmpSize - pos)*sizeof(MY_TYPE) ); + // affectation of the current element + m_data[pos] = item; + } + + /** + * @brief + * + * @param[in,out] --- + * + * @return --- + * + */ + void Insert(int32_t pos, const MY_TYPE * item, int32_t nbElement) + { + if (pos>m_size) { + EDN_WARNING(" can not insert Element at this position : " << pos << " > " << m_size << " add it at the end ... "); + PushBack(item, nbElement); + return; + } + int32_t tmpSize = m_size; + // Request resize of the current buffer + Resize(m_size+nbElement); + // move curent data (after the position) + memmove((m_data + pos + nbElement), (m_data + pos), (tmpSize - pos)*sizeof(MY_TYPE) ); + // affectation of all input element + memcpy(&m_data[pos], item, nbElement*sizeof(MY_TYPE) ); + } + + /** + * @brief Remove one element + * + * @param[in] pos Position to remove the data + * + * @return --- + * + */ + void Erase(int32_t pos) + { + if (pos>m_size) { + EDN_ERROR(" can not Erase Element at this position : " << pos << " > " << m_size); + return; + } + int32_t tmpSize = m_size; + // move curent data + memmove((m_data + pos), (m_data + pos + 1), (tmpSize - (pos+1))*sizeof(MY_TYPE) ); + // Request resize of the current buffer + Resize(m_size-1); + } + + /** + * @brief Remove one element + * + * @param[in] pos Position to remove the data + * @param[in] nbElement number of element to remove + * + * @return --- + * + */ + void Erase(int32_t pos, int32_t nbElement) + { + if (pos>m_size) { + EDN_ERROR(" can not Erase Element at this position : " << pos << " > " << m_size); + return; + } + if (pos+nbElement>m_size) { + nbElement = m_size - pos; + } + int32_t tmpSize = m_size; + // move curent data + memmove((m_data + pos), (m_data + pos + nbElement), (tmpSize - (pos+nbElement))*sizeof(MY_TYPE) ); + // Request resize of the current buffer + Resize(m_size-nbElement); + } + + /** + * @brief extract data between two point : + * @param[in] posStart start position to extract data + * @param[in] posEnd End position to extract data + * @return the extracted vector + */ + EdnVectorBin Extract(int32_t posStart = 0, int32_t posEnd=0x7FFFFFFF) + { + EdnVectorBin out; + if (posStart < 0) { + posStart = 0; + } else if (posStart >= Size() ) { + return out; + } + if (posEnd < 0) { + return out; + } else if (posEnd >= Size() ) { + posEnd = Size(); + } + out.PushBack(&m_data[posStart], posEnd-posStart); + return out; + } + + /** + * @brief Set the minimum allocation in memory for the curent vector ==> reallocate the + * buffer to fit exactly the mumber of element needed + */ + void Fit(void) + { + if (m_size > m_allocated) { + // Reallocate the curent data to the correct size ... + EDN_REALLOC(m_data, m_size, MY_TYPE); + } + // Check result with assert : + EDN_ASSERT(NULL!=m_data, "Error in data Fitting"); + m_allocated = m_size; + } + + /** + * @brief Get an iterator an an specific position + * @param[in] pos Requested position of the iterator in the vector + * @return The Iterator + */ + Iterator Position(int32_t pos) + { + return Iterator(this, pos); + } + + /** + * @brief Get an Iterator on the start position of the Vector + * @return The Iterator + */ + Iterator Begin(void) + { + return Position(0); + } + + /** + * @brief Get an Iterator on the end position of the Vector + * @return The Iterator + */ + Iterator End(void) + { + return Position( Size()-1 ); + } + + private: + /** + * @brief Change the current size of the vector + * @param[in] newSize New requested size of element in the vector + */ + void Resize(int32_t newSize) + { + // Reallocate memory + if (newSize > m_allocated) { + ChangeAllocation(newSize); + } + m_size = newSize; + } + + /** + * @brief Change the current allocation to the corect one (depend on the current size) + * @param[in] newSize Minimum number of element needed + */ + void ChangeAllocation(int32_t newSize) + { + // set the minimal size to 1 + if(newSize <= 0) { + newSize = 1; + } + int32_t requestSize = m_allocated; + // set the size with the corect chose type : + if (newSize == m_allocated) { + return; + } else if (newSize < requestSize) { + // down the size of the vector: + if (0==m_increment) { + // never down size... + } else { + int32_t devide = m_increment; + if (devide == 0) { + devide = 1; + } + int32_t numberOfStep = m_allocated / devide; + if (newSize< ((numberOfStep-2)*devide + devide/2) ) { + //Allow Reallocation of a new size shoerter + requestSize = ((newSize / devide)+1) * devide; + } + } + } else { + while(newSize > requestSize) { + if (0 == requestSize) { + requestSize = 1; + } else if (0==m_increment) { + requestSize = requestSize * 2; + } else { + requestSize = (requestSize + m_increment); + } + } + } + // No reallocation needed : + if (requestSize == m_allocated) { + return; + } + // check if something is allocated : + if (NULL == m_data) { + // no data allocated ==> request an allocation (might be the first) + EDN_MALLOC(m_data, requestSize, MY_TYPE); + } else { + // move datas + EDN_REALLOC(m_data, requestSize, MY_TYPE); + } + // Check result with assert : + EDN_ASSERT(NULL!=m_data, "Error in data allocation"); + // set the new allocation size + m_allocated = requestSize; + } + +}; + +#undef __class__ +#define __class__ NULL + +#endif diff --git a/Sources/tools/EdnTemplate/EdnVectorBuf.cpp b/Sources/tools/EdnTemplate/EdnVectorBuf.cpp new file mode 100644 index 0000000..49d60d3 --- /dev/null +++ b/Sources/tools/EdnTemplate/EdnVectorBuf.cpp @@ -0,0 +1,706 @@ +/** + ******************************************************************************* + * @file EdnEdnVectorBuf.cpp + * @brief Editeur De N'ours : Basic EdnVectorBuf Basic binary vector for all type of storage + * @author Edouard DUPIN + * @date 07/04/2011 + * @par Project + * Edn + * + * @par Copyright + * Copyright 2010 Edouard DUPIN, all right reserved + * + * This software is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY. + * + * Licence summary : + * You can modify and redistribute the sources code and binaries. + * You can send me the bug-fix + * You can not earn money with this Software (if the source extract from Edn + * represent less than 50% of original Sources) + * Term of the licence in in the file licence.txt. + * + ******************************************************************************* + */ + + +#include "tools_debug.h" +#include "tools_globals.h" +#include "toolsMemory.h" +#include "EdnVectorBuf.h" + +#undef __class__ +#define __class__ "EdnEdnVectorBuf" + + +/** + * @brief Create an empty vector + * + * @param[in] count Minimum request size of the Buffer + * + * @return --- + * + */ +EdnVectorBuf::EdnVectorBuf(int32_t count) +{ + m_data = NULL; + m_allocated = 0; + m_gapStart = 0; + m_gapEnd = GAP_SIZE_MIN; + ChangeAllocation(count+GAP_SIZE_MIN); +} + + +/** + * @brief Re-copy constructor (copy all needed data) + * + * @param[in] Evb Vector that might be copy + * + * @return --- + * + */ +EdnVectorBuf::EdnVectorBuf(const EdnVectorBuf & Evb) +{ + m_allocated = Evb.m_allocated; + m_data = NULL; + m_gapStart = Evb.m_gapStart; + m_gapEnd = Evb.m_gapEnd; + + // allocate all same data + EDN_MALLOC(m_data, m_allocated, int8_t); + EDN_ASSERT(NULL!=m_data, "Error in data allocation"); + // Copy all data ... + memcpy(m_data, Evb.m_data, m_allocated * sizeof(int8_t) ); +} + + +/** + * @brief Destructor of the current Class + * + * @param --- + * + * @return --- + * + */ +EdnVectorBuf::~EdnVectorBuf() +{ + if (NULL!=m_data) { + EDN_FREE(m_data); + m_data = NULL; + m_allocated = 0; + m_gapStart = 0; + m_gapEnd = 0; + } +} + + +static int32_t getFileSize(FILE *myFile) +{ + if (NULL == myFile) { + return 0; + } + int32_t size = 0; + + fseek(myFile, 0, SEEK_END); + size = ftell(myFile); + fseek(myFile, 0, SEEK_SET); + return size; +} + + +/** + * @brief Save in the current file open + * + * @param[in,out] myFile pointer on the file where data might be writed + * + * @return true if OK / false if an error occured + * + */ +bool EdnVectorBuf::DumpIn(FILE *myFile) +{ + bool ret = true; + // write Data + (void)fwrite(m_data, sizeof(int8_t), m_gapStart, myFile); + (void)fwrite(&m_data[m_gapEnd], sizeof(int8_t), m_allocated - m_gapEnd, myFile); + return ret; +} + + +/** + * @brief Load in the current file open + * + * @param[in,out] myFile pointer on the file where data might be read + * + * @return true if OK / false if an error occured + * + */ +bool EdnVectorBuf::DumpFrom(FILE *myFile) +{ + bool ret = true; + int32_t length = getFileSize(myFile); + // error case ... + if (length < 0) { + length = 0; + } + // allocate the current buffer : + ChangeAllocation(length + GAP_SIZE_MIN); + + // insert Data + int32_t nbReadData = fread(&m_data[GAP_SIZE_MIN], sizeof(int8_t), length, myFile); + EDN_INFO("load data : filesize=" << length << ", readData=" << nbReadData); + // check ERROR + if (nbReadData != length) { + EDN_ERROR("load data pb : filesize=" << length << ", readData=" << nbReadData); + ret = false; + } + // set the gapsize at the end ... + m_gapStart = 0; + m_gapEnd = GAP_SIZE_MIN; + return ret; +} + + + +/** + * @brief Re-copy operator + * + * @param[in] Evb Vector that might be copy + * + * @return reference on the curent re-copy vector + * + */ +EdnVectorBuf& EdnVectorBuf::operator=(const EdnVectorBuf & Evb) +{ + if( this != &Evb ) // avoid copy to itself + { + if (NULL!=m_data) { + EDN_FREE(m_data); + m_data = NULL; + } + // Set the new value + m_allocated = Evb.m_allocated; + m_gapStart = Evb.m_gapStart; + m_gapEnd = Evb.m_gapEnd; + // allocate all same data + EDN_MALLOC(m_data, m_allocated, int8_t); + EDN_ASSERT(NULL!=m_data, "Error in data allocation"); + // Copy all data ... + memcpy(m_data, Evb.m_data, m_allocated * sizeof(int8_t) ); + } + // Return the curent pointer + return *this; +} + +int8_t EdnVectorBuf::operator[] (int32_t pos) +{ + EDN_ASSERT(0 <= pos || pos < Size(), "try to read an element non existing"); + if (pos < m_gapStart) { + return m_data[pos]; + } + return m_data[pos + m_gapEnd-m_gapStart]; +} + + +/** + * @brief Get a current element in the vector + * + * @param[in] pos Desired position read + * + * @return Reference on the Element + * + */ +int8_t& EdnVectorBuf::Get(int32_t pos) +{ + EDN_ASSERT(0 <= pos || pos < Size(), "try to read an element non existing"); + if (pos < m_gapStart) { + return m_data[pos]; + } + return m_data[pos + m_gapEnd-m_gapStart]; +} + + +/** + * @brief + * + * @param[in,out] --- + * + * @return --- + * + */ +void EdnVectorBuf::Get(int32_t pos, int32_t nbElement, EdnVectorBin &tmpBuffer) +{ + tmpBuffer.Clear(); + if (pos < m_gapStart) { + if (pos + nbElement < m_gapStart) { + tmpBuffer.PushBack(&m_data[pos], nbElement); + } else { + tmpBuffer.PushBack(&m_data[pos], m_gapStart - pos); + tmpBuffer.PushBack(&m_data[m_gapEnd], nbElement - (m_gapStart - pos) ); + } + } else { + tmpBuffer.PushBack(&m_data[pos+(m_gapEnd-m_gapStart)], nbElement); + } +} + + +/** + * @brief Add at the Last position of the Vector + * + * @param[in] item Element to add at the end of vector + * + * @return --- + * + */ +void EdnVectorBuf::PushBack(const int8_t& item) +{ + Insert( Size(), item); +} + +/** + * @brief Remove the last element of the vector + * + * @param --- + * + * @return --- + * + */ +void EdnVectorBuf::PopBack(void) +{ + if (Size()>0) { + Remove( Size() ); + } +} + + +/** + * @brief Remove data in the buffer + * + * @param[in] + * + * @return --- + * + */ +void EdnVectorBuf::Remove(int32_t pos, int32_t nbRemoveElement) +{ + if( pos > Size() + || pos < 0 ) { + EDN_ERROR("Request higher than buffer size : pos="< " << newSize); + // check if something is allocated : + if (NULL == m_data) { + // no data allocated ==> request an allocation (might be the first) + EDN_MALLOC(m_data, newSize, int8_t); + } else { + // move datas + EDN_REALLOC(m_data, newSize, int8_t); + } + // Check result with assert : + EDN_ASSERT(NULL!=m_data, "Error in data allocation"); + // set the new allocation size + m_allocated = newSize; +} + + +/** + * @brief + * + * @param[in,out] --- + * + * @return --- + * + */ +void EdnVectorBuf::Insert(int32_t pos, const int8_t& item) +{ + if( pos > Size() + || pos < 0 ) { + EDN_ERROR("Request higher than buffer size : pos="< items; + items.PushBack('i'); + items.PushBack('j'); + items.PushBack('k'); + items.PushBack('l'); + items.PushBack('m'); + items.PushBack('n'); + items.PushBack('o'); + items.PushBack('p'); + + + + myBufferTmp.Insert(3, items); + myBufferTmp.Display(); + + + + plop='7'; + myBufferTmp.Insert(7, plop); + myBufferTmp.Display(); + + myBufferTmp.Replace(8, 'z'); + myBufferTmp.Display(); + + items.Clear(); + items.PushBack('1'); + items.PushBack('2'); + items.PushBack('3'); + myBufferTmp.Replace(10, 4, items); + myBufferTmp.Display(); + + + myBufferTmp.PushBack('a'); + myBufferTmp.PushBack('a'); + myBufferTmp.PushBack('a'); + myBufferTmp.PushBack('a'); + myBufferTmp.Display(); + + + myBufferTmp.PopBack(); + myBufferTmp.PopBack(); + myBufferTmp.PopBack(); + myBufferTmp.PopBack(); + myBufferTmp.Display(); + + myBufferTmp.Remove(2, 3); + myBufferTmp.Display(); + */ + +} + + diff --git a/Sources/tools/EdnTemplate/EdnVectorBuf.h b/Sources/tools/EdnTemplate/EdnVectorBuf.h new file mode 100644 index 0000000..70f5acd --- /dev/null +++ b/Sources/tools/EdnTemplate/EdnVectorBuf.h @@ -0,0 +1,342 @@ +/** + ******************************************************************************* + * @file EdnEdnVectorBuf.h + * @brief Editeur De N'ours : Basic EdnVectorBuf for direct data insertion (template) + * @author Edouard DUPIN + * @date 07/04/2011 + * @par Project + * Edn + * + * @par Copyright + * Copyright 2010 Edouard DUPIN, all right reserved + * + * This software is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY. + * + * Licence summary : + * You can modify and redistribute the sources code and binaries. + * You can send me the bug-fix + * You can not earn money with this Software (if the source extract from Edn + * represent less than 50% of original Sources) + * Term of the licence in in the file licence.txt. + * + ******************************************************************************* + */ + +#ifndef __EDN_VECTOR_BUF_H__ +#define __EDN_VECTOR_BUF_H__ + +#include "toolsMemory.h" +#include "EdnVectorBin.h" + +#undef __class__ +#define __class__ "EdnVectorBuf" + +// minimum gapSize when allocated +#define GAP_SIZE_MIN (80) +// maximum gap that is automaticly resize +#define GAP_SIZE_MAX (GAP_SIZE_MIN*4) + + +/* + + + + ______________________________________________________________________________________ + | | + | | + | | + | | + | | + | | + | | + | | + | | + | | + | | + | | + | | + | | + | | + | | + | | + | | + | | + | | + | | + | | + | | + | | + | | + | | + | | + | | + | | + |____________________________________________________________________________________| + + + + + + + + + + +*/ + + + + + + + + + + + +/** + * @brief EdnVectorBuf classes ... + */ +class EdnVectorBuf +{ + public: + class Iterator + { + // Private data : + private: + int32_t m_current; // curent Id on the vector + EdnVectorBuf * m_EdnVectorBuf; // Pointer on the curent element of the vectorBin + public: + /** + * @brief Basic itarator constructor with no link with an EdnVector + */ + Iterator(void): + m_current(-1), + m_EdnVectorBuf(NULL) + { + // nothing to do ... + } + /** + * @brief Recopy constructor on a specific EdnVector. + * @param[in] otherIterator The Iterator that might be copy + */ + Iterator(const Iterator & otherIterator): + m_current(otherIterator.m_current), + m_EdnVectorBuf(otherIterator.m_EdnVectorBuf) + { + // nothing to do ... + } + /** + * @brief Asignation operator. + * @param[in] otherIterator The Iterator that might be copy + * @return reference on the curent Iterator + */ + Iterator& operator=(const Iterator & otherIterator) + { + m_current = otherIterator.m_current; + m_EdnVectorBuf = otherIterator.m_EdnVectorBuf; + return *this; + } + /** + * @brief Basic destructor + */ + ~Iterator(void) + { + m_current = -1; + m_EdnVectorBuf = NULL; + } + /** + * @brief gaet element position in the system + */ + int32_t Position(void) + { + if(0 > m_current) { + return 0; + } else if (m_EdnVectorBuf->Size() <= m_current) { + return m_EdnVectorBuf->Size(); + } else { + return m_current; + } + } + /** + * @brief basic boolean cast + * @return true if the element is present in the EdnVector size + */ + operator bool () + { + if( 0 <= m_current + && m_current < m_EdnVectorBuf->Size() ) + { + return true; + } else { + return false; + } + } + /** + * @brief Incremental operator + * @return Reference on the current iterator incremented + */ + Iterator& operator++ () + { + if( NULL != m_EdnVectorBuf + && m_current < m_EdnVectorBuf->Size() ) + { + m_current++; + } + return *this; + } + /** + * @brief Decremental operator + * @return Reference on the current iterator decremented + */ + Iterator& operator-- () + { + if (m_current >= 0) { + m_current--; + } + return *this; + } + /** + * @brief Incremental operator + * @return Reference on a new iterator and increment the other one + */ + Iterator operator++ (int32_t) + { + Iterator it(*this); + ++(*this); + return it; + } + /** + * @brief Decremental operator + * @return Reference on a new iterator and decrement the other one + */ + Iterator operator-- (int32_t) + { + Iterator it(*this); + --(*this); + return it; + } + /** + * @brief Get reference on the current Element + * @return the reference on the current Element + */ + int8_t & operator-> () const + { + EDN_CHECK_INOUT(m_current >= 0 && m_current < m_EdnVectorBuf->Size()); + return m_EdnVectorBuf->Get(m_current); + } + /** + * @brief Get reference on the current Element + * @return the reference on the current Element + */ + int8_t & operator* () const + { + EDN_CHECK_INOUT(m_current >= 0 && m_current < m_EdnVectorBuf->Size()); + return m_EdnVectorBuf->Get(m_current); + } + private: + /** + * @brief + * + * @param[in,out] --- + * + * @return --- + * + */ + Iterator(EdnVectorBuf * Evb, int32_t pos): + m_current(pos), + m_EdnVectorBuf(Evb) + { + // nothing to do ... + } + friend class EdnVectorBuf; + }; + private: + int8_t * m_data; //!< pointer on the curetn table of Data + int32_t m_allocated; //!< Current allocated size + // empty part of the buffer data + int32_t m_gapStart; //!< points to the first character of the gap + int32_t m_gapEnd; //!< points to the first char after the gap + public: + EdnVectorBuf(int32_t count = 0); + EdnVectorBuf(const EdnVectorBuf & Evb); + ~EdnVectorBuf(); + + bool DumpIn( FILE *myFile); + bool DumpFrom( FILE *myFile); + + 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, EdnVectorBin &tmpBuffer); + // insert functions + void PushBack( const int8_t& item); + void Insert( int32_t pos, const int8_t& item); + void Insert( int32_t pos, EdnVectorBin& items); + // Remove and insert functions + void Replace( int32_t pos, const int8_t& item); + void Replace( int32_t pos, int32_t nbRemoveElement, EdnVectorBin& items); + // Revove fonctions + void Remove( int32_t pos, int32_t nbRemoveElement = 1); + void PopBack( void); + void Clear( void); + + + void Fit(void); + + void Display(void); + + /** + * @brief Get a current element in the vector (iterator system) + * @param[in] RealElementPosition Real position in the buffer (only use in the ITERATOR) + * @return Reference on the Element + */ + int8_t & GetDirect(int32_t RealElementPosition){ return m_data[RealElementPosition]; }; + /** + * @brief Get the number of element in the vector + * @return The number requested + */ + int32_t Size(void) { return m_allocated - GapSize(); }; + + Iterator Position(int32_t pos) + { + return Iterator(this, pos); + } + + /** + * @brief Get an Iterator on the start position of the Vector + * @return The Iterator + */ + Iterator Begin() + { + return Position(0); + } + + /** + * @brief Get an Iterator on the end position of the Vector + * @return The Iterator + */ + Iterator End() + { + return Position( Size()-1 ); + } + private: + // TODO : Set a boolean at the return value to prevent internal error ... + void ChangeAllocation( int32_t newSize); + bool GapMove( int32_t pos); + bool GapResize( int32_t pos, int32_t newGapLen); + // get current gap Size + int32_t GapSize( void) { return m_gapEnd - m_gapStart; }; + void GapCheckMaxSize( void); +}; + +#undef __class__ +#define __class__ NULL + +void TestEdnVectorBuf(void); + +#endif diff --git a/Sources/tools/EdnTemplate/Singleton.h b/Sources/tools/EdnTemplate/Singleton.h new file mode 100755 index 0000000..ab84006 --- /dev/null +++ b/Sources/tools/EdnTemplate/Singleton.h @@ -0,0 +1,85 @@ +/** + ******************************************************************************* + * @file Singleton.h + * @brief Editeur De N'ours : singleton system class + * @author Edouard DUPIN + * @date 04/12/2010 + * @par Project + * Edn + * + * @par Copyright + * Copyright 2010 Edouard DUPIN, all right reserved + * + * This software is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY. + * + * Licence summary : + * You can modify and redistribute the sources code and binaries. + * You can send me the bug-fix + * You can not earn money with this Software (if the source extract from Edn + * represent less than 50% of original Sources) + * Term of the licence in in the file licence.txt. + * + ******************************************************************************* + */ + +#ifndef __SINGLETON_H__ +#define __SINGLETON_H__ + +#include +using namespace std; + + +///////////////////////////////////////////////////////////////////////////// +// +// Singleton - modèle Singleton applicable à n'importe quelle classe. +// +///////////////////////////////////////////////////////////////////////////// + +template +class Singleton +{ + protected: + // Constructeur/destructeur + Singleton() { } + ~Singleton() { /*std::cout << "destroying singleton." << std::endl;*/ } + + public: + // Interface publique + static T *getInstance() + { + if (NULL == _singleton) + { + /*std::cout << "C: Singleton | creating singleton." << std::endl;*/ + _singleton = new T; + } + /* + else + { + std::cout << "C: Singleton | singleton already created!" << std::endl; + } + */ + + return (static_cast (_singleton)); + } + + static void kill() + { + if (NULL != _singleton) + { + delete _singleton; + _singleton = NULL; + } + } + + private: + // Unique instance + static T *_singleton; +}; + +template + T *Singleton::_singleton = NULL; + +#endif + + diff --git a/Sources/tools/MsgBroadcast/AccelKey.cpp b/Sources/tools/MsgBroadcast/AccelKey.cpp new file mode 100644 index 0000000..ddeac30 --- /dev/null +++ b/Sources/tools/MsgBroadcast/AccelKey.cpp @@ -0,0 +1,97 @@ +/** + ******************************************************************************* + * @file AccelKey.cpp + * @brief Editeur De N'ours : Basic Gui Accelerator Key (common for ALL) or nearly (Sources) + * @author Edouard DUPIN + * @date 17/06/2011 + * @par Project + * Edn + * + * @par Copyright + * Copyright 2010 Edouard DUPIN, all right reserved + * + * This software is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY. + * + * Licence summary : + * You can modify and redistribute the sources code and binaries. + * You can send me the bug-fix + * You can not earn money with this Software (if the source extract from Edn + * represent less than 50% of original Sources) + * Term of the licence in in the file licence.txt. + * + ******************************************************************************* + */ + +#include "tools_debug.h" +#include "AccelKey.h" + +AccelKey::AccelKey(void) +{ + m_accelGroup = gtk_accel_group_new(); +} + +AccelKey::~AccelKey(void) +{ + +} + +void AccelKey::SetAccel(GtkWidget * widget, char * accelKey) +{ + SetAccel(widget, m_accelGroup, accelKey); +} + +void AccelKey::SetAccel(GtkWidget * widget, GtkAccelGroup * accel, char * accelKey) +{ + guint accel_key = 0; + int32_t accel_mods = 0; + if( NULL==accelKey + || 0==strlen(accelKey)) + { + return; + } + // parsing of the string : + //"ctrl+shift+alt+pomme+s" + //EDN_DEBUG("Parse acxel string : \"" << accelKey << "\""); + char * tmp = strstr(accelKey, "ctrl"); + if(NULL != tmp) { + accel_mods |= GDK_CONTROL_MASK; + //EDN_DEBUG(" => find CTRL"); + } + tmp = strstr(accelKey, "shift"); + if(NULL != tmp) { + accel_mods |= GDK_SHIFT_MASK; + //EDN_DEBUG(" => find SHIFT"); + } + tmp = strstr(accelKey, "alt"); + if(NULL != tmp) { + accel_mods |= GDK_MOD1_MASK; + //EDN_DEBUG(" => find ALT"); + } + tmp = strstr(accelKey, "pomme"); + if(NULL != tmp) { + accel_mods |= GDK_MOD2_MASK; + //EDN_DEBUG(" => find POMME"); + } + accel_key = accelKey[strlen(accelKey) -1]; + //char plop = accel_key; + //EDN_DEBUG(" => find letter : '" << plop << "'"); + + // Ajout du racourcis clavier : + gtk_widget_add_accelerator( widget, "activate", accel, + accel_key, // key + (GdkModifierType)accel_mods, // modifier keys + GTK_ACCEL_VISIBLE); +} + +void AccelKey::LinkCommonAccel(GtkWidget * widget) +{ + gtk_window_add_accel_group(GTK_WINDOW(widget), m_accelGroup); +} + +void AccelKey::LinkCommonAccel(GtkWindow * widget) +{ + gtk_window_add_accel_group(GTK_WINDOW(widget), m_accelGroup); +} + + diff --git a/Sources/tools/MsgBroadcast/AccelKey.h b/Sources/tools/MsgBroadcast/AccelKey.h new file mode 100644 index 0000000..4b5c743 --- /dev/null +++ b/Sources/tools/MsgBroadcast/AccelKey.h @@ -0,0 +1,56 @@ +/** + ******************************************************************************* + * @file AccelKey.h + * @brief Editeur De N'ours : Basic Gui Accelerator Key (common for ALL) or nearly (header) + * @author Edouard DUPIN + * @date 17/06/2011 + * @par Project + * Edn + * + * @par Copyright + * Copyright 2010 Edouard DUPIN, all right reserved + * + * This software is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY. + * + * Licence summary : + * You can modify and redistribute the sources code and binaries. + * You can send me the bug-fix + * You can not earn money with this Software (if the source extract from Edn + * represent less than 50% of original Sources) + * Term of the licence in in the file licence.txt. + * + ******************************************************************************* + */ + +#ifndef __ACCEL_KEY_H__ +#define __ACCEL_KEY_H__ + +#include "tools_debug.h" +#include "Singleton.h" + +// need to create a syngleton ... +class AccelKey: public Singleton +{ + friend class Singleton; + // specific for sigleton system... + private: + // Constructeur + AccelKey(void); + ~AccelKey(void); + public: + // for internal Parsing + void SetAccel(GtkWidget * widget, char * accelKey); + // For external parsing + void SetAccel(GtkWidget * widget, GtkAccelGroup * accel, char * accelKey); + void LinkCommonAccel(GtkWidget * widget); + void LinkCommonAccel(GtkWindow * widget); + GtkAccelGroup * GetAccel(void) { return m_accelGroup; }; + + private: + GtkAccelGroup * m_accelGroup; +}; + + +#endif + diff --git a/Sources/tools/MsgBroadcast/MsgBroadcast.cpp b/Sources/tools/MsgBroadcast/MsgBroadcast.cpp new file mode 100644 index 0000000..a26e783 --- /dev/null +++ b/Sources/tools/MsgBroadcast/MsgBroadcast.cpp @@ -0,0 +1,260 @@ +/** + ******************************************************************************* + * @file MsgBroadcast.cpp + * @brief Editeur De N'ours : message beetween thread and GUI elements ... (Souces) + * @author Edouard DUPIN + * @date 04/02/2011 + * @par Project + * Edn + * + * @par Copyright + * Copyright 2010 Edouard DUPIN, all right reserved + * + * This software is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY. + * + * Licence summary : + * You can modify and redistribute the sources code and binaries. + * You can send me the bug-fix + * You can not earn money with this Software (if the source extract from Edn + * represent less than 50% of original Sources) + * Term of the licence in in the file licence.txt. + * + ******************************************************************************* + */ + +#include "tools_debug.h" +#include "tools_globals.h" +#include "MsgBroadcast.h" + +#undef __class__ +#define __class__ "MsgBroadcast" + + +MsgBroadcast::MsgBroadcast(const char * className, messageCat_te cat) +{ + m_messageSystem = MsgBroadcastCore::getInstance(); + m_className = className; + m_cat = cat; + // add on listner + m_messageSystem->AddReceiver(this); +} + +MsgBroadcast::~MsgBroadcast(void) +{ + m_messageSystem->RmReceiver(this); + m_messageSystem = NULL; +} + +void MsgBroadcast::OnMessage(int32_t id, int32_t dataID) +{ + // nothing to do here +} + +void MsgBroadcast::SendMessage(messageType_te id, int32_t dataID) +{ + m_messageSystem->SendMessage(this, id, dataID); +} + + +#undef __class__ +#define __class__ "MsgBroadcastCore" + + +// need to create a syngleton ... +MsgBroadcastCore::MsgBroadcastCore(void) +{ + EDN_INFO("Init broadcast message System : "); + m_messageID = 0; +} + +MsgBroadcastCore::~MsgBroadcastCore(void) +{ + EDN_INFO("Un-Init broadcast message System : "); +} + +#define MACRO_DISPLAY_MSG(data) case data: return (char*)#data ; break; + +static char * GetMessageChar(messageType_te Id) +{ + switch(Id) + { + MACRO_DISPLAY_MSG(EDN_MSG__QUIT) + MACRO_DISPLAY_MSG(EDN_MSG__BUFFER_CHANGE_CURRENT) + + MACRO_DISPLAY_MSG(EDN_MSG__GUI_SHOW_MAIN_WINDOWS) + MACRO_DISPLAY_MSG(EDN_MSG__GUI_SHOW_SEARCH) + MACRO_DISPLAY_MSG(EDN_MSG__GUI_SHOW_PREFERENCE) + MACRO_DISPLAY_MSG(EDN_MSG__GUI_SHOW_REPLACE) + MACRO_DISPLAY_MSG(EDN_MSG__GUI_SHOW_OPEN_FILE) + MACRO_DISPLAY_MSG(EDN_MSG__GUI_SHOW_SAVE_AS) + MACRO_DISPLAY_MSG(EDN_MSG__GUI_SHOW_GOTO_LINE) + + MACRO_DISPLAY_MSG(EDN_MSG__BUFFER_REMOVE) + MACRO_DISPLAY_MSG(EDN_MSG__BUFFER_REMOVE_ALL) + MACRO_DISPLAY_MSG(EDN_MSG__BUFFER_ADD) + MACRO_DISPLAY_MSG(EDN_MSG__BUFFER_CHANGE_STATE) + MACRO_DISPLAY_MSG(EDN_MSG__BUFFER_CHANGE_NAME) + MACRO_DISPLAY_MSG(EDN_MSG__BUFFER_CHANGE_MODIFY) + MACRO_DISPLAY_MSG(EDN_MSG__BUFFER_CHANGE_HAS_HISTORY) + MACRO_DISPLAY_MSG(EDN_MSG__BUFFER_CHANGE_HAS_NOT_HISTORY) + MACRO_DISPLAY_MSG(EDN_MSG__BUFFER_CHANGE_HAS_FUTURE_HISTORY) + MACRO_DISPLAY_MSG(EDN_MSG__BUFFER_CHANGE_HAS_NOT_FUTURE_HISTORY) + + // create a new buffer + MACRO_DISPLAY_MSG(EDN_MSG__NEW) + MACRO_DISPLAY_MSG(EDN_MSG__BUFF_ALL_SAVE) + MACRO_DISPLAY_MSG(EDN_MSG__BUFF_ALL_CLOSE) + MACRO_DISPLAY_MSG(EDN_MSG__BUFF_ID_CLOSE) + MACRO_DISPLAY_MSG(EDN_MSG__BUFF_ID_SAVE) + + // GUI event for the selected buffer + MACRO_DISPLAY_MSG(EDN_MSG__CURRENT_CHANGE_BUFFER_ID) + MACRO_DISPLAY_MSG(EDN_MSG__CURRENT_SAVE) + MACRO_DISPLAY_MSG(EDN_MSG__CURRENT_SAVE_AS) + MACRO_DISPLAY_MSG(EDN_MSG__CURRENT_REMOVE_LINE) + MACRO_DISPLAY_MSG(EDN_MSG__CURRENT_SELECT_ALL) + MACRO_DISPLAY_MSG(EDN_MSG__CURRENT_UN_SELECT) + MACRO_DISPLAY_MSG(EDN_MSG__CURRENT_COPY) + MACRO_DISPLAY_MSG(EDN_MSG__CURRENT_CUT) + MACRO_DISPLAY_MSG(EDN_MSG__CURRENT_PASTE) + MACRO_DISPLAY_MSG(EDN_MSG__CURRENT_FIND_PREVIOUS) + MACRO_DISPLAY_MSG(EDN_MSG__CURRENT_FIND_OLD_PREVIOUS) + MACRO_DISPLAY_MSG(EDN_MSG__CURRENT_FIND_NEXT) + MACRO_DISPLAY_MSG(EDN_MSG__CURRENT_FIND_OLD_NEXT) + MACRO_DISPLAY_MSG(EDN_MSG__CURRENT_REPLACE) + MACRO_DISPLAY_MSG(EDN_MSG__CURRENT_REPLACE_ALL) + MACRO_DISPLAY_MSG(EDN_MSG__CURRENT_CLOSE) + MACRO_DISPLAY_MSG(EDN_MSG__CURRENT_UNDO) + MACRO_DISPLAY_MSG(EDN_MSG__CURRENT_REDO) + MACRO_DISPLAY_MSG(EDN_MSG__CURRENT_GOTO_LINE) + MACRO_DISPLAY_MSG(EDN_MSG__REFRESH_DISPLAY) + MACRO_DISPLAY_MSG(EDN_MSG__CURRENT_SET_CHARSET) + + // Ctags MESSAGE : + MACRO_DISPLAY_MSG(EDN_MSG__OPEN_CTAGS) + MACRO_DISPLAY_MSG(EDN_MSG__RELOAD_CTAGS) + MACRO_DISPLAY_MSG(EDN_MSG__JUMP_TO_CURRENT_SELECTION) + MACRO_DISPLAY_MSG(EDN_MSG__JUMP_BACK) + + default: + return (char*)"??"; + } +} + +static char * GetMessageTypeChar(messageCat_te Id) +{ + switch(Id) + { + case EDN_CAT_NONE: + return (char*)"NONE"; + case EDN_CAT_GUI: + return (char*)"GUI"; + case EDN_CAT_WORK_AREA: + return (char*)"WORK_AREA"; + case EDN_CAT_SYSTEM: + return (char*)"SYSTEM"; + case EDN_CAT_BUFFER_MANAGER: + return (char*)"BUFFER_MANAGER"; + case EDN_CAT_GUI_MANAGER: + return (char*)"GUI_MANAGER"; + case EDN_CAT_CTAGS: + return (char*)"C-TAGS_MANAGER"; + default: + return (char*)"??"; + } +} + +void MsgBroadcastCore::SendMessage(MsgBroadcast * pointerOnSender, messageType_te id, int32_t dataID) +{ + // Add message on the list : + messageElement_ts myStructMessage; + messageCat_te catDest = EDN_CAT_NONE; + + + // DESTINATION : GUI_MANAGER + if( MSG_TO_GUI_MANAGER__START <= id + && MSG_TO_GUI_MANAGER__STOP >= id ) + { + catDest = EDN_CAT_GUI_MANAGER; + } else if( MSG_TO_GUI__START <= id + && MSG_TO_GUI__STOP >= id ) + { + catDest = EDN_CAT_GUI; + } else if( MSG_TO_BUFFER_MANAGER__START <= id + && MSG_TO_BUFFER_MANAGER__STOP >= id ) + { + catDest = EDN_CAT_BUFFER_MANAGER; + } else if( MSG_TO_WORKING_AREA__START <= id + && MSG_TO_WORKING_AREA__STOP >= id ) + { + catDest = EDN_CAT_WORK_AREA; + } else if( MSG_TO_SYSTEM__START <= id + && MSG_TO_SYSTEM__STOP >= id ) + { + catDest = EDN_CAT_SYSTEM; + } else if( MSG_TO_CTAGS__START <= id + && MSG_TO_CTAGS__STOP >= id ) + { + catDest = EDN_CAT_CTAGS; + } + + myStructMessage.localMessageID = m_messageID++; + if (NULL == pointerOnSender) { + EDN_INFO("#" << myStructMessage.localMessageID << " From \"NULL\" CAT=" << GetMessageTypeChar(catDest) << " id=" << id << "=\"" << GetMessageChar(id) << "\" dataID=" << dataID); + } else { + EDN_INFO("#" << myStructMessage.localMessageID << " From \"" << pointerOnSender->GetName().c_str() << "\" CAT=" << GetMessageTypeChar(catDest) << " id=" << id << "=\"" << GetMessageChar(id) << "\" dataID=" << dataID); + } + myStructMessage.msgCatDest = catDest; + myStructMessage.msgId = id; + myStructMessage.data = dataID; + m_listOfMessage.PushBack(myStructMessage); + + + if (m_listOfMessage.Size() > 1 ) { + // we are curently in message processing ==> wait end to process this message + return; + } + // send message on system : + while (m_listOfMessage.Size() > 0) { + for (int32_t i=0 ; iGetCat()) + { + EDN_INFO(" #" << m_listOfMessage[0].localMessageID << " ==> process In :\"" << m_listMessage[i]->GetName().c_str() << "\" "); + m_listMessage[i]->OnMessage(m_listOfMessage[0].msgId, m_listOfMessage[0].data); + } + } + m_listOfMessage.Erase(0); + } +} + +void MsgBroadcastCore::AddReceiver(MsgBroadcast * pointerOnReceiver) +{ + for (int32_t i=0 ; iGetName().c_str() << "\""); +} + + +void MsgBroadcastCore::RmReceiver(MsgBroadcast * pointerOnReceiver) +{ + for (int32_t i=0 ; iSendMessage(NULL, id, dataID); +} diff --git a/Sources/tools/MsgBroadcast/MsgBroadcast.h b/Sources/tools/MsgBroadcast/MsgBroadcast.h new file mode 100644 index 0000000..396799c --- /dev/null +++ b/Sources/tools/MsgBroadcast/MsgBroadcast.h @@ -0,0 +1,198 @@ +/** + ******************************************************************************* + * @file MsgBroadcast.h + * @brief Editeur De N'ours : message beetween thread and GUI elements ... (header) + * @author Edouard DUPIN + * @date 04/02/2011 + * @par Project + * Edn + * + * @par Copyright + * Copyright 2010 Edouard DUPIN, all right reserved + * + * This software is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY. + * + * Licence summary : + * You can modify and redistribute the sources code and binaries. + * You can send me the bug-fix + * You can not earn money with this Software (if the source extract from Edn + * represent less than 50% of original Sources) + * Term of the licence in in the file licence.txt. + * + ******************************************************************************* + */ + +#ifndef __MSG_BROADCAST_H__ +#define __MSG_BROADCAST_H__ + +#include "tools_debug.h" +#include "Edn.h" +#include "Singleton.h" + + + +// broadCast Message + +// Message to prevent the curent thread that Buffer has changed +// the ID we'll use to identify our event +typedef enum { + EDN_MSG__NONE = 0, + // Programm is Quitting... close all if needed ... + EDN_MSG__QUIT, + EDN_MSG__BUFFER_CHANGE_CURRENT, // set the new current BUFFER ... + + // DESTINATION : GUI_MANAGER + MSG_TO_GUI_MANAGER__START, + // GUI windows openning and closing + EDN_MSG__GUI_SHOW_MAIN_WINDOWS, + EDN_MSG__GUI_SHOW_SEARCH, + EDN_MSG__GUI_SHOW_PREFERENCE, + EDN_MSG__GUI_SHOW_REPLACE, + EDN_MSG__GUI_SHOW_OPEN_FILE, + EDN_MSG__GUI_SHOW_SAVE_AS, + EDN_MSG__GUI_SHOW_GOTO_LINE, + MSG_TO_GUI_MANAGER__STOP, + + // DESTINATION : GUI + // generate by the current buffer to said the buffer has changing + MSG_TO_GUI__START, + EDN_MSG__BUFFER_REMOVE, + EDN_MSG__BUFFER_REMOVE_ALL, + EDN_MSG__BUFFER_ADD, + EDN_MSG__BUFFER_CHANGE_STATE, + EDN_MSG__BUFFER_CHANGE_NAME, + EDN_MSG__BUFFER_CHANGE_MODIFY, + EDN_MSG__BUFFER_CHANGE_HAS_HISTORY, + EDN_MSG__BUFFER_CHANGE_HAS_NOT_HISTORY, + EDN_MSG__BUFFER_CHANGE_HAS_FUTURE_HISTORY, + EDN_MSG__BUFFER_CHANGE_HAS_NOT_FUTURE_HISTORY, + MSG_TO_GUI__STOP, + + // DESTINATION : Buffer MANAGER + MSG_TO_BUFFER_MANAGER__START, + // create a new buffer + EDN_MSG__NEW, + // Event For All buffer ==> goto the buffer MANAGER + EDN_MSG__BUFF_ALL_SAVE, + EDN_MSG__BUFF_ALL_CLOSE, + // Event For Specific Buffer ID : ==> GOTO the buffer MANAGER + EDN_MSG__BUFF_ID_CLOSE, + EDN_MSG__BUFF_ID_SAVE, + MSG_TO_BUFFER_MANAGER__STOP, + + // DESTINATION : Working AREA + MSG_TO_WORKING_AREA__START, + // GUI event for the selected buffer + EDN_MSG__CURRENT_CHANGE_BUFFER_ID, + EDN_MSG__CURRENT_SAVE, + EDN_MSG__CURRENT_SAVE_AS, + EDN_MSG__CURRENT_SELECT_ALL, + EDN_MSG__CURRENT_REMOVE_LINE, + EDN_MSG__CURRENT_UN_SELECT, + EDN_MSG__CURRENT_COPY, + EDN_MSG__CURRENT_CUT, + EDN_MSG__CURRENT_PASTE, + EDN_MSG__CURRENT_FIND_PREVIOUS, + EDN_MSG__CURRENT_FIND_OLD_PREVIOUS, + EDN_MSG__CURRENT_FIND_NEXT, + EDN_MSG__CURRENT_FIND_OLD_NEXT, + EDN_MSG__CURRENT_REPLACE, + EDN_MSG__CURRENT_REPLACE_ALL, + EDN_MSG__CURRENT_CLOSE, + EDN_MSG__CURRENT_UNDO, + EDN_MSG__CURRENT_REDO, + EDN_MSG__CURRENT_GOTO_LINE, + EDN_MSG__REFRESH_DISPLAY, + EDN_MSG__CURRENT_SET_CHARSET, + MSG_TO_WORKING_AREA__STOP, + + // DESTINATION : SYSTEM ... + MSG_TO_SYSTEM__START, + MSG_TO_SYSTEM__STOP, + + + // DESTINATION : CTAGS ... + MSG_TO_CTAGS__START, + EDN_MSG__OPEN_CTAGS, + EDN_MSG__RELOAD_CTAGS, + EDN_MSG__JUMP_TO_CURRENT_SELECTION, + EDN_MSG__JUMP_BACK, + MSG_TO_CTAGS__STOP, + + +}messageType_te; + +typedef enum { + EDN_CAT_NONE, + EDN_CAT_GUI, + EDN_CAT_WORK_AREA, + EDN_CAT_SYSTEM, + EDN_CAT_BUFFER_MANAGER, + EDN_CAT_GUI_MANAGER, + EDN_CAT_CTAGS, +}messageCat_te; + + +typedef struct { + messageType_te msgId; + int32_t dataId; +}messageData_ts; + + +class MsgBroadcastCore; + +class MsgBroadcast +{ + private: + Edn::String m_className; + MsgBroadcastCore * m_messageSystem; + messageCat_te m_cat; + public: + MsgBroadcast(const char * className, messageCat_te cat); + virtual ~MsgBroadcast(void); + // caul when a message is send + virtual void OnMessage(int32_t id, int32_t dataID); + Edn::String& GetName(void) { return m_className; }; + messageCat_te GetCat(void) { return m_cat; }; + protected : + void SendMessage(messageType_te id, int32_t dataID = -1); +}; + + +typedef struct { + int32_t localMessageID; + messageCat_te msgCatDest; + messageType_te msgId; + int32_t data; +}messageElement_ts; + +// need to create a syngleton ... +class MsgBroadcastCore: public Singleton +{ + friend class Singleton; + // specific for sigleton system... + private: + // Constructeur + MsgBroadcastCore(void); + ~MsgBroadcastCore(void); + public: + void SendMessage(MsgBroadcast * pointerOnSender, messageType_te id, int32_t dataID = -1); + void AddReceiver(MsgBroadcast * pointerOnReceiver); + void RmReceiver(MsgBroadcast * pointerOnReceiver); + + private: + EdnVectorBin m_listMessage; + uint32_t m_messageID; + EdnVectorBin m_listOfMessage; +}; + + +void GeneralSendMessage(messageType_te id, int32_t dataID = -1); + + + + + +#endif + diff --git a/Sources/tools/NameSpaceEdn/Edn.h b/Sources/tools/NameSpaceEdn/Edn.h new file mode 100644 index 0000000..350cec9 --- /dev/null +++ b/Sources/tools/NameSpaceEdn/Edn.h @@ -0,0 +1,44 @@ +/** + ******************************************************************************* + * @file Edn.h + * @brief Editeur De N'ours : Basic namespace for Edn (header) + * @author Edouard DUPIN + * @date 16/07/2011 + * @par Project + * Edn + * + * @par Copyright + * Copyright 2010 Edouard DUPIN, all right reserved + * + * This software is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY. + * + * Licence summary : + * You can modify and redistribute the sources code and binaries. + * You can send me the bug-fix + * You can not earn money with this Software (if the source extract from Edn + * represent less than 50% of original Sources) + * Term of the licence in in the file licence.txt. + * + ******************************************************************************* + */ + + +#include "tools_debug.h" +#include "toolsMemory.h" +#include "EdnVectorBin.h" + +#ifndef __EDN_H__ +#define __EDN_H__ + +#define _IN_NAMESPACE_EDN_ (plop) + +namespace Edn +{ + #include "String.h" + #include "File.h" +} + +#undef IN_NAMESPACE_EDN + +#endif diff --git a/Sources/tools/NameSpaceEdn/File.cpp b/Sources/tools/NameSpaceEdn/File.cpp new file mode 100644 index 0000000..15f5b7f --- /dev/null +++ b/Sources/tools/NameSpaceEdn/File.cpp @@ -0,0 +1,114 @@ +/** + ******************************************************************************* + * @file File.cpp + * @brief Editeur De N'ours : File folder and name abstraction (Sources) + * @author Edouard DUPIN + * @date 16/07/2011 + * @par Project + * Edn + * + * @par Copyright + * Copyright 2010 Edouard DUPIN, all right reserved + * + * This software is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY. + * + * Licence summary : + * You can modify and redistribute the sources code and binaries. + * You can send me the bug-fix + * You can not earn money with this Software (if the source extract from Edn + * represent less than 50% of original Sources) + * Term of the licence in in the file licence.txt. + * + ******************************************************************************* + */ + + +#include "tools_debug.h" +#include "tools_globals.h" +#include "Edn.h" + +Edn::File::File(Edn::String &filename, int32_t LineNumber) +{ + m_lineNumberOpen = 0; + SetCompleateName(filename); +} + +Edn::File::File(Edn::String &filename, Edn::String &folder, int32_t lineNumber) +{ + Edn::String tmpString = folder; + tmpString += '/'; + tmpString += filename; + SetCompleateName(tmpString); + m_lineNumberOpen = lineNumber; +} + + +Edn::File::~File(void) +{ + // nothing to do ... +} + +void Edn::File::ExtranctAndName(Edn::String &inputString) +{ + m_folder = ""; + m_shortFilename = ""; + + for (int32_t iii=inputString.Size()-1; iii >= 0 ; iii--) { + /* + if (inputString[iii] != '/') { + m_shortFilename.Insert(0, inputString[iii]); + } else { + break; + } + */ + } + + + +/* + char tmpVal[4096]; + strncpy(tmpVal, inputString.c_str(), 4096); + tmpVal[4096-1] = '\0'; + char *ptr = strrchr(tmpVal, '/'); + if (NULL == ptr) { + ptr = strrchr(tmpVal, '\\'); + } + Edn::String out = "./"; + if (NULL != ptr) { + *ptr = '\0'; + out = tmpVal; + out+= '/'; + } + return out; +*/ +} + + +Edn::String Edn::File::GetFolder(void) +{ + return m_folder; +} + +Edn::String Edn::File::GetShortFilename(void) +{ + return m_shortFilename; +} + +Edn::String Edn::File::GetCompleateName(void) +{ + Edn::String out; + out = m_folder; + out += '/'; + out += m_shortFilename; +} + +void Edn::File::SetCompleateName(Edn::String &newFilename) +{ + +} + +int32_t Edn::File::GetLineNumber(void) +{ + return m_lineNumberOpen; +} \ No newline at end of file diff --git a/Sources/tools/NameSpaceEdn/File.h b/Sources/tools/NameSpaceEdn/File.h new file mode 100644 index 0000000..596961a --- /dev/null +++ b/Sources/tools/NameSpaceEdn/File.h @@ -0,0 +1,53 @@ +/** + ******************************************************************************* + * @file File.h + * @brief Editeur De N'ours : File folder and name abstraction (header) + * @author Edouard DUPIN + * @date 16/07/2011 + * @par Project + * Edn + * + * @par Copyright + * Copyright 2010 Edouard DUPIN, all right reserved + * + * This software is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY. + * + * Licence summary : + * You can modify and redistribute the sources code and binaries. + * You can send me the bug-fix + * You can not earn money with this Software (if the source extract from Edn + * represent less than 50% of original Sources) + * Term of the licence in in the file licence.txt. + * + ******************************************************************************* + */ + + +#ifndef _IN_NAMESPACE_EDN_ +# error This will be include only in "edn.h" +#else + +class File +{ + public: + File(void) { m_lineNumberOpen=0; } + File(Edn::String &filename, int32_t LineNumber = 0); + File(Edn::String &filename, Edn::String &folder, int32_t lineNumber = 0); + ~File(void); + Edn::String GetFolder(void); + Edn::String GetShortFilename(void); + Edn::String GetCompleateName(void); + int32_t GetLineNumber(void); + + void SetCompleateName(Edn::String &newFilename); + + private : + void ExtranctAndName(Edn::String &inputString); + Edn::String m_folder; + Edn::String m_shortFilename; + int32_t m_lineNumberOpen; +}; + +#endif + diff --git a/Sources/tools/NameSpaceEdn/String.cpp b/Sources/tools/NameSpaceEdn/String.cpp new file mode 100644 index 0000000..1103aa8 --- /dev/null +++ b/Sources/tools/NameSpaceEdn/String.cpp @@ -0,0 +1,708 @@ +/** + ******************************************************************************* + * @file EdnString.cpp + * @brief Editeur De N'ours : normal sting management... (sources) + * @author Edouard DUPIN + * @date 26/01/2011 + * @par Project + * Edn + * + * @par Copyright + * Copyright 2010 Edouard DUPIN, all right reserved + * + * This software is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY. + * + * Licence summary : + * You can modify and redistribute the sources code and binaries. + * You can send me the bug-fix + * You can not earn money with this Software (if the source extract from Edn + * represent less than 50% of original Sources) + * Term of the licence in in the file licence.txt. + * + ******************************************************************************* + */ + +#include "Edn.h" +#include "toolsMemory.h" + + +#undef __class__ +#define __class__ "EdnString" + + +/** + * @brief + * + * @param[in,out] + * + * @return + * + */ +Edn::String::~String(void) +{ + m_data.Clear(); +} + + +/** + * @brief + * + * @param[in,out] + * + * @return + * + */ +Edn::String::String(void) +{ + //EDN_INFO("new Edn::String()"); + m_data.Clear(); + m_data.PushBack('\0'); +} + + +/** + * @brief + * + * @param[in,out] + * + * @return + * + */ +Edn::String::String(const char myInput) +{ + m_data.Clear(); + m_data.PushBack(myInput); + m_data.PushBack('\0'); +} + + +/** + * @brief + * + * @param[in,out] + * + * @return + * + */ +Edn::String::String(const char* inputData, int32_t len) +{ + m_data.Clear(); + m_data.PushBack('\0'); + Set(inputData, len); +} + +void Edn::String::Set(const char * inputData, int32_t len) +{ + // overwrite the len if needed : + if ((-1) == len) { + len = strlen(inputData); + } + + if (len != 0) { + // remove the last '\0' + m_data.PopBack(); + // copy the data ... + m_data.PushBack((int8_t*)inputData, len); + // add the last '\0' + m_data.PushBack('\0'); + } +} + +/** + * @brief + * + * @param[in,out] + * + * @return + * + */ +Edn::String::String(int inputData) +{ + char tmpVal[256]; + // generate the string : + sprintf(tmpVal, "%d", inputData); + // set the internal data : + m_data.Clear(); + m_data.PushBack('\0'); + Set(tmpVal); +} + + +/** + * @brief + * + * @param[in,out] + * + * @return + * + */ +Edn::String::String(unsigned int inputData) +{ + char tmpVal[256]; + // generate the string : + sprintf(tmpVal, "%d", inputData); + // set the internal data : + m_data.Clear(); + m_data.PushBack('\0'); + Set(tmpVal); +} + +Edn::String::String(const Edn::String &ednS) +{ + //EDN_INFO("Constructeur de recopie"); + m_data = ednS.m_data; +} + + +/** + * @brief + * + * @param[in,out] + * + * @return + * + */ +const Edn::String& Edn::String::operator= (const Edn::String &ednS ) +{ + //EDN_INFO("OPERATOR de recopie"); + if( this != &ednS ) // avoid copy to itself + { + m_data = ednS.m_data; + } + return *this; +} + + +/** + * @brief + * + * @param[in,out] + * + * @return + * + */ +const Edn::String& Edn::String::operator= (const char * inputData) +{ + m_data.Clear(); + m_data.PushBack('\0'); + // calculate the size : + uint32_t len = strlen(inputData); + // check the new size ... + if (len > 0 ) { + // copy all data : + Set(inputData, len); + } + return *this; +} + + +/** + * @brief + * + * @param[in,out] + * + * @return + * + */ +const Edn::String& Edn::String::operator= (EdnVectorBin inputData) +{ + m_data = inputData; + if (m_data.Size()>0) { + if (m_data[m_data.Size()-1] != '\0') { + m_data.PushBack('\0'); + } + } + //EDN_DEBUG("m_dataLen="<= m_data.Size() ) { + return true; + } else { + return false; + } +} + + +/** + * @brief + * + * @param[in,out] + * + * @return + * + */ +int32_t Edn::String::Size(void) const +{ + if (m_data.Size() == 0) { + return 0; + } else { + return m_data.Size() - 1; + } +} + + +/** + * @brief + * + * @param[in,out] + * + * @return + * + */ +void Edn::String::Add(int32_t currentID, const char* inputData) +{ + // get the input lenght + int32_t len = strlen(inputData); + if (0 == len) { + EDN_WARNING("no data to add on the current string"); + return; + } else if (currentID < 0) { + EDN_WARNING("Curent ID(" << currentID << ") < 0 ==> Add at the start"); + currentID = 0; + } else if (currentID > Size() ) { + EDN_ERROR("Curent ID(" << currentID << ") > maxSize ... (" << Size() << ") ==> add at the end ..."); + m_data.PushBack((int8_t*)inputData, len); + return; + } + m_data.Insert(currentID, (int8_t*)inputData, len); +} + + +/** + * @brief + * + * @param[in,out] + * + * @return + * + */ +void Edn::String::Remove(int32_t currentID, int32_t len) +{ + if (0 >= len) { + EDN_ERROR("no data to remove on the current string"); + return; + } + // TODO : check the size of the data + m_data.Erase(currentID, len); +} + + +/** + * @brief Remove all element in the string + * + * @param --- + * + * @return --- + * + */ +void Edn::String::Clear(void) +{ + m_data.Clear(); + m_data.PushBack('\0'); +} + + + +/** + * @brief find the first accurence after the position indicated + * + * @param[in] element Element that might be find in the string + * @param[in] startPos Stert position to begin the search + * + * @return the position of the first occurence or -1 if not find... + * + */ +int32_t Edn::String::FindForward(const char element, int32_t startPos) +{ + if (startPos < 0) { + startPos = 0; + } else if (startPos >= Size() ) { + return -1; + } + for (int32_t iii=startPos; iii< Size(); iii++) { + if (m_data[iii] == element) { + return iii; + } + } + return -1; +} + + +/** + * @brief find the first accurence before the position indicated. + * + * @param[in] element Element that might be find in the string + * @param[in] startPos Stert position to begin the search + * + * @return the position of the first occurence begining by the end or -1 if not find... + * + */ +int32_t Edn::String::FindBack(const char element, int32_t startPos) +{ + if (startPos < 0) { + return -1; + } else if (startPos >= Size() ) { + startPos = Size(); + } + for (int32_t iii=startPos; iii>=0; iii--) { + if (m_data[iii] == element) { + return iii; + } + } + return -1; +} + + +/** + * @brief Extract data from the data between two position + * + * @param[in] posStart Start position where to extract data + * @param[in] posEnd End position where to extract data + * + * @return the extracted string + * + */ +Edn::String Edn::String::Extract(int32_t posStart, int32_t posEnd) +{ + Edn::String out; + if (posStart < 0) { + posStart = 0; + } else if (posStart >= Size() ) { + return out; + } + if (posEnd < 0) { + return out; + } else if (posEnd >= Size() ) { + posEnd = Size(); + } + out.m_data = m_data.Extract(posStart, posEnd); + out.m_data.PushBack('\0'); + return out; +} + + +/** + * @brief Get a basic vector in int8 data with no \0 at the end of the string + * + * @param --- + * + * @return The desired vector with data + * + */ +EdnVectorBin Edn::String::GetVector(void) +{ + EdnVectorBin out = m_data; + out.PopBack(); + return out; +} + +/** + * @brief Unitary test for the string system + * + * @param --- + * + * @return --- + * + */ +void Edn::TestUntaire_String(void) +{ + EDN_WARNING("*********************************************************"); + EDN_WARNING("** Test Unitaire 'EdnString' (START)"); + EDN_WARNING("*********************************************************"); + + int32_t iddd = 0; + Edn::String * monString = new Edn::String(); + EDN_INFO("phase : " << iddd++ << " : \"" << monString->c_str() << "\""); + delete(monString); + + monString = new Edn::String("test de direct data"); + EDN_INFO("phase : " << iddd++ << " : \"" << monString->c_str() << "\""); + delete(monString); + + monString = new Edn::String("test de direct data", 7); + EDN_INFO("phase : " << iddd++ << " : \"" << monString->c_str() << "\""); + delete(monString); + + int32_t testId = -6789; + monString = new Edn::String(testId); + EDN_INFO("phase : " << iddd++ << " : \"" << monString->c_str() << "\""); + delete(monString); + + uint32_t testId2 = 12345; + monString = new Edn::String((unsigned int)testId2); + EDN_INFO("phase : " << iddd++ << " : \"" << monString->c_str() << "\""); + delete(monString); + + Edn::String plop = "otherString"; + monString = new Edn::String(plop); + EDN_INFO("phase : " << iddd++ << " : \"" << monString->c_str() << "\""); + delete(monString); + + + Edn::String s1 = "test de base ..."; + s1 += s1; + EDN_INFO("phase : " << iddd++ << " : \"" << s1.c_str() << "\""); + s1 += " plop 2 "; + EDN_INFO("phase : " << iddd++ << " : \"" << s1.c_str() << "\""); + s1 += plop; + EDN_INFO("phase : " << iddd++ << " : \"" << s1.c_str() << "\""); + s1 = plop; + EDN_INFO("phase : " << iddd++ << " : \"" << s1.c_str() << "\""); + s1 = "test direct 44"; + EDN_INFO("phase : " << iddd++ << " : \"" << s1.c_str() << "\""); + EdnVectorBin vb1; + vb1.PushBack('v'); + vb1.PushBack('b'); + vb1.PushBack('1'); + s1 = vb1; + EDN_INFO("phase : " << iddd++ << " : \"" << s1.c_str() << "\""); + vb1.Clear(); + vb1.PushBack('v'); + vb1.PushBack('b'); + vb1.PushBack('2'); + vb1.PushBack('\0'); + s1 = vb1; + EDN_INFO("phase : " << iddd++ << " : \"" << s1.c_str() << "\""); + + if (s1 == "vb2") { + EDN_INFO("phase : " << iddd++ << " : == OK"); + } else { + EDN_ERROR("phase : " << iddd++ << " : == ERROR"); + } + + + if (s1 == "vb3") { + EDN_ERROR("phase : " << iddd++ << " : == ERROR"); + } else { + EDN_INFO("phase : " << iddd++ << " : == OK"); + } + + + if (s1 != "vb3") { + EDN_INFO("phase : " << iddd++ << " : == OK"); + } else { + EDN_ERROR("phase : " << iddd++ << " : == ERROR"); + } + + + if (s1 != "vb2") { + EDN_ERROR("phase : " << iddd++ << " : == ERROR"); + } else { + EDN_INFO("phase : " << iddd++ << " : == OK"); + } + + + Edn::String s2 = "vb2"; + Edn::String s3 = "vb3"; + + if (s1 == s2) { + EDN_INFO("phase : " << iddd++ << " : == OK"); + } else { + EDN_ERROR("phase : " << iddd++ << " : == ERROR"); + } + + + if (s1 == s3) { + EDN_ERROR("phase : " << iddd++ << " : == ERROR"); + } else { + EDN_INFO("phase : " << iddd++ << " : == OK"); + } + + + if (s1 != s3) { + EDN_INFO("phase : " << iddd++ << " : == OK"); + } else { + EDN_ERROR("phase : " << iddd++ << " : == ERROR"); + } + + + if (s1 != s2) { + EDN_ERROR("phase : " << iddd++ << " : == ERROR"); + } else { + EDN_INFO("phase : " << iddd++ << " : == OK"); + } + EDN_WARNING("*********************************************************"); + EDN_WARNING("** Test Unitaire 'EdnString' (STOP)"); + EDN_WARNING("*********************************************************"); +} + diff --git a/Sources/tools/NameSpaceEdn/String.h b/Sources/tools/NameSpaceEdn/String.h new file mode 100644 index 0000000..1740d07 --- /dev/null +++ b/Sources/tools/NameSpaceEdn/String.h @@ -0,0 +1,82 @@ +/** + ******************************************************************************* + * @file EdnString.h + * @brief Editeur De N'ours : normal sting management... (header) + * @author Edouard DUPIN + * @date 26/01/2011 + * @par Project + * Edn + * + * @par Copyright + * Copyright 2010 Edouard DUPIN, all right reserved + * + * This software is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY. + * + * Licence summary : + * You can modify and redistribute the sources code and binaries. + * You can send me the bug-fix + * You can not earn money with this Software (if the source extract from Edn + * represent less than 50% of original Sources) + * Term of the licence in in the file licence.txt. + * + ******************************************************************************* + */ + +#ifndef _IN_NAMESPACE_EDN_ +# error This will be include only in "edn.h" +#else + + class String + { + public: + // Constructeurs + String(void); + String(const char myInput); + String(const char* inputData, int32_t len = -1);//, bool noAllocation=false); + void Set(const char* inputData, int32_t len=-1); + // basic convertion integer en string + String(int inputData); + String(unsigned int inputData); + //String(const wchar_t *inputData); + String(const Edn::String &ednS); + // destructor : + ~String(void); + + const Edn::String& operator= (const Edn::String &ednS ); // assigment + const Edn::String& operator= (const char * inputData); + const Edn::String& operator= (EdnVectorBin inputData); + bool operator== (const Edn::String& ednS) const; // == operator + bool operator== (const char * inputData) const; + bool operator!= (const Edn::String& ednS) const; // != operator + bool operator!= (const char * inputData) const; + const Edn::String& operator+= (const Edn::String &ednS); // += operator + const Edn::String& operator+= (const char * inputData); + Edn::String operator+ (const Edn::String &ednS); // + operator + Edn::String operator+ (const char * inputData); + //operator const char *() + + + bool IsEmpty(void) const; + int32_t Size(void) const; + + void Add(int32_t currentID, const char* inputData); + void Remove(int32_t currentID, int32_t len); + void Clear(void); + + EdnVectorBin GetVector(void); + char * c_str(void) { return (char*)&m_data[0]; }; + + // Sting operation : + int32_t FindForward(const char element, int32_t startPos=0); + int32_t FindBack(const char element, int32_t startPos=0x7FFFFFFF); + Edn::String Extract(int32_t posStart=0, int32_t posEnd=0x7FFFFFFF); + + private : + EdnVectorBin m_data; + }; + + void TestUntaire_String(void); + +#endif + diff --git a/Sources/tools/charset/charset.cpp b/Sources/tools/charset/charset.cpp new file mode 100644 index 0000000..34fa8a9 --- /dev/null +++ b/Sources/tools/charset/charset.cpp @@ -0,0 +1,1059 @@ +/** + ******************************************************************************* + * @file charset.cpp + * @brief Editeur De N'ours : Abstraction Charset layer (Sources) + * @author Edouard DUPIN + * @date 06/06/2011 + * @par Project + * Edn + * + * @par Copyright + * Copyright 2010 Edouard DUPIN, all right reserved + * + * This software is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY. + * + * Licence summary : + * You can modify and redistribute the sources code and binaries. + * You can send me the bug-fix + * You can not earn money with this Software (if the source extract from Edn + * represent less than 50% of original Sources) + * Term of the licence in in the file licence.txt. + * + ******************************************************************************* + */ + +// cf : http://unicode.org/fr/charts/symbols.html#CombiningDiacriticalMarks + +#include "tools_debug.h" +#include "tools_globals.h" +#include "charsetTable.h" +#include "charset.h" + +// /usr/include/gtk-3.0/gdk/gdkkeysyms.h + + +// transform ISO <==> Unicode +void convertIsoToUnicode(charset_te inputCharset, char input_ISO, int32_t & output_Unicode) +{ + switch(inputCharset) + { + case EDN_CHARSET_ISO_8859_1: output_Unicode = TableIso8859_1[(uint32_t)input_ISO&0xFF]; break; + case EDN_CHARSET_ISO_8859_2: output_Unicode = TableIso8859_2[(uint32_t)input_ISO&0xFF]; break; + case EDN_CHARSET_ISO_8859_3: output_Unicode = TableIso8859_3[(uint32_t)input_ISO&0xFF]; break; + case EDN_CHARSET_ISO_8859_4: output_Unicode = TableIso8859_4[(uint32_t)input_ISO&0xFF]; break; + case EDN_CHARSET_ISO_8859_5: output_Unicode = TableIso8859_5[(uint32_t)input_ISO&0xFF]; break; + case EDN_CHARSET_ISO_8859_6: output_Unicode = TableIso8859_6[(uint32_t)input_ISO&0xFF]; break; + case EDN_CHARSET_ISO_8859_7: output_Unicode = TableIso8859_7[(uint32_t)input_ISO&0xFF]; break; + case EDN_CHARSET_ISO_8859_8: output_Unicode = TableIso8859_8[(uint32_t)input_ISO&0xFF]; break; + case EDN_CHARSET_ISO_8859_9: output_Unicode = TableIso8859_9[(uint32_t)input_ISO&0xFF]; break; + case EDN_CHARSET_ISO_8859_10: output_Unicode = TableIso8859_10[(uint32_t)input_ISO&0xFF]; break; + case EDN_CHARSET_ISO_8859_11: output_Unicode = TableIso8859_11[(uint32_t)input_ISO&0xFF]; break; + case EDN_CHARSET_ISO_8859_13: output_Unicode = TableIso8859_13[(uint32_t)input_ISO&0xFF]; break; + case EDN_CHARSET_ISO_8859_14: output_Unicode = TableIso8859_14[(uint32_t)input_ISO&0xFF]; break; + case EDN_CHARSET_ISO_8859_15: + output_Unicode = TableIso8859_15[(uint32_t)input_ISO&0xFF]; + #if 0 + if ((uint32_t)input_ISO&0xFF == 0xb0) { + printf("Change Element : 0x%02x ==> 0x%08x \n", (uint32_t)input_ISO&0xFF, output_Unicode); + } + #endif + break; + default : + EDN_WARNING("Unknow charset ... " << inputCharset); + output_Unicode = '?'; + break; + } +} + + +void convertUnicodeToIso(charset_te inputCharset, int32_t input_Unicode, char & output_ISO) +{ + const int32_t *tmpTable = NULL; + switch(inputCharset) + { + case EDN_CHARSET_ISO_8859_1: tmpTable = TableIso8859_1; break; + case EDN_CHARSET_ISO_8859_2: tmpTable = TableIso8859_2; break; + case EDN_CHARSET_ISO_8859_3: tmpTable = TableIso8859_3; break; + case EDN_CHARSET_ISO_8859_4: tmpTable = TableIso8859_4; break; + case EDN_CHARSET_ISO_8859_5: tmpTable = TableIso8859_5; break; + case EDN_CHARSET_ISO_8859_6: tmpTable = TableIso8859_6; break; + case EDN_CHARSET_ISO_8859_7: tmpTable = TableIso8859_7; break; + case EDN_CHARSET_ISO_8859_8: tmpTable = TableIso8859_8; break; + case EDN_CHARSET_ISO_8859_9: tmpTable = TableIso8859_9; break; + case EDN_CHARSET_ISO_8859_10: tmpTable = TableIso8859_10; break; + case EDN_CHARSET_ISO_8859_11: tmpTable = TableIso8859_11; break; + case EDN_CHARSET_ISO_8859_13: tmpTable = TableIso8859_13; break; + case EDN_CHARSET_ISO_8859_14: tmpTable = TableIso8859_14; break; + case EDN_CHARSET_ISO_8859_15: tmpTable = TableIso8859_15; break; + default : + EDN_WARNING("Unknow charset ... " << inputCharset); + output_ISO = '?'; + return; + } + int32_t i; + for (i=0; i<256; i++) { + if (tmpTable[i] == input_Unicode) { + output_ISO = (char)i; + return; + } + } +} + + +int32_t convertIsoToUnicode(charset_te inputCharset, EdnVectorBin& input_ISO, EdnVectorBin& output_Unicode) +{ + EDN_WARNING("TODO : not coded..."); + return 0; +} + + +int32_t convertUnicodeToIso(charset_te inputCharset, EdnVectorBin& input_Unicode, EdnVectorBin& output_ISO) +{ + EDN_WARNING("TODO : not coded..."); + return 0; +} + + +static uint32_t unicodeToUtf8(uint32_t value) +{ + uint32_t output = 0; + if (127 >= value) { + output = value; + } else if (2047 >= value) { + // output ==> 00000000 00000000 110xxxxx 10xxxxxx + // input ==> -------- -------- -----222 22111111 + output = 0x0000C080; + output+= (value & 0x000007C0)<<2; + output+= value & 0x0000003F; + } else if (65535 >= value) { + // output ==> 00000000 1110xxxx 10xxxxxx 10xxxxxx + // input ==> -------- -------- 33332222 22111111 + output = 0x00E08080; + output+= (value & 0x0000F000)<<4; + output+= (value & 0x00000FC0)<<2; + output+= value & 0x0000003F; + } else if (1114111 >= value) { + // output ==> 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx + // input ==> -------- ---44433 33332222 22111111 + output = 0xF0808080; + output+= (value & 0x001C0000)<<6; + output+= (value & 0x0003F000)<<4; + output+= (value & 0x00000FC0)<<2; + output+= value & 0x0000003F; + } else { + EDN_ERROR("NON UTF8 caracter input..."); + return 0; + } + //printf("utf8convertion : %d=%08x ==> %08x\n",value, value, output); + return output; +} + + +// Transform UTF-8 <==> Unicode +void convertUnicodeToUtf8(int32_t input_Unicode, char * output_UTF8) +{ + uint32_t value = unicodeToUtf8(input_Unicode); + if (0xFF >= value) { + output_UTF8[0] = (char)value; + output_UTF8[1] = '\0'; + } else if (0xFFFF >= value) { + output_UTF8[0] = (char)((value>>8) & 0x000000FF); + output_UTF8[1] = (char)value; + output_UTF8[2] = '\0'; + } else if (0xFFFFFF >= value) { + output_UTF8[0] = (char)((value>>16) & 0x000000FF); + output_UTF8[1] = (char)((value>>8) & 0x000000FF); + output_UTF8[2] = (char)value; + output_UTF8[3] = '\0'; + } else { + output_UTF8[0] = (char)((value>>24) & 0x000000FF); + output_UTF8[1] = (char)((value>>16) & 0x000000FF); + output_UTF8[2] = (char)((value>>8) & 0x000000FF); + output_UTF8[3] = (char)value; + output_UTF8[4] = '\0'; + } +} + + + +void convertUtf8ToUnicode(char * input_UTF8, int32_t &output_Unicode) +{ + int32_t len = strlen(input_UTF8); + output_Unicode = 0; + switch (len) { + case 1: + output_Unicode = (uint8_t)(input_UTF8[0]) & 0x7F; + break; + case 2: + output_Unicode = (((uint8_t)input_UTF8[0]) & 0x1F)<< 6; + output_Unicode += ((uint8_t)input_UTF8[1]) & 0x3F; + break; + case 3: + output_Unicode = (((uint8_t)input_UTF8[0]) & 0x0F)<< 12; + output_Unicode += (((uint8_t)input_UTF8[1]) & 0x3F)<< 6; + output_Unicode += ((uint8_t)input_UTF8[2]) & 0x3F; + break; + default: + output_Unicode = (((uint8_t)input_UTF8[0]) & 0x07)<< 18; + output_Unicode += (((uint8_t)input_UTF8[1]) & 0x3F)<< 12; + output_Unicode += (((uint8_t)input_UTF8[2]) & 0x3F)<< 6; + output_Unicode += ((uint8_t)input_UTF8[3]) & 0x3F; + break; + } +} + + +int32_t convertUnicodeToUtf8(EdnVectorBin& input_Unicode, EdnVectorBin& output_UTF8) +{ + EDN_WARNING("TODO : not coded..."); + return 0; +} + + +int32_t convertUtf8ToUnicode(EdnVectorBin& input_UTF8, EdnVectorBin& output_Unicode) +{ + EDN_WARNING("TODO : not coded..."); + return 0; +} + + +// Transform ISO <==> UTF-8 +void convertIsoToUtf8(charset_te inputCharset, char input_ISO, char * output_UTF8) +{ + int32_t tmpUnicode; + // concert Iso in UniCode + convertIsoToUnicode(inputCharset, input_ISO, tmpUnicode ); + // convert UniCode in Utf-8 + convertUnicodeToUtf8(tmpUnicode, output_UTF8); +} + + +void convertUtf8ToIso(charset_te inputCharset, char * input_UTF8, char & output_ISO) +{ + int32_t tmpUnicode; + // convert Utf-8 in UniCode + convertUtf8ToUnicode(input_UTF8, tmpUnicode); + // concert UniCode in Iso + convertUnicodeToIso(inputCharset, tmpUnicode, output_ISO); +} + + +int32_t convertIsoToUtf8(charset_te inputCharset, EdnVectorBin& input_ISO, EdnVectorBin& output_UTF8) +{ + EDN_WARNING("TODO : not coded..."); + return 0; +} + + +int32_t convertUtf8ToIso(charset_te inputCharset, EdnVectorBin& input_UTF8, EdnVectorBin& output_ISO) +{ + EDN_WARNING("TODO : not coded..."); + return 0; +} + +/** + * @brief Get the number of element of the curent UTF8 char (in the curent Buffer) + * + * @param[in] data pointer on the curent CHAR string (pointer on the allocated buffer) + * @param[out] size Nb of char use in this UTF8 [0..4] + * @param[out] baseValid true : the ase format of the UTF8 is CORRECT + * + * @return --- + * + */ +void Utf8_SizeElement(const char * data, int32_t lenMax , uint8_t &size, bool &baseValid) +{ + EDN_ASSERT(0 <= lenMax, "size can not be < 0 ..."); + if (0 > lenMax) { + size = 0; + baseValid = false; + return; + } + //4 case + if ( 1<=lenMax + && 0x00 == (data[0] & 0x80) ) { + // One Char Element + size = 1; + baseValid = true; + } else if( 2<=lenMax + && 0xC0 == (data[0] & 0xE0) + && 0x80 == (data[1] & 0xC0) ) { + size = 2; + baseValid = true; + } else if( 3<=lenMax + && 0xE0 == (data[0] & 0xF0) + && 0x80 == (data[1] & 0xC0) + && 0x80 == (data[2] & 0xC0)) { + size = 3; + baseValid = true; + } else if( 4<=lenMax + && 0xF0 == (data[0] & 0xF8) + && 0x80 == (data[1] & 0xC0) + && 0x80 == (data[2] & 0xC0) + && 0x80 == (data[3] & 0xC0)) { + size = 4; + baseValid = true; + } else { + // return only one error Caracter ... + baseValid = false; + size = 1; + } +} + +/** + * @brief Get the number of element of the previous UTF8 char (in the curent Buffer) + * + * @param[in] data pointer on the curent CHAR string (pointer on the allocated buffer) (the curent char is not check) + * @param[out] size Nb of char use in this UTF8 [0..4] + * @param[out] baseValid true : the ase format of the UTF8 is CORRECT + * + * @return --- + * + */ +static void Utf8_SizePreviousElement(const char * data, int32_t lenMax, uint8_t &size, bool &baseValid) +{ + EDN_ASSERT(0 <= lenMax, "size can not be < 0 ..."); + if (0 > lenMax) { + size = 0; + baseValid = false; + return; + } + //4 case + if ( 1<=lenMax + && 0x00 == (data[-1] & 0x80) ) { + // One Char Element + size = 1; + baseValid = true; + } else if( 2<=lenMax + && 0xC0 == (data[-2] & 0xE0) + && 0x80 == (data[-1] & 0xC0) ) { + size = 2; + baseValid = true; + } else if( 3<=lenMax + && 0xE0 == (data[-3] & 0xF0) + && 0x80 == (data[-2] & 0xC0) + && 0x80 == (data[-1] & 0xC0)) { + size = 3; + baseValid = true; + } else if( 4<=lenMax + && 0xF0 == (data[-4] & 0xF8) + && 0x80 == (data[-3] & 0xC0) + && 0x80 == (data[-2] & 0xC0) + && 0x80 == (data[-1] & 0xC0)) { + size = 4; + baseValid = true; + } else { + // return only one error Caracter ... + baseValid = false; + size = 1; + } +} + + +/** + * @brief + * + * @param[in,out] + * + * @return + * + */ + /* +static uint32_t Utf8_GetValue(UTF8Element_ts &Element) +{ + uint32_t value = 0; + const char * data = m_data + Element.CharPosition; + //4 case + switch(Element.CharSize) + { + case 1: + value = data[0] & 0x7F; + break; + case 2: + value = (data[0] & 0x1F)<< 6; + value += data[1] & 0x3F; + break; + case 3: + value = (data[0] & 0x0F)<< 12; + value += (data[1] & 0x3F)<< 6; + value += data[2] & 0x3F; + break; + case 4: + value = (data[0] & 0x07)<< 18; + value += (data[1] & 0x3F)<< 12; + value += (data[2] & 0x3F)<< 6; + value += data[3] & 0x3F; + break; + default: + // return only one error Caracter ... + EDN_ASSERT(false, "impossible case...."); + break; + } + // check the validity of the UTF8 ... + if( ( 0xD800 <= value + && 0xDFFF >= value ) + || ( 0xFDD0 <= value + && 0xFDEF >= value ) + || ( 0xFFFE <= value + && 0xFFFF >= value ) + || ( 0x1FFFE <= value + && 0x1FFFF >= value ) + || ( 0x2FFFE <= value + && 0xDFFFF >= value ) + || ( 0xEFFFE <= value + && 0xEFFFF >= value ) + || ( 0xFFFFE <= value + && 0xFFFFF >= value ) + || ( 0x10FFFE <= value + && 0x10FFFF >= value ) ) + { + // overwrite the UTF8 validity ==> this is not a diaplayable element + Element.ValidUTF8 = false; + return value; + } + + return value; +} +*/ + + +int32_t strUtf8Len(const char *input_UTF8) +{ + int32_t count = 0; + int32_t size = strlen(input_UTF8); + uint8_t tmpSize; + bool baseValid; + while (size > 0) { + Utf8_SizeElement(input_UTF8, size , tmpSize, baseValid); + input_UTF8 += tmpSize; + size -= tmpSize; + count++; + } + return count; +} + + + +// ************************************************************************************************************** +// simple convertion optention +// ************************************************************************************************************** + +#if 0 + +Procedure de recuperation des charset sans ce casser les ... + +// generate the basic file + FILE * mfile = NULL; + mfile = fopen("fichierIsoBase", "wb"); + if (NULL == mfile) { + EDN_ERROR("Error to create file"); + return false; + } + char newline = '\n'; + for(int32_t i=0x20; i<0x100; i++) { + char plop = i; + fwrite(&plop, sizeof(char), 1, mfile); + fwrite(&newline, sizeof(char), 1, mfile); + } + fclose(mfile); +// console script to convert files : +iconv -c --from-code=ISO-8859-1 --to-code=UTF-8 -o fichierUTF8_iso-1 fichierIsoBase +iconv -c --from-code=ISO-8859-2 --to-code=UTF-8 -o fichierUTF8_iso-2 fichierIsoBase +iconv -c --from-code=ISO-8859-3 --to-code=UTF-8 -o fichierUTF8_iso-3 fichierIsoBase +iconv -c --from-code=ISO-8859-4 --to-code=UTF-8 -o fichierUTF8_iso-4 fichierIsoBase +iconv -c --from-code=ISO-8859-5 --to-code=UTF-8 -o fichierUTF8_iso-5 fichierIsoBase +iconv -c --from-code=ISO-8859-6 --to-code=UTF-8 -o fichierUTF8_iso-6 fichierIsoBase +iconv -c --from-code=ISO-8859-7 --to-code=UTF-8 -o fichierUTF8_iso-7 fichierIsoBase +iconv -c --from-code=ISO-8859-8 --to-code=UTF-8 -o fichierUTF8_iso-8 fichierIsoBase +iconv -c --from-code=ISO-8859-9 --to-code=UTF-8 -o fichierUTF8_iso-9 fichierIsoBase +iconv -c --from-code=ISO-8859-10 --to-code=UTF-8 -o fichierUTF8_iso-10 fichierIsoBase +iconv -c --from-code=ISO-8859-11 --to-code=UTF-8 -o fichierUTF8_iso-11 fichierIsoBase +iconv -c --from-code=ISO-8859-12 --to-code=UTF-8 -o fichierUTF8_iso-12 fichierIsoBase +iconv -c --from-code=ISO-8859-13 --to-code=UTF-8 -o fichierUTF8_iso-13 fichierIsoBase +iconv -c --from-code=ISO-8859-14 --to-code=UTF-8 -o fichierUTF8_iso-14 fichierIsoBase +iconv -c --from-code=ISO-8859-15 --to-code=UTF-8 -o fichierUTF8_iso-15 fichierIsoBase + +// NOTE : Le format 12 n'existe pas ... + FILE * mfileout = NULL; + mfileout = fopen("outputGeneration.c", "wb"); + if (NULL == mfileout) { + EDN_ERROR("Error to create file"); + return false; + } + + char * inputFileData[] = { + "fichierUTF8_iso-1", + "fichierUTF8_iso-2", +// "fichierUTF8_iso-3", + "fichierUTF8_iso-4", + "fichierUTF8_iso-5", +/* "fichierUTF8_iso-6", + "fichierUTF8_iso-7", + "fichierUTF8_iso-8", + "fichierUTF8_iso-9", + "fichierUTF8_iso-10", + "fichierUTF8_iso-11", + "fichierUTF8_iso-13", + "fichierUTF8_iso-14", +*/ + "fichierUTF8_iso-15" + }; + + for (int32_t k=0; k<5; k++) { + FILE * mfile = NULL; + mfile = fopen(inputFileData[k], "rb"); + if (NULL == mfile) { + EDN_ERROR("Error to open file"); + return false; + } + char data[255] ; + fprintf(mfileout, "\tTYPESTRUCT_TS %s[] = {\n\t\t", inputFileData[k]); + for(int32_t i=0x0; i<0x10; i++) { + fprintf(mfileout, "0x%08X, ", i); + } + fprintf(mfileout, "\n\t\t"); + for(int32_t i=0x10; i<0x20; i++) { + fprintf(mfileout, "0x%08X, ", i); + } + for(int32_t i=0x20; i<0x100; i++) { + if (0==i%16) { + fprintf(mfileout, "\n\t\t"); + } + fgets(data, 25, mfile ); + data[strlen(data)-1] = '\0'; + EDN_INFO("sizeofLine=" << strlen(data) << " data=\"" << data << "\""); + // convert in int : + int32_t valUTF8 = 0; + int32_t valUnicode = 0; + switch (strlen(data)) { + case 1: + valUTF8 = (uint8_t) (data[0]); + valUnicode = (uint8_t)(data[0]) & 0x7F; + break; + case 2: + valUTF8 = (uint8_t) (data[0]) << 8; + valUTF8 += (uint8_t) (data[1]); + valUnicode = (((uint8_t)data[0]) & 0x1F)<< 6; + valUnicode += ((uint8_t)data[1]) & 0x3F; + break; + case 3: + valUTF8 = (uint8_t) (data[0]) << 16; + valUTF8 += (uint8_t) (data[1]) << 8; + valUTF8 += (uint8_t) (data[2]); + valUnicode = (((uint8_t)data[0]) & 0x0F)<< 12; + valUnicode += (((uint8_t)data[1]) & 0x3F)<< 6; + valUnicode += ((uint8_t)data[2]) & 0x3F; + break; + default: + valUTF8 = (uint8_t) (data[0]) <<24; + valUTF8 += (uint8_t) (data[1]) << 16; + valUTF8 += (uint8_t) (data[2]) << 8; + valUTF8 += (uint8_t) (data[3]); + valUnicode = (((uint8_t)data[0]) & 0x07)<< 18; + valUnicode += (((uint8_t)data[1]) & 0x3F)<< 12; + valUnicode += (((uint8_t)data[2]) & 0x3F)<< 6; + valUnicode += ((uint8_t)data[3]) & 0x3F; + break; + } + fprintf(mfileout, "0x%08X, ", valUnicode); + } + fprintf(mfileout, "\n\t};\n\n"); + fclose(mfile); + } + fclose(mfileout); + +#endif + + + + +void ConvertInput(GdkEventKey *event, char* Utf8Out, bool &controlKey, bool &moveKey, int32_t &key) +{ + char *eventMode=(char*)"KEY REALEASED"; + if(event->type == GDK_KEY_PRESS) { + eventMode=(char*)"KEY PRESSED"; + } + moveKey = false; + controlKey = false; + key = event->keyval; + //EDN_INFO("key : " << key); + switch (key) + { +# ifdef USE_GTK_VERSION_3_0 + case GDK_KEY_KP_Space: +# elif USE_GTK_VERSION_2_0 + case GDK_KP_Space: +# endif + key = (int32_t)' '; + break; +# ifdef USE_GTK_VERSION_3_0 + case GDK_KEY_KP_Tab: +# elif USE_GTK_VERSION_2_0 + case GDK_KP_Tab: +# endif + case 65289: + key = (int32_t)'\t'; + break; +# ifdef USE_GTK_VERSION_3_0 + case GDK_KEY_KP_Enter: + key = GDK_KEY_Return; + break; +# elif USE_GTK_VERSION_2_0 + case GDK_KP_Enter: + key = GDK_Return; + break; +# endif +# ifdef USE_GTK_VERSION_3_0 + case GDK_KEY_KP_F1: + case GDK_KEY_F1: + key = GDK_KEY_F1; +# elif USE_GTK_VERSION_2_0 + case GDK_KP_F1: + case GDK_F1: + key = GDK_F1; +# endif + controlKey = true; + break; +# ifdef USE_GTK_VERSION_3_0 + case GDK_KEY_KP_F2: + case GDK_KEY_F2: + key = GDK_KEY_F2; +# elif USE_GTK_VERSION_2_0 + case GDK_KP_F2: + case GDK_F2: + key = GDK_F2; +# endif + controlKey = true; + break; +# ifdef USE_GTK_VERSION_3_0 + case GDK_KEY_KP_F3: + case GDK_KEY_F3: + key = GDK_KEY_F3; +# elif USE_GTK_VERSION_2_0 + case GDK_KP_F3: + case GDK_F3: + key = GDK_F3; +# endif + controlKey = true; + break; +# ifdef USE_GTK_VERSION_3_0 + case GDK_KEY_KP_F4: + case GDK_KEY_F4: + key = GDK_KEY_F4; +# elif USE_GTK_VERSION_2_0 + case GDK_KP_F4: + case GDK_F4: + key = GDK_F4; +# endif + controlKey = true; + break; +# ifdef USE_GTK_VERSION_3_0 + case GDK_KEY_F5: + case GDK_KEY_F6: + case GDK_KEY_F7: + case GDK_KEY_F8: + case GDK_KEY_F9: + case GDK_KEY_F10: + case GDK_KEY_F11: + case GDK_KEY_F12: + case GDK_KEY_F13: + case GDK_KEY_F14: + case GDK_KEY_F15: + case GDK_KEY_F16: +# elif USE_GTK_VERSION_2_0 + case GDK_F5: + case GDK_F6: + case GDK_F7: + case GDK_F8: + case GDK_F9: + case GDK_F10: + case GDK_F11: + case GDK_F12: + case GDK_F13: + case GDK_F14: + case GDK_F15: + case GDK_F16: +# endif + controlKey = true; + break; +# ifdef USE_GTK_VERSION_3_0 + case GDK_KEY_KP_Home: + case GDK_KEY_Home: + key = GDK_KEY_Begin; +# elif USE_GTK_VERSION_2_0 + case GDK_KP_Home: + case GDK_Home: + key = GDK_Begin; +# endif + controlKey = true; + moveKey = true; + break; +# ifdef USE_GTK_VERSION_3_0 + case GDK_KEY_KP_Left: + case GDK_KEY_Left: + key = GDK_KEY_Left; +# elif USE_GTK_VERSION_2_0 + case GDK_KP_Left: + case GDK_Left: + key = GDK_Left; +# endif + controlKey = true; + moveKey = true; + break; +# ifdef USE_GTK_VERSION_3_0 + case GDK_KEY_KP_Up: + case GDK_KEY_Up: + key = GDK_KEY_Up; +# elif USE_GTK_VERSION_2_0 + case GDK_KP_Up: + case GDK_Up: + key = GDK_Up; +# endif + controlKey = true; + moveKey = true; + break; +# ifdef USE_GTK_VERSION_3_0 + case GDK_KEY_KP_Right: + case GDK_KEY_Right: + key = GDK_KEY_Right; +# elif USE_GTK_VERSION_2_0 + case GDK_KP_Right: + case GDK_Right: + key = GDK_Right; +# endif + controlKey = true; + moveKey = true; + break; +# ifdef USE_GTK_VERSION_3_0 + case GDK_KEY_KP_Down: + case GDK_KEY_Down: + key = GDK_KEY_Down; +# elif USE_GTK_VERSION_2_0 + case GDK_KP_Down: + case GDK_Down: + key = GDK_Down; +# endif + controlKey = true; + moveKey = true; + break; +# ifdef USE_GTK_VERSION_3_0 + case GDK_KEY_KP_Page_Up: + case GDK_KEY_Page_Up: + key = GDK_KEY_Page_Up; +# elif USE_GTK_VERSION_2_0 + case GDK_KP_Page_Up: + case GDK_Page_Up: + key = GDK_Page_Up; +# endif + controlKey = true; + moveKey = true; + break; +# ifdef USE_GTK_VERSION_3_0 + case GDK_KEY_KP_Page_Down: + case GDK_KEY_Page_Down: + key = GDK_KEY_Page_Down; +# elif USE_GTK_VERSION_2_0 + case GDK_KP_Page_Down: + case GDK_Page_Down: + key = GDK_Page_Down; +# endif + controlKey = true; + moveKey = true; + break; +# ifdef USE_GTK_VERSION_3_0 + case GDK_KEY_KP_End: + case GDK_KEY_End: + key = GDK_KEY_End; +# elif USE_GTK_VERSION_2_0 + case GDK_KP_End: + case GDK_End: + key = GDK_End; +# endif + controlKey = true; + moveKey = true; + break; +# ifdef USE_GTK_VERSION_3_0 + case GDK_KEY_KP_Begin: + case GDK_KEY_Begin: + key = GDK_KEY_Begin; +# elif USE_GTK_VERSION_2_0 + case GDK_KP_Begin: + case GDK_Begin: + key = GDK_Begin; +# endif + controlKey = true; + moveKey = true; + break; +# ifdef USE_GTK_VERSION_3_0 + case GDK_KEY_KP_Equal: +# elif USE_GTK_VERSION_2_0 + case GDK_KP_Equal: +# endif + key = (int32_t)'='; + break; +# ifdef USE_GTK_VERSION_3_0 + case GDK_KEY_KP_Multiply: +# elif USE_GTK_VERSION_2_0 + case GDK_KP_Multiply: +# endif + key = (int32_t)'*'; + break; +# ifdef USE_GTK_VERSION_3_0 + case GDK_KEY_KP_Add: +# elif USE_GTK_VERSION_2_0 + case GDK_KP_Add: +# endif + key = (int32_t)'+'; + break; +# ifdef USE_GTK_VERSION_3_0 + case GDK_KEY_KP_Separator: +# elif USE_GTK_VERSION_2_0 + case GDK_KP_Separator: +# endif + // TODO ... key = (int32)'\t'; + break; +# ifdef USE_GTK_VERSION_3_0 + case GDK_KEY_KP_Subtract: +# elif USE_GTK_VERSION_2_0 + case GDK_KP_Subtract: +# endif + key = (int32_t)'-'; + break; +# ifdef USE_GTK_VERSION_3_0 + case GDK_KEY_KP_Decimal: +# elif USE_GTK_VERSION_2_0 + case GDK_KP_Decimal: +# endif + // TODO ... key = (int32)'\t'; + break; +# ifdef USE_GTK_VERSION_3_0 + case GDK_KEY_KP_Divide: +# elif USE_GTK_VERSION_2_0 + case GDK_KP_Divide: +# endif + key = (int32_t)'/'; + break; +# ifdef USE_GTK_VERSION_3_0 + case GDK_KEY_KP_0: +# elif USE_GTK_VERSION_2_0 + case GDK_KP_0: +# endif + key = (int32_t)'0'; + break; +# ifdef USE_GTK_VERSION_3_0 + case GDK_KEY_KP_1: +# elif USE_GTK_VERSION_2_0 + case GDK_KP_1: +# endif + key = (int32_t)'1'; + break; +# ifdef USE_GTK_VERSION_3_0 + case GDK_KEY_KP_2: +# elif USE_GTK_VERSION_2_0 + case GDK_KP_2: +# endif + key = (int32_t)'2'; + break; +# ifdef USE_GTK_VERSION_3_0 + case GDK_KEY_KP_3: +# elif USE_GTK_VERSION_2_0 + case GDK_KP_3: +# endif + key = (int32_t)'3'; + break; +# ifdef USE_GTK_VERSION_3_0 + case GDK_KEY_KP_4: +# elif USE_GTK_VERSION_2_0 + case GDK_KP_4: +# endif + key = (int32_t)'4'; + break; +# ifdef USE_GTK_VERSION_3_0 + case GDK_KEY_KP_5: +# elif USE_GTK_VERSION_2_0 + case GDK_KP_5: +# endif + key = (int32_t)'5'; + break; +# ifdef USE_GTK_VERSION_3_0 + case GDK_KEY_KP_6: +# elif USE_GTK_VERSION_2_0 + case GDK_KP_6: +# endif + key = (int32_t)'6'; + break; +# ifdef USE_GTK_VERSION_3_0 + case GDK_KEY_KP_7: +# elif USE_GTK_VERSION_2_0 + case GDK_KP_7: +# endif + key = (int32_t)'7'; + break; +# ifdef USE_GTK_VERSION_3_0 + case GDK_KEY_KP_8: +# elif USE_GTK_VERSION_2_0 + case GDK_KP_8: +# endif + key = (int32_t)'8'; + break; +# ifdef USE_GTK_VERSION_3_0 + case GDK_KEY_KP_9: +# elif USE_GTK_VERSION_2_0 + case GDK_KP_9: +# endif + key = (int32_t)'9'; + break; + +# ifdef USE_GTK_VERSION_3_0 + case GDK_KEY_Clear: +# elif USE_GTK_VERSION_2_0 + case GDK_Clear: +# endif + controlKey = true; + break; +# ifdef USE_GTK_VERSION_3_0 + case GDK_KEY_Escape: +# elif USE_GTK_VERSION_2_0 + case GDK_Escape: +# endif + controlKey = true; + break; +# ifdef USE_GTK_VERSION_3_0 + case GDK_KEY_Meta_L: + case GDK_KEY_Meta_R: +# elif USE_GTK_VERSION_2_0 + case GDK_Meta_L: + case GDK_Meta_R: +# endif + EDN_INFO("keyEvent : " << eventMode); + controlKey = true; + break; +# ifdef USE_GTK_VERSION_3_0 + case GDK_KEY_Shift_L: + case GDK_KEY_Shift_R: +# elif USE_GTK_VERSION_2_0 + case GDK_Shift_L: + case GDK_Shift_R: +# endif + controlKey = true; + //EDN_INFO("keyEvent : " << eventMode); + if(event->type == GDK_KEY_PRESS) { + globals::SetShift(); + } else { + globals::UnSetShift(); + } + break; +# ifdef USE_GTK_VERSION_3_0 + case GDK_KEY_Control_L: + case GDK_KEY_Control_R: +# elif USE_GTK_VERSION_2_0 + case GDK_Control_L: + case GDK_Control_R: +# endif + controlKey = true; + //EDN_INFO("keyEvent : " << eventMode); + if(event->type == GDK_KEY_PRESS) { + globals::SetCtrl(); + } else { + globals::UnSetCtrl(); + } + break; +# ifdef USE_GTK_VERSION_3_0 + case GDK_KEY_Alt_L: + case GDK_KEY_Alt_R: +# elif USE_GTK_VERSION_2_0 + case GDK_Alt_L: + case GDK_Alt_R: +# endif + controlKey = true; + //EDN_INFO("keyEvent : " << eventMode); + if(event->type == GDK_KEY_PRESS) { + globals::SetAlt(); + } else { + globals::UnSetAlt(); + } + break; +# ifdef USE_GTK_VERSION_3_0 + case GDK_KEY_Alt_Gr: +# elif USE_GTK_VERSION_2_0 + case GDK_Alt_Gr: +# endif + EDN_INFO("keyEvent : " << eventMode); + controlKey = true; + break; +# ifdef USE_GTK_VERSION_3_0 + case GDK_KEY_KP_Insert: + case GDK_KEY_Insert: + key = GDK_KEY_Insert; +# elif USE_GTK_VERSION_2_0 + case GDK_KP_Insert: + case GDK_Insert: + key = GDK_Insert; +# endif + //EDN_INFO("keyEvent : " << eventMode); + if(event->type == GDK_KEY_PRESS) { + globals::ToggleInsert(); + } + controlKey = true; + break; +# ifdef USE_GTK_VERSION_3_0 + case GDK_KEY_Pomme_L: + case GDK_KEY_Pomme_R: +# elif USE_GTK_VERSION_2_0 + case GDK_Pomme_L: + case GDK_Pomme_R: +# endif + //EDN_INFO("keyEvent : " << eventMode); + if(event->type == GDK_KEY_PRESS) { + globals::SetPomme(); + } else { + globals::UnSetPomme(); + } + controlKey = true; + break; +# ifdef USE_GTK_VERSION_3_0 + case GDK_KEY_Return: +# elif USE_GTK_VERSION_2_0 + case GDK_Return: +# endif + key = '\n'; + break; +# ifdef USE_GTK_VERSION_3_0 + case GDK_KEY_KP_Delete: + case GDK_KEY_Delete: + key = GDK_KEY_Delete; +# elif USE_GTK_VERSION_2_0 + case GDK_KP_Delete: + case GDK_Delete: + key = GDK_Delete; +# endif + key = 0x7F; + break; +# ifdef USE_GTK_VERSION_3_0 + case GDK_KEY_BackSpace: +# elif USE_GTK_VERSION_2_0 + case GDK_BackSpace: +# endif + key = 0x08; + break; + default: + break; + } + // Transform in unicode the input : + int32_t unichar = gdk_keyval_to_unicode(key); + if (unichar == 0) { + Utf8Out[0] = (char)key; + Utf8Out[1] = '\0'; + } else { + // Generate UTF8 form UniCode + convertUnicodeToUtf8(unichar, Utf8Out); + #if 0 + printf(" convertUnicodeToUtf8 : \"0x%08x\" ==> unichar=%d %s\n", key, unichar, Utf8Out); + for (int32_t uu=0; uu < strlen(Utf8Out); uu++) { + printf(" 0x%02x\n", Utf8Out[uu]); + } + #endif + } + +} diff --git a/Sources/tools/charset/charset.h b/Sources/tools/charset/charset.h new file mode 100644 index 0000000..298ade1 --- /dev/null +++ b/Sources/tools/charset/charset.h @@ -0,0 +1,87 @@ +/** + ******************************************************************************* + * @file charset.h + * @brief Editeur De N'ours : Abstraction Charset layer (header) + * @author Edouard DUPIN + * @date 06/06/2011 + * @par Project + * Edn + * + * @par Copyright + * Copyright 2010 Edouard DUPIN, all right reserved + * + * This software is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY. + * + * Licence summary : + * You can modify and redistribute the sources code and binaries. + * You can send me the bug-fix + * You can not earn money with this Software (if the source extract from Edn + * represent less than 50% of original Sources) + * Term of the licence in in the file licence.txt. + * + ******************************************************************************* + */ + +#ifndef __CHARSET_H__ +#define __CHARSET_H__ + +#include "EdnVectorBin.h" + +typedef enum { + EDN_CHARSET_UTF8, + EDN_CHARSET_ISO_8859_1, + EDN_CHARSET_ISO_8859_2, + EDN_CHARSET_ISO_8859_3, + EDN_CHARSET_ISO_8859_4, + EDN_CHARSET_ISO_8859_5, + EDN_CHARSET_ISO_8859_6, + EDN_CHARSET_ISO_8859_7, + EDN_CHARSET_ISO_8859_8, + EDN_CHARSET_ISO_8859_9, + EDN_CHARSET_ISO_8859_10, + EDN_CHARSET_ISO_8859_11, + EDN_CHARSET_ISO_8859_13, + EDN_CHARSET_ISO_8859_14, + EDN_CHARSET_ISO_8859_15, +} charset_te; + +// transform ISO <==> Unicode +void convertIsoToUnicode(charset_te inputCharset, char input_ISO, int32_t & output_Unicode); +void convertUnicodeToIso(charset_te inputCharset, int32_t input_Unicode, char & output_ISO); +int32_t convertIsoToUnicode(charset_te inputCharset, EdnVectorBin& input_ISO, EdnVectorBin& output_Unicode); +int32_t convertUnicodeToIso(charset_te inputCharset, EdnVectorBin& input_Unicode, EdnVectorBin& output_ISO); +// Transform UTF-8 <==> Unicode +void convertUnicodeToUtf8( int32_t input_Unicode, char * output_UTF8); +void convertUtf8ToUnicode( char * input_UTF8, int32_t& output_Unicode); +int32_t convertUnicodeToUtf8( EdnVectorBin& input_Unicode, EdnVectorBin& output_UTF8); +int32_t convertUtf8ToUnicode( EdnVectorBin& input_UTF8, EdnVectorBin& output_Unicode); +// Transform ISO <==> UTF-8 +void convertIsoToUtf8( charset_te inputCharset, char input_ISO, char * output_UTF8); +void convertUtf8ToIso( charset_te inputCharset, char * input_UTF8, char & output_ISO); +int32_t convertIsoToUtf8( charset_te inputCharset, EdnVectorBin& input_ISO, EdnVectorBin& output_UTF8); +int32_t convertUtf8ToIso( charset_te inputCharset, EdnVectorBin& input_UTF8, EdnVectorBin& output_ISO); + +void Utf8_SizeElement(const char * data, int32_t lenMax , uint8_t &size, bool &baseValid); +int32_t strUtf8Len(const char *input_UTF8); + + +#ifdef USE_GTK_VERSION_3_0 +# define GDK_KEY_Esc (65305) +# define GDK_KEY_Alt_Gr (65027) +# define GDK_KEY_Pomme_L (65515) +# define GDK_KEY_Pomme_R (65516) +#elif USE_GTK_VERSION_2_0 +# define GDK_Esc (65305) +# define GDK_Alt_Gr (65027) +# define GDK_Pomme_L (65515) +# define GDK_Pomme_R (65516) +#endif +//# define GDK_Retur (65516) + +void ConvertInput(GdkEventKey *event, char* Utf8Out, bool &controlKey, bool &moveKey, int32_t &key); + +void testDisplayConvChar(void); + +#endif + diff --git a/Sources/tools/charset/charsetTable.cpp b/Sources/tools/charset/charsetTable.cpp new file mode 100644 index 0000000..c36e840 --- /dev/null +++ b/Sources/tools/charset/charsetTable.cpp @@ -0,0 +1,312 @@ +/** + ******************************************************************************* + * @file charsetTable.cpp + * @brief Editeur De N'ours : Table of all charset convertions (Sources) + * @author Edouard DUPIN + * @date 06/06/2011 + * @par Project + * Edn + * + * @par Copyright + * Copyright 2010 Edouard DUPIN, all right reserved + * + * This software is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY. + * + * Licence summary : + * You can modify and redistribute the sources code and binaries. + * You can send me the bug-fix + * You can not earn money with this Software (if the source extract from Edn + * represent less than 50% of original Sources) + * Term of the licence in in the file licence.txt. + * + ******************************************************************************* + */ + + +#include "tools_debug.h" +#include "tools_globals.h" +#include "charsetTable.h" + +extern "C" { + + const int32_t TableIso8859_1[] = { + 0x00000000, 0x00000001, 0x00000002, 0x00000003, 0x00000004, 0x00000005, 0x00000006, 0x00000007, 0x00000008, 0x00000009, 0x0000000A, 0x0000000B, 0x0000000C, 0x0000000D, 0x0000000E, 0x0000000F, + 0x00000010, 0x00000011, 0x00000012, 0x00000013, 0x00000014, 0x00000015, 0x00000016, 0x00000017, 0x00000018, 0x00000019, 0x0000001A, 0x0000001B, 0x0000001C, 0x0000001D, 0x0000001E, 0x0000001F, + 0x00000020, 0x00000021, 0x00000022, 0x00000023, 0x00000024, 0x00000025, 0x00000026, 0x00000027, 0x00000028, 0x00000029, 0x0000002A, 0x0000002B, 0x0000002C, 0x0000002D, 0x0000002E, 0x0000002F, + 0x00000030, 0x00000031, 0x00000032, 0x00000033, 0x00000034, 0x00000035, 0x00000036, 0x00000037, 0x00000038, 0x00000039, 0x0000003A, 0x0000003B, 0x0000003C, 0x0000003D, 0x0000003E, 0x0000003F, + 0x00000040, 0x00000041, 0x00000042, 0x00000043, 0x00000044, 0x00000045, 0x00000046, 0x00000047, 0x00000048, 0x00000049, 0x0000004A, 0x0000004B, 0x0000004C, 0x0000004D, 0x0000004E, 0x0000004F, + 0x00000050, 0x00000051, 0x00000052, 0x00000053, 0x00000054, 0x00000055, 0x00000056, 0x00000057, 0x00000058, 0x00000059, 0x0000005A, 0x0000005B, 0x0000005C, 0x0000005D, 0x0000005E, 0x0000005F, + 0x00000060, 0x00000061, 0x00000062, 0x00000063, 0x00000064, 0x00000065, 0x00000066, 0x00000067, 0x00000068, 0x00000069, 0x0000006A, 0x0000006B, 0x0000006C, 0x0000006D, 0x0000006E, 0x0000006F, + 0x00000070, 0x00000071, 0x00000072, 0x00000073, 0x00000074, 0x00000075, 0x00000076, 0x00000077, 0x00000078, 0x00000079, 0x0000007A, 0x0000007B, 0x0000007C, 0x0000007D, 0x0000007E, 0x0000007F, + 0x00000080, 0x00000081, 0x00000082, 0x00000083, 0x00000084, 0x00000085, 0x00000086, 0x00000087, 0x00000088, 0x00000089, 0x0000008A, 0x0000008B, 0x0000008C, 0x0000008D, 0x0000008E, 0x0000008F, + 0x00000090, 0x00000091, 0x00000092, 0x00000093, 0x00000094, 0x00000095, 0x00000096, 0x00000097, 0x00000098, 0x00000099, 0x0000009A, 0x0000009B, 0x0000009C, 0x0000009D, 0x0000009E, 0x0000009F, + 0x000000A0, 0x000000A1, 0x000000A2, 0x000000A3, 0x000000A4, 0x000000A5, 0x000000A6, 0x000000A7, 0x000000A8, 0x000000A9, 0x000000AA, 0x000000AB, 0x000000AC, 0x000000AD, 0x000000AE, 0x000000AF, + 0x000000B0, 0x000000B1, 0x000000B2, 0x000000B3, 0x000000B4, 0x000000B5, 0x000000B6, 0x000000B7, 0x000000B8, 0x000000B9, 0x000000BA, 0x000000BB, 0x000000BC, 0x000000BD, 0x000000BE, 0x000000BF, + 0x000000C0, 0x000000C1, 0x000000C2, 0x000000C3, 0x000000C4, 0x000000C5, 0x000000C6, 0x000000C7, 0x000000C8, 0x000000C9, 0x000000CA, 0x000000CB, 0x000000CC, 0x000000CD, 0x000000CE, 0x000000CF, + 0x000000D0, 0x000000D1, 0x000000D2, 0x000000D3, 0x000000D4, 0x000000D5, 0x000000D6, 0x000000D7, 0x000000D8, 0x000000D9, 0x000000DA, 0x000000DB, 0x000000DC, 0x000000DD, 0x000000DE, 0x000000DF, + 0x000000E0, 0x000000E1, 0x000000E2, 0x000000E3, 0x000000E4, 0x000000E5, 0x000000E6, 0x000000E7, 0x000000E8, 0x000000E9, 0x000000EA, 0x000000EB, 0x000000EC, 0x000000ED, 0x000000EE, 0x000000EF, + 0x000000F0, 0x000000F1, 0x000000F2, 0x000000F3, 0x000000F4, 0x000000F5, 0x000000F6, 0x000000F7, 0x000000F8, 0x000000F9, 0x000000FA, 0x000000FB, 0x000000FC, 0x000000FD, 0x000000FE, 0x000000FF + }; + + const int32_t TableIso8859_2[] = { + 0x00000000, 0x00000001, 0x00000002, 0x00000003, 0x00000004, 0x00000005, 0x00000006, 0x00000007, 0x00000008, 0x00000009, 0x0000000A, 0x0000000B, 0x0000000C, 0x0000000D, 0x0000000E, 0x0000000F, + 0x00000010, 0x00000011, 0x00000012, 0x00000013, 0x00000014, 0x00000015, 0x00000016, 0x00000017, 0x00000018, 0x00000019, 0x0000001A, 0x0000001B, 0x0000001C, 0x0000001D, 0x0000001E, 0x0000001F, + 0x00000020, 0x00000021, 0x00000022, 0x00000023, 0x00000024, 0x00000025, 0x00000026, 0x00000027, 0x00000028, 0x00000029, 0x0000002A, 0x0000002B, 0x0000002C, 0x0000002D, 0x0000002E, 0x0000002F, + 0x00000030, 0x00000031, 0x00000032, 0x00000033, 0x00000034, 0x00000035, 0x00000036, 0x00000037, 0x00000038, 0x00000039, 0x0000003A, 0x0000003B, 0x0000003C, 0x0000003D, 0x0000003E, 0x0000003F, + 0x00000040, 0x00000041, 0x00000042, 0x00000043, 0x00000044, 0x00000045, 0x00000046, 0x00000047, 0x00000048, 0x00000049, 0x0000004A, 0x0000004B, 0x0000004C, 0x0000004D, 0x0000004E, 0x0000004F, + 0x00000050, 0x00000051, 0x00000052, 0x00000053, 0x00000054, 0x00000055, 0x00000056, 0x00000057, 0x00000058, 0x00000059, 0x0000005A, 0x0000005B, 0x0000005C, 0x0000005D, 0x0000005E, 0x0000005F, + 0x00000060, 0x00000061, 0x00000062, 0x00000063, 0x00000064, 0x00000065, 0x00000066, 0x00000067, 0x00000068, 0x00000069, 0x0000006A, 0x0000006B, 0x0000006C, 0x0000006D, 0x0000006E, 0x0000006F, + 0x00000070, 0x00000071, 0x00000072, 0x00000073, 0x00000074, 0x00000075, 0x00000076, 0x00000077, 0x00000078, 0x00000079, 0x0000007A, 0x0000007B, 0x0000007C, 0x0000007D, 0x0000007E, 0x0000007F, + 0x00000080, 0x00000081, 0x00000082, 0x00000083, 0x00000084, 0x00000085, 0x00000086, 0x00000087, 0x00000088, 0x00000089, 0x0000008A, 0x0000008B, 0x0000008C, 0x0000008D, 0x0000008E, 0x0000008F, + 0x00000090, 0x00000091, 0x00000092, 0x00000093, 0x00000094, 0x00000095, 0x00000096, 0x00000097, 0x00000098, 0x00000099, 0x0000009A, 0x0000009B, 0x0000009C, 0x0000009D, 0x0000009E, 0x0000009F, + 0x000000A0, 0x00000104, 0x000002D8, 0x00000141, 0x000000A4, 0x0000013D, 0x0000015A, 0x000000A7, 0x000000A8, 0x00000160, 0x0000015E, 0x00000164, 0x00000179, 0x000000AD, 0x0000017D, 0x0000017B, + 0x000000B0, 0x00000105, 0x000002DB, 0x00000142, 0x000000B4, 0x0000013E, 0x0000015B, 0x000002C7, 0x000000B8, 0x00000161, 0x0000015F, 0x00000165, 0x0000017A, 0x000002DD, 0x0000017E, 0x0000017C, + 0x00000154, 0x000000C1, 0x000000C2, 0x00000102, 0x000000C4, 0x00000139, 0x00000106, 0x000000C7, 0x0000010C, 0x000000C9, 0x00000118, 0x000000CB, 0x0000011A, 0x000000CD, 0x000000CE, 0x0000010E, + 0x00000110, 0x00000143, 0x00000147, 0x000000D3, 0x000000D4, 0x00000150, 0x000000D6, 0x000000D7, 0x00000158, 0x0000016E, 0x000000DA, 0x00000170, 0x000000DC, 0x000000DD, 0x00000162, 0x000000DF, + 0x00000155, 0x000000E1, 0x000000E2, 0x00000103, 0x000000E4, 0x0000013A, 0x00000107, 0x000000E7, 0x0000010D, 0x000000E9, 0x00000119, 0x000000EB, 0x0000011B, 0x000000ED, 0x000000EE, 0x0000010F, + 0x00000111, 0x00000144, 0x00000148, 0x000000F3, 0x000000F4, 0x00000151, 0x000000F6, 0x000000F7, 0x00000159, 0x0000016F, 0x000000FA, 0x00000171, 0x000000FC, 0x000000FD, 0x00000163, 0x000002D9 + }; + + const int32_t TableIso8859_3[] = { + 0x00000000, 0x00000001, 0x00000002, 0x00000003, 0x00000004, 0x00000005, 0x00000006, 0x00000007, 0x00000008, 0x00000009, 0x0000000A, 0x0000000B, 0x0000000C, 0x0000000D, 0x0000000E, 0x0000000F, + 0x00000010, 0x00000011, 0x00000012, 0x00000013, 0x00000014, 0x00000015, 0x00000016, 0x00000017, 0x00000018, 0x00000019, 0x0000001A, 0x0000001B, 0x0000001C, 0x0000001D, 0x0000001E, 0x0000001F, + 0x00000020, 0x00000021, 0x00000022, 0x00000023, 0x00000024, 0x00000025, 0x00000026, 0x00000027, 0x00000028, 0x00000029, 0x0000002A, 0x0000002B, 0x0000002C, 0x0000002D, 0x0000002E, 0x0000002F, + 0x00000030, 0x00000031, 0x00000032, 0x00000033, 0x00000034, 0x00000035, 0x00000036, 0x00000037, 0x00000038, 0x00000039, 0x0000003A, 0x0000003B, 0x0000003C, 0x0000003D, 0x0000003E, 0x0000003F, + 0x00000040, 0x00000041, 0x00000042, 0x00000043, 0x00000044, 0x00000045, 0x00000046, 0x00000047, 0x00000048, 0x00000049, 0x0000004A, 0x0000004B, 0x0000004C, 0x0000004D, 0x0000004E, 0x0000004F, + 0x00000050, 0x00000051, 0x00000052, 0x00000053, 0x00000054, 0x00000055, 0x00000056, 0x00000057, 0x00000058, 0x00000059, 0x0000005A, 0x0000005B, 0x0000005C, 0x0000005D, 0x0000005E, 0x0000005F, + 0x00000060, 0x00000061, 0x00000062, 0x00000063, 0x00000064, 0x00000065, 0x00000066, 0x00000067, 0x00000068, 0x00000069, 0x0000006A, 0x0000006B, 0x0000006C, 0x0000006D, 0x0000006E, 0x0000006F, + 0x00000070, 0x00000071, 0x00000072, 0x00000073, 0x00000074, 0x00000075, 0x00000076, 0x00000077, 0x00000078, 0x00000079, 0x0000007A, 0x0000007B, 0x0000007C, 0x0000007D, 0x0000007E, 0x0000007F, + 0x00000080, 0x00000081, 0x00000082, 0x00000083, 0x00000084, 0x00000085, 0x00000086, 0x00000087, 0x00000088, 0x00000089, 0x0000008A, 0x0000008B, 0x0000008C, 0x0000008D, 0x0000008E, 0x0000008F, + 0x00000090, 0x00000091, 0x00000092, 0x00000093, 0x00000094, 0x00000095, 0x00000096, 0x00000097, 0x00000098, 0x00000099, 0x0000009A, 0x0000009B, 0x0000009C, 0x0000009D, 0x0000009E, 0x0000009F, + 0x000000A0, 0x00000126, 0x000002D8, 0x000000A3, 0x000000A4, 0x00000000, 0x00000124, 0x000000A7, 0x000000A8, 0x00000130, 0x0000015E, 0x0000011E, 0x00000134, 0x000000AD, 0x00000000, 0x0000017B, + 0x000000B0, 0x00000127, 0x000000B2, 0x000000B3, 0x000000B4, 0x000000B5, 0x00000125, 0x000000B7, 0x000000B8, 0x00000131, 0x0000015F, 0x0000011F, 0x00000135, 0x000000BD, 0x00000000, 0x0000017C, + 0x000000C0, 0x000000C1, 0x000000C2, 0x00000000, 0x000000C4, 0x0000010A, 0x00000108, 0x000000C7, 0x000000C8, 0x000000C9, 0x000000CA, 0x000000CB, 0x000000CC, 0x000000CD, 0x000000CE, 0x000000CF, + 0x00000000, 0x000000D1, 0x000000D2, 0x000000D3, 0x000000D4, 0x00000120, 0x000000D6, 0x000000D7, 0x0000011C, 0x000000D9, 0x000000DA, 0x000000DB, 0x000000DC, 0x0000016C, 0x0000015C, 0x000000DF, + 0x000000E0, 0x000000E1, 0x000000E2, 0x00000000, 0x000000E4, 0x0000010B, 0x00000109, 0x000000E7, 0x000000E8, 0x000000E9, 0x000000EA, 0x000000EB, 0x000000EC, 0x000000ED, 0x000000EE, 0x000000EF, + 0x00000000, 0x000000F1, 0x000000F2, 0x000000F3, 0x000000F4, 0x00000121, 0x000000F6, 0x000000F7, 0x0000011D, 0x000000F9, 0x000000FA, 0x000000FB, 0x000000FC, 0x0000016D, 0x0000015D, 0x000002D9 + }; + + const int32_t TableIso8859_4[] = { + 0x00000000, 0x00000001, 0x00000002, 0x00000003, 0x00000004, 0x00000005, 0x00000006, 0x00000007, 0x00000008, 0x00000009, 0x0000000A, 0x0000000B, 0x0000000C, 0x0000000D, 0x0000000E, 0x0000000F, + 0x00000010, 0x00000011, 0x00000012, 0x00000013, 0x00000014, 0x00000015, 0x00000016, 0x00000017, 0x00000018, 0x00000019, 0x0000001A, 0x0000001B, 0x0000001C, 0x0000001D, 0x0000001E, 0x0000001F, + 0x00000020, 0x00000021, 0x00000022, 0x00000023, 0x00000024, 0x00000025, 0x00000026, 0x00000027, 0x00000028, 0x00000029, 0x0000002A, 0x0000002B, 0x0000002C, 0x0000002D, 0x0000002E, 0x0000002F, + 0x00000030, 0x00000031, 0x00000032, 0x00000033, 0x00000034, 0x00000035, 0x00000036, 0x00000037, 0x00000038, 0x00000039, 0x0000003A, 0x0000003B, 0x0000003C, 0x0000003D, 0x0000003E, 0x0000003F, + 0x00000040, 0x00000041, 0x00000042, 0x00000043, 0x00000044, 0x00000045, 0x00000046, 0x00000047, 0x00000048, 0x00000049, 0x0000004A, 0x0000004B, 0x0000004C, 0x0000004D, 0x0000004E, 0x0000004F, + 0x00000050, 0x00000051, 0x00000052, 0x00000053, 0x00000054, 0x00000055, 0x00000056, 0x00000057, 0x00000058, 0x00000059, 0x0000005A, 0x0000005B, 0x0000005C, 0x0000005D, 0x0000005E, 0x0000005F, + 0x00000060, 0x00000061, 0x00000062, 0x00000063, 0x00000064, 0x00000065, 0x00000066, 0x00000067, 0x00000068, 0x00000069, 0x0000006A, 0x0000006B, 0x0000006C, 0x0000006D, 0x0000006E, 0x0000006F, + 0x00000070, 0x00000071, 0x00000072, 0x00000073, 0x00000074, 0x00000075, 0x00000076, 0x00000077, 0x00000078, 0x00000079, 0x0000007A, 0x0000007B, 0x0000007C, 0x0000007D, 0x0000007E, 0x0000007F, + 0x00000080, 0x00000081, 0x00000082, 0x00000083, 0x00000084, 0x00000085, 0x00000086, 0x00000087, 0x00000088, 0x00000089, 0x0000008A, 0x0000008B, 0x0000008C, 0x0000008D, 0x0000008E, 0x0000008F, + 0x00000090, 0x00000091, 0x00000092, 0x00000093, 0x00000094, 0x00000095, 0x00000096, 0x00000097, 0x00000098, 0x00000099, 0x0000009A, 0x0000009B, 0x0000009C, 0x0000009D, 0x0000009E, 0x0000009F, + 0x000000A0, 0x00000104, 0x00000138, 0x00000156, 0x000000A4, 0x00000128, 0x0000013B, 0x000000A7, 0x000000A8, 0x00000160, 0x00000112, 0x00000122, 0x00000166, 0x000000AD, 0x0000017D, 0x000000AF, + 0x000000B0, 0x00000105, 0x000002DB, 0x00000157, 0x000000B4, 0x00000129, 0x0000013C, 0x000002C7, 0x000000B8, 0x00000161, 0x00000113, 0x00000123, 0x00000167, 0x0000014A, 0x0000017E, 0x0000014B, + 0x00000100, 0x000000C1, 0x000000C2, 0x000000C3, 0x000000C4, 0x000000C5, 0x000000C6, 0x0000012E, 0x0000010C, 0x000000C9, 0x00000118, 0x000000CB, 0x00000116, 0x000000CD, 0x000000CE, 0x0000012A, + 0x00000110, 0x00000145, 0x0000014C, 0x00000136, 0x000000D4, 0x000000D5, 0x000000D6, 0x000000D7, 0x000000D8, 0x00000172, 0x000000DA, 0x000000DB, 0x000000DC, 0x00000168, 0x0000016A, 0x000000DF, + 0x00000101, 0x000000E1, 0x000000E2, 0x000000E3, 0x000000E4, 0x000000E5, 0x000000E6, 0x0000012F, 0x0000010D, 0x000000E9, 0x00000119, 0x000000EB, 0x00000117, 0x000000ED, 0x000000EE, 0x0000012B, + 0x00000111, 0x00000146, 0x0000014D, 0x00000137, 0x000000F4, 0x000000F5, 0x000000F6, 0x000000F7, 0x000000F8, 0x00000173, 0x000000FA, 0x000000FB, 0x000000FC, 0x00000169, 0x0000016B, 0x000002D9 + }; + + const int32_t TableIso8859_5[] = { + 0x00000000, 0x00000001, 0x00000002, 0x00000003, 0x00000004, 0x00000005, 0x00000006, 0x00000007, 0x00000008, 0x00000009, 0x0000000A, 0x0000000B, 0x0000000C, 0x0000000D, 0x0000000E, 0x0000000F, + 0x00000010, 0x00000011, 0x00000012, 0x00000013, 0x00000014, 0x00000015, 0x00000016, 0x00000017, 0x00000018, 0x00000019, 0x0000001A, 0x0000001B, 0x0000001C, 0x0000001D, 0x0000001E, 0x0000001F, + 0x00000020, 0x00000021, 0x00000022, 0x00000023, 0x00000024, 0x00000025, 0x00000026, 0x00000027, 0x00000028, 0x00000029, 0x0000002A, 0x0000002B, 0x0000002C, 0x0000002D, 0x0000002E, 0x0000002F, + 0x00000030, 0x00000031, 0x00000032, 0x00000033, 0x00000034, 0x00000035, 0x00000036, 0x00000037, 0x00000038, 0x00000039, 0x0000003A, 0x0000003B, 0x0000003C, 0x0000003D, 0x0000003E, 0x0000003F, + 0x00000040, 0x00000041, 0x00000042, 0x00000043, 0x00000044, 0x00000045, 0x00000046, 0x00000047, 0x00000048, 0x00000049, 0x0000004A, 0x0000004B, 0x0000004C, 0x0000004D, 0x0000004E, 0x0000004F, + 0x00000050, 0x00000051, 0x00000052, 0x00000053, 0x00000054, 0x00000055, 0x00000056, 0x00000057, 0x00000058, 0x00000059, 0x0000005A, 0x0000005B, 0x0000005C, 0x0000005D, 0x0000005E, 0x0000005F, + 0x00000060, 0x00000061, 0x00000062, 0x00000063, 0x00000064, 0x00000065, 0x00000066, 0x00000067, 0x00000068, 0x00000069, 0x0000006A, 0x0000006B, 0x0000006C, 0x0000006D, 0x0000006E, 0x0000006F, + 0x00000070, 0x00000071, 0x00000072, 0x00000073, 0x00000074, 0x00000075, 0x00000076, 0x00000077, 0x00000078, 0x00000079, 0x0000007A, 0x0000007B, 0x0000007C, 0x0000007D, 0x0000007E, 0x0000007F, + 0x00000080, 0x00000081, 0x00000082, 0x00000083, 0x00000084, 0x00000085, 0x00000086, 0x00000087, 0x00000088, 0x00000089, 0x0000008A, 0x0000008B, 0x0000008C, 0x0000008D, 0x0000008E, 0x0000008F, + 0x00000090, 0x00000091, 0x00000092, 0x00000093, 0x00000094, 0x00000095, 0x00000096, 0x00000097, 0x00000098, 0x00000099, 0x0000009A, 0x0000009B, 0x0000009C, 0x0000009D, 0x0000009E, 0x0000009F, + 0x000000A0, 0x00000401, 0x00000402, 0x00000403, 0x00000404, 0x00000405, 0x00000406, 0x00000407, 0x00000408, 0x00000409, 0x0000040A, 0x0000040B, 0x0000040C, 0x000000AD, 0x0000040E, 0x0000040F, + 0x00000410, 0x00000411, 0x00000412, 0x00000413, 0x00000414, 0x00000415, 0x00000416, 0x00000417, 0x00000418, 0x00000419, 0x0000041A, 0x0000041B, 0x0000041C, 0x0000041D, 0x0000041E, 0x0000041F, + 0x00000420, 0x00000421, 0x00000422, 0x00000423, 0x00000424, 0x00000425, 0x00000426, 0x00000427, 0x00000428, 0x00000429, 0x0000042A, 0x0000042B, 0x0000042C, 0x0000042D, 0x0000042E, 0x0000042F, + 0x00000430, 0x00000431, 0x00000432, 0x00000433, 0x00000434, 0x00000435, 0x00000436, 0x00000437, 0x00000438, 0x00000439, 0x0000043A, 0x0000043B, 0x0000043C, 0x0000043D, 0x0000043E, 0x0000043F, + 0x00000440, 0x00000441, 0x00000442, 0x00000443, 0x00000444, 0x00000445, 0x00000446, 0x00000447, 0x00000448, 0x00000449, 0x0000044A, 0x0000044B, 0x0000044C, 0x0000044D, 0x0000044E, 0x0000044F, + 0x00002116, 0x00000451, 0x00000452, 0x00000453, 0x00000454, 0x00000455, 0x00000456, 0x00000457, 0x00000458, 0x00000459, 0x0000045A, 0x0000045B, 0x0000045C, 0x000000A7, 0x0000045E, 0x0000045F + }; + + const int32_t TableIso8859_6[] = { + 0x00000000, 0x00000001, 0x00000002, 0x00000003, 0x00000004, 0x00000005, 0x00000006, 0x00000007, 0x00000008, 0x00000009, 0x0000000A, 0x0000000B, 0x0000000C, 0x0000000D, 0x0000000E, 0x0000000F, + 0x00000010, 0x00000011, 0x00000012, 0x00000013, 0x00000014, 0x00000015, 0x00000016, 0x00000017, 0x00000018, 0x00000019, 0x0000001A, 0x0000001B, 0x0000001C, 0x0000001D, 0x0000001E, 0x0000001F, + 0x00000020, 0x00000021, 0x00000022, 0x00000023, 0x00000024, 0x00000025, 0x00000026, 0x00000027, 0x00000028, 0x00000029, 0x0000002A, 0x0000002B, 0x0000002C, 0x0000002D, 0x0000002E, 0x0000002F, + 0x00000030, 0x00000031, 0x00000032, 0x00000033, 0x00000034, 0x00000035, 0x00000036, 0x00000037, 0x00000038, 0x00000039, 0x0000003A, 0x0000003B, 0x0000003C, 0x0000003D, 0x0000003E, 0x0000003F, + 0x00000040, 0x00000041, 0x00000042, 0x00000043, 0x00000044, 0x00000045, 0x00000046, 0x00000047, 0x00000048, 0x00000049, 0x0000004A, 0x0000004B, 0x0000004C, 0x0000004D, 0x0000004E, 0x0000004F, + 0x00000050, 0x00000051, 0x00000052, 0x00000053, 0x00000054, 0x00000055, 0x00000056, 0x00000057, 0x00000058, 0x00000059, 0x0000005A, 0x0000005B, 0x0000005C, 0x0000005D, 0x0000005E, 0x0000005F, + 0x00000060, 0x00000061, 0x00000062, 0x00000063, 0x00000064, 0x00000065, 0x00000066, 0x00000067, 0x00000068, 0x00000069, 0x0000006A, 0x0000006B, 0x0000006C, 0x0000006D, 0x0000006E, 0x0000006F, + 0x00000070, 0x00000071, 0x00000072, 0x00000073, 0x00000074, 0x00000075, 0x00000076, 0x00000077, 0x00000078, 0x00000079, 0x0000007A, 0x0000007B, 0x0000007C, 0x0000007D, 0x0000007E, 0x0000007F, + 0x00000080, 0x00000081, 0x00000082, 0x00000083, 0x00000084, 0x00000085, 0x00000086, 0x00000087, 0x00000088, 0x00000089, 0x0000008A, 0x0000008B, 0x0000008C, 0x0000008D, 0x0000008E, 0x0000008F, + 0x00000090, 0x00000091, 0x00000092, 0x00000093, 0x00000094, 0x00000095, 0x00000096, 0x00000097, 0x00000098, 0x00000099, 0x0000009A, 0x0000009B, 0x0000009C, 0x0000009D, 0x0000009E, 0x0000009F, + 0x000000A0, 0x00000000, 0x00000000, 0x00000000, 0x000000A4, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000060C, 0x000000AD, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000061B, 0x00000000, 0x00000000, 0x00000000, 0x0000061F, + 0x00000000, 0x00000621, 0x00000622, 0x00000623, 0x00000624, 0x00000625, 0x00000626, 0x00000627, 0x00000628, 0x00000629, 0x0000062A, 0x0000062B, 0x0000062C, 0x0000062D, 0x0000062E, 0x0000062F, + 0x00000630, 0x00000631, 0x00000632, 0x00000633, 0x00000634, 0x00000635, 0x00000636, 0x00000637, 0x00000638, 0x00000639, 0x0000063A, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000640, 0x00000641, 0x00000642, 0x00000643, 0x00000644, 0x00000645, 0x00000646, 0x00000647, 0x00000648, 0x00000649, 0x0000064A, 0x0000064B, 0x0000064C, 0x0000064D, 0x0000064E, 0x0000064F, + 0x00000650, 0x00000651, 0x00000652, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 + }; + + const int32_t TableIso8859_7[] = { + 0x00000000, 0x00000001, 0x00000002, 0x00000003, 0x00000004, 0x00000005, 0x00000006, 0x00000007, 0x00000008, 0x00000009, 0x0000000A, 0x0000000B, 0x0000000C, 0x0000000D, 0x0000000E, 0x0000000F, + 0x00000010, 0x00000011, 0x00000012, 0x00000013, 0x00000014, 0x00000015, 0x00000016, 0x00000017, 0x00000018, 0x00000019, 0x0000001A, 0x0000001B, 0x0000001C, 0x0000001D, 0x0000001E, 0x0000001F, + 0x00000020, 0x00000021, 0x00000022, 0x00000023, 0x00000024, 0x00000025, 0x00000026, 0x00000027, 0x00000028, 0x00000029, 0x0000002A, 0x0000002B, 0x0000002C, 0x0000002D, 0x0000002E, 0x0000002F, + 0x00000030, 0x00000031, 0x00000032, 0x00000033, 0x00000034, 0x00000035, 0x00000036, 0x00000037, 0x00000038, 0x00000039, 0x0000003A, 0x0000003B, 0x0000003C, 0x0000003D, 0x0000003E, 0x0000003F, + 0x00000040, 0x00000041, 0x00000042, 0x00000043, 0x00000044, 0x00000045, 0x00000046, 0x00000047, 0x00000048, 0x00000049, 0x0000004A, 0x0000004B, 0x0000004C, 0x0000004D, 0x0000004E, 0x0000004F, + 0x00000050, 0x00000051, 0x00000052, 0x00000053, 0x00000054, 0x00000055, 0x00000056, 0x00000057, 0x00000058, 0x00000059, 0x0000005A, 0x0000005B, 0x0000005C, 0x0000005D, 0x0000005E, 0x0000005F, + 0x00000060, 0x00000061, 0x00000062, 0x00000063, 0x00000064, 0x00000065, 0x00000066, 0x00000067, 0x00000068, 0x00000069, 0x0000006A, 0x0000006B, 0x0000006C, 0x0000006D, 0x0000006E, 0x0000006F, + 0x00000070, 0x00000071, 0x00000072, 0x00000073, 0x00000074, 0x00000075, 0x00000076, 0x00000077, 0x00000078, 0x00000079, 0x0000007A, 0x0000007B, 0x0000007C, 0x0000007D, 0x0000007E, 0x0000007F, + 0x00000080, 0x00000081, 0x00000082, 0x00000083, 0x00000084, 0x00000085, 0x00000086, 0x00000087, 0x00000088, 0x00000089, 0x0000008A, 0x0000008B, 0x0000008C, 0x0000008D, 0x0000008E, 0x0000008F, + 0x00000090, 0x00000091, 0x00000092, 0x00000093, 0x00000094, 0x00000095, 0x00000096, 0x00000097, 0x00000098, 0x00000099, 0x0000009A, 0x0000009B, 0x0000009C, 0x0000009D, 0x0000009E, 0x0000009F, + 0x000000A0, 0x00002018, 0x00002019, 0x000000A3, 0x000020AC, 0x000020AF, 0x000000A6, 0x000000A7, 0x000000A8, 0x000000A9, 0x0000037A, 0x000000AB, 0x000000AC, 0x000000AD, 0x00000000, 0x00002015, + 0x000000B0, 0x000000B1, 0x000000B2, 0x000000B3, 0x00000384, 0x00000385, 0x00000386, 0x000000B7, 0x00000388, 0x00000389, 0x0000038A, 0x000000BB, 0x0000038C, 0x000000BD, 0x0000038E, 0x0000038F, + 0x00000390, 0x00000391, 0x00000392, 0x00000393, 0x00000394, 0x00000395, 0x00000396, 0x00000397, 0x00000398, 0x00000399, 0x0000039A, 0x0000039B, 0x0000039C, 0x0000039D, 0x0000039E, 0x0000039F, + 0x000003A0, 0x000003A1, 0x00000000, 0x000003A3, 0x000003A4, 0x000003A5, 0x000003A6, 0x000003A7, 0x000003A8, 0x000003A9, 0x000003AA, 0x000003AB, 0x000003AC, 0x000003AD, 0x000003AE, 0x000003AF, + 0x000003B0, 0x000003B1, 0x000003B2, 0x000003B3, 0x000003B4, 0x000003B5, 0x000003B6, 0x000003B7, 0x000003B8, 0x000003B9, 0x000003BA, 0x000003BB, 0x000003BC, 0x000003BD, 0x000003BE, 0x000003BF, + 0x000003C0, 0x000003C1, 0x000003C2, 0x000003C3, 0x000003C4, 0x000003C5, 0x000003C6, 0x000003C7, 0x000003C8, 0x000003C9, 0x000003CA, 0x000003CB, 0x000003CC, 0x000003CD, 0x000003CE, 0x00000000 + }; + + const int32_t TableIso8859_8[] = { + 0x00000000, 0x00000001, 0x00000002, 0x00000003, 0x00000004, 0x00000005, 0x00000006, 0x00000007, 0x00000008, 0x00000009, 0x0000000A, 0x0000000B, 0x0000000C, 0x0000000D, 0x0000000E, 0x0000000F, + 0x00000010, 0x00000011, 0x00000012, 0x00000013, 0x00000014, 0x00000015, 0x00000016, 0x00000017, 0x00000018, 0x00000019, 0x0000001A, 0x0000001B, 0x0000001C, 0x0000001D, 0x0000001E, 0x0000001F, + 0x00000020, 0x00000021, 0x00000022, 0x00000023, 0x00000024, 0x00000025, 0x00000026, 0x00000027, 0x00000028, 0x00000029, 0x0000002A, 0x0000002B, 0x0000002C, 0x0000002D, 0x0000002E, 0x0000002F, + 0x00000030, 0x00000031, 0x00000032, 0x00000033, 0x00000034, 0x00000035, 0x00000036, 0x00000037, 0x00000038, 0x00000039, 0x0000003A, 0x0000003B, 0x0000003C, 0x0000003D, 0x0000003E, 0x0000003F, + 0x00000040, 0x00000041, 0x00000042, 0x00000043, 0x00000044, 0x00000045, 0x00000046, 0x00000047, 0x00000048, 0x00000049, 0x0000004A, 0x0000004B, 0x0000004C, 0x0000004D, 0x0000004E, 0x0000004F, + 0x00000050, 0x00000051, 0x00000052, 0x00000053, 0x00000054, 0x00000055, 0x00000056, 0x00000057, 0x00000058, 0x00000059, 0x0000005A, 0x0000005B, 0x0000005C, 0x0000005D, 0x0000005E, 0x0000005F, + 0x00000060, 0x00000061, 0x00000062, 0x00000063, 0x00000064, 0x00000065, 0x00000066, 0x00000067, 0x00000068, 0x00000069, 0x0000006A, 0x0000006B, 0x0000006C, 0x0000006D, 0x0000006E, 0x0000006F, + 0x00000070, 0x00000071, 0x00000072, 0x00000073, 0x00000074, 0x00000075, 0x00000076, 0x00000077, 0x00000078, 0x00000079, 0x0000007A, 0x0000007B, 0x0000007C, 0x0000007D, 0x0000007E, 0x0000007F, + 0x00000080, 0x00000081, 0x00000082, 0x00000083, 0x00000084, 0x00000085, 0x00000086, 0x00000087, 0x00000088, 0x00000089, 0x0000008A, 0x0000008B, 0x0000008C, 0x0000008D, 0x0000008E, 0x0000008F, + 0x00000090, 0x00000091, 0x00000092, 0x00000093, 0x00000094, 0x00000095, 0x00000096, 0x00000097, 0x00000098, 0x00000099, 0x0000009A, 0x0000009B, 0x0000009C, 0x0000009D, 0x0000009E, 0x0000009F, + 0x000000A0, 0x00000000, 0x000000A2, 0x000000A3, 0x000000A4, 0x000000A5, 0x000000A6, 0x000000A7, 0x000000A8, 0x000000A9, 0x000000D7, 0x000000AB, 0x000000AC, 0x000000AD, 0x000000AE, 0x000000AF, + 0x000000B0, 0x000000B1, 0x000000B2, 0x000000B3, 0x000000B4, 0x000000B5, 0x000000B6, 0x000000B7, 0x000000B8, 0x000000B9, 0x000000F7, 0x000000BB, 0x000000BC, 0x000000BD, 0x000000BE, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00002017, + 0x000005D0, 0x000005D1, 0x000005D2, 0x000005D3, 0x000005D4, 0x000005D5, 0x000005D6, 0x000005D7, 0x000005D8, 0x000005D9, 0x000005DA, 0x000005DB, 0x000005DC, 0x000005DD, 0x000005DE, 0x000005DF, + 0x000005E0, 0x000005E1, 0x000005E2, 0x000005E3, 0x000005E4, 0x000005E5, 0x000005E6, 0x000005E7, 0x000005E8, 0x000005E9, 0x000005EA, 0x00000000, 0x00000000, 0x0000200E, 0x0000200F, 0x000003C0 + }; + + const int32_t TableIso8859_9[] = { + 0x00000000, 0x00000001, 0x00000002, 0x00000003, 0x00000004, 0x00000005, 0x00000006, 0x00000007, 0x00000008, 0x00000009, 0x0000000A, 0x0000000B, 0x0000000C, 0x0000000D, 0x0000000E, 0x0000000F, + 0x00000010, 0x00000011, 0x00000012, 0x00000013, 0x00000014, 0x00000015, 0x00000016, 0x00000017, 0x00000018, 0x00000019, 0x0000001A, 0x0000001B, 0x0000001C, 0x0000001D, 0x0000001E, 0x0000001F, + 0x00000020, 0x00000021, 0x00000022, 0x00000023, 0x00000024, 0x00000025, 0x00000026, 0x00000027, 0x00000028, 0x00000029, 0x0000002A, 0x0000002B, 0x0000002C, 0x0000002D, 0x0000002E, 0x0000002F, + 0x00000030, 0x00000031, 0x00000032, 0x00000033, 0x00000034, 0x00000035, 0x00000036, 0x00000037, 0x00000038, 0x00000039, 0x0000003A, 0x0000003B, 0x0000003C, 0x0000003D, 0x0000003E, 0x0000003F, + 0x00000040, 0x00000041, 0x00000042, 0x00000043, 0x00000044, 0x00000045, 0x00000046, 0x00000047, 0x00000048, 0x00000049, 0x0000004A, 0x0000004B, 0x0000004C, 0x0000004D, 0x0000004E, 0x0000004F, + 0x00000050, 0x00000051, 0x00000052, 0x00000053, 0x00000054, 0x00000055, 0x00000056, 0x00000057, 0x00000058, 0x00000059, 0x0000005A, 0x0000005B, 0x0000005C, 0x0000005D, 0x0000005E, 0x0000005F, + 0x00000060, 0x00000061, 0x00000062, 0x00000063, 0x00000064, 0x00000065, 0x00000066, 0x00000067, 0x00000068, 0x00000069, 0x0000006A, 0x0000006B, 0x0000006C, 0x0000006D, 0x0000006E, 0x0000006F, + 0x00000070, 0x00000071, 0x00000072, 0x00000073, 0x00000074, 0x00000075, 0x00000076, 0x00000077, 0x00000078, 0x00000079, 0x0000007A, 0x0000007B, 0x0000007C, 0x0000007D, 0x0000007E, 0x0000007F, + 0x00000080, 0x00000081, 0x00000082, 0x00000083, 0x00000084, 0x00000085, 0x00000086, 0x00000087, 0x00000088, 0x00000089, 0x0000008A, 0x0000008B, 0x0000008C, 0x0000008D, 0x0000008E, 0x0000008F, + 0x00000090, 0x00000091, 0x00000092, 0x00000093, 0x00000094, 0x00000095, 0x00000096, 0x00000097, 0x00000098, 0x00000099, 0x0000009A, 0x0000009B, 0x0000009C, 0x0000009D, 0x0000009E, 0x0000009F, + 0x000000A0, 0x000000A1, 0x000000A2, 0x000000A3, 0x000000A4, 0x000000A5, 0x000000A6, 0x000000A7, 0x000000A8, 0x000000A9, 0x000000AA, 0x000000AB, 0x000000AC, 0x000000AD, 0x000000AE, 0x000000AF, + 0x000000B0, 0x000000B1, 0x000000B2, 0x000000B3, 0x000000B4, 0x000000B5, 0x000000B6, 0x000000B7, 0x000000B8, 0x000000B9, 0x000000BA, 0x000000BB, 0x000000BC, 0x000000BD, 0x000000BE, 0x000000BF, + 0x000000C0, 0x000000C1, 0x000000C2, 0x000000C3, 0x000000C4, 0x000000C5, 0x000000C6, 0x000000C7, 0x000000C8, 0x000000C9, 0x000000CA, 0x000000CB, 0x000000CC, 0x000000CD, 0x000000CE, 0x000000CF, + 0x0000011E, 0x000000D1, 0x000000D2, 0x000000D3, 0x000000D4, 0x000000D5, 0x000000D6, 0x000000D7, 0x000000D8, 0x000000D9, 0x000000DA, 0x000000DB, 0x000000DC, 0x00000130, 0x0000015E, 0x000000DF, + 0x000000E0, 0x000000E1, 0x000000E2, 0x000000E3, 0x000000E4, 0x000000E5, 0x000000E6, 0x000000E7, 0x000000E8, 0x000000E9, 0x000000EA, 0x000000EB, 0x000000EC, 0x000000ED, 0x000000EE, 0x000000EF, + 0x0000011F, 0x000000F1, 0x000000F2, 0x000000F3, 0x000000F4, 0x000000F5, 0x000000F6, 0x000000F7, 0x000000F8, 0x000000F9, 0x000000FA, 0x000000FB, 0x000000FC, 0x00000131, 0x0000015F, 0x000000FF + }; + + const int32_t TableIso8859_10[] = { + 0x00000000, 0x00000001, 0x00000002, 0x00000003, 0x00000004, 0x00000005, 0x00000006, 0x00000007, 0x00000008, 0x00000009, 0x0000000A, 0x0000000B, 0x0000000C, 0x0000000D, 0x0000000E, 0x0000000F, + 0x00000010, 0x00000011, 0x00000012, 0x00000013, 0x00000014, 0x00000015, 0x00000016, 0x00000017, 0x00000018, 0x00000019, 0x0000001A, 0x0000001B, 0x0000001C, 0x0000001D, 0x0000001E, 0x0000001F, + 0x00000020, 0x00000021, 0x00000022, 0x00000023, 0x00000024, 0x00000025, 0x00000026, 0x00000027, 0x00000028, 0x00000029, 0x0000002A, 0x0000002B, 0x0000002C, 0x0000002D, 0x0000002E, 0x0000002F, + 0x00000030, 0x00000031, 0x00000032, 0x00000033, 0x00000034, 0x00000035, 0x00000036, 0x00000037, 0x00000038, 0x00000039, 0x0000003A, 0x0000003B, 0x0000003C, 0x0000003D, 0x0000003E, 0x0000003F, + 0x00000040, 0x00000041, 0x00000042, 0x00000043, 0x00000044, 0x00000045, 0x00000046, 0x00000047, 0x00000048, 0x00000049, 0x0000004A, 0x0000004B, 0x0000004C, 0x0000004D, 0x0000004E, 0x0000004F, + 0x00000050, 0x00000051, 0x00000052, 0x00000053, 0x00000054, 0x00000055, 0x00000056, 0x00000057, 0x00000058, 0x00000059, 0x0000005A, 0x0000005B, 0x0000005C, 0x0000005D, 0x0000005E, 0x0000005F, + 0x00000060, 0x00000061, 0x00000062, 0x00000063, 0x00000064, 0x00000065, 0x00000066, 0x00000067, 0x00000068, 0x00000069, 0x0000006A, 0x0000006B, 0x0000006C, 0x0000006D, 0x0000006E, 0x0000006F, + 0x00000070, 0x00000071, 0x00000072, 0x00000073, 0x00000074, 0x00000075, 0x00000076, 0x00000077, 0x00000078, 0x00000079, 0x0000007A, 0x0000007B, 0x0000007C, 0x0000007D, 0x0000007E, 0x0000007F, + 0x00000080, 0x00000081, 0x00000082, 0x00000083, 0x00000084, 0x00000085, 0x00000086, 0x00000087, 0x00000088, 0x00000089, 0x0000008A, 0x0000008B, 0x0000008C, 0x0000008D, 0x0000008E, 0x0000008F, + 0x00000090, 0x00000091, 0x00000092, 0x00000093, 0x00000094, 0x00000095, 0x00000096, 0x00000097, 0x00000098, 0x00000099, 0x0000009A, 0x0000009B, 0x0000009C, 0x0000009D, 0x0000009E, 0x0000009F, + 0x000000A0, 0x00000104, 0x00000112, 0x00000122, 0x0000012A, 0x00000128, 0x00000136, 0x000000A7, 0x0000013B, 0x00000110, 0x00000160, 0x00000166, 0x0000017D, 0x000000AD, 0x0000016A, 0x0000014A, + 0x000000B0, 0x00000105, 0x00000113, 0x00000123, 0x0000012B, 0x00000129, 0x00000137, 0x000000B7, 0x0000013C, 0x00000111, 0x00000161, 0x00000167, 0x0000017E, 0x00002015, 0x0000016B, 0x0000014B, + 0x00000100, 0x000000C1, 0x000000C2, 0x000000C3, 0x000000C4, 0x000000C5, 0x000000C6, 0x0000012E, 0x0000010C, 0x000000C9, 0x00000118, 0x000000CB, 0x00000116, 0x000000CD, 0x000000CE, 0x000000CF, + 0x000000D0, 0x00000145, 0x0000014C, 0x000000D3, 0x000000D4, 0x000000D5, 0x000000D6, 0x00000168, 0x000000D8, 0x00000172, 0x000000DA, 0x000000DB, 0x000000DC, 0x000000DD, 0x000000DE, 0x000000DF, + 0x00000101, 0x000000E1, 0x000000E2, 0x000000E3, 0x000000E4, 0x000000E5, 0x000000E6, 0x0000012F, 0x0000010D, 0x000000E9, 0x00000119, 0x000000EB, 0x00000117, 0x000000ED, 0x000000EE, 0x000000EF, + 0x000000F0, 0x00000146, 0x0000014D, 0x000000F3, 0x000000F4, 0x000000F5, 0x000000F6, 0x00000169, 0x000000F8, 0x00000173, 0x000000FA, 0x000000FB, 0x000000FC, 0x000000FD, 0x000000FE, 0x00000138 + }; + + const int32_t TableIso8859_11[] = { + 0x00000000, 0x00000001, 0x00000002, 0x00000003, 0x00000004, 0x00000005, 0x00000006, 0x00000007, 0x00000008, 0x00000009, 0x0000000A, 0x0000000B, 0x0000000C, 0x0000000D, 0x0000000E, 0x0000000F, + 0x00000010, 0x00000011, 0x00000012, 0x00000013, 0x00000014, 0x00000015, 0x00000016, 0x00000017, 0x00000018, 0x00000019, 0x0000001A, 0x0000001B, 0x0000001C, 0x0000001D, 0x0000001E, 0x0000001F, + 0x00000020, 0x00000021, 0x00000022, 0x00000023, 0x00000024, 0x00000025, 0x00000026, 0x00000027, 0x00000028, 0x00000029, 0x0000002A, 0x0000002B, 0x0000002C, 0x0000002D, 0x0000002E, 0x0000002F, + 0x00000030, 0x00000031, 0x00000032, 0x00000033, 0x00000034, 0x00000035, 0x00000036, 0x00000037, 0x00000038, 0x00000039, 0x0000003A, 0x0000003B, 0x0000003C, 0x0000003D, 0x0000003E, 0x0000003F, + 0x00000040, 0x00000041, 0x00000042, 0x00000043, 0x00000044, 0x00000045, 0x00000046, 0x00000047, 0x00000048, 0x00000049, 0x0000004A, 0x0000004B, 0x0000004C, 0x0000004D, 0x0000004E, 0x0000004F, + 0x00000050, 0x00000051, 0x00000052, 0x00000053, 0x00000054, 0x00000055, 0x00000056, 0x00000057, 0x00000058, 0x00000059, 0x0000005A, 0x0000005B, 0x0000005C, 0x0000005D, 0x0000005E, 0x0000005F, + 0x00000060, 0x00000061, 0x00000062, 0x00000063, 0x00000064, 0x00000065, 0x00000066, 0x00000067, 0x00000068, 0x00000069, 0x0000006A, 0x0000006B, 0x0000006C, 0x0000006D, 0x0000006E, 0x0000006F, + 0x00000070, 0x00000071, 0x00000072, 0x00000073, 0x00000074, 0x00000075, 0x00000076, 0x00000077, 0x00000078, 0x00000079, 0x0000007A, 0x0000007B, 0x0000007C, 0x0000007D, 0x0000007E, 0x0000007F, + 0x00000080, 0x00000081, 0x00000082, 0x00000083, 0x00000084, 0x00000085, 0x00000086, 0x00000087, 0x00000088, 0x00000089, 0x0000008A, 0x0000008B, 0x0000008C, 0x0000008D, 0x0000008E, 0x0000008F, + 0x00000090, 0x00000091, 0x00000092, 0x00000093, 0x00000094, 0x00000095, 0x00000096, 0x00000097, 0x00000098, 0x00000099, 0x0000009A, 0x0000009B, 0x0000009C, 0x0000009D, 0x0000009E, 0x0000009F, + 0x000000A0, 0x00000E01, 0x00000E02, 0x00000E03, 0x00000E04, 0x00000E05, 0x00000E06, 0x00000E07, 0x00000E08, 0x00000E09, 0x00000E0A, 0x00000E0B, 0x00000E0C, 0x00000E0D, 0x00000E0E, 0x00000E0F, + 0x00000E10, 0x00000E11, 0x00000E12, 0x00000E13, 0x00000E14, 0x00000E15, 0x00000E16, 0x00000E17, 0x00000E18, 0x00000E19, 0x00000E1A, 0x00000E1B, 0x00000E1C, 0x00000E1D, 0x00000E1E, 0x00000E1F, + 0x00000E20, 0x00000E21, 0x00000E22, 0x00000E23, 0x00000E24, 0x00000E25, 0x00000E26, 0x00000E27, 0x00000E28, 0x00000E29, 0x00000E2A, 0x00000E2B, 0x00000E2C, 0x00000E2D, 0x00000E2E, 0x00000E2F, + 0x00000E30, 0x00000E31, 0x00000E32, 0x00000E33, 0x00000E34, 0x00000E35, 0x00000E36, 0x00000E37, 0x00000E38, 0x00000E39, 0x00000E3A, 0x00000E80, 0x00000E80, 0x00000E80, 0x00000E80, 0x00000E3F, + 0x00000E40, 0x00000E41, 0x00000E42, 0x00000E43, 0x00000E44, 0x00000E45, 0x00000E46, 0x00000E47, 0x00000E48, 0x00000E49, 0x00000E4A, 0x00000E4B, 0x00000E4C, 0x00000E4D, 0x00000E4E, 0x00000E4F, + 0x00000E50, 0x00000E51, 0x00000E52, 0x00000E53, 0x00000E54, 0x00000E55, 0x00000E56, 0x00000E57, 0x00000E58, 0x00000E59, 0x00000E5A, 0x00000E5B, 0x000006C0, 0x000006C0, 0x000006C0, 0x000006C0 + }; + + const int32_t TableIso8859_13[] = { + 0x00000000, 0x00000001, 0x00000002, 0x00000003, 0x00000004, 0x00000005, 0x00000006, 0x00000007, 0x00000008, 0x00000009, 0x0000000A, 0x0000000B, 0x0000000C, 0x0000000D, 0x0000000E, 0x0000000F, + 0x00000010, 0x00000011, 0x00000012, 0x00000013, 0x00000014, 0x00000015, 0x00000016, 0x00000017, 0x00000018, 0x00000019, 0x0000001A, 0x0000001B, 0x0000001C, 0x0000001D, 0x0000001E, 0x0000001F, + 0x00000020, 0x00000021, 0x00000022, 0x00000023, 0x00000024, 0x00000025, 0x00000026, 0x00000027, 0x00000028, 0x00000029, 0x0000002A, 0x0000002B, 0x0000002C, 0x0000002D, 0x0000002E, 0x0000002F, + 0x00000030, 0x00000031, 0x00000032, 0x00000033, 0x00000034, 0x00000035, 0x00000036, 0x00000037, 0x00000038, 0x00000039, 0x0000003A, 0x0000003B, 0x0000003C, 0x0000003D, 0x0000003E, 0x0000003F, + 0x00000040, 0x00000041, 0x00000042, 0x00000043, 0x00000044, 0x00000045, 0x00000046, 0x00000047, 0x00000048, 0x00000049, 0x0000004A, 0x0000004B, 0x0000004C, 0x0000004D, 0x0000004E, 0x0000004F, + 0x00000050, 0x00000051, 0x00000052, 0x00000053, 0x00000054, 0x00000055, 0x00000056, 0x00000057, 0x00000058, 0x00000059, 0x0000005A, 0x0000005B, 0x0000005C, 0x0000005D, 0x0000005E, 0x0000005F, + 0x00000060, 0x00000061, 0x00000062, 0x00000063, 0x00000064, 0x00000065, 0x00000066, 0x00000067, 0x00000068, 0x00000069, 0x0000006A, 0x0000006B, 0x0000006C, 0x0000006D, 0x0000006E, 0x0000006F, + 0x00000070, 0x00000071, 0x00000072, 0x00000073, 0x00000074, 0x00000075, 0x00000076, 0x00000077, 0x00000078, 0x00000079, 0x0000007A, 0x0000007B, 0x0000007C, 0x0000007D, 0x0000007E, 0x0000007F, + 0x00000080, 0x00000081, 0x00000082, 0x00000083, 0x00000084, 0x00000085, 0x00000086, 0x00000087, 0x00000088, 0x00000089, 0x0000008A, 0x0000008B, 0x0000008C, 0x0000008D, 0x0000008E, 0x0000008F, + 0x00000090, 0x00000091, 0x00000092, 0x00000093, 0x00000094, 0x00000095, 0x00000096, 0x00000097, 0x00000098, 0x00000099, 0x0000009A, 0x0000009B, 0x0000009C, 0x0000009D, 0x0000009E, 0x0000009F, + 0x000000A0, 0x0000201D, 0x000000A2, 0x000000A3, 0x000000A4, 0x0000201E, 0x000000A6, 0x000000A7, 0x000000D8, 0x000000A9, 0x00000156, 0x000000AB, 0x000000AC, 0x000000AD, 0x000000AE, 0x000000C6, + 0x000000B0, 0x000000B1, 0x000000B2, 0x000000B3, 0x0000201C, 0x000000B5, 0x000000B6, 0x000000B7, 0x000000F8, 0x000000B9, 0x00000157, 0x000000BB, 0x000000BC, 0x000000BD, 0x000000BE, 0x000000E6, + 0x00000104, 0x0000012E, 0x00000100, 0x00000106, 0x000000C4, 0x000000C5, 0x00000118, 0x00000112, 0x0000010C, 0x000000C9, 0x00000179, 0x00000116, 0x00000122, 0x00000136, 0x0000012A, 0x0000013B, + 0x00000160, 0x00000143, 0x00000145, 0x000000D3, 0x0000014C, 0x000000D5, 0x000000D6, 0x000000D7, 0x00000172, 0x00000141, 0x0000015A, 0x0000016A, 0x000000DC, 0x0000017B, 0x0000017D, 0x000000DF, + 0x00000105, 0x0000012F, 0x00000101, 0x00000107, 0x000000E4, 0x000000E5, 0x00000119, 0x00000113, 0x0000010D, 0x000000E9, 0x0000017A, 0x00000117, 0x00000123, 0x00000137, 0x0000012B, 0x0000013C, + 0x00000161, 0x00000144, 0x00000146, 0x000000F3, 0x0000014D, 0x000000F5, 0x000000F6, 0x000000F7, 0x00000173, 0x00000142, 0x0000015B, 0x0000016B, 0x000000FC, 0x0000017C, 0x0000017E, 0x00002019 + }; + + const int32_t TableIso8859_14[] = { + 0x00000000, 0x00000001, 0x00000002, 0x00000003, 0x00000004, 0x00000005, 0x00000006, 0x00000007, 0x00000008, 0x00000009, 0x0000000A, 0x0000000B, 0x0000000C, 0x0000000D, 0x0000000E, 0x0000000F, + 0x00000010, 0x00000011, 0x00000012, 0x00000013, 0x00000014, 0x00000015, 0x00000016, 0x00000017, 0x00000018, 0x00000019, 0x0000001A, 0x0000001B, 0x0000001C, 0x0000001D, 0x0000001E, 0x0000001F, + 0x00000020, 0x00000021, 0x00000022, 0x00000023, 0x00000024, 0x00000025, 0x00000026, 0x00000027, 0x00000028, 0x00000029, 0x0000002A, 0x0000002B, 0x0000002C, 0x0000002D, 0x0000002E, 0x0000002F, + 0x00000030, 0x00000031, 0x00000032, 0x00000033, 0x00000034, 0x00000035, 0x00000036, 0x00000037, 0x00000038, 0x00000039, 0x0000003A, 0x0000003B, 0x0000003C, 0x0000003D, 0x0000003E, 0x0000003F, + 0x00000040, 0x00000041, 0x00000042, 0x00000043, 0x00000044, 0x00000045, 0x00000046, 0x00000047, 0x00000048, 0x00000049, 0x0000004A, 0x0000004B, 0x0000004C, 0x0000004D, 0x0000004E, 0x0000004F, + 0x00000050, 0x00000051, 0x00000052, 0x00000053, 0x00000054, 0x00000055, 0x00000056, 0x00000057, 0x00000058, 0x00000059, 0x0000005A, 0x0000005B, 0x0000005C, 0x0000005D, 0x0000005E, 0x0000005F, + 0x00000060, 0x00000061, 0x00000062, 0x00000063, 0x00000064, 0x00000065, 0x00000066, 0x00000067, 0x00000068, 0x00000069, 0x0000006A, 0x0000006B, 0x0000006C, 0x0000006D, 0x0000006E, 0x0000006F, + 0x00000070, 0x00000071, 0x00000072, 0x00000073, 0x00000074, 0x00000075, 0x00000076, 0x00000077, 0x00000078, 0x00000079, 0x0000007A, 0x0000007B, 0x0000007C, 0x0000007D, 0x0000007E, 0x0000007F, + 0x00000080, 0x00000081, 0x00000082, 0x00000083, 0x00000084, 0x00000085, 0x00000086, 0x00000087, 0x00000088, 0x00000089, 0x0000008A, 0x0000008B, 0x0000008C, 0x0000008D, 0x0000008E, 0x0000008F, + 0x00000090, 0x00000091, 0x00000092, 0x00000093, 0x00000094, 0x00000095, 0x00000096, 0x00000097, 0x00000098, 0x00000099, 0x0000009A, 0x0000009B, 0x0000009C, 0x0000009D, 0x0000009E, 0x0000009F, + 0x000000A0, 0x00001E02, 0x00001E03, 0x000000A3, 0x0000010A, 0x0000010B, 0x00001E0A, 0x000000A7, 0x00001E80, 0x000000A9, 0x00001E82, 0x00001E0B, 0x00001EF2, 0x000000AD, 0x000000AE, 0x00000178, + 0x00001E1E, 0x00001E1F, 0x00000120, 0x00000121, 0x00001E40, 0x00001E41, 0x000000B6, 0x00001E56, 0x00001E81, 0x00001E57, 0x00001E83, 0x00001E60, 0x00001EF3, 0x00001E84, 0x00001E85, 0x00001E61, + 0x000000C0, 0x000000C1, 0x000000C2, 0x000000C3, 0x000000C4, 0x000000C5, 0x000000C6, 0x000000C7, 0x000000C8, 0x000000C9, 0x000000CA, 0x000000CB, 0x000000CC, 0x000000CD, 0x000000CE, 0x000000CF, + 0x00000174, 0x000000D1, 0x000000D2, 0x000000D3, 0x000000D4, 0x000000D5, 0x000000D6, 0x00001E6A, 0x000000D8, 0x000000D9, 0x000000DA, 0x000000DB, 0x000000DC, 0x000000DD, 0x00000176, 0x000000DF, + 0x000000E0, 0x000000E1, 0x000000E2, 0x000000E3, 0x000000E4, 0x000000E5, 0x000000E6, 0x000000E7, 0x000000E8, 0x000000E9, 0x000000EA, 0x000000EB, 0x000000EC, 0x000000ED, 0x000000EE, 0x000000EF, + 0x00000175, 0x000000F1, 0x000000F2, 0x000000F3, 0x000000F4, 0x000000F5, 0x000000F6, 0x00001E6B, 0x000000F8, 0x000000F9, 0x000000FA, 0x000000FB, 0x000000FC, 0x000000FD, 0x00000177, 0x000000FF + }; + + const int32_t TableIso8859_15[] = { + 0x00000000, 0x00000001, 0x00000002, 0x00000003, 0x00000004, 0x00000005, 0x00000006, 0x00000007, 0x00000008, 0x00000009, 0x0000000A, 0x0000000B, 0x0000000C, 0x0000000D, 0x0000000E, 0x0000000F, + 0x00000010, 0x00000011, 0x00000012, 0x00000013, 0x00000014, 0x00000015, 0x00000016, 0x00000017, 0x00000018, 0x00000019, 0x0000001A, 0x0000001B, 0x0000001C, 0x0000001D, 0x0000001E, 0x0000001F, + 0x00000020, 0x00000021, 0x00000022, 0x00000023, 0x00000024, 0x00000025, 0x00000026, 0x00000027, 0x00000028, 0x00000029, 0x0000002A, 0x0000002B, 0x0000002C, 0x0000002D, 0x0000002E, 0x0000002F, + 0x00000030, 0x00000031, 0x00000032, 0x00000033, 0x00000034, 0x00000035, 0x00000036, 0x00000037, 0x00000038, 0x00000039, 0x0000003A, 0x0000003B, 0x0000003C, 0x0000003D, 0x0000003E, 0x0000003F, + 0x00000040, 0x00000041, 0x00000042, 0x00000043, 0x00000044, 0x00000045, 0x00000046, 0x00000047, 0x00000048, 0x00000049, 0x0000004A, 0x0000004B, 0x0000004C, 0x0000004D, 0x0000004E, 0x0000004F, + 0x00000050, 0x00000051, 0x00000052, 0x00000053, 0x00000054, 0x00000055, 0x00000056, 0x00000057, 0x00000058, 0x00000059, 0x0000005A, 0x0000005B, 0x0000005C, 0x0000005D, 0x0000005E, 0x0000005F, + 0x00000060, 0x00000061, 0x00000062, 0x00000063, 0x00000064, 0x00000065, 0x00000066, 0x00000067, 0x00000068, 0x00000069, 0x0000006A, 0x0000006B, 0x0000006C, 0x0000006D, 0x0000006E, 0x0000006F, + 0x00000070, 0x00000071, 0x00000072, 0x00000073, 0x00000074, 0x00000075, 0x00000076, 0x00000077, 0x00000078, 0x00000079, 0x0000007A, 0x0000007B, 0x0000007C, 0x0000007D, 0x0000007E, 0x0000007F, + 0x00000080, 0x00000081, 0x00000082, 0x00000083, 0x00000084, 0x00000085, 0x00000086, 0x00000087, 0x00000088, 0x00000089, 0x0000008A, 0x0000008B, 0x0000008C, 0x0000008D, 0x0000008E, 0x0000008F, + 0x00000090, 0x00000091, 0x00000092, 0x00000093, 0x00000094, 0x00000095, 0x00000096, 0x00000097, 0x00000098, 0x00000099, 0x0000009A, 0x0000009B, 0x0000009C, 0x0000009D, 0x0000009E, 0x0000009F, + 0x000000A0, 0x000000A1, 0x000000A2, 0x000000A3, 0x000020AC, 0x000000A5, 0x00000160, 0x000000A7, 0x00000161, 0x000000A9, 0x000000AA, 0x000000AB, 0x000000AC, 0x000000AD, 0x000000AE, 0x000000AF, + 0x000000B0, 0x000000B1, 0x000000B2, 0x000000B3, 0x0000017D, 0x000000B5, 0x000000B6, 0x000000B7, 0x0000017E, 0x000000B9, 0x000000BA, 0x000000BB, 0x00000152, 0x00000153, 0x00000178, 0x000000BF, + 0x000000C0, 0x000000C1, 0x000000C2, 0x000000C3, 0x000000C4, 0x000000C5, 0x000000C6, 0x000000C7, 0x000000C8, 0x000000C9, 0x000000CA, 0x000000CB, 0x000000CC, 0x000000CD, 0x000000CE, 0x000000CF, + 0x000000D0, 0x000000D1, 0x000000D2, 0x000000D3, 0x000000D4, 0x000000D5, 0x000000D6, 0x000000D7, 0x000000D8, 0x000000D9, 0x000000DA, 0x000000DB, 0x000000DC, 0x000000DD, 0x000000DE, 0x000000DF, + 0x000000E0, 0x000000E1, 0x000000E2, 0x000000E3, 0x000000E4, 0x000000E5, 0x000000E6, 0x000000E7, 0x000000E8, 0x000000E9, 0x000000EA, 0x000000EB, 0x000000EC, 0x000000ED, 0x000000EE, 0x000000EF, + 0x000000F0, 0x000000F1, 0x000000F2, 0x000000F3, 0x000000F4, 0x000000F5, 0x000000F6, 0x000000F7, 0x000000F8, 0x000000F9, 0x000000FA, 0x000000FB, 0x000000FC, 0x000000FD, 0x000000FE, 0x000000FF + }; + + + + + + + + + + + + + +} + diff --git a/Sources/tools/charset/charsetTable.h b/Sources/tools/charset/charsetTable.h new file mode 100644 index 0000000..6b9d54c --- /dev/null +++ b/Sources/tools/charset/charsetTable.h @@ -0,0 +1,51 @@ +/** + ******************************************************************************* + * @file charsetTable.h + * @brief Editeur De N'ours : Table of all charset convertions (Header) + * @author Edouard DUPIN + * @date 06/06/2011 + * @par Project + * Edn + * + * @par Copyright + * Copyright 2010 Edouard DUPIN, all right reserved + * + * This software is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY. + * + * Licence summary : + * You can modify and redistribute the sources code and binaries. + * You can send me the bug-fix + * You can not earn money with this Software (if the source extract from Edn + * represent less than 50% of original Sources) + * Term of the licence in in the file licence.txt. + * + ******************************************************************************* + */ + +#ifndef __CHARSET_TABLE_H__ +#define __CHARSET_TABLE_H__ + + + +extern "C" { + + extern const int32_t TableIso8859_1[]; + extern const int32_t TableIso8859_2[]; + extern const int32_t TableIso8859_3[]; + extern const int32_t TableIso8859_4[]; + extern const int32_t TableIso8859_5[]; + extern const int32_t TableIso8859_6[]; + extern const int32_t TableIso8859_7[]; + extern const int32_t TableIso8859_8[]; + extern const int32_t TableIso8859_9[]; + extern const int32_t TableIso8859_10[]; + extern const int32_t TableIso8859_11[]; + extern const int32_t TableIso8859_13[]; + extern const int32_t TableIso8859_14[]; + extern const int32_t TableIso8859_15[]; + + ; +} + +#endif diff --git a/Sources/tools/debug/tools_debug.cpp b/Sources/tools/debug/tools_debug.cpp new file mode 100644 index 0000000..a35b7f1 --- /dev/null +++ b/Sources/tools/debug/tools_debug.cpp @@ -0,0 +1,62 @@ +/** + ******************************************************************************* + * @file tools_debug.h + * @brief Editeur De N'ours : log implementation + * @author Edouard DUPIN + * @date 08/06/2010 + * @par Project + * Edn + * + * @par Copyright + * Copyright 2010 Edouard DUPIN, all right reserved + * + * This software is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY. + * + * Licence summary : + * You can modify and redistribute the sources code and binaries. + * You can send me the bug-fix + * You can not earn money with this Software (if the source extract from Edn + * represent less than 50% of original Sources) + * Term of the licence in in the file licence.txt. + * + ******************************************************************************* + */ + +#include "tools_debug.h" +#include "time.h" + +// Max string size : (wide screan console nb caractere) +#define EDN_LOG_MAX_LENGTH 250 + + +#define FUNCTION_NAME_SIZE (50) + +void TOOLS_DisplayFuncName(int32_t ligne, const char* className, const char* funcName) +{ + char tmpName[FUNCTION_NAME_SIZE] = ""; + if (NULL == className) { + snprintf(tmpName, FUNCTION_NAME_SIZE, "(l=%5d) %s ",ligne, funcName); + } else { + snprintf(tmpName, FUNCTION_NAME_SIZE, "(l=%5d) %s::%s ",ligne, className, funcName); + } + tmpName[FUNCTION_NAME_SIZE-4] = ' '; + tmpName[FUNCTION_NAME_SIZE-3] = '|'; + tmpName[FUNCTION_NAME_SIZE-2] = ' '; + tmpName[FUNCTION_NAME_SIZE-1] = '\0'; + std::cout << tmpName; +} + + +void TOOLS_DisplayTime(void) +{ + time_t rawtime; + struct tm * timeinfo; + char tmpdata[50]; + + time ( &rawtime ); + timeinfo = localtime ( &rawtime ); + sprintf(tmpdata, " %2dh %2dmin %2ds | ", timeinfo->tm_hour, timeinfo->tm_min, timeinfo->tm_sec); + std::cout << tmpdata ; +} + diff --git a/Sources/tools/debug/tools_debug.h b/Sources/tools/debug/tools_debug.h new file mode 100644 index 0000000..c8287e5 --- /dev/null +++ b/Sources/tools/debug/tools_debug.h @@ -0,0 +1,155 @@ +/** + ******************************************************************************* + * @file tools_debug.h + * @brief Editeur De N'ours : log implementation + * @author Edouard DUPIN + * @date 08/06/2010 + * @par Project + * Edn + * + * @par Copyright + * Copyright 2010 Edouard DUPIN, all right reserved + * + * This software is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY. + * + * Licence summary : + * You can modify and redistribute the sources code and binaries. + * You can send me the bug-fix + * You can not earn money with this Software (if the source extract from Edn + * represent less than 50% of original Sources) + * Term of the licence in in the file licence.txt. + * + ******************************************************************************* + */ + +#ifndef __TOOLS_DEBUG_H__ +#define __TOOLS_DEBUG_H__ + +#include +#include "types_generique.h" + +// Log Message System For EDN +void TOOLS_DisplayFuncName(int32_t ligne, const char* className, const char* funcName); +void TOOLS_DisplayTime(void); + +//regular colors +#define COLOR_BLACK "\e[0;30m" +#define COLOR_RED "\e[0;31m" +#define COLOR_GREEN "\e[0;32m" +#define COLOR_YELLOW "\e[0;33m" +#define COLOR_BLUE "\e[0;34m" +#define COLOR_MAGENTA "\e[0;35m" +#define COLOR_CYAN "\e[0;36m" +#define COLOR_WHITE "\e[0;37m" +//emphasized (bolded) colors +#define COLOR_BOLD_BLACK "\e[1;30m" +#define COLOR_BOLD_RED "\e[1;31m" +#define COLOR_BOLD_GREEN "\e[1;32m" +#define COLOR_BOLD_YELLOW "\e[1;33m" +#define COLOR_BOLD_BLUE "\e[1;34m" +#define COLOR_BOLD_MAGENTA "\e[1;35m" +#define COLOR_BOLD_CYAN "\e[1;36m" +#define COLOR_BOLD_WHITE "\e[1;37m" +//background colors +#define COLOR_BG_BLACK "\e[40m" +#define COLOR_BG_RED "\e[41m" +#define COLOR_BG_GREEN "\e[42m" +#define COLOR_BG_YELLOW "\e[43m" +#define COLOR_BG_BLUE "\e[44m" +#define COLOR_BG_MAGENTA "\e[45m" +#define COLOR_BG_CYAN "\e[46m" +#define COLOR_BG_WHITE "\e[47m" +// Return to the normal color setings +#define COLOR_NORMAL "\e[0m" +//go to the Top of bash +#define GO_TOP "\e[0;0f" + +#undef __class__ +#define __class__ (NULL) + +/* +#define DEFINE_CLASS_NAME(name) #undef __class__ \ + #define __class__ (#name) +at the start of the class : +#undef __class__ +#define __class__ "" +*/ + +#define EDN_DBG_COMMON(color, info, data) do { \ + std::cout << color; \ + TOOLS_DisplayTime(); \ + TOOLS_DisplayFuncName(__LINE__, __class__, __func__); \ + std::cout << "[" << info << "] " << data; \ + std::cout << COLOR_NORMAL < 0 +# define EDN_WARNING(data) EDN_DBG_COMMON(COLOR_MAGENTA, "WW", data) +# define EDN_ERROR(data) EDN_DBG_COMMON(COLOR_BOLD_RED, "EE", data) +#else +# define EDN_WARNING(data) do {}while(0) +# define EDN_ERROR(data) do {}while(0) +#endif + +#if EDN_DEBUG_LEVEL > 1 +# define EDN_INFO(data) EDN_DBG_COMMON(COLOR_CYAN, "II", data) +#else +# define EDN_INFO(data) do {}while(0) +#endif + +#if EDN_DEBUG_LEVEL > 2 +# define EDN_DEBUG(data) EDN_DBG_COMMON(COLOR_YELLOW, "DD", data) +#else +# define EDN_DEBUG(data) do {}while(0) +#endif + + + +#if EDN_DEBUG_LEVEL > 0 +# define EDN_ASSERT(cond, format, ...) \ + do { \ + if (!(cond)) { \ + EDN_CRITICAL(format, ##__VA_ARGS__); \ + assert(!#cond); \ + } \ + } while (0) +#else +# define EDN_ASSERT(cond, format, ...) \ + do { \ + assert(cond); \ + } while (0) +#endif + +#if EDN_DEBUG_LEVEL > 1 +# define EDN_CHECK_INOUT(cond) EDN_ASSERT((cond), "Internal input error : "#cond) +#elif EDN_DEBUG_LEVEL > 0 +// Critical warning mode +# define EDN_CHECK_INOUT(cond) \ + do { \ + if (!(cond)) { \ + EDN_CRITICAL("Internal input error : "#cond);\ + } \ + } while (0) +#else +// Default : No check +# define EDN_CHECK_INOUT(cond) do { } while (0) +#endif + + +// Enable or disable the magic element checking... +#if EDN_DEBUG_LEVEL > 0 + #define CHECK_MAGIC(cond) EDN_ASSERT((cond), "MAGIC check error : "#cond) + #define EDN_ENABLE_CHECK_MAGIC (1) +#else + #define CHECK_MAGIC(cond) do {}while(0) +#endif + + + + + + +#endif diff --git a/Sources/tools/debug/types_generique.h b/Sources/tools/debug/types_generique.h new file mode 100644 index 0000000..1557a20 --- /dev/null +++ b/Sources/tools/debug/types_generique.h @@ -0,0 +1,87 @@ +/** + ******************************************************************************* + * @file types_generique.h + * @brief Editeur De N'ours : generique define type + * @author Edouard DUPIN + * @date 08/06/2010 + * @par Project + * Edn + * + * @par Copyright + * Copyright 2010 Edouard DUPIN, all right reserved + * + * This software is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY. + * + * Licence summary : + * You can modify and redistribute the sources code and binaries. + * You can send me the bug-fix + * You can not earn money with this Software (if the source extract from Edn + * represent less than 50% of original Sources) + * Term of the licence in in the file licence.txt. + * + ******************************************************************************* + */ + +#ifndef __TOOLS_TYPES_GENERIQUE_H__ +#define __TOOLS_TYPES_GENERIQUE_H__ + +// includes system, malloc, EXIT_SUCCESS +#include +// includes fopen, fwrite, fseek, ftell +#include +#include +#include +#include + +extern "C" { + // includes GDK_q + #include + #include +} + + + +#ifndef __int8_t_defined +# define __int8_t_defined + typedef signed char int8_t; + typedef signed short int int16_t; + typedef int int32_t; + typedef signed long long int int64_t; +#endif + +typedef unsigned char uint8_t; +typedef unsigned short int uint16_t; +typedef unsigned long int uint32_t; +typedef unsigned long long int uint64_t; + +typedef bool BOOL; + +typedef enum { + ERR_NONE = 0, //!< No error, luckily everything went fine + ERR_FAIL, //!< Miscellaneous failure + ERR_INVAL, //!< Invalid entry parameter + ERR_MEM, //!< Dynamic memory allocation failure + ERR_TIMEOUT, //!< Request time out + ERR_BUSY, //!< Element curently Busy +}erreurCode_te; + + +#define edn_min(elemA, elemB) ((elemA)<(elemB)) ? (elemA) : (elemB) +#define edn_max(elemA, elemB) ((elemA)<(elemB)) ? (elemB) : (elemA) +#define edn_average(minimim, elem, maximum) ((minimim)>(elem)) ? (minimim) : ((maximum)<(elem)) ? (maximum) : (elem) + + + + + +typedef struct { + int32_t x; + int32_t y; +} position_ts; + + + +#endif + + diff --git a/Sources/tools/globals/tools_globals.cpp b/Sources/tools/globals/tools_globals.cpp new file mode 100644 index 0000000..53b6137 --- /dev/null +++ b/Sources/tools/globals/tools_globals.cpp @@ -0,0 +1,236 @@ +/** + ******************************************************************************* + * @file tools_Globals.cpp + * @brief Editeur De N'ours : Globals Values + * @author Edouard DUPIN + * @date 05/12/2010 + * @par Project + * Edn + * + * @par Copyright + * Copyright 2010 Edouard DUPIN, all right reserved + * + * This software is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY. + * + * Licence summary : + * You can modify and redistribute the sources code and binaries. + * You can send me the bug-fix + * You can not earn money with this Software (if the source extract from Edn + * represent less than 50% of original Sources) + * Term of the licence in in the file licence.txt. + * + ******************************************************************************* + */ + +#include "tools_globals.h" +#include "ColorizeManager.h" +#include "MsgBroadcast.h" +#include + +#undef __class__ +#define __class__ "globals" + +// Variables privé du namespace + +static std::string curentFileName = "???"; + + +erreurCode_te globals::init(void) +{ + erreurCode_te ret = ERR_NONE; + + + return ret; +} + + + +// ----------------------------------------------------------- +static bool displayEOL = false; +bool globals::IsSetDisplayEndOfLine(void) +{ + return displayEOL; +} + +void globals::SetDisplayEndOfLine(bool newVal) +{ + EDN_INFO("Set EndOfLine " << newVal); + displayEOL = newVal; + GeneralSendMessage(EDN_MSG__REFRESH_DISPLAY); +} + +// ----------------------------------------------------------- +static bool displaySpaceChar = true; +bool globals::IsSetDisplaySpaceChar(void) +{ + return displaySpaceChar; +} + +void globals::SetDisplaySpaceChar(bool newVal) +{ + EDN_INFO("Set SpaceChar " << newVal); + displaySpaceChar = newVal; + GeneralSendMessage(EDN_MSG__REFRESH_DISPLAY); +} + + +// ----------------------------------------------------------- +static bool AutoIndent = true; +bool globals::IsSetAutoIndent(void) +{ + return AutoIndent; +} + +void globals::SetAutoIndent(bool newVal) +{ + EDN_INFO("Set AutoIndent " << newVal); + AutoIndent = newVal; +} + +// ----------------------------------------------------------- + + + + +int32_t globals::getNbColoneBorder(void) +{ + return 6; +} + +int32_t globals::getNbLineBorder(void) +{ + return 3; +} + + + +static bool shiftIsSet = false; +void globals::SetShift(void) +{ + shiftIsSet = true; + EDN_INFO(" SHIFT => Set"); +} + +void globals::UnSetShift(void) +{ + shiftIsSet = false; + EDN_INFO(" SHIFT => UnSet"); +} + +bool globals::IsSetShift(void) +{ + return shiftIsSet; +} + + + +static bool altIsSet = false; +void globals::SetAlt(void) +{ + altIsSet = true; +} + +void globals::UnSetAlt(void) +{ + altIsSet = false; +} + +bool globals::IsSetAlt(void) +{ + return altIsSet; +} + + +static bool ctrlIsSet = false; +void globals::SetCtrl(void) +{ + ctrlIsSet = true; +} + +void globals::UnSetCtrl(void) +{ + ctrlIsSet = false; +} + +bool globals::IsSetCtrl(void) +{ + return ctrlIsSet; +} + + +static bool pommeIsSet = false; +void globals::SetPomme(void) +{ + pommeIsSet = true; +} + +void globals::UnSetPomme(void) +{ + pommeIsSet = false; +} + +bool globals::IsSetPomme(void) +{ + return pommeIsSet; +} + +static bool insertIsSet = false; +void globals::SetInsert(void) +{ + insertIsSet = true; +} + +void globals::UnSetInsert(void) +{ + insertIsSet = false; +} +void globals::ToggleInsert(void) +{ + if (true==insertIsSet) { + insertIsSet = false; + } else { + insertIsSet = true; + } +} + +bool globals::IsSetInsert(void) +{ + return insertIsSet; +} + + + + +/* + * Basic GUI system : + * + * + * + * + */ + + + +void globals::DisplaySystemString(std::vector &data) +{ + // Display the copyed data ... + uint32_t i; + EDN_INFO("Display Data : "); + printf(" ========================================================\n"); + for(i=0; i +#include + +namespace globals +{ + erreurCode_te init(void); + int32_t getNbColoneBorder(void); + int32_t getNbLineBorder(void); + + bool IsSetDisplayEndOfLine(void); + void SetDisplayEndOfLine(bool newVal); + + bool IsSetDisplaySpaceChar(void); + void SetDisplaySpaceChar(bool newVal); + + bool IsSetAutoIndent(void); + void SetAutoIndent(bool newVal); + + void init2(void); + + void SetShift(void); + void UnSetShift(void); + bool IsSetShift(void); + void SetAlt(void); + void UnSetAlt(void); + bool IsSetAlt(void); + void SetCtrl(void); + void UnSetCtrl(void); + bool IsSetCtrl(void); + void SetPomme(void); + void UnSetPomme(void); + bool IsSetPomme(void); + void SetInsert(void); + void UnSetInsert(void); + void ToggleInsert(void); + bool IsSetInsert(void); + void DisplaySystemString(std::vector &data); +} + +#endif + + diff --git a/Sources/tools/memory/toolsMemory.cpp b/Sources/tools/memory/toolsMemory.cpp new file mode 100644 index 0000000..e69de29 diff --git a/Sources/tools/memory/toolsMemory.h b/Sources/tools/memory/toolsMemory.h new file mode 100644 index 0000000..8c9b1cc --- /dev/null +++ b/Sources/tools/memory/toolsMemory.h @@ -0,0 +1,93 @@ +/** + ******************************************************************************* + * @file toolsmemory.h + * @brief Editeur De N'ours : Memory implementation (headers) + * @author Edouard DUPIN + * @date 12/01/2011 + * @par Project + * Edn + * + * @par Copyright + * Copyright 2010 Edouard DUPIN, all right reserved + * + * This software is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY. + * + * Licence summary : + * You can modify and redistribute the sources code and binaries. + * You can send me the bug-fix + * You can not earn money with this Software (if the source extract from Edn + * represent less than 50% of original Sources) + * Term of the licence in in the file licence.txt. + * + ******************************************************************************* + */ + +#ifndef __TOOLS_MEMORY_H__ +#define __TOOLS_MEMORY_H__ + + + +// General +#if EDN_MEMORY_CHECKER > 0 + void EDN_MemFree( void * pointerData, const char * variableName, const char * functionName, int32_t line, const char * fileName ); + void * EDN_MemMalloc( size_t num, size_t size, uint8_t init, const char * variableName, const char * functionName, int32_t line, const char * fileName ); + void EDN_MemShowLogs( void ); +# define EDN_MALLOC(pointerData, nbElements, dataType) do { \ + pointerData = (dataType *)EDN_MemMalloc( (nbElements), sizeof(dataType), 0, #pointerData, __func__, __LINE__, __FILE__); \ + }while(0) +# define EDN_MALLOC_CAST(pointerData, nbElements, dataType, cast) do { \ + pointerData = (cast)EDN_MemMalloc( (nbElements), sizeof(dataType), 0, #pointerData, __func__, __LINE__, __FILE__); \ + }while(0) +# define EDN_CALLOC(pointerData, nbElements, dataType) do { \ + pointerData = (dataType *)EDN_MemMalloc( (nbElements), sizeof(dataType), 1, #pointerData, __func__, __LINE__, __FILE__); \ + }while(0) +# define EDN_CALLOC_CAST(pointerData, nbElements, dataType, cast) do { \ + pointerData = (cast)EDN_MemMalloc( (nbElements), sizeof(dataType), 1, #pointerData, __func__, __LINE__, __FILE__); \ + }while(0) +# define EDN_FREE(pointerData) do { \ + EDN_MemFree( (pointerData) , #pointerData, __func__, __LINE__, __FILE__); \ + (pointerData) = NULL; \ + }while(0) +# define EDN_MEM_SHOW_LOG() do { \ + EDN_MemShowLogs(); \ + }while(0) +#else + +# define EDN_MALLOC(pointerData, nbElements, dataType) do { \ + (pointerData) = (dataType *)malloc( (nbElements) * sizeof(dataType) ); \ + }while(0) + +# define EDN_MALLOC_CAST(pointerData, nbElements, dataType, cast) do { \ + (pointerData) = (cast)malloc( (nbElements) * sizeof(dataType) ); \ + }while(0) + +# define EDN_CALLOC(pointerData, nbElements, dataType) do { \ + (pointerData) = (dataType *)calloc( (nbElements), sizeof(dataType) ); \ + }while(0) + +# define EDN_CALLOC_CAST(pointerData, nbElements, dataType, cast) do { \ + (pointerData) = (cast)calloc( (nbElements), sizeof(dataType) ); \ + }while(0) + +# define EDN_REALLOC(pointerData, nbElements, dataType) do { \ + (pointerData) = (dataType *)realloc( (pointerData), (nbElements)* sizeof(dataType) ); \ + }while(0) + +# define EDN_REALLOC_CAST(pointerData, nbElements, dataType, cast) do { \ + (pointerData) = (cast)realloc( (pointerData), (nbElements) * sizeof(dataType) ); \ + }while(0) + +# define EDN_FREE(pointerData) do { \ + free( pointerData ); \ + (pointerData) = NULL; \ + }while(0) + +# define EDN_MEM_SHOW_LOG() do { \ + sup_system_diag("No Memory check availlable"); \ + }while(0) +#endif + + +#endif + diff --git a/Sources/tools/tinyXML/tinystr.cpp b/Sources/tools/tinyXML/tinystr.cpp new file mode 100644 index 0000000..6812507 --- /dev/null +++ b/Sources/tools/tinyXML/tinystr.cpp @@ -0,0 +1,116 @@ +/* +www.sourceforge.net/projects/tinyxml +Original file by Yves Berquin. + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any +damages arising from the use of this software. + +Permission is granted to anyone to use this software for any +purpose, including commercial applications, and to alter it and +redistribute it freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must +not claim that you wrote the original software. If you use this +software in a product, an acknowledgment in the product documentation +would be appreciated but is not required. + +2. Altered source versions must be plainly marked as such, and +must not be misrepresented as being the original software. + +3. This notice may not be removed or altered from any source +distribution. +*/ + +/* + * THIS FILE WAS ALTERED BY Tyge Løvset, 7. April 2005. + */ + + +#ifndef TIXML_USE_STL + +#include "tinystr.h" + +// Error value for find primitive +const TiXmlString::size_type TiXmlString::npos = static_cast< TiXmlString::size_type >(-1); + + +// Null rep. +TiXmlString::Rep TiXmlString::nullrep_ = { 0, 0, { '\0' } }; + + +void TiXmlString::reserve (size_type cap) +{ + if (cap > capacity()) + { + TiXmlString tmp; + tmp.init(length(), cap); + memcpy(tmp.start(), data(), length()); + swap(tmp); + } +} + + +TiXmlString& TiXmlString::assign(const char* str, size_type len) +{ + size_type cap = capacity(); + if (len > cap || cap > 3*(len + 8)) + { + TiXmlString tmp; + tmp.init(len); + memcpy(tmp.start(), str, len); + swap(tmp); + } + else + { + memmove(start(), str, len); + set_size(len); + } + return *this; +} + + +TiXmlString& TiXmlString::append(const char* str, size_type len) +{ + size_type newsize = length() + len; + if (newsize > capacity()) + { + reserve (newsize + capacity()); + } + memmove(finish(), str, len); + set_size(newsize); + return *this; +} + + +TiXmlString operator + (const TiXmlString & a, const TiXmlString & b) +{ + TiXmlString tmp; + tmp.reserve(a.length() + b.length()); + tmp += a; + tmp += b; + return tmp; +} + +TiXmlString operator + (const TiXmlString & a, const char* b) +{ + TiXmlString tmp; + TiXmlString::size_type b_len = static_cast( strlen(b) ); + tmp.reserve(a.length() + b_len); + tmp += a; + tmp.append(b, b_len); + return tmp; +} + +TiXmlString operator + (const char* a, const TiXmlString & b) +{ + TiXmlString tmp; + TiXmlString::size_type a_len = static_cast( strlen(a) ); + tmp.reserve(a_len + b.length()); + tmp.append(a, a_len); + tmp += b; + return tmp; +} + + +#endif // TIXML_USE_STL diff --git a/Sources/tools/tinyXML/tinystr.h b/Sources/tools/tinyXML/tinystr.h new file mode 100644 index 0000000..3c2aa9d --- /dev/null +++ b/Sources/tools/tinyXML/tinystr.h @@ -0,0 +1,319 @@ +/* +www.sourceforge.net/projects/tinyxml +Original file by Yves Berquin. + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any +damages arising from the use of this software. + +Permission is granted to anyone to use this software for any +purpose, including commercial applications, and to alter it and +redistribute it freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must +not claim that you wrote the original software. If you use this +software in a product, an acknowledgment in the product documentation +would be appreciated but is not required. + +2. Altered source versions must be plainly marked as such, and +must not be misrepresented as being the original software. + +3. This notice may not be removed or altered from any source +distribution. +*/ + +/* + * THIS FILE WAS ALTERED BY Tyge Lovset, 7. April 2005. + * + * - completely rewritten. compact, clean, and fast implementation. + * - sizeof(TiXmlString) = pointer size (4 bytes on 32-bit systems) + * - fixed reserve() to work as per specification. + * - fixed buggy compares operator==(), operator<(), and operator>() + * - fixed operator+=() to take a const ref argument, following spec. + * - added "copy" constructor with length, and most compare operators. + * - added swap(), clear(), size(), capacity(), operator+(). + */ + +#ifndef TIXML_USE_STL + +#ifndef TIXML_STRING_INCLUDED +#define TIXML_STRING_INCLUDED + +#include +#include + +/* The support for explicit isn't that universal, and it isn't really + required - it is used to check that the TiXmlString class isn't incorrectly + used. Be nice to old compilers and macro it here: +*/ +#if defined(_MSC_VER) && (_MSC_VER >= 1200 ) + // Microsoft visual studio, version 6 and higher. + #define TIXML_EXPLICIT explicit +#elif defined(__GNUC__) && (__GNUC__ >= 3 ) + // GCC version 3 and higher.s + #define TIXML_EXPLICIT explicit +#else + #define TIXML_EXPLICIT +#endif + + +/* + TiXmlString is an emulation of a subset of the std::string template. + Its purpose is to allow compiling TinyXML on compilers with no or poor STL support. + Only the member functions relevant to the TinyXML project have been implemented. + The buffer allocation is made by a simplistic power of 2 like mechanism : if we increase + a string and there's no more room, we allocate a buffer twice as big as we need. +*/ +class TiXmlString +{ + public : + // The size type used + typedef size_t size_type; + + // Error value for find primitive + static const size_type npos; // = -1; + + + // TiXmlString empty constructor + TiXmlString () : rep_(&nullrep_) + { + } + + // TiXmlString copy constructor + TiXmlString ( const TiXmlString & copy) : rep_(0) + { + init(copy.length()); + memcpy(start(), copy.data(), length()); + } + + // TiXmlString constructor, based on a string + TIXML_EXPLICIT TiXmlString ( const char * copy) : rep_(0) + { + init( static_cast( strlen(copy) )); + memcpy(start(), copy, length()); + } + + // TiXmlString constructor, based on a string + TIXML_EXPLICIT TiXmlString ( const char * str, size_type len) : rep_(0) + { + init(len); + memcpy(start(), str, len); + } + + // TiXmlString destructor + ~TiXmlString () + { + quit(); + } + + // = operator + TiXmlString& operator = (const char * copy) + { + return assign( copy, (size_type)strlen(copy)); + } + + // = operator + TiXmlString& operator = (const TiXmlString & copy) + { + return assign(copy.start(), copy.length()); + } + + + // += operator. Maps to append + TiXmlString& operator += (const char * suffix) + { + return append(suffix, static_cast( strlen(suffix) )); + } + + // += operator. Maps to append + TiXmlString& operator += (char single) + { + return append(&single, 1); + } + + // += operator. Maps to append + TiXmlString& operator += (const TiXmlString & suffix) + { + return append(suffix.data(), suffix.length()); + } + + + // Convert a TiXmlString into a null-terminated char * + const char * c_str () const { return rep_->str; } + + // Convert a TiXmlString into a char * (need not be null terminated). + const char * data () const { return rep_->str; } + + // Return the length of a TiXmlString + size_type length () const { return rep_->size; } + + // Alias for length() + size_type size () const { return rep_->size; } + + // Checks if a TiXmlString is empty + bool empty () const { return rep_->size == 0; } + + // Return capacity of string + size_type capacity () const { return rep_->capacity; } + + + // single char extraction + const char& at (size_type index) const + { + assert( index < length() ); + return rep_->str[ index ]; + } + + // [] operator + char& operator [] (size_type index) const + { + assert( index < length() ); + return rep_->str[ index ]; + } + + // find a char in a string. Return TiXmlString::npos if not found + size_type find (char lookup) const + { + return find(lookup, 0); + } + + // find a char in a string from an offset. Return TiXmlString::npos if not found + size_type find (char tofind, size_type offset) const + { + if (offset >= length()) return npos; + + for (const char* p = c_str() + offset; *p != '\0'; ++p) + { + if (*p == tofind) return static_cast< size_type >( p - c_str() ); + } + return npos; + } + + void clear () + { + //Lee: + //The original was just too strange, though correct: + // TiXmlString().swap(*this); + //Instead use the quit & re-init: + quit(); + init(0,0); + } + + /* Function to reserve a big amount of data when we know we'll need it. Be aware that this + function DOES NOT clear the content of the TiXmlString if any exists. + */ + void reserve (size_type cap); + + TiXmlString& assign (const char* str, size_type len); + + TiXmlString& append (const char* str, size_type len); + + void swap (TiXmlString& other) + { + Rep* r = rep_; + rep_ = other.rep_; + other.rep_ = r; + } + + private: + + void init(size_type sz) { init(sz, sz); } + void set_size(size_type sz) { rep_->str[ rep_->size = sz ] = '\0'; } + char* start() const { return rep_->str; } + char* finish() const { return rep_->str + rep_->size; } + + struct Rep + { + size_type size, capacity; + char str[1]; + }; + + void init(size_type sz, size_type cap) + { + if (cap) + { + // Lee: the original form: + // rep_ = static_cast(operator new(sizeof(Rep) + cap)); + // doesn't work in some cases of new being overloaded. Switching + // to the normal allocation, although use an 'int' for systems + // that are overly picky about structure alignment. + const size_type bytesNeeded = sizeof(Rep) + cap; + const size_type intsNeeded = ( bytesNeeded + sizeof(int) - 1 ) / sizeof( int ); + rep_ = reinterpret_cast( new int[ intsNeeded ] ); + + rep_->str[ rep_->size = sz ] = '\0'; + rep_->capacity = cap; + } + else + { + rep_ = &nullrep_; + } + } + + void quit() + { + if (rep_ != &nullrep_) + { + // The rep_ is really an array of ints. (see the allocator, above). + // Cast it back before delete, so the compiler won't incorrectly call destructors. + delete [] ( reinterpret_cast( rep_ ) ); + } + } + + Rep * rep_; + static Rep nullrep_; + +} ; + + +inline bool operator == (const TiXmlString & a, const TiXmlString & b) +{ + return ( a.length() == b.length() ) // optimization on some platforms + && ( strcmp(a.c_str(), b.c_str()) == 0 ); // actual compare +} +inline bool operator < (const TiXmlString & a, const TiXmlString & b) +{ + return strcmp(a.c_str(), b.c_str()) < 0; +} + +inline bool operator != (const TiXmlString & a, const TiXmlString & b) { return !(a == b); } +inline bool operator > (const TiXmlString & a, const TiXmlString & b) { return b < a; } +inline bool operator <= (const TiXmlString & a, const TiXmlString & b) { return !(b < a); } +inline bool operator >= (const TiXmlString & a, const TiXmlString & b) { return !(a < b); } + +inline bool operator == (const TiXmlString & a, const char* b) { return strcmp(a.c_str(), b) == 0; } +inline bool operator == (const char* a, const TiXmlString & b) { return b == a; } +inline bool operator != (const TiXmlString & a, const char* b) { return !(a == b); } +inline bool operator != (const char* a, const TiXmlString & b) { return !(b == a); } + +TiXmlString operator + (const TiXmlString & a, const TiXmlString & b); +TiXmlString operator + (const TiXmlString & a, const char* b); +TiXmlString operator + (const char* a, const TiXmlString & b); + + +/* + TiXmlOutStream is an emulation of std::ostream. It is based on TiXmlString. + Only the operators that we need for TinyXML have been developped. +*/ +class TiXmlOutStream : public TiXmlString +{ +public : + + // TiXmlOutStream << operator. + TiXmlOutStream & operator << (const TiXmlString & in) + { + *this += in; + return *this; + } + + // TiXmlOutStream << operator. + TiXmlOutStream & operator << (const char * in) + { + *this += in; + return *this; + } + +} ; + +#endif // TIXML_STRING_INCLUDED +#endif // TIXML_USE_STL diff --git a/Sources/tools/tinyXML/tinyxml.cpp b/Sources/tools/tinyXML/tinyxml.cpp new file mode 100644 index 0000000..9be6c6a --- /dev/null +++ b/Sources/tools/tinyXML/tinyxml.cpp @@ -0,0 +1,1839 @@ +/* +www.sourceforge.net/projects/tinyxml +Original code (2.0 and earlier )copyright (c) 2000-2006 Lee Thomason (www.grinninglizard.com) + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any +damages arising from the use of this software. + +Permission is granted to anyone to use this software for any +purpose, including commercial applications, and to alter it and +redistribute it freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must +not claim that you wrote the original software. If you use this +software in a product, an acknowledgment in the product documentation +would be appreciated but is not required. + +2. Altered source versions must be plainly marked as such, and +must not be misrepresented as being the original software. + +3. This notice may not be removed or altered from any source +distribution. +*/ + +#include + +#ifdef TIXML_USE_STL +#include +#include +#endif + +#include "tinyxml.h" + +FILE* TiXmlFOpen( const char* filename, const char* mode ); + +bool TiXmlBase::condenseWhiteSpace = true; + +// Microsoft compiler security +FILE* TiXmlFOpen( const char* filename, const char* mode ) +{ + #if defined(_MSC_VER) && (_MSC_VER >= 1400 ) + FILE* fp = 0; + errno_t err = fopen_s( &fp, filename, mode ); + if ( !err && fp ) + return fp; + return 0; + #else + return fopen( filename, mode ); + #endif +} + +void TiXmlBase::EncodeString( const TIXML_STRING& str, TIXML_STRING* outString ) +{ + int i=0; + + while( i<(int)str.length() ) + { + unsigned char c = (unsigned char) str[i]; + + if ( c == '&' + && i < ( (int)str.length() - 2 ) + && str[i+1] == '#' + && str[i+2] == 'x' ) + { + // Hexadecimal character reference. + // Pass through unchanged. + // © -- copyright symbol, for example. + // + // The -1 is a bug fix from Rob Laveaux. It keeps + // an overflow from happening if there is no ';'. + // There are actually 2 ways to exit this loop - + // while fails (error case) and break (semicolon found). + // However, there is no mechanism (currently) for + // this function to return an error. + while ( i<(int)str.length()-1 ) + { + outString->append( str.c_str() + i, 1 ); + ++i; + if ( str[i] == ';' ) + break; + } + } + else if ( c == '&' ) + { + outString->append( entity[0].str, entity[0].strLength ); + ++i; + } + else if ( c == '<' ) + { + outString->append( entity[1].str, entity[1].strLength ); + ++i; + } + else if ( c == '>' ) + { + outString->append( entity[2].str, entity[2].strLength ); + ++i; + } + else if ( c == '\"' ) + { + outString->append( entity[3].str, entity[3].strLength ); + ++i; + } + else if ( c == '\'' ) + { + outString->append( entity[4].str, entity[4].strLength ); + ++i; + } + else if ( c < 32 ) + { + // Easy pass at non-alpha/numeric/symbol + // Below 32 is symbolic. + char buf[ 32 ]; + + #if defined(TIXML_SNPRINTF) + TIXML_SNPRINTF( buf, sizeof(buf), "&#x%02X;", (unsigned) ( c & 0xff ) ); + #else + sprintf( buf, "&#x%02X;", (unsigned) ( c & 0xff ) ); + #endif + + //*ME: warning C4267: convert 'size_t' to 'int' + //*ME: Int-Cast to make compiler happy ... + outString->append( buf, (int)strlen( buf ) ); + ++i; + } + else + { + //char realc = (char) c; + //outString->append( &realc, 1 ); + *outString += (char) c; // somewhat more efficient function call. + ++i; + } + } +} + + +TiXmlNode::TiXmlNode( NodeType _type ) : TiXmlBase() +{ + parent = 0; + type = _type; + firstChild = 0; + lastChild = 0; + prev = 0; + next = 0; +} + + +TiXmlNode::~TiXmlNode() +{ + TiXmlNode* node = firstChild; + TiXmlNode* temp = 0; + + while ( node ) + { + temp = node; + node = node->next; + delete temp; + } +} + + +void TiXmlNode::CopyTo( TiXmlNode* target ) const +{ + target->SetValue (value.c_str() ); + target->userData = userData; + target->location = location; +} + + +void TiXmlNode::Clear() +{ + TiXmlNode* node = firstChild; + TiXmlNode* temp = 0; + + while ( node ) + { + temp = node; + node = node->next; + delete temp; + } + + firstChild = 0; + lastChild = 0; +} + + +TiXmlNode* TiXmlNode::LinkEndChild( TiXmlNode* node ) +{ + assert( node->parent == 0 || node->parent == this ); + assert( node->GetDocument() == 0 || node->GetDocument() == this->GetDocument() ); + + if ( node->Type() == TiXmlNode::TINYXML_DOCUMENT ) + { + delete node; + if ( GetDocument() ) GetDocument()->SetError( TIXML_ERROR_DOCUMENT_TOP_ONLY, 0, 0, TIXML_ENCODING_UNKNOWN ); + return 0; + } + + node->parent = this; + + node->prev = lastChild; + node->next = 0; + + if ( lastChild ) + lastChild->next = node; + else + firstChild = node; // it was an empty list. + + lastChild = node; + return node; +} + + +TiXmlNode* TiXmlNode::InsertEndChild( const TiXmlNode& addThis ) +{ + if ( addThis.Type() == TiXmlNode::TINYXML_DOCUMENT ) + { + if ( GetDocument() ) GetDocument()->SetError( TIXML_ERROR_DOCUMENT_TOP_ONLY, 0, 0, TIXML_ENCODING_UNKNOWN ); + return 0; + } + TiXmlNode* node = addThis.Clone(); + if ( !node ) + return 0; + + return LinkEndChild( node ); +} + + +TiXmlNode* TiXmlNode::InsertBeforeChild( TiXmlNode* beforeThis, const TiXmlNode& addThis ) +{ + if ( !beforeThis || beforeThis->parent != this ) { + return 0; + } + if ( addThis.Type() == TiXmlNode::TINYXML_DOCUMENT ) + { + if ( GetDocument() ) GetDocument()->SetError( TIXML_ERROR_DOCUMENT_TOP_ONLY, 0, 0, TIXML_ENCODING_UNKNOWN ); + return 0; + } + + TiXmlNode* node = addThis.Clone(); + if ( !node ) + return 0; + node->parent = this; + + node->next = beforeThis; + node->prev = beforeThis->prev; + if ( beforeThis->prev ) + { + beforeThis->prev->next = node; + } + else + { + assert( firstChild == beforeThis ); + firstChild = node; + } + beforeThis->prev = node; + return node; +} + + +TiXmlNode* TiXmlNode::InsertAfterChild( TiXmlNode* afterThis, const TiXmlNode& addThis ) +{ + if ( !afterThis || afterThis->parent != this ) { + return 0; + } + if ( addThis.Type() == TiXmlNode::TINYXML_DOCUMENT ) + { + if ( GetDocument() ) GetDocument()->SetError( TIXML_ERROR_DOCUMENT_TOP_ONLY, 0, 0, TIXML_ENCODING_UNKNOWN ); + return 0; + } + + TiXmlNode* node = addThis.Clone(); + if ( !node ) + return 0; + node->parent = this; + + node->prev = afterThis; + node->next = afterThis->next; + if ( afterThis->next ) + { + afterThis->next->prev = node; + } + else + { + assert( lastChild == afterThis ); + lastChild = node; + } + afterThis->next = node; + return node; +} + + +TiXmlNode* TiXmlNode::ReplaceChild( TiXmlNode* replaceThis, const TiXmlNode& withThis ) +{ + if ( !replaceThis ) + return 0; + + if ( replaceThis->parent != this ) + return 0; + + if ( withThis.ToDocument() ) { + // A document can never be a child. Thanks to Noam. + TiXmlDocument* document = GetDocument(); + if ( document ) + document->SetError( TIXML_ERROR_DOCUMENT_TOP_ONLY, 0, 0, TIXML_ENCODING_UNKNOWN ); + return 0; + } + + TiXmlNode* node = withThis.Clone(); + if ( !node ) + return 0; + + node->next = replaceThis->next; + node->prev = replaceThis->prev; + + if ( replaceThis->next ) + replaceThis->next->prev = node; + else + lastChild = node; + + if ( replaceThis->prev ) + replaceThis->prev->next = node; + else + firstChild = node; + + delete replaceThis; + node->parent = this; + return node; +} + + +bool TiXmlNode::RemoveChild( TiXmlNode* removeThis ) +{ + if ( !removeThis ) { + return false; + } + + if ( removeThis->parent != this ) + { + assert( 0 ); + return false; + } + + if ( removeThis->next ) + removeThis->next->prev = removeThis->prev; + else + lastChild = removeThis->prev; + + if ( removeThis->prev ) + removeThis->prev->next = removeThis->next; + else + firstChild = removeThis->next; + + delete removeThis; + return true; +} + +const TiXmlNode* TiXmlNode::FirstChild( const char * _value ) const +{ + const TiXmlNode* node; + for ( node = firstChild; node; node = node->next ) + { + if ( strcmp( node->Value(), _value ) == 0 ) + return node; + } + return 0; +} + + +const TiXmlNode* TiXmlNode::LastChild( const char * _value ) const +{ + const TiXmlNode* node; + for ( node = lastChild; node; node = node->prev ) + { + if ( strcmp( node->Value(), _value ) == 0 ) + return node; + } + return 0; +} + + +const TiXmlNode* TiXmlNode::IterateChildren( const TiXmlNode* previous ) const +{ + if ( !previous ) + { + return FirstChild(); + } + else + { + assert( previous->parent == this ); + return previous->NextSibling(); + } +} + + +const TiXmlNode* TiXmlNode::IterateChildren( const char * val, const TiXmlNode* previous ) const +{ + if ( !previous ) + { + return FirstChild( val ); + } + else + { + assert( previous->parent == this ); + return previous->NextSibling( val ); + } +} + + +const TiXmlNode* TiXmlNode::NextSibling( const char * _value ) const +{ + const TiXmlNode* node; + for ( node = next; node; node = node->next ) + { + if ( strcmp( node->Value(), _value ) == 0 ) + return node; + } + return 0; +} + + +const TiXmlNode* TiXmlNode::PreviousSibling( const char * _value ) const +{ + const TiXmlNode* node; + for ( node = prev; node; node = node->prev ) + { + if ( strcmp( node->Value(), _value ) == 0 ) + return node; + } + return 0; +} + + +void TiXmlElement::RemoveAttribute( const char * name ) +{ + #ifdef TIXML_USE_STL + TIXML_STRING str( name ); + TiXmlAttribute* node = attributeSet.Find( str ); + #else + TiXmlAttribute* node = attributeSet.Find( name ); + #endif + if ( node ) + { + attributeSet.Remove( node ); + delete node; + } +} + +const TiXmlElement* TiXmlNode::FirstChildElement() const +{ + const TiXmlNode* node; + + for ( node = FirstChild(); + node; + node = node->NextSibling() ) + { + if ( node->ToElement() ) + return node->ToElement(); + } + return 0; +} + + +const TiXmlElement* TiXmlNode::FirstChildElement( const char * _value ) const +{ + const TiXmlNode* node; + + for ( node = FirstChild( _value ); + node; + node = node->NextSibling( _value ) ) + { + if ( node->ToElement() ) + return node->ToElement(); + } + return 0; +} + + +const TiXmlElement* TiXmlNode::NextSiblingElement() const +{ + const TiXmlNode* node; + + for ( node = NextSibling(); + node; + node = node->NextSibling() ) + { + if ( node->ToElement() ) + return node->ToElement(); + } + return 0; +} + + +const TiXmlElement* TiXmlNode::NextSiblingElement( const char * _value ) const +{ + const TiXmlNode* node; + + for ( node = NextSibling( _value ); + node; + node = node->NextSibling( _value ) ) + { + if ( node->ToElement() ) + return node->ToElement(); + } + return 0; +} + + +const TiXmlDocument* TiXmlNode::GetDocument() const +{ + const TiXmlNode* node; + + for( node = this; node; node = node->parent ) + { + if ( node->ToDocument() ) + return node->ToDocument(); + } + return 0; +} + + +TiXmlElement::TiXmlElement (const char * _value) + : TiXmlNode( TiXmlNode::TINYXML_ELEMENT ) +{ + firstChild = lastChild = 0; + value = _value; +} + + +#ifdef TIXML_USE_STL +TiXmlElement::TiXmlElement( const std::string& _value ) + : TiXmlNode( TiXmlNode::TINYXML_ELEMENT ) +{ + firstChild = lastChild = 0; + value = _value; +} +#endif + + +TiXmlElement::TiXmlElement( const TiXmlElement& copy) + : TiXmlNode( TiXmlNode::TINYXML_ELEMENT ) +{ + firstChild = lastChild = 0; + copy.CopyTo( this ); +} + + +void TiXmlElement::operator=( const TiXmlElement& base ) +{ + ClearThis(); + base.CopyTo( this ); +} + + +TiXmlElement::~TiXmlElement() +{ + ClearThis(); +} + + +void TiXmlElement::ClearThis() +{ + Clear(); + while( attributeSet.First() ) + { + TiXmlAttribute* node = attributeSet.First(); + attributeSet.Remove( node ); + delete node; + } +} + + +const char* TiXmlElement::Attribute( const char* name ) const +{ + const TiXmlAttribute* node = attributeSet.Find( name ); + if ( node ) + return node->Value(); + return 0; +} + + +#ifdef TIXML_USE_STL +const std::string* TiXmlElement::Attribute( const std::string& name ) const +{ + const TiXmlAttribute* attrib = attributeSet.Find( name ); + if ( attrib ) + return &attrib->ValueStr(); + return 0; +} +#endif + + +const char* TiXmlElement::Attribute( const char* name, int* i ) const +{ + const TiXmlAttribute* attrib = attributeSet.Find( name ); + const char* result = 0; + + if ( attrib ) { + result = attrib->Value(); + if ( i ) { + attrib->QueryIntValue( i ); + } + } + return result; +} + + +#ifdef TIXML_USE_STL +const std::string* TiXmlElement::Attribute( const std::string& name, int* i ) const +{ + const TiXmlAttribute* attrib = attributeSet.Find( name ); + const std::string* result = 0; + + if ( attrib ) { + result = &attrib->ValueStr(); + if ( i ) { + attrib->QueryIntValue( i ); + } + } + return result; +} +#endif + + +const char* TiXmlElement::Attribute( const char* name, double* d ) const +{ + const TiXmlAttribute* attrib = attributeSet.Find( name ); + const char* result = 0; + + if ( attrib ) { + result = attrib->Value(); + if ( d ) { + attrib->QueryDoubleValue( d ); + } + } + return result; +} + + +#ifdef TIXML_USE_STL +const std::string* TiXmlElement::Attribute( const std::string& name, double* d ) const +{ + const TiXmlAttribute* attrib = attributeSet.Find( name ); + const std::string* result = 0; + + if ( attrib ) { + result = &attrib->ValueStr(); + if ( d ) { + attrib->QueryDoubleValue( d ); + } + } + return result; +} +#endif + + +int TiXmlElement::QueryIntAttribute( const char* name, int* ival ) const +{ + const TiXmlAttribute* attrib = attributeSet.Find( name ); + if ( !attrib ) + return TIXML_NO_ATTRIBUTE; + return attrib->QueryIntValue( ival ); +} + + +#ifdef TIXML_USE_STL +int TiXmlElement::QueryIntAttribute( const std::string& name, int* ival ) const +{ + const TiXmlAttribute* attrib = attributeSet.Find( name ); + if ( !attrib ) + return TIXML_NO_ATTRIBUTE; + return attrib->QueryIntValue( ival ); +} +#endif + + +int TiXmlElement::QueryDoubleAttribute( const char* name, double* dval ) const +{ + const TiXmlAttribute* attrib = attributeSet.Find( name ); + if ( !attrib ) + return TIXML_NO_ATTRIBUTE; + return attrib->QueryDoubleValue( dval ); +} + + +#ifdef TIXML_USE_STL +int TiXmlElement::QueryDoubleAttribute( const std::string& name, double* dval ) const +{ + const TiXmlAttribute* attrib = attributeSet.Find( name ); + if ( !attrib ) + return TIXML_NO_ATTRIBUTE; + return attrib->QueryDoubleValue( dval ); +} +#endif + + +void TiXmlElement::SetAttribute( const char * name, int val ) +{ + TiXmlAttribute* attrib = attributeSet.FindOrCreate( name ); + if ( attrib ) { + attrib->SetIntValue( val ); + } +} + + +#ifdef TIXML_USE_STL +void TiXmlElement::SetAttribute( const std::string& name, int val ) +{ + TiXmlAttribute* attrib = attributeSet.FindOrCreate( name ); + if ( attrib ) { + attrib->SetIntValue( val ); + } +} +#endif + + +void TiXmlElement::SetDoubleAttribute( const char * name, double val ) +{ + TiXmlAttribute* attrib = attributeSet.FindOrCreate( name ); + if ( attrib ) { + attrib->SetDoubleValue( val ); + } +} + + +#ifdef TIXML_USE_STL +void TiXmlElement::SetDoubleAttribute( const std::string& name, double val ) +{ + TiXmlAttribute* attrib = attributeSet.FindOrCreate( name ); + if ( attrib ) { + attrib->SetDoubleValue( val ); + } +} +#endif + + +void TiXmlElement::SetAttribute( const char * cname, const char * cvalue ) +{ + TiXmlAttribute* attrib = attributeSet.FindOrCreate( cname ); + if ( attrib ) { + attrib->SetValue( cvalue ); + } +} + + +#ifdef TIXML_USE_STL +void TiXmlElement::SetAttribute( const std::string& _name, const std::string& _value ) +{ + TiXmlAttribute* attrib = attributeSet.FindOrCreate( _name ); + if ( attrib ) { + attrib->SetValue( _value ); + } +} +#endif + + +void TiXmlElement::Print( FILE* cfile, int depth ) const +{ + int i; + assert( cfile ); + for ( i=0; iNext() ) + { + fprintf( cfile, " " ); + attrib->Print( cfile, depth ); + } + + // There are 3 different formatting approaches: + // 1) An element without children is printed as a node + // 2) An element with only a text child is printed as text + // 3) An element with children is printed on multiple lines. + TiXmlNode* node; + if ( !firstChild ) + { + fprintf( cfile, " />" ); + } + else if ( firstChild == lastChild && firstChild->ToText() ) + { + fprintf( cfile, ">" ); + firstChild->Print( cfile, depth + 1 ); + fprintf( cfile, "", value.c_str() ); + } + else + { + fprintf( cfile, ">" ); + + for ( node = firstChild; node; node=node->NextSibling() ) + { + if ( !node->ToText() ) + { + fprintf( cfile, "\n" ); + } + node->Print( cfile, depth+1 ); + } + fprintf( cfile, "\n" ); + for( i=0; i", value.c_str() ); + } +} + + +void TiXmlElement::CopyTo( TiXmlElement* target ) const +{ + // superclass: + TiXmlNode::CopyTo( target ); + + // Element class: + // Clone the attributes, then clone the children. + const TiXmlAttribute* attribute = 0; + for( attribute = attributeSet.First(); + attribute; + attribute = attribute->Next() ) + { + target->SetAttribute( attribute->Name(), attribute->Value() ); + } + + TiXmlNode* node = 0; + for ( node = firstChild; node; node = node->NextSibling() ) + { + target->LinkEndChild( node->Clone() ); + } +} + +bool TiXmlElement::Accept( TiXmlVisitor* visitor ) const +{ + if ( visitor->VisitEnter( *this, attributeSet.First() ) ) + { + for ( const TiXmlNode* node=FirstChild(); node; node=node->NextSibling() ) + { + if ( !node->Accept( visitor ) ) + break; + } + } + return visitor->VisitExit( *this ); +} + + +TiXmlNode* TiXmlElement::Clone() const +{ + TiXmlElement* clone = new TiXmlElement( Value() ); + if ( !clone ) + return 0; + + CopyTo( clone ); + return clone; +} + + +const char* TiXmlElement::GetText() const +{ + const TiXmlNode* child = this->FirstChild(); + if ( child ) { + const TiXmlText* childText = child->ToText(); + if ( childText ) { + return childText->Value(); + } + } + return 0; +} + + +TiXmlDocument::TiXmlDocument() : TiXmlNode( TiXmlNode::TINYXML_DOCUMENT ) +{ + tabsize = 4; + useMicrosoftBOM = false; + ClearError(); +} + +TiXmlDocument::TiXmlDocument( const char * documentName ) : TiXmlNode( TiXmlNode::TINYXML_DOCUMENT ) +{ + tabsize = 4; + useMicrosoftBOM = false; + value = documentName; + ClearError(); +} + + +#ifdef TIXML_USE_STL +TiXmlDocument::TiXmlDocument( const std::string& documentName ) : TiXmlNode( TiXmlNode::TINYXML_DOCUMENT ) +{ + tabsize = 4; + useMicrosoftBOM = false; + value = documentName; + ClearError(); +} +#endif + + +TiXmlDocument::TiXmlDocument( const TiXmlDocument& copy ) : TiXmlNode( TiXmlNode::TINYXML_DOCUMENT ) +{ + copy.CopyTo( this ); +} + + +void TiXmlDocument::operator=( const TiXmlDocument& copy ) +{ + Clear(); + copy.CopyTo( this ); +} + + +bool TiXmlDocument::LoadFile( TiXmlEncoding encoding ) +{ + return LoadFile( Value(), encoding ); +} + + +bool TiXmlDocument::SaveFile() const +{ + return SaveFile( Value() ); +} + +bool TiXmlDocument::LoadFile( const char* _filename, TiXmlEncoding encoding ) +{ + TIXML_STRING filename( _filename ); + value = filename; + + // reading in binary mode so that tinyxml can normalize the EOL + FILE* file = TiXmlFOpen( value.c_str (), "rb" ); + + if ( file ) + { + bool result = LoadFile( file, encoding ); + fclose( file ); + return result; + } + else + { + SetError( TIXML_ERROR_OPENING_FILE, 0, 0, TIXML_ENCODING_UNKNOWN ); + return false; + } +} + +bool TiXmlDocument::LoadFile( FILE* file, TiXmlEncoding encoding ) +{ + if ( !file ) + { + SetError( TIXML_ERROR_OPENING_FILE, 0, 0, TIXML_ENCODING_UNKNOWN ); + return false; + } + + // Delete the existing data: + Clear(); + location.Clear(); + + // Get the file size, so we can pre-allocate the string. HUGE speed impact. + long length = 0; + fseek( file, 0, SEEK_END ); + length = ftell( file ); + fseek( file, 0, SEEK_SET ); + + // Strange case, but good to handle up front. + if ( length <= 0 ) + { + SetError( TIXML_ERROR_DOCUMENT_EMPTY, 0, 0, TIXML_ENCODING_UNKNOWN ); + return false; + } + + // Subtle bug here. TinyXml did use fgets. But from the XML spec: + // 2.11 End-of-Line Handling + // + // + // ...the XML processor MUST behave as if it normalized all line breaks in external + // parsed entities (including the document entity) on input, before parsing, by translating + // both the two-character sequence #xD #xA and any #xD that is not followed by #xA to + // a single #xA character. + // + // + // It is not clear fgets does that, and certainly isn't clear it works cross platform. + // Generally, you expect fgets to translate from the convention of the OS to the c/unix + // convention, and not work generally. + + /* + while( fgets( buf, sizeof(buf), file ) ) + { + data += buf; + } + */ + + char* buf = new char[ length+1 ]; + buf[0] = 0; + + if ( fread( buf, length, 1, file ) != 1 ) { + delete [] buf; + SetError( TIXML_ERROR_OPENING_FILE, 0, 0, TIXML_ENCODING_UNKNOWN ); + return false; + } + + // Process the buffer in place to normalize new lines. (See comment above.) + // Copies from the 'p' to 'q' pointer, where p can advance faster if + // a newline-carriage return is hit. + // + // Wikipedia: + // Systems based on ASCII or a compatible character set use either LF (Line feed, '\n', 0x0A, 10 in decimal) or + // CR (Carriage return, '\r', 0x0D, 13 in decimal) individually, or CR followed by LF (CR+LF, 0x0D 0x0A)... + // * LF: Multics, Unix and Unix-like systems (GNU/Linux, AIX, Xenix, Mac OS X, FreeBSD, etc.), BeOS, Amiga, RISC OS, and others + // * CR+LF: DEC RT-11 and most other early non-Unix, non-IBM OSes, CP/M, MP/M, DOS, OS/2, Microsoft Windows, Symbian OS + // * CR: Commodore 8-bit machines, Apple II family, Mac OS up to version 9 and OS-9 + + const char* p = buf; // the read head + char* q = buf; // the write head + const char CR = 0x0d; + const char LF = 0x0a; + + buf[length] = 0; + while( *p ) { + assert( p < (buf+length) ); + assert( q <= (buf+length) ); + assert( q <= p ); + + if ( *p == CR ) { + *q++ = LF; + p++; + if ( *p == LF ) { // check for CR+LF (and skip LF) + p++; + } + } + else { + *q++ = *p++; + } + } + assert( q <= (buf+length) ); + *q = 0; + + Parse( buf, 0, encoding ); + + delete [] buf; + return !Error(); +} + + +bool TiXmlDocument::SaveFile( const char * filename ) const +{ + // The old c stuff lives on... + FILE* fp = TiXmlFOpen( filename, "w" ); + if ( fp ) + { + bool result = SaveFile( fp ); + fclose( fp ); + return result; + } + return false; +} + + +bool TiXmlDocument::SaveFile( FILE* fp ) const +{ + if ( useMicrosoftBOM ) + { + const unsigned char TIXML_UTF_LEAD_0 = 0xefU; + const unsigned char TIXML_UTF_LEAD_1 = 0xbbU; + const unsigned char TIXML_UTF_LEAD_2 = 0xbfU; + + fputc( TIXML_UTF_LEAD_0, fp ); + fputc( TIXML_UTF_LEAD_1, fp ); + fputc( TIXML_UTF_LEAD_2, fp ); + } + Print( fp, 0 ); + return (ferror(fp) == 0); +} + + +void TiXmlDocument::CopyTo( TiXmlDocument* target ) const +{ + TiXmlNode::CopyTo( target ); + + target->error = error; + target->errorId = errorId; + target->errorDesc = errorDesc; + target->tabsize = tabsize; + target->errorLocation = errorLocation; + target->useMicrosoftBOM = useMicrosoftBOM; + + TiXmlNode* node = 0; + for ( node = firstChild; node; node = node->NextSibling() ) + { + target->LinkEndChild( node->Clone() ); + } +} + + +TiXmlNode* TiXmlDocument::Clone() const +{ + TiXmlDocument* clone = new TiXmlDocument(); + if ( !clone ) + return 0; + + CopyTo( clone ); + return clone; +} + + +void TiXmlDocument::Print( FILE* cfile, int depth ) const +{ + assert( cfile ); + for ( const TiXmlNode* node=FirstChild(); node; node=node->NextSibling() ) + { + node->Print( cfile, depth ); + fprintf( cfile, "\n" ); + } +} + + +bool TiXmlDocument::Accept( TiXmlVisitor* visitor ) const +{ + if ( visitor->VisitEnter( *this ) ) + { + for ( const TiXmlNode* node=FirstChild(); node; node=node->NextSibling() ) + { + if ( !node->Accept( visitor ) ) + break; + } + } + return visitor->VisitExit( *this ); +} + + +const TiXmlAttribute* TiXmlAttribute::Next() const +{ + // We are using knowledge of the sentinel. The sentinel + // have a value or name. + if ( next->value.empty() && next->name.empty() ) + return 0; + return next; +} + +/* +TiXmlAttribute* TiXmlAttribute::Next() +{ + // We are using knowledge of the sentinel. The sentinel + // have a value or name. + if ( next->value.empty() && next->name.empty() ) + return 0; + return next; +} +*/ + +const TiXmlAttribute* TiXmlAttribute::Previous() const +{ + // We are using knowledge of the sentinel. The sentinel + // have a value or name. + if ( prev->value.empty() && prev->name.empty() ) + return 0; + return prev; +} + +/* +TiXmlAttribute* TiXmlAttribute::Previous() +{ + // We are using knowledge of the sentinel. The sentinel + // have a value or name. + if ( prev->value.empty() && prev->name.empty() ) + return 0; + return prev; +} +*/ + +void TiXmlAttribute::Print( FILE* cfile, int /*depth*/, TIXML_STRING* str ) const +{ + TIXML_STRING n, v; + + EncodeString( name, &n ); + EncodeString( value, &v ); + + if (value.find ('\"') == TIXML_STRING::npos) { + if ( cfile ) { + fprintf (cfile, "%s=\"%s\"", n.c_str(), v.c_str() ); + } + if ( str ) { + (*str) += n; (*str) += "=\""; (*str) += v; (*str) += "\""; + } + } + else { + if ( cfile ) { + fprintf (cfile, "%s='%s'", n.c_str(), v.c_str() ); + } + if ( str ) { + (*str) += n; (*str) += "='"; (*str) += v; (*str) += "'"; + } + } +} + + +int TiXmlAttribute::QueryIntValue( int* ival ) const +{ + if ( TIXML_SSCANF( value.c_str(), "%d", ival ) == 1 ) + return TIXML_SUCCESS; + return TIXML_WRONG_TYPE; +} + +int TiXmlAttribute::QueryDoubleValue( double* dval ) const +{ + if ( TIXML_SSCANF( value.c_str(), "%lf", dval ) == 1 ) + return TIXML_SUCCESS; + return TIXML_WRONG_TYPE; +} + +void TiXmlAttribute::SetIntValue( int _value ) +{ + char buf [64]; + #if defined(TIXML_SNPRINTF) + TIXML_SNPRINTF(buf, sizeof(buf), "%d", _value); + #else + sprintf (buf, "%d", _value); + #endif + SetValue (buf); +} + +void TiXmlAttribute::SetDoubleValue( double _value ) +{ + char buf [256]; + #if defined(TIXML_SNPRINTF) + TIXML_SNPRINTF( buf, sizeof(buf), "%g", _value); + #else + sprintf (buf, "%g", _value); + #endif + SetValue (buf); +} + +int TiXmlAttribute::IntValue() const +{ + return atoi (value.c_str ()); +} + +double TiXmlAttribute::DoubleValue() const +{ + return atof (value.c_str ()); +} + + +TiXmlComment::TiXmlComment( const TiXmlComment& copy ) : TiXmlNode( TiXmlNode::TINYXML_COMMENT ) +{ + copy.CopyTo( this ); +} + + +void TiXmlComment::operator=( const TiXmlComment& base ) +{ + Clear(); + base.CopyTo( this ); +} + + +void TiXmlComment::Print( FILE* cfile, int depth ) const +{ + assert( cfile ); + for ( int i=0; i", value.c_str() ); +} + + +void TiXmlComment::CopyTo( TiXmlComment* target ) const +{ + TiXmlNode::CopyTo( target ); +} + + +bool TiXmlComment::Accept( TiXmlVisitor* visitor ) const +{ + return visitor->Visit( *this ); +} + + +TiXmlNode* TiXmlComment::Clone() const +{ + TiXmlComment* clone = new TiXmlComment(); + + if ( !clone ) + return 0; + + CopyTo( clone ); + return clone; +} + + +void TiXmlText::Print( FILE* cfile, int depth ) const +{ + assert( cfile ); + if ( cdata ) + { + int i; + fprintf( cfile, "\n" ); + for ( i=0; i\n", value.c_str() ); // unformatted output + } + else + { + TIXML_STRING buffer; + EncodeString( value, &buffer ); + fprintf( cfile, "%s", buffer.c_str() ); + } +} + + +void TiXmlText::CopyTo( TiXmlText* target ) const +{ + TiXmlNode::CopyTo( target ); + target->cdata = cdata; +} + + +bool TiXmlText::Accept( TiXmlVisitor* visitor ) const +{ + return visitor->Visit( *this ); +} + + +TiXmlNode* TiXmlText::Clone() const +{ + TiXmlText* clone = 0; + clone = new TiXmlText( "" ); + + if ( !clone ) + return 0; + + CopyTo( clone ); + return clone; +} + + +TiXmlDeclaration::TiXmlDeclaration( const char * _version, + const char * _encoding, + const char * _standalone ) + : TiXmlNode( TiXmlNode::TINYXML_DECLARATION ) +{ + version = _version; + encoding = _encoding; + standalone = _standalone; +} + + +#ifdef TIXML_USE_STL +TiXmlDeclaration::TiXmlDeclaration( const std::string& _version, + const std::string& _encoding, + const std::string& _standalone ) + : TiXmlNode( TiXmlNode::TINYXML_DECLARATION ) +{ + version = _version; + encoding = _encoding; + standalone = _standalone; +} +#endif + + +TiXmlDeclaration::TiXmlDeclaration( const TiXmlDeclaration& copy ) + : TiXmlNode( TiXmlNode::TINYXML_DECLARATION ) +{ + copy.CopyTo( this ); +} + + +void TiXmlDeclaration::operator=( const TiXmlDeclaration& copy ) +{ + Clear(); + copy.CopyTo( this ); +} + + +void TiXmlDeclaration::Print( FILE* cfile, int /*depth*/, TIXML_STRING* str ) const +{ + if ( cfile ) fprintf( cfile, "" ); + if ( str ) (*str) += "?>"; +} + + +void TiXmlDeclaration::CopyTo( TiXmlDeclaration* target ) const +{ + TiXmlNode::CopyTo( target ); + + target->version = version; + target->encoding = encoding; + target->standalone = standalone; +} + + +bool TiXmlDeclaration::Accept( TiXmlVisitor* visitor ) const +{ + return visitor->Visit( *this ); +} + + +TiXmlNode* TiXmlDeclaration::Clone() const +{ + TiXmlDeclaration* clone = new TiXmlDeclaration(); + + if ( !clone ) + return 0; + + CopyTo( clone ); + return clone; +} + + +void TiXmlUnknown::Print( FILE* cfile, int depth ) const +{ + for ( int i=0; i", value.c_str() ); +} + + +void TiXmlUnknown::CopyTo( TiXmlUnknown* target ) const +{ + TiXmlNode::CopyTo( target ); +} + + +bool TiXmlUnknown::Accept( TiXmlVisitor* visitor ) const +{ + return visitor->Visit( *this ); +} + + +TiXmlNode* TiXmlUnknown::Clone() const +{ + TiXmlUnknown* clone = new TiXmlUnknown(); + + if ( !clone ) + return 0; + + CopyTo( clone ); + return clone; +} + + +TiXmlAttributeSet::TiXmlAttributeSet() +{ + sentinel.next = &sentinel; + sentinel.prev = &sentinel; +} + + +TiXmlAttributeSet::~TiXmlAttributeSet() +{ + assert( sentinel.next == &sentinel ); + assert( sentinel.prev == &sentinel ); +} + + +void TiXmlAttributeSet::Add( TiXmlAttribute* addMe ) +{ + #ifdef TIXML_USE_STL + assert( !Find( TIXML_STRING( addMe->Name() ) ) ); // Shouldn't be multiply adding to the set. + #else + assert( !Find( addMe->Name() ) ); // Shouldn't be multiply adding to the set. + #endif + + addMe->next = &sentinel; + addMe->prev = sentinel.prev; + + sentinel.prev->next = addMe; + sentinel.prev = addMe; +} + +void TiXmlAttributeSet::Remove( TiXmlAttribute* removeMe ) +{ + TiXmlAttribute* node; + + for( node = sentinel.next; node != &sentinel; node = node->next ) + { + if ( node == removeMe ) + { + node->prev->next = node->next; + node->next->prev = node->prev; + node->next = 0; + node->prev = 0; + return; + } + } + assert( 0 ); // we tried to remove a non-linked attribute. +} + + +#ifdef TIXML_USE_STL +TiXmlAttribute* TiXmlAttributeSet::Find( const std::string& name ) const +{ + for( TiXmlAttribute* node = sentinel.next; node != &sentinel; node = node->next ) + { + if ( node->name == name ) + return node; + } + return 0; +} + +TiXmlAttribute* TiXmlAttributeSet::FindOrCreate( const std::string& _name ) +{ + TiXmlAttribute* attrib = Find( _name ); + if ( !attrib ) { + attrib = new TiXmlAttribute(); + Add( attrib ); + attrib->SetName( _name ); + } + return attrib; +} +#endif + + +TiXmlAttribute* TiXmlAttributeSet::Find( const char* name ) const +{ + for( TiXmlAttribute* node = sentinel.next; node != &sentinel; node = node->next ) + { + if ( strcmp( node->name.c_str(), name ) == 0 ) + return node; + } + return 0; +} + + +TiXmlAttribute* TiXmlAttributeSet::FindOrCreate( const char* _name ) +{ + TiXmlAttribute* attrib = Find( _name ); + if ( !attrib ) { + attrib = new TiXmlAttribute(); + Add( attrib ); + attrib->SetName( _name ); + } + return attrib; +} + + +#ifdef TIXML_USE_STL +std::istream& operator>> (std::istream & in, TiXmlNode & base) +{ + TIXML_STRING tag; + tag.reserve( 8 * 1000 ); + base.StreamIn( &in, &tag ); + + base.Parse( tag.c_str(), 0, TIXML_DEFAULT_ENCODING ); + return in; +} +#endif + + +#ifdef TIXML_USE_STL +std::ostream& operator<< (std::ostream & out, const TiXmlNode & base) +{ + TiXmlPrinter printer; + printer.SetStreamPrinting(); + base.Accept( &printer ); + out << printer.Str(); + + return out; +} + + +std::string& operator<< (std::string& out, const TiXmlNode& base ) +{ + TiXmlPrinter printer; + printer.SetStreamPrinting(); + base.Accept( &printer ); + out.append( printer.Str() ); + + return out; +} +#endif + + +TiXmlHandle TiXmlHandle::FirstChild() const +{ + if ( node ) + { + TiXmlNode* child = node->FirstChild(); + if ( child ) + return TiXmlHandle( child ); + } + return TiXmlHandle( 0 ); +} + + +TiXmlHandle TiXmlHandle::FirstChild( const char * value ) const +{ + if ( node ) + { + TiXmlNode* child = node->FirstChild( value ); + if ( child ) + return TiXmlHandle( child ); + } + return TiXmlHandle( 0 ); +} + + +TiXmlHandle TiXmlHandle::FirstChildElement() const +{ + if ( node ) + { + TiXmlElement* child = node->FirstChildElement(); + if ( child ) + return TiXmlHandle( child ); + } + return TiXmlHandle( 0 ); +} + + +TiXmlHandle TiXmlHandle::FirstChildElement( const char * value ) const +{ + if ( node ) + { + TiXmlElement* child = node->FirstChildElement( value ); + if ( child ) + return TiXmlHandle( child ); + } + return TiXmlHandle( 0 ); +} + + +TiXmlHandle TiXmlHandle::Child( int count ) const +{ + if ( node ) + { + int i; + TiXmlNode* child = node->FirstChild(); + for ( i=0; + child && iNextSibling(), ++i ) + { + // nothing + } + if ( child ) + return TiXmlHandle( child ); + } + return TiXmlHandle( 0 ); +} + + +TiXmlHandle TiXmlHandle::Child( const char* value, int count ) const +{ + if ( node ) + { + int i; + TiXmlNode* child = node->FirstChild( value ); + for ( i=0; + child && iNextSibling( value ), ++i ) + { + // nothing + } + if ( child ) + return TiXmlHandle( child ); + } + return TiXmlHandle( 0 ); +} + + +TiXmlHandle TiXmlHandle::ChildElement( int count ) const +{ + if ( node ) + { + int i; + TiXmlElement* child = node->FirstChildElement(); + for ( i=0; + child && iNextSiblingElement(), ++i ) + { + // nothing + } + if ( child ) + return TiXmlHandle( child ); + } + return TiXmlHandle( 0 ); +} + + +TiXmlHandle TiXmlHandle::ChildElement( const char* value, int count ) const +{ + if ( node ) + { + int i; + TiXmlElement* child = node->FirstChildElement( value ); + for ( i=0; + child && iNextSiblingElement( value ), ++i ) + { + // nothing + } + if ( child ) + return TiXmlHandle( child ); + } + return TiXmlHandle( 0 ); +} + + +bool TiXmlPrinter::VisitEnter( const TiXmlDocument& ) +{ + return true; +} + +bool TiXmlPrinter::VisitExit( const TiXmlDocument& ) +{ + return true; +} + +bool TiXmlPrinter::VisitEnter( const TiXmlElement& element, const TiXmlAttribute* firstAttribute ) +{ + DoIndent(); + buffer += "<"; + buffer += element.Value(); + + for( const TiXmlAttribute* attrib = firstAttribute; attrib; attrib = attrib->Next() ) + { + buffer += " "; + attrib->Print( 0, 0, &buffer ); + } + + if ( !element.FirstChild() ) + { + buffer += " />"; + DoLineBreak(); + } + else + { + buffer += ">"; + if ( element.FirstChild()->ToText() + && element.LastChild() == element.FirstChild() + && element.FirstChild()->ToText()->CDATA() == false ) + { + simpleTextPrint = true; + // no DoLineBreak()! + } + else + { + DoLineBreak(); + } + } + ++depth; + return true; +} + + +bool TiXmlPrinter::VisitExit( const TiXmlElement& element ) +{ + --depth; + if ( !element.FirstChild() ) + { + // nothing. + } + else + { + if ( simpleTextPrint ) + { + simpleTextPrint = false; + } + else + { + DoIndent(); + } + buffer += ""; + DoLineBreak(); + } + return true; +} + + +bool TiXmlPrinter::Visit( const TiXmlText& text ) +{ + if ( text.CDATA() ) + { + DoIndent(); + buffer += ""; + DoLineBreak(); + } + else if ( simpleTextPrint ) + { + TIXML_STRING str; + TiXmlBase::EncodeString( text.ValueTStr(), &str ); + buffer += str; + } + else + { + DoIndent(); + TIXML_STRING str; + TiXmlBase::EncodeString( text.ValueTStr(), &str ); + buffer += str; + DoLineBreak(); + } + return true; +} + + +bool TiXmlPrinter::Visit( const TiXmlDeclaration& declaration ) +{ + DoIndent(); + declaration.Print( 0, 0, &buffer ); + DoLineBreak(); + return true; +} + + +bool TiXmlPrinter::Visit( const TiXmlComment& comment ) +{ + DoIndent(); + buffer += ""; + DoLineBreak(); + return true; +} + + +bool TiXmlPrinter::Visit( const TiXmlUnknown& unknown ) +{ + DoIndent(); + buffer += "<"; + buffer += unknown.Value(); + buffer += ">"; + DoLineBreak(); + return true; +} + diff --git a/Sources/tools/tinyXML/tinyxml.h b/Sources/tools/tinyXML/tinyxml.h new file mode 100644 index 0000000..0182291 --- /dev/null +++ b/Sources/tools/tinyXML/tinyxml.h @@ -0,0 +1,1799 @@ +/* +www.sourceforge.net/projects/tinyxml +Original code (2.0 and earlier )copyright (c) 2000-2006 Lee Thomason (www.grinninglizard.com) + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any +damages arising from the use of this software. + +Permission is granted to anyone to use this software for any +purpose, including commercial applications, and to alter it and +redistribute it freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must +not claim that you wrote the original software. If you use this +software in a product, an acknowledgment in the product documentation +would be appreciated but is not required. + +2. Altered source versions must be plainly marked as such, and +must not be misrepresented as being the original software. + +3. This notice may not be removed or altered from any source +distribution. +*/ + + +#ifndef TINYXML_INCLUDED +#define TINYXML_INCLUDED + +#ifdef _MSC_VER +#pragma warning( push ) +#pragma warning( disable : 4530 ) +#pragma warning( disable : 4786 ) +#endif + +#include +#include +#include +#include +#include + +// Help out windows: +#if defined( _DEBUG ) && !defined( DEBUG ) +#define DEBUG +#endif + +#ifdef TIXML_USE_STL + #include + #include + #include + #define TIXML_STRING std::string +#else + #include "tinystr.h" + #define TIXML_STRING TiXmlString +#endif + +// Deprecated library function hell. Compilers want to use the +// new safe versions. This probably doesn't fully address the problem, +// but it gets closer. There are too many compilers for me to fully +// test. If you get compilation troubles, undefine TIXML_SAFE +#define TIXML_SAFE + +#ifdef TIXML_SAFE + #if defined(_MSC_VER) && (_MSC_VER >= 1400 ) + // Microsoft visual studio, version 2005 and higher. + #define TIXML_SNPRINTF _snprintf_s + #define TIXML_SSCANF sscanf_s + #elif defined(_MSC_VER) && (_MSC_VER >= 1200 ) + // Microsoft visual studio, version 6 and higher. + //#pragma message( "Using _sn* functions." ) + #define TIXML_SNPRINTF _snprintf + #define TIXML_SSCANF sscanf + #elif defined(__GNUC__) && (__GNUC__ >= 3 ) + // GCC version 3 and higher.s + //#warning( "Using sn* functions." ) + #define TIXML_SNPRINTF snprintf + #define TIXML_SSCANF sscanf + #else + #define TIXML_SNPRINTF snprintf + #define TIXML_SSCANF sscanf + #endif +#endif + +class TiXmlDocument; +class TiXmlElement; +class TiXmlComment; +class TiXmlUnknown; +class TiXmlAttribute; +class TiXmlText; +class TiXmlDeclaration; +class TiXmlParsingData; + +const int TIXML_MAJOR_VERSION = 2; +const int TIXML_MINOR_VERSION = 6; +const int TIXML_PATCH_VERSION = 1; + +/* Internal structure for tracking location of items + in the XML file. +*/ +struct TiXmlCursor +{ + TiXmlCursor() { Clear(); } + void Clear() { row = col = -1; } + + int row; // 0 based. + int col; // 0 based. +}; + + +/** + Implements the interface to the "Visitor pattern" (see the Accept() method.) + If you call the Accept() method, it requires being passed a TiXmlVisitor + class to handle callbacks. For nodes that contain other nodes (Document, Element) + you will get called with a VisitEnter/VisitExit pair. Nodes that are always leaves + are simply called with Visit(). + + If you return 'true' from a Visit method, recursive parsing will continue. If you return + false, no children of this node or its sibilings will be Visited. + + All flavors of Visit methods have a default implementation that returns 'true' (continue + visiting). You need to only override methods that are interesting to you. + + Generally Accept() is called on the TiXmlDocument, although all nodes suppert Visiting. + + You should never change the document from a callback. + + @sa TiXmlNode::Accept() +*/ +class TiXmlVisitor +{ +public: + virtual ~TiXmlVisitor() {} + + /// Visit a document. + virtual bool VisitEnter( const TiXmlDocument& /*doc*/ ) { return true; } + /// Visit a document. + virtual bool VisitExit( const TiXmlDocument& /*doc*/ ) { return true; } + + /// Visit an element. + virtual bool VisitEnter( const TiXmlElement& /*element*/, const TiXmlAttribute* /*firstAttribute*/ ) { return true; } + /// Visit an element. + virtual bool VisitExit( const TiXmlElement& /*element*/ ) { return true; } + + /// Visit a declaration + virtual bool Visit( const TiXmlDeclaration& /*declaration*/ ) { return true; } + /// Visit a text node + virtual bool Visit( const TiXmlText& /*text*/ ) { return true; } + /// Visit a comment node + virtual bool Visit( const TiXmlComment& /*comment*/ ) { return true; } + /// Visit an unknow node + virtual bool Visit( const TiXmlUnknown& /*unknown*/ ) { return true; } +}; + +// Only used by Attribute::Query functions +enum +{ + TIXML_SUCCESS, + TIXML_NO_ATTRIBUTE, + TIXML_WRONG_TYPE +}; + + +// Used by the parsing routines. +enum TiXmlEncoding +{ + TIXML_ENCODING_UNKNOWN, + TIXML_ENCODING_UTF8, + TIXML_ENCODING_LEGACY +}; + +const TiXmlEncoding TIXML_DEFAULT_ENCODING = TIXML_ENCODING_UNKNOWN; + +/** TiXmlBase is a base class for every class in TinyXml. + It does little except to establish that TinyXml classes + can be printed and provide some utility functions. + + In XML, the document and elements can contain + other elements and other types of nodes. + + @verbatim + A Document can contain: Element (container or leaf) + Comment (leaf) + Unknown (leaf) + Declaration( leaf ) + + An Element can contain: Element (container or leaf) + Text (leaf) + Attributes (not on tree) + Comment (leaf) + Unknown (leaf) + + A Decleration contains: Attributes (not on tree) + @endverbatim +*/ +class TiXmlBase +{ + friend class TiXmlNode; + friend class TiXmlElement; + friend class TiXmlDocument; + +public: + TiXmlBase() : userData(0) {} + virtual ~TiXmlBase() {} + + /** All TinyXml classes can print themselves to a filestream + or the string class (TiXmlString in non-STL mode, std::string + in STL mode.) Either or both cfile and str can be null. + + This is a formatted print, and will insert + tabs and newlines. + + (For an unformatted stream, use the << operator.) + */ + virtual void Print( FILE* cfile, int depth ) const = 0; + + /** The world does not agree on whether white space should be kept or + not. In order to make everyone happy, these global, static functions + are provided to set whether or not TinyXml will condense all white space + into a single space or not. The default is to condense. Note changing this + value is not thread safe. + */ + static void SetCondenseWhiteSpace( bool condense ) { condenseWhiteSpace = condense; } + + /// Return the current white space setting. + static bool IsWhiteSpaceCondensed() { return condenseWhiteSpace; } + + /** Return the position, in the original source file, of this node or attribute. + The row and column are 1-based. (That is the first row and first column is + 1,1). If the returns values are 0 or less, then the parser does not have + a row and column value. + + Generally, the row and column value will be set when the TiXmlDocument::Load(), + TiXmlDocument::LoadFile(), or any TiXmlNode::Parse() is called. It will NOT be set + when the DOM was created from operator>>. + + The values reflect the initial load. Once the DOM is modified programmatically + (by adding or changing nodes and attributes) the new values will NOT update to + reflect changes in the document. + + There is a minor performance cost to computing the row and column. Computation + can be disabled if TiXmlDocument::SetTabSize() is called with 0 as the value. + + @sa TiXmlDocument::SetTabSize() + */ + int Row() const { return location.row + 1; } + int Column() const { return location.col + 1; } ///< See Row() + + void SetUserData( void* user ) { userData = user; } ///< Set a pointer to arbitrary user data. + void* GetUserData() { return userData; } ///< Get a pointer to arbitrary user data. + const void* GetUserData() const { return userData; } ///< Get a pointer to arbitrary user data. + + // Table that returs, for a given lead byte, the total number of bytes + // in the UTF-8 sequence. + static const int utf8ByteTable[256]; + + virtual const char* Parse( const char* p, + TiXmlParsingData* data, + TiXmlEncoding encoding /*= TIXML_ENCODING_UNKNOWN */ ) = 0; + + /** Expands entities in a string. Note this should not contian the tag's '<', '>', etc, + or they will be transformed into entities! + */ + static void EncodeString( const TIXML_STRING& str, TIXML_STRING* out ); + + enum + { + TIXML_NO_ERROR = 0, + TIXML_ERROR, + TIXML_ERROR_OPENING_FILE, + TIXML_ERROR_PARSING_ELEMENT, + TIXML_ERROR_FAILED_TO_READ_ELEMENT_NAME, + TIXML_ERROR_READING_ELEMENT_VALUE, + TIXML_ERROR_READING_ATTRIBUTES, + TIXML_ERROR_PARSING_EMPTY, + TIXML_ERROR_READING_END_TAG, + TIXML_ERROR_PARSING_UNKNOWN, + TIXML_ERROR_PARSING_COMMENT, + TIXML_ERROR_PARSING_DECLARATION, + TIXML_ERROR_DOCUMENT_EMPTY, + TIXML_ERROR_EMBEDDED_NULL, + TIXML_ERROR_PARSING_CDATA, + TIXML_ERROR_DOCUMENT_TOP_ONLY, + + TIXML_ERROR_STRING_COUNT + }; + +protected: + + static const char* SkipWhiteSpace( const char*, TiXmlEncoding encoding ); + + inline static bool IsWhiteSpace( char c ) + { + return ( isspace( (unsigned char) c ) || c == '\n' || c == '\r' ); + } + inline static bool IsWhiteSpace( int c ) + { + if ( c < 256 ) + return IsWhiteSpace( (char) c ); + return false; // Again, only truly correct for English/Latin...but usually works. + } + + #ifdef TIXML_USE_STL + static bool StreamWhiteSpace( std::istream * in, TIXML_STRING * tag ); + static bool StreamTo( std::istream * in, int character, TIXML_STRING * tag ); + #endif + + /* Reads an XML name into the string provided. Returns + a pointer just past the last character of the name, + or 0 if the function has an error. + */ + static const char* ReadName( const char* p, TIXML_STRING* name, TiXmlEncoding encoding ); + + /* Reads text. Returns a pointer past the given end tag. + Wickedly complex options, but it keeps the (sensitive) code in one place. + */ + static const char* ReadText( const char* in, // where to start + TIXML_STRING* text, // the string read + bool ignoreWhiteSpace, // whether to keep the white space + const char* endTag, // what ends this text + bool ignoreCase, // whether to ignore case in the end tag + TiXmlEncoding encoding ); // the current encoding + + // If an entity has been found, transform it into a character. + static const char* GetEntity( const char* in, char* value, int* length, TiXmlEncoding encoding ); + + // Get a character, while interpreting entities. + // The length can be from 0 to 4 bytes. + inline static const char* GetChar( const char* p, char* _value, int* length, TiXmlEncoding encoding ) + { + assert( p ); + if ( encoding == TIXML_ENCODING_UTF8 ) + { + *length = utf8ByteTable[ *((const unsigned char*)p) ]; + assert( *length >= 0 && *length < 5 ); + } + else + { + *length = 1; + } + + if ( *length == 1 ) + { + if ( *p == '&' ) + return GetEntity( p, _value, length, encoding ); + *_value = *p; + return p+1; + } + else if ( *length ) + { + //strncpy( _value, p, *length ); // lots of compilers don't like this function (unsafe), + // and the null terminator isn't needed + for( int i=0; p[i] && i<*length; ++i ) { + _value[i] = p[i]; + } + return p + (*length); + } + else + { + // Not valid text. + return 0; + } + } + + // Return true if the next characters in the stream are any of the endTag sequences. + // Ignore case only works for english, and should only be relied on when comparing + // to English words: StringEqual( p, "version", true ) is fine. + static bool StringEqual( const char* p, + const char* endTag, + bool ignoreCase, + TiXmlEncoding encoding ); + + static const char* errorString[ TIXML_ERROR_STRING_COUNT ]; + + TiXmlCursor location; + + /// Field containing a generic user pointer + void* userData; + + // None of these methods are reliable for any language except English. + // Good for approximation, not great for accuracy. + static int IsAlpha( unsigned char anyByte, TiXmlEncoding encoding ); + static int IsAlphaNum( unsigned char anyByte, TiXmlEncoding encoding ); + inline static int ToLower( int v, TiXmlEncoding encoding ) + { + if ( encoding == TIXML_ENCODING_UTF8 ) + { + if ( v < 128 ) return tolower( v ); + return v; + } + else + { + return tolower( v ); + } + } + static void ConvertUTF32ToUTF8( unsigned long input, char* output, int* length ); + +private: + TiXmlBase( const TiXmlBase& ); // not implemented. + void operator=( const TiXmlBase& base ); // not allowed. + + struct Entity + { + const char* str; + unsigned int strLength; + char chr; + }; + enum + { + NUM_ENTITY = 5, + MAX_ENTITY_LENGTH = 6 + + }; + static Entity entity[ NUM_ENTITY ]; + static bool condenseWhiteSpace; +}; + + +/** The parent class for everything in the Document Object Model. + (Except for attributes). + Nodes have siblings, a parent, and children. A node can be + in a document, or stand on its own. The type of a TiXmlNode + can be queried, and it can be cast to its more defined type. +*/ +class TiXmlNode : public TiXmlBase +{ + friend class TiXmlDocument; + friend class TiXmlElement; + +public: + #ifdef TIXML_USE_STL + + /** An input stream operator, for every class. Tolerant of newlines and + formatting, but doesn't expect them. + */ + friend std::istream& operator >> (std::istream& in, TiXmlNode& base); + + /** An output stream operator, for every class. Note that this outputs + without any newlines or formatting, as opposed to Print(), which + includes tabs and new lines. + + The operator<< and operator>> are not completely symmetric. Writing + a node to a stream is very well defined. You'll get a nice stream + of output, without any extra whitespace or newlines. + + But reading is not as well defined. (As it always is.) If you create + a TiXmlElement (for example) and read that from an input stream, + the text needs to define an element or junk will result. This is + true of all input streams, but it's worth keeping in mind. + + A TiXmlDocument will read nodes until it reads a root element, and + all the children of that root element. + */ + friend std::ostream& operator<< (std::ostream& out, const TiXmlNode& base); + + /// Appends the XML node or attribute to a std::string. + friend std::string& operator<< (std::string& out, const TiXmlNode& base ); + + #endif + + /** The types of XML nodes supported by TinyXml. (All the + unsupported types are picked up by UNKNOWN.) + */ + enum NodeType + { + TINYXML_DOCUMENT, + TINYXML_ELEMENT, + TINYXML_COMMENT, + TINYXML_UNKNOWN, + TINYXML_TEXT, + TINYXML_DECLARATION, + TINYXML_TYPECOUNT + }; + + virtual ~TiXmlNode(); + + /** The meaning of 'value' changes for the specific type of + TiXmlNode. + @verbatim + Document: filename of the xml file + Element: name of the element + Comment: the comment text + Unknown: the tag contents + Text: the text string + @endverbatim + + The subclasses will wrap this function. + */ + const char *Value() const { return value.c_str (); } + + #ifdef TIXML_USE_STL + /** Return Value() as a std::string. If you only use STL, + this is more efficient than calling Value(). + Only available in STL mode. + */ + const std::string& ValueStr() const { return value; } + #endif + + const TIXML_STRING& ValueTStr() const { return value; } + + /** Changes the value of the node. Defined as: + @verbatim + Document: filename of the xml file + Element: name of the element + Comment: the comment text + Unknown: the tag contents + Text: the text string + @endverbatim + */ + void SetValue(const char * _value) { value = _value;} + + #ifdef TIXML_USE_STL + /// STL std::string form. + void SetValue( const std::string& _value ) { value = _value; } + #endif + + /// Delete all the children of this node. Does not affect 'this'. + void Clear(); + + /// One step up the DOM. + TiXmlNode* Parent() { return parent; } + const TiXmlNode* Parent() const { return parent; } + + const TiXmlNode* FirstChild() const { return firstChild; } ///< The first child of this node. Will be null if there are no children. + TiXmlNode* FirstChild() { return firstChild; } + const TiXmlNode* FirstChild( const char * value ) const; ///< The first child of this node with the matching 'value'. Will be null if none found. + /// The first child of this node with the matching 'value'. Will be null if none found. + TiXmlNode* FirstChild( const char * _value ) { + // Call through to the const version - safe since nothing is changed. Exiting syntax: cast this to a const (always safe) + // call the method, cast the return back to non-const. + return const_cast< TiXmlNode* > ((const_cast< const TiXmlNode* >(this))->FirstChild( _value )); + } + const TiXmlNode* LastChild() const { return lastChild; } /// The last child of this node. Will be null if there are no children. + TiXmlNode* LastChild() { return lastChild; } + + const TiXmlNode* LastChild( const char * value ) const; /// The last child of this node matching 'value'. Will be null if there are no children. + TiXmlNode* LastChild( const char * _value ) { + return const_cast< TiXmlNode* > ((const_cast< const TiXmlNode* >(this))->LastChild( _value )); + } + + #ifdef TIXML_USE_STL + const TiXmlNode* FirstChild( const std::string& _value ) const { return FirstChild (_value.c_str ()); } ///< STL std::string form. + TiXmlNode* FirstChild( const std::string& _value ) { return FirstChild (_value.c_str ()); } ///< STL std::string form. + const TiXmlNode* LastChild( const std::string& _value ) const { return LastChild (_value.c_str ()); } ///< STL std::string form. + TiXmlNode* LastChild( const std::string& _value ) { return LastChild (_value.c_str ()); } ///< STL std::string form. + #endif + + /** An alternate way to walk the children of a node. + One way to iterate over nodes is: + @verbatim + for( child = parent->FirstChild(); child; child = child->NextSibling() ) + @endverbatim + + IterateChildren does the same thing with the syntax: + @verbatim + child = 0; + while( child = parent->IterateChildren( child ) ) + @endverbatim + + IterateChildren takes the previous child as input and finds + the next one. If the previous child is null, it returns the + first. IterateChildren will return null when done. + */ + const TiXmlNode* IterateChildren( const TiXmlNode* previous ) const; + TiXmlNode* IterateChildren( const TiXmlNode* previous ) { + return const_cast< TiXmlNode* >( (const_cast< const TiXmlNode* >(this))->IterateChildren( previous ) ); + } + + /// This flavor of IterateChildren searches for children with a particular 'value' + const TiXmlNode* IterateChildren( const char * value, const TiXmlNode* previous ) const; + TiXmlNode* IterateChildren( const char * _value, const TiXmlNode* previous ) { + return const_cast< TiXmlNode* >( (const_cast< const TiXmlNode* >(this))->IterateChildren( _value, previous ) ); + } + + #ifdef TIXML_USE_STL + const TiXmlNode* IterateChildren( const std::string& _value, const TiXmlNode* previous ) const { return IterateChildren (_value.c_str (), previous); } ///< STL std::string form. + TiXmlNode* IterateChildren( const std::string& _value, const TiXmlNode* previous ) { return IterateChildren (_value.c_str (), previous); } ///< STL std::string form. + #endif + + /** Add a new node related to this. Adds a child past the LastChild. + Returns a pointer to the new object or NULL if an error occured. + */ + TiXmlNode* InsertEndChild( const TiXmlNode& addThis ); + + + /** Add a new node related to this. Adds a child past the LastChild. + + NOTE: the node to be added is passed by pointer, and will be + henceforth owned (and deleted) by tinyXml. This method is efficient + and avoids an extra copy, but should be used with care as it + uses a different memory model than the other insert functions. + + @sa InsertEndChild + */ + TiXmlNode* LinkEndChild( TiXmlNode* addThis ); + + /** Add a new node related to this. Adds a child before the specified child. + Returns a pointer to the new object or NULL if an error occured. + */ + TiXmlNode* InsertBeforeChild( TiXmlNode* beforeThis, const TiXmlNode& addThis ); + + /** Add a new node related to this. Adds a child after the specified child. + Returns a pointer to the new object or NULL if an error occured. + */ + TiXmlNode* InsertAfterChild( TiXmlNode* afterThis, const TiXmlNode& addThis ); + + /** Replace a child of this node. + Returns a pointer to the new object or NULL if an error occured. + */ + TiXmlNode* ReplaceChild( TiXmlNode* replaceThis, const TiXmlNode& withThis ); + + /// Delete a child of this node. + bool RemoveChild( TiXmlNode* removeThis ); + + /// Navigate to a sibling node. + const TiXmlNode* PreviousSibling() const { return prev; } + TiXmlNode* PreviousSibling() { return prev; } + + /// Navigate to a sibling node. + const TiXmlNode* PreviousSibling( const char * ) const; + TiXmlNode* PreviousSibling( const char *_prev ) { + return const_cast< TiXmlNode* >( (const_cast< const TiXmlNode* >(this))->PreviousSibling( _prev ) ); + } + + #ifdef TIXML_USE_STL + const TiXmlNode* PreviousSibling( const std::string& _value ) const { return PreviousSibling (_value.c_str ()); } ///< STL std::string form. + TiXmlNode* PreviousSibling( const std::string& _value ) { return PreviousSibling (_value.c_str ()); } ///< STL std::string form. + const TiXmlNode* NextSibling( const std::string& _value) const { return NextSibling (_value.c_str ()); } ///< STL std::string form. + TiXmlNode* NextSibling( const std::string& _value) { return NextSibling (_value.c_str ()); } ///< STL std::string form. + #endif + + /// Navigate to a sibling node. + const TiXmlNode* NextSibling() const { return next; } + TiXmlNode* NextSibling() { return next; } + + /// Navigate to a sibling node with the given 'value'. + const TiXmlNode* NextSibling( const char * ) const; + TiXmlNode* NextSibling( const char* _next ) { + return const_cast< TiXmlNode* >( (const_cast< const TiXmlNode* >(this))->NextSibling( _next ) ); + } + + /** Convenience function to get through elements. + Calls NextSibling and ToElement. Will skip all non-Element + nodes. Returns 0 if there is not another element. + */ + const TiXmlElement* NextSiblingElement() const; + TiXmlElement* NextSiblingElement() { + return const_cast< TiXmlElement* >( (const_cast< const TiXmlNode* >(this))->NextSiblingElement() ); + } + + /** Convenience function to get through elements. + Calls NextSibling and ToElement. Will skip all non-Element + nodes. Returns 0 if there is not another element. + */ + const TiXmlElement* NextSiblingElement( const char * ) const; + TiXmlElement* NextSiblingElement( const char *_next ) { + return const_cast< TiXmlElement* >( (const_cast< const TiXmlNode* >(this))->NextSiblingElement( _next ) ); + } + + #ifdef TIXML_USE_STL + const TiXmlElement* NextSiblingElement( const std::string& _value) const { return NextSiblingElement (_value.c_str ()); } ///< STL std::string form. + TiXmlElement* NextSiblingElement( const std::string& _value) { return NextSiblingElement (_value.c_str ()); } ///< STL std::string form. + #endif + + /// Convenience function to get through elements. + const TiXmlElement* FirstChildElement() const; + TiXmlElement* FirstChildElement() { + return const_cast< TiXmlElement* >( (const_cast< const TiXmlNode* >(this))->FirstChildElement() ); + } + + /// Convenience function to get through elements. + const TiXmlElement* FirstChildElement( const char * _value ) const; + TiXmlElement* FirstChildElement( const char * _value ) { + return const_cast< TiXmlElement* >( (const_cast< const TiXmlNode* >(this))->FirstChildElement( _value ) ); + } + + #ifdef TIXML_USE_STL + const TiXmlElement* FirstChildElement( const std::string& _value ) const { return FirstChildElement (_value.c_str ()); } ///< STL std::string form. + TiXmlElement* FirstChildElement( const std::string& _value ) { return FirstChildElement (_value.c_str ()); } ///< STL std::string form. + #endif + + /** Query the type (as an enumerated value, above) of this node. + The possible types are: DOCUMENT, ELEMENT, COMMENT, + UNKNOWN, TEXT, and DECLARATION. + */ + int Type() const { return type; } + + /** Return a pointer to the Document this node lives in. + Returns null if not in a document. + */ + const TiXmlDocument* GetDocument() const; + TiXmlDocument* GetDocument() { + return const_cast< TiXmlDocument* >( (const_cast< const TiXmlNode* >(this))->GetDocument() ); + } + + /// Returns true if this node has no children. + bool NoChildren() const { return !firstChild; } + + virtual const TiXmlDocument* ToDocument() const { return 0; } ///< Cast to a more defined type. Will return null if not of the requested type. + virtual const TiXmlElement* ToElement() const { return 0; } ///< Cast to a more defined type. Will return null if not of the requested type. + virtual const TiXmlComment* ToComment() const { return 0; } ///< Cast to a more defined type. Will return null if not of the requested type. + virtual const TiXmlUnknown* ToUnknown() const { return 0; } ///< Cast to a more defined type. Will return null if not of the requested type. + virtual const TiXmlText* ToText() const { return 0; } ///< Cast to a more defined type. Will return null if not of the requested type. + virtual const TiXmlDeclaration* ToDeclaration() const { return 0; } ///< Cast to a more defined type. Will return null if not of the requested type. + + virtual TiXmlDocument* ToDocument() { return 0; } ///< Cast to a more defined type. Will return null if not of the requested type. + virtual TiXmlElement* ToElement() { return 0; } ///< Cast to a more defined type. Will return null if not of the requested type. + virtual TiXmlComment* ToComment() { return 0; } ///< Cast to a more defined type. Will return null if not of the requested type. + virtual TiXmlUnknown* ToUnknown() { return 0; } ///< Cast to a more defined type. Will return null if not of the requested type. + virtual TiXmlText* ToText() { return 0; } ///< Cast to a more defined type. Will return null if not of the requested type. + virtual TiXmlDeclaration* ToDeclaration() { return 0; } ///< Cast to a more defined type. Will return null if not of the requested type. + + /** Create an exact duplicate of this node and return it. The memory must be deleted + by the caller. + */ + virtual TiXmlNode* Clone() const = 0; + + /** Accept a hierchical visit the nodes in the TinyXML DOM. Every node in the + XML tree will be conditionally visited and the host will be called back + via the TiXmlVisitor interface. + + This is essentially a SAX interface for TinyXML. (Note however it doesn't re-parse + the XML for the callbacks, so the performance of TinyXML is unchanged by using this + interface versus any other.) + + The interface has been based on ideas from: + + - http://www.saxproject.org/ + - http://c2.com/cgi/wiki?HierarchicalVisitorPattern + + Which are both good references for "visiting". + + An example of using Accept(): + @verbatim + TiXmlPrinter printer; + tinyxmlDoc.Accept( &printer ); + const char* xmlcstr = printer.CStr(); + @endverbatim + */ + virtual bool Accept( TiXmlVisitor* visitor ) const = 0; + +protected: + TiXmlNode( NodeType _type ); + + // Copy to the allocated object. Shared functionality between Clone, Copy constructor, + // and the assignment operator. + void CopyTo( TiXmlNode* target ) const; + + #ifdef TIXML_USE_STL + // The real work of the input operator. + virtual void StreamIn( std::istream* in, TIXML_STRING* tag ) = 0; + #endif + + // Figure out what is at *p, and parse it. Returns null if it is not an xml node. + TiXmlNode* Identify( const char* start, TiXmlEncoding encoding ); + + TiXmlNode* parent; + NodeType type; + + TiXmlNode* firstChild; + TiXmlNode* lastChild; + + TIXML_STRING value; + + TiXmlNode* prev; + TiXmlNode* next; + +private: + TiXmlNode( const TiXmlNode& ); // not implemented. + void operator=( const TiXmlNode& base ); // not allowed. +}; + + +/** An attribute is a name-value pair. Elements have an arbitrary + number of attributes, each with a unique name. + + @note The attributes are not TiXmlNodes, since they are not + part of the tinyXML document object model. There are other + suggested ways to look at this problem. +*/ +class TiXmlAttribute : public TiXmlBase +{ + friend class TiXmlAttributeSet; + +public: + /// Construct an empty attribute. + TiXmlAttribute() : TiXmlBase() + { + document = 0; + prev = next = 0; + } + + #ifdef TIXML_USE_STL + /// std::string constructor. + TiXmlAttribute( const std::string& _name, const std::string& _value ) + { + name = _name; + value = _value; + document = 0; + prev = next = 0; + } + #endif + + /// Construct an attribute with a name and value. + TiXmlAttribute( const char * _name, const char * _value ) + { + name = _name; + value = _value; + document = 0; + prev = next = 0; + } + + const char* Name() const { return name.c_str(); } ///< Return the name of this attribute. + const char* Value() const { return value.c_str(); } ///< Return the value of this attribute. + #ifdef TIXML_USE_STL + const std::string& ValueStr() const { return value; } ///< Return the value of this attribute. + #endif + int IntValue() const; ///< Return the value of this attribute, converted to an integer. + double DoubleValue() const; ///< Return the value of this attribute, converted to a double. + + // Get the tinyxml string representation + const TIXML_STRING& NameTStr() const { return name; } + + /** QueryIntValue examines the value string. It is an alternative to the + IntValue() method with richer error checking. + If the value is an integer, it is stored in 'value' and + the call returns TIXML_SUCCESS. If it is not + an integer, it returns TIXML_WRONG_TYPE. + + A specialized but useful call. Note that for success it returns 0, + which is the opposite of almost all other TinyXml calls. + */ + int QueryIntValue( int* _value ) const; + /// QueryDoubleValue examines the value string. See QueryIntValue(). + int QueryDoubleValue( double* _value ) const; + + void SetName( const char* _name ) { name = _name; } ///< Set the name of this attribute. + void SetValue( const char* _value ) { value = _value; } ///< Set the value. + + void SetIntValue( int _value ); ///< Set the value from an integer. + void SetDoubleValue( double _value ); ///< Set the value from a double. + + #ifdef TIXML_USE_STL + /// STL std::string form. + void SetName( const std::string& _name ) { name = _name; } + /// STL std::string form. + void SetValue( const std::string& _value ) { value = _value; } + #endif + + /// Get the next sibling attribute in the DOM. Returns null at end. + const TiXmlAttribute* Next() const; + TiXmlAttribute* Next() { + return const_cast< TiXmlAttribute* >( (const_cast< const TiXmlAttribute* >(this))->Next() ); + } + + /// Get the previous sibling attribute in the DOM. Returns null at beginning. + const TiXmlAttribute* Previous() const; + TiXmlAttribute* Previous() { + return const_cast< TiXmlAttribute* >( (const_cast< const TiXmlAttribute* >(this))->Previous() ); + } + + bool operator==( const TiXmlAttribute& rhs ) const { return rhs.name == name; } + bool operator<( const TiXmlAttribute& rhs ) const { return name < rhs.name; } + bool operator>( const TiXmlAttribute& rhs ) const { return name > rhs.name; } + + /* Attribute parsing starts: first letter of the name + returns: the next char after the value end quote + */ + virtual const char* Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding ); + + // Prints this Attribute to a FILE stream. + virtual void Print( FILE* cfile, int depth ) const { + Print( cfile, depth, 0 ); + } + void Print( FILE* cfile, int depth, TIXML_STRING* str ) const; + + // [internal use] + // Set the document pointer so the attribute can report errors. + void SetDocument( TiXmlDocument* doc ) { document = doc; } + +private: + TiXmlAttribute( const TiXmlAttribute& ); // not implemented. + void operator=( const TiXmlAttribute& base ); // not allowed. + + TiXmlDocument* document; // A pointer back to a document, for error reporting. + TIXML_STRING name; + TIXML_STRING value; + TiXmlAttribute* prev; + TiXmlAttribute* next; +}; + + +/* A class used to manage a group of attributes. + It is only used internally, both by the ELEMENT and the DECLARATION. + + The set can be changed transparent to the Element and Declaration + classes that use it, but NOT transparent to the Attribute + which has to implement a next() and previous() method. Which makes + it a bit problematic and prevents the use of STL. + + This version is implemented with circular lists because: + - I like circular lists + - it demonstrates some independence from the (typical) doubly linked list. +*/ +class TiXmlAttributeSet +{ +public: + TiXmlAttributeSet(); + ~TiXmlAttributeSet(); + + void Add( TiXmlAttribute* attribute ); + void Remove( TiXmlAttribute* attribute ); + + const TiXmlAttribute* First() const { return ( sentinel.next == &sentinel ) ? 0 : sentinel.next; } + TiXmlAttribute* First() { return ( sentinel.next == &sentinel ) ? 0 : sentinel.next; } + const TiXmlAttribute* Last() const { return ( sentinel.prev == &sentinel ) ? 0 : sentinel.prev; } + TiXmlAttribute* Last() { return ( sentinel.prev == &sentinel ) ? 0 : sentinel.prev; } + + TiXmlAttribute* Find( const char* _name ) const; + TiXmlAttribute* FindOrCreate( const char* _name ); + +# ifdef TIXML_USE_STL + TiXmlAttribute* Find( const std::string& _name ) const; + TiXmlAttribute* FindOrCreate( const std::string& _name ); +# endif + + +private: + //*ME: Because of hidden/disabled copy-construktor in TiXmlAttribute (sentinel-element), + //*ME: this class must be also use a hidden/disabled copy-constructor !!! + TiXmlAttributeSet( const TiXmlAttributeSet& ); // not allowed + void operator=( const TiXmlAttributeSet& ); // not allowed (as TiXmlAttribute) + + TiXmlAttribute sentinel; +}; + + +/** The element is a container class. It has a value, the element name, + and can contain other elements, text, comments, and unknowns. + Elements also contain an arbitrary number of attributes. +*/ +class TiXmlElement : public TiXmlNode +{ +public: + /// Construct an element. + TiXmlElement (const char * in_value); + + #ifdef TIXML_USE_STL + /// std::string constructor. + TiXmlElement( const std::string& _value ); + #endif + + TiXmlElement( const TiXmlElement& ); + + void operator=( const TiXmlElement& base ); + + virtual ~TiXmlElement(); + + /** Given an attribute name, Attribute() returns the value + for the attribute of that name, or null if none exists. + */ + const char* Attribute( const char* name ) const; + + /** Given an attribute name, Attribute() returns the value + for the attribute of that name, or null if none exists. + If the attribute exists and can be converted to an integer, + the integer value will be put in the return 'i', if 'i' + is non-null. + */ + const char* Attribute( const char* name, int* i ) const; + + /** Given an attribute name, Attribute() returns the value + for the attribute of that name, or null if none exists. + If the attribute exists and can be converted to an double, + the double value will be put in the return 'd', if 'd' + is non-null. + */ + const char* Attribute( const char* name, double* d ) const; + + /** QueryIntAttribute examines the attribute - it is an alternative to the + Attribute() method with richer error checking. + If the attribute is an integer, it is stored in 'value' and + the call returns TIXML_SUCCESS. If it is not + an integer, it returns TIXML_WRONG_TYPE. If the attribute + does not exist, then TIXML_NO_ATTRIBUTE is returned. + */ + int QueryIntAttribute( const char* name, int* _value ) const; + /// QueryDoubleAttribute examines the attribute - see QueryIntAttribute(). + int QueryDoubleAttribute( const char* name, double* _value ) const; + /// QueryFloatAttribute examines the attribute - see QueryIntAttribute(). + int QueryFloatAttribute( const char* name, float* _value ) const { + double d; + int result = QueryDoubleAttribute( name, &d ); + if ( result == TIXML_SUCCESS ) { + *_value = (float)d; + } + return result; + } + + #ifdef TIXML_USE_STL + /// QueryStringAttribute examines the attribute - see QueryIntAttribute(). + int QueryStringAttribute( const char* name, std::string* _value ) const { + const char* cstr = Attribute( name ); + if ( cstr ) { + *_value = std::string( cstr ); + return TIXML_SUCCESS; + } + return TIXML_NO_ATTRIBUTE; + } + + /** Template form of the attribute query which will try to read the + attribute into the specified type. Very easy, very powerful, but + be careful to make sure to call this with the correct type. + + NOTE: This method doesn't work correctly for 'string' types that contain spaces. + + @return TIXML_SUCCESS, TIXML_WRONG_TYPE, or TIXML_NO_ATTRIBUTE + */ + template< typename T > int QueryValueAttribute( const std::string& name, T* outValue ) const + { + const TiXmlAttribute* node = attributeSet.Find( name ); + if ( !node ) + return TIXML_NO_ATTRIBUTE; + + std::stringstream sstream( node->ValueStr() ); + sstream >> *outValue; + if ( !sstream.fail() ) + return TIXML_SUCCESS; + return TIXML_WRONG_TYPE; + } + + int QueryValueAttribute( const std::string& name, std::string* outValue ) const + { + const TiXmlAttribute* node = attributeSet.Find( name ); + if ( !node ) + return TIXML_NO_ATTRIBUTE; + *outValue = node->ValueStr(); + return TIXML_SUCCESS; + } + #endif + + /** Sets an attribute of name to a given value. The attribute + will be created if it does not exist, or changed if it does. + */ + void SetAttribute( const char* name, const char * _value ); + + #ifdef TIXML_USE_STL + const std::string* Attribute( const std::string& name ) const; + const std::string* Attribute( const std::string& name, int* i ) const; + const std::string* Attribute( const std::string& name, double* d ) const; + int QueryIntAttribute( const std::string& name, int* _value ) const; + int QueryDoubleAttribute( const std::string& name, double* _value ) const; + + /// STL std::string form. + void SetAttribute( const std::string& name, const std::string& _value ); + ///< STL std::string form. + void SetAttribute( const std::string& name, int _value ); + ///< STL std::string form. + void SetDoubleAttribute( const std::string& name, double value ); + #endif + + /** Sets an attribute of name to a given value. The attribute + will be created if it does not exist, or changed if it does. + */ + void SetAttribute( const char * name, int value ); + + /** Sets an attribute of name to a given value. The attribute + will be created if it does not exist, or changed if it does. + */ + void SetDoubleAttribute( const char * name, double value ); + + /** Deletes an attribute with the given name. + */ + void RemoveAttribute( const char * name ); + #ifdef TIXML_USE_STL + void RemoveAttribute( const std::string& name ) { RemoveAttribute (name.c_str ()); } ///< STL std::string form. + #endif + + const TiXmlAttribute* FirstAttribute() const { return attributeSet.First(); } ///< Access the first attribute in this element. + TiXmlAttribute* FirstAttribute() { return attributeSet.First(); } + const TiXmlAttribute* LastAttribute() const { return attributeSet.Last(); } ///< Access the last attribute in this element. + TiXmlAttribute* LastAttribute() { return attributeSet.Last(); } + + /** Convenience function for easy access to the text inside an element. Although easy + and concise, GetText() is limited compared to getting the TiXmlText child + and accessing it directly. + + If the first child of 'this' is a TiXmlText, the GetText() + returns the character string of the Text node, else null is returned. + + This is a convenient method for getting the text of simple contained text: + @verbatim + This is text + const char* str = fooElement->GetText(); + @endverbatim + + 'str' will be a pointer to "This is text". + + Note that this function can be misleading. If the element foo was created from + this XML: + @verbatim + This is text + @endverbatim + + then the value of str would be null. The first child node isn't a text node, it is + another element. From this XML: + @verbatim + This is text + @endverbatim + GetText() will return "This is ". + + WARNING: GetText() accesses a child node - don't become confused with the + similarly named TiXmlHandle::Text() and TiXmlNode::ToText() which are + safe type casts on the referenced node. + */ + const char* GetText() const; + + /// Creates a new Element and returns it - the returned element is a copy. + virtual TiXmlNode* Clone() const; + // Print the Element to a FILE stream. + virtual void Print( FILE* cfile, int depth ) const; + + /* Attribtue parsing starts: next char past '<' + returns: next char past '>' + */ + virtual const char* Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding ); + + virtual const TiXmlElement* ToElement() const { return this; } ///< Cast to a more defined type. Will return null not of the requested type. + virtual TiXmlElement* ToElement() { return this; } ///< Cast to a more defined type. Will return null not of the requested type. + + /** Walk the XML tree visiting this node and all of its children. + */ + virtual bool Accept( TiXmlVisitor* visitor ) const; + +protected: + + void CopyTo( TiXmlElement* target ) const; + void ClearThis(); // like clear, but initializes 'this' object as well + + // Used to be public [internal use] + #ifdef TIXML_USE_STL + virtual void StreamIn( std::istream * in, TIXML_STRING * tag ); + #endif + /* [internal use] + Reads the "value" of the element -- another element, or text. + This should terminate with the current end tag. + */ + const char* ReadValue( const char* in, TiXmlParsingData* prevData, TiXmlEncoding encoding ); + +private: + TiXmlAttributeSet attributeSet; +}; + + +/** An XML comment. +*/ +class TiXmlComment : public TiXmlNode +{ +public: + /// Constructs an empty comment. + TiXmlComment() : TiXmlNode( TiXmlNode::TINYXML_COMMENT ) {} + /// Construct a comment from text. + TiXmlComment( const char* _value ) : TiXmlNode( TiXmlNode::TINYXML_COMMENT ) { + SetValue( _value ); + } + TiXmlComment( const TiXmlComment& ); + void operator=( const TiXmlComment& base ); + + virtual ~TiXmlComment() {} + + /// Returns a copy of this Comment. + virtual TiXmlNode* Clone() const; + // Write this Comment to a FILE stream. + virtual void Print( FILE* cfile, int depth ) const; + + /* Attribtue parsing starts: at the ! of the !-- + returns: next char past '>' + */ + virtual const char* Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding ); + + virtual const TiXmlComment* ToComment() const { return this; } ///< Cast to a more defined type. Will return null not of the requested type. + virtual TiXmlComment* ToComment() { return this; } ///< Cast to a more defined type. Will return null not of the requested type. + + /** Walk the XML tree visiting this node and all of its children. + */ + virtual bool Accept( TiXmlVisitor* visitor ) const; + +protected: + void CopyTo( TiXmlComment* target ) const; + + // used to be public + #ifdef TIXML_USE_STL + virtual void StreamIn( std::istream * in, TIXML_STRING * tag ); + #endif +// virtual void StreamOut( TIXML_OSTREAM * out ) const; + +private: + +}; + + +/** XML text. A text node can have 2 ways to output the next. "normal" output + and CDATA. It will default to the mode it was parsed from the XML file and + you generally want to leave it alone, but you can change the output mode with + SetCDATA() and query it with CDATA(). +*/ +class TiXmlText : public TiXmlNode +{ + friend class TiXmlElement; +public: + /** Constructor for text element. By default, it is treated as + normal, encoded text. If you want it be output as a CDATA text + element, set the parameter _cdata to 'true' + */ + TiXmlText (const char * initValue ) : TiXmlNode (TiXmlNode::TINYXML_TEXT) + { + SetValue( initValue ); + cdata = false; + } + virtual ~TiXmlText() {} + + #ifdef TIXML_USE_STL + /// Constructor. + TiXmlText( const std::string& initValue ) : TiXmlNode (TiXmlNode::TINYXML_TEXT) + { + SetValue( initValue ); + cdata = false; + } + #endif + + TiXmlText( const TiXmlText& copy ) : TiXmlNode( TiXmlNode::TINYXML_TEXT ) { copy.CopyTo( this ); } + void operator=( const TiXmlText& base ) { base.CopyTo( this ); } + + // Write this text object to a FILE stream. + virtual void Print( FILE* cfile, int depth ) const; + + /// Queries whether this represents text using a CDATA section. + bool CDATA() const { return cdata; } + /// Turns on or off a CDATA representation of text. + void SetCDATA( bool _cdata ) { cdata = _cdata; } + + virtual const char* Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding ); + + virtual const TiXmlText* ToText() const { return this; } ///< Cast to a more defined type. Will return null not of the requested type. + virtual TiXmlText* ToText() { return this; } ///< Cast to a more defined type. Will return null not of the requested type. + + /** Walk the XML tree visiting this node and all of its children. + */ + virtual bool Accept( TiXmlVisitor* content ) const; + +protected : + /// [internal use] Creates a new Element and returns it. + virtual TiXmlNode* Clone() const; + void CopyTo( TiXmlText* target ) const; + + bool Blank() const; // returns true if all white space and new lines + // [internal use] + #ifdef TIXML_USE_STL + virtual void StreamIn( std::istream * in, TIXML_STRING * tag ); + #endif + +private: + bool cdata; // true if this should be input and output as a CDATA style text element +}; + + +/** In correct XML the declaration is the first entry in the file. + @verbatim + + @endverbatim + + TinyXml will happily read or write files without a declaration, + however. There are 3 possible attributes to the declaration: + version, encoding, and standalone. + + Note: In this version of the code, the attributes are + handled as special cases, not generic attributes, simply + because there can only be at most 3 and they are always the same. +*/ +class TiXmlDeclaration : public TiXmlNode +{ +public: + /// Construct an empty declaration. + TiXmlDeclaration() : TiXmlNode( TiXmlNode::TINYXML_DECLARATION ) {} + +#ifdef TIXML_USE_STL + /// Constructor. + TiXmlDeclaration( const std::string& _version, + const std::string& _encoding, + const std::string& _standalone ); +#endif + + /// Construct. + TiXmlDeclaration( const char* _version, + const char* _encoding, + const char* _standalone ); + + TiXmlDeclaration( const TiXmlDeclaration& copy ); + void operator=( const TiXmlDeclaration& copy ); + + virtual ~TiXmlDeclaration() {} + + /// Version. Will return an empty string if none was found. + const char *Version() const { return version.c_str (); } + /// Encoding. Will return an empty string if none was found. + const char *Encoding() const { return encoding.c_str (); } + /// Is this a standalone document? + const char *Standalone() const { return standalone.c_str (); } + + /// Creates a copy of this Declaration and returns it. + virtual TiXmlNode* Clone() const; + // Print this declaration to a FILE stream. + virtual void Print( FILE* cfile, int depth, TIXML_STRING* str ) const; + virtual void Print( FILE* cfile, int depth ) const { + Print( cfile, depth, 0 ); + } + + virtual const char* Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding ); + + virtual const TiXmlDeclaration* ToDeclaration() const { return this; } ///< Cast to a more defined type. Will return null not of the requested type. + virtual TiXmlDeclaration* ToDeclaration() { return this; } ///< Cast to a more defined type. Will return null not of the requested type. + + /** Walk the XML tree visiting this node and all of its children. + */ + virtual bool Accept( TiXmlVisitor* visitor ) const; + +protected: + void CopyTo( TiXmlDeclaration* target ) const; + // used to be public + #ifdef TIXML_USE_STL + virtual void StreamIn( std::istream * in, TIXML_STRING * tag ); + #endif + +private: + + TIXML_STRING version; + TIXML_STRING encoding; + TIXML_STRING standalone; +}; + + +/** Any tag that tinyXml doesn't recognize is saved as an + unknown. It is a tag of text, but should not be modified. + It will be written back to the XML, unchanged, when the file + is saved. + + DTD tags get thrown into TiXmlUnknowns. +*/ +class TiXmlUnknown : public TiXmlNode +{ +public: + TiXmlUnknown() : TiXmlNode( TiXmlNode::TINYXML_UNKNOWN ) {} + virtual ~TiXmlUnknown() {} + + TiXmlUnknown( const TiXmlUnknown& copy ) : TiXmlNode( TiXmlNode::TINYXML_UNKNOWN ) { copy.CopyTo( this ); } + void operator=( const TiXmlUnknown& copy ) { copy.CopyTo( this ); } + + /// Creates a copy of this Unknown and returns it. + virtual TiXmlNode* Clone() const; + // Print this Unknown to a FILE stream. + virtual void Print( FILE* cfile, int depth ) const; + + virtual const char* Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding ); + + virtual const TiXmlUnknown* ToUnknown() const { return this; } ///< Cast to a more defined type. Will return null not of the requested type. + virtual TiXmlUnknown* ToUnknown() { return this; } ///< Cast to a more defined type. Will return null not of the requested type. + + /** Walk the XML tree visiting this node and all of its children. + */ + virtual bool Accept( TiXmlVisitor* content ) const; + +protected: + void CopyTo( TiXmlUnknown* target ) const; + + #ifdef TIXML_USE_STL + virtual void StreamIn( std::istream * in, TIXML_STRING * tag ); + #endif + +private: + +}; + + +/** Always the top level node. A document binds together all the + XML pieces. It can be saved, loaded, and printed to the screen. + The 'value' of a document node is the xml file name. +*/ +class TiXmlDocument : public TiXmlNode +{ +public: + /// Create an empty document, that has no name. + TiXmlDocument(); + /// Create a document with a name. The name of the document is also the filename of the xml. + TiXmlDocument( const char * documentName ); + + #ifdef TIXML_USE_STL + /// Constructor. + TiXmlDocument( const std::string& documentName ); + #endif + + TiXmlDocument( const TiXmlDocument& copy ); + void operator=( const TiXmlDocument& copy ); + + virtual ~TiXmlDocument() {} + + /** Load a file using the current document value. + Returns true if successful. Will delete any existing + document data before loading. + */ + bool LoadFile( TiXmlEncoding encoding = TIXML_DEFAULT_ENCODING ); + /// Save a file using the current document value. Returns true if successful. + bool SaveFile() const; + /// Load a file using the given filename. Returns true if successful. + bool LoadFile( const char * filename, TiXmlEncoding encoding = TIXML_DEFAULT_ENCODING ); + /// Save a file using the given filename. Returns true if successful. + bool SaveFile( const char * filename ) const; + /** Load a file using the given FILE*. Returns true if successful. Note that this method + doesn't stream - the entire object pointed at by the FILE* + will be interpreted as an XML file. TinyXML doesn't stream in XML from the current + file location. Streaming may be added in the future. + */ + bool LoadFile( FILE*, TiXmlEncoding encoding = TIXML_DEFAULT_ENCODING ); + /// Save a file using the given FILE*. Returns true if successful. + bool SaveFile( FILE* ) const; + + #ifdef TIXML_USE_STL + bool LoadFile( const std::string& filename, TiXmlEncoding encoding = TIXML_DEFAULT_ENCODING ) ///< STL std::string version. + { + return LoadFile( filename.c_str(), encoding ); + } + bool SaveFile( const std::string& filename ) const ///< STL std::string version. + { + return SaveFile( filename.c_str() ); + } + #endif + + /** Parse the given null terminated block of xml data. Passing in an encoding to this + method (either TIXML_ENCODING_LEGACY or TIXML_ENCODING_UTF8 will force TinyXml + to use that encoding, regardless of what TinyXml might otherwise try to detect. + */ + virtual const char* Parse( const char* p, TiXmlParsingData* data = 0, TiXmlEncoding encoding = TIXML_DEFAULT_ENCODING ); + + /** Get the root element -- the only top level element -- of the document. + In well formed XML, there should only be one. TinyXml is tolerant of + multiple elements at the document level. + */ + const TiXmlElement* RootElement() const { return FirstChildElement(); } + TiXmlElement* RootElement() { return FirstChildElement(); } + + /** If an error occurs, Error will be set to true. Also, + - The ErrorId() will contain the integer identifier of the error (not generally useful) + - The ErrorDesc() method will return the name of the error. (very useful) + - The ErrorRow() and ErrorCol() will return the location of the error (if known) + */ + bool Error() const { return error; } + + /// Contains a textual (english) description of the error if one occurs. + const char * ErrorDesc() const { return errorDesc.c_str (); } + + /** Generally, you probably want the error string ( ErrorDesc() ). But if you + prefer the ErrorId, this function will fetch it. + */ + int ErrorId() const { return errorId; } + + /** Returns the location (if known) of the error. The first column is column 1, + and the first row is row 1. A value of 0 means the row and column wasn't applicable + (memory errors, for example, have no row/column) or the parser lost the error. (An + error in the error reporting, in that case.) + + @sa SetTabSize, Row, Column + */ + int ErrorRow() const { return errorLocation.row+1; } + int ErrorCol() const { return errorLocation.col+1; } ///< The column where the error occured. See ErrorRow() + + /** SetTabSize() allows the error reporting functions (ErrorRow() and ErrorCol()) + to report the correct values for row and column. It does not change the output + or input in any way. + + By calling this method, with a tab size + greater than 0, the row and column of each node and attribute is stored + when the file is loaded. Very useful for tracking the DOM back in to + the source file. + + The tab size is required for calculating the location of nodes. If not + set, the default of 4 is used. The tabsize is set per document. Setting + the tabsize to 0 disables row/column tracking. + + Note that row and column tracking is not supported when using operator>>. + + The tab size needs to be enabled before the parse or load. Correct usage: + @verbatim + TiXmlDocument doc; + doc.SetTabSize( 8 ); + doc.Load( "myfile.xml" ); + @endverbatim + + @sa Row, Column + */ + void SetTabSize( int _tabsize ) { tabsize = _tabsize; } + + int TabSize() const { return tabsize; } + + /** If you have handled the error, it can be reset with this call. The error + state is automatically cleared if you Parse a new XML block. + */ + void ClearError() { error = false; + errorId = 0; + errorDesc = ""; + errorLocation.row = errorLocation.col = 0; + //errorLocation.last = 0; + } + + /** Write the document to standard out using formatted printing ("pretty print"). */ + void Print() const { Print( stdout, 0 ); } + + /* Write the document to a string using formatted printing ("pretty print"). This + will allocate a character array (new char[]) and return it as a pointer. The + calling code pust call delete[] on the return char* to avoid a memory leak. + */ + //char* PrintToMemory() const; + + /// Print this Document to a FILE stream. + virtual void Print( FILE* cfile, int depth = 0 ) const; + // [internal use] + void SetError( int err, const char* errorLocation, TiXmlParsingData* prevData, TiXmlEncoding encoding ); + + virtual const TiXmlDocument* ToDocument() const { return this; } ///< Cast to a more defined type. Will return null not of the requested type. + virtual TiXmlDocument* ToDocument() { return this; } ///< Cast to a more defined type. Will return null not of the requested type. + + /** Walk the XML tree visiting this node and all of its children. + */ + virtual bool Accept( TiXmlVisitor* content ) const; + +protected : + // [internal use] + virtual TiXmlNode* Clone() const; + #ifdef TIXML_USE_STL + virtual void StreamIn( std::istream * in, TIXML_STRING * tag ); + #endif + +private: + void CopyTo( TiXmlDocument* target ) const; + + bool error; + int errorId; + TIXML_STRING errorDesc; + int tabsize; + TiXmlCursor errorLocation; + bool useMicrosoftBOM; // the UTF-8 BOM were found when read. Note this, and try to write. +}; + + +/** + A TiXmlHandle is a class that wraps a node pointer with null checks; this is + an incredibly useful thing. Note that TiXmlHandle is not part of the TinyXml + DOM structure. It is a separate utility class. + + Take an example: + @verbatim + + + + + + + @endverbatim + + Assuming you want the value of "attributeB" in the 2nd "Child" element, it's very + easy to write a *lot* of code that looks like: + + @verbatim + TiXmlElement* root = document.FirstChildElement( "Document" ); + if ( root ) + { + TiXmlElement* element = root->FirstChildElement( "Element" ); + if ( element ) + { + TiXmlElement* child = element->FirstChildElement( "Child" ); + if ( child ) + { + TiXmlElement* child2 = child->NextSiblingElement( "Child" ); + if ( child2 ) + { + // Finally do something useful. + @endverbatim + + And that doesn't even cover "else" cases. TiXmlHandle addresses the verbosity + of such code. A TiXmlHandle checks for null pointers so it is perfectly safe + and correct to use: + + @verbatim + TiXmlHandle docHandle( &document ); + TiXmlElement* child2 = docHandle.FirstChild( "Document" ).FirstChild( "Element" ).Child( "Child", 1 ).ToElement(); + if ( child2 ) + { + // do something useful + @endverbatim + + Which is MUCH more concise and useful. + + It is also safe to copy handles - internally they are nothing more than node pointers. + @verbatim + TiXmlHandle handleCopy = handle; + @endverbatim + + What they should not be used for is iteration: + + @verbatim + int i=0; + while ( true ) + { + TiXmlElement* child = docHandle.FirstChild( "Document" ).FirstChild( "Element" ).Child( "Child", i ).ToElement(); + if ( !child ) + break; + // do something + ++i; + } + @endverbatim + + It seems reasonable, but it is in fact two embedded while loops. The Child method is + a linear walk to find the element, so this code would iterate much more than it needs + to. Instead, prefer: + + @verbatim + TiXmlElement* child = docHandle.FirstChild( "Document" ).FirstChild( "Element" ).FirstChild( "Child" ).ToElement(); + + for( child; child; child=child->NextSiblingElement() ) + { + // do something + } + @endverbatim +*/ +class TiXmlHandle +{ +public: + /// Create a handle from any node (at any depth of the tree.) This can be a null pointer. + TiXmlHandle( TiXmlNode* _node ) { this->node = _node; } + /// Copy constructor + TiXmlHandle( const TiXmlHandle& ref ) { this->node = ref.node; } + TiXmlHandle operator=( const TiXmlHandle& ref ) { this->node = ref.node; return *this; } + + /// Return a handle to the first child node. + TiXmlHandle FirstChild() const; + /// Return a handle to the first child node with the given name. + TiXmlHandle FirstChild( const char * value ) const; + /// Return a handle to the first child element. + TiXmlHandle FirstChildElement() const; + /// Return a handle to the first child element with the given name. + TiXmlHandle FirstChildElement( const char * value ) const; + + /** Return a handle to the "index" child with the given name. + The first child is 0, the second 1, etc. + */ + TiXmlHandle Child( const char* value, int index ) const; + /** Return a handle to the "index" child. + The first child is 0, the second 1, etc. + */ + TiXmlHandle Child( int index ) const; + /** Return a handle to the "index" child element with the given name. + The first child element is 0, the second 1, etc. Note that only TiXmlElements + are indexed: other types are not counted. + */ + TiXmlHandle ChildElement( const char* value, int index ) const; + /** Return a handle to the "index" child element. + The first child element is 0, the second 1, etc. Note that only TiXmlElements + are indexed: other types are not counted. + */ + TiXmlHandle ChildElement( int index ) const; + + #ifdef TIXML_USE_STL + TiXmlHandle FirstChild( const std::string& _value ) const { return FirstChild( _value.c_str() ); } + TiXmlHandle FirstChildElement( const std::string& _value ) const { return FirstChildElement( _value.c_str() ); } + + TiXmlHandle Child( const std::string& _value, int index ) const { return Child( _value.c_str(), index ); } + TiXmlHandle ChildElement( const std::string& _value, int index ) const { return ChildElement( _value.c_str(), index ); } + #endif + + /** Return the handle as a TiXmlNode. This may return null. + */ + TiXmlNode* ToNode() const { return node; } + /** Return the handle as a TiXmlElement. This may return null. + */ + TiXmlElement* ToElement() const { return ( ( node && node->ToElement() ) ? node->ToElement() : 0 ); } + /** Return the handle as a TiXmlText. This may return null. + */ + TiXmlText* ToText() const { return ( ( node && node->ToText() ) ? node->ToText() : 0 ); } + /** Return the handle as a TiXmlUnknown. This may return null. + */ + TiXmlUnknown* ToUnknown() const { return ( ( node && node->ToUnknown() ) ? node->ToUnknown() : 0 ); } + + /** @deprecated use ToNode. + Return the handle as a TiXmlNode. This may return null. + */ + TiXmlNode* Node() const { return ToNode(); } + /** @deprecated use ToElement. + Return the handle as a TiXmlElement. This may return null. + */ + TiXmlElement* Element() const { return ToElement(); } + /** @deprecated use ToText() + Return the handle as a TiXmlText. This may return null. + */ + TiXmlText* Text() const { return ToText(); } + /** @deprecated use ToUnknown() + Return the handle as a TiXmlUnknown. This may return null. + */ + TiXmlUnknown* Unknown() const { return ToUnknown(); } + +private: + TiXmlNode* node; +}; + + +/** Print to memory functionality. The TiXmlPrinter is useful when you need to: + + -# Print to memory (especially in non-STL mode) + -# Control formatting (line endings, etc.) + + When constructed, the TiXmlPrinter is in its default "pretty printing" mode. + Before calling Accept() you can call methods to control the printing + of the XML document. After TiXmlNode::Accept() is called, the printed document can + be accessed via the CStr(), Str(), and Size() methods. + + TiXmlPrinter uses the Visitor API. + @verbatim + TiXmlPrinter printer; + printer.SetIndent( "\t" ); + + doc.Accept( &printer ); + fprintf( stdout, "%s", printer.CStr() ); + @endverbatim +*/ +class TiXmlPrinter : public TiXmlVisitor +{ +public: + TiXmlPrinter() : depth( 0 ), simpleTextPrint( false ), + buffer(), indent( " " ), lineBreak( "\n" ) {} + + virtual bool VisitEnter( const TiXmlDocument& doc ); + virtual bool VisitExit( const TiXmlDocument& doc ); + + virtual bool VisitEnter( const TiXmlElement& element, const TiXmlAttribute* firstAttribute ); + virtual bool VisitExit( const TiXmlElement& element ); + + virtual bool Visit( const TiXmlDeclaration& declaration ); + virtual bool Visit( const TiXmlText& text ); + virtual bool Visit( const TiXmlComment& comment ); + virtual bool Visit( const TiXmlUnknown& unknown ); + + /** Set the indent characters for printing. By default 4 spaces + but tab (\t) is also useful, or null/empty string for no indentation. + */ + void SetIndent( const char* _indent ) { indent = _indent ? _indent : "" ; } + /// Query the indention string. + const char* Indent() { return indent.c_str(); } + /** Set the line breaking string. By default set to newline (\n). + Some operating systems prefer other characters, or can be + set to the null/empty string for no indenation. + */ + void SetLineBreak( const char* _lineBreak ) { lineBreak = _lineBreak ? _lineBreak : ""; } + /// Query the current line breaking string. + const char* LineBreak() { return lineBreak.c_str(); } + + /** Switch over to "stream printing" which is the most dense formatting without + linebreaks. Common when the XML is needed for network transmission. + */ + void SetStreamPrinting() { indent = ""; + lineBreak = ""; + } + /// Return the result. + const char* CStr() { return buffer.c_str(); } + /// Return the length of the result string. + size_t Size() { return buffer.size(); } + + #ifdef TIXML_USE_STL + /// Return the result. + const std::string& Str() { return buffer; } + #endif + +private: + void DoIndent() { + for( int i=0; i +#include + +#include "tinyxml.h" + +//#define DEBUG_PARSER +#if defined( DEBUG_PARSER ) +# if defined( DEBUG ) && defined( _MSC_VER ) +# include +# define TIXML_LOG OutputDebugString +# else +# define TIXML_LOG printf +# endif +#endif + +// Note tha "PutString" hardcodes the same list. This +// is less flexible than it appears. Changing the entries +// or order will break putstring. +TiXmlBase::Entity TiXmlBase::entity[ NUM_ENTITY ] = +{ + { "&", 5, '&' }, + { "<", 4, '<' }, + { ">", 4, '>' }, + { """, 6, '\"' }, + { "'", 6, '\'' } +}; + +// Bunch of unicode info at: +// http://www.unicode.org/faq/utf_bom.html +// Including the basic of this table, which determines the #bytes in the +// sequence from the lead byte. 1 placed for invalid sequences -- +// although the result will be junk, pass it through as much as possible. +// Beware of the non-characters in UTF-8: +// ef bb bf (Microsoft "lead bytes") +// ef bf be +// ef bf bf + +const unsigned char TIXML_UTF_LEAD_0 = 0xefU; +const unsigned char TIXML_UTF_LEAD_1 = 0xbbU; +const unsigned char TIXML_UTF_LEAD_2 = 0xbfU; + +const int TiXmlBase::utf8ByteTable[256] = +{ + // 0 1 2 3 4 5 6 7 8 9 a b c d e f + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x00 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x10 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x20 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x30 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x40 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x50 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x60 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x70 End of ASCII range + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x80 0x80 to 0xc1 invalid + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x90 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0xa0 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0xb0 + 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, // 0xc0 0xc2 to 0xdf 2 byte + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, // 0xd0 + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // 0xe0 0xe0 to 0xef 3 byte + 4, 4, 4, 4, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 // 0xf0 0xf0 to 0xf4 4 byte, 0xf5 and higher invalid +}; + + +void TiXmlBase::ConvertUTF32ToUTF8( unsigned long input, char* output, int* length ) +{ + const unsigned long BYTE_MASK = 0xBF; + const unsigned long BYTE_MARK = 0x80; + const unsigned long FIRST_BYTE_MARK[7] = { 0x00, 0x00, 0xC0, 0xE0, 0xF0, 0xF8, 0xFC }; + + if (input < 0x80) + *length = 1; + else if ( input < 0x800 ) + *length = 2; + else if ( input < 0x10000 ) + *length = 3; + else if ( input < 0x200000 ) + *length = 4; + else + { *length = 0; return; } // This code won't covert this correctly anyway. + + output += *length; + + // Scary scary fall throughs. + switch (*length) + { + case 4: + --output; + *output = (char)((input | BYTE_MARK) & BYTE_MASK); + input >>= 6; + case 3: + --output; + *output = (char)((input | BYTE_MARK) & BYTE_MASK); + input >>= 6; + case 2: + --output; + *output = (char)((input | BYTE_MARK) & BYTE_MASK); + input >>= 6; + case 1: + --output; + *output = (char)(input | FIRST_BYTE_MARK[*length]); + } +} + + +/*static*/ int TiXmlBase::IsAlpha( unsigned char anyByte, TiXmlEncoding /*encoding*/ ) +{ + // This will only work for low-ascii, everything else is assumed to be a valid + // letter. I'm not sure this is the best approach, but it is quite tricky trying + // to figure out alhabetical vs. not across encoding. So take a very + // conservative approach. + +// if ( encoding == TIXML_ENCODING_UTF8 ) +// { + if ( anyByte < 127 ) + return isalpha( anyByte ); + else + return 1; // What else to do? The unicode set is huge...get the english ones right. +// } +// else +// { +// return isalpha( anyByte ); +// } +} + + +/*static*/ int TiXmlBase::IsAlphaNum( unsigned char anyByte, TiXmlEncoding /*encoding*/ ) +{ + // This will only work for low-ascii, everything else is assumed to be a valid + // letter. I'm not sure this is the best approach, but it is quite tricky trying + // to figure out alhabetical vs. not across encoding. So take a very + // conservative approach. + +// if ( encoding == TIXML_ENCODING_UTF8 ) +// { + if ( anyByte < 127 ) + return isalnum( anyByte ); + else + return 1; // What else to do? The unicode set is huge...get the english ones right. +// } +// else +// { +// return isalnum( anyByte ); +// } +} + + +class TiXmlParsingData +{ + friend class TiXmlDocument; + public: + void Stamp( const char* now, TiXmlEncoding encoding ); + + const TiXmlCursor& Cursor() { return cursor; } + + private: + // Only used by the document! + TiXmlParsingData( const char* start, int _tabsize, int row, int col ) + { + assert( start ); + stamp = start; + tabsize = _tabsize; + cursor.row = row; + cursor.col = col; + } + + TiXmlCursor cursor; + const char* stamp; + int tabsize; +}; + + +void TiXmlParsingData::Stamp( const char* now, TiXmlEncoding encoding ) +{ + assert( now ); + + // Do nothing if the tabsize is 0. + if ( tabsize < 1 ) + { + return; + } + + // Get the current row, column. + int row = cursor.row; + int col = cursor.col; + const char* p = stamp; + assert( p ); + + while ( p < now ) + { + // Treat p as unsigned, so we have a happy compiler. + const unsigned char* pU = (const unsigned char*)p; + + // Code contributed by Fletcher Dunn: (modified by lee) + switch (*pU) { + case 0: + // We *should* never get here, but in case we do, don't + // advance past the terminating null character, ever + return; + + case '\r': + // bump down to the next line + ++row; + col = 0; + // Eat the character + ++p; + + // Check for \r\n sequence, and treat this as a single character + if (*p == '\n') { + ++p; + } + break; + + case '\n': + // bump down to the next line + ++row; + col = 0; + + // Eat the character + ++p; + + // Check for \n\r sequence, and treat this as a single + // character. (Yes, this bizarre thing does occur still + // on some arcane platforms...) + if (*p == '\r') { + ++p; + } + break; + + case '\t': + // Eat the character + ++p; + + // Skip to next tab stop + col = (col / tabsize + 1) * tabsize; + break; + + case TIXML_UTF_LEAD_0: + if ( encoding == TIXML_ENCODING_UTF8 ) + { + if ( *(p+1) && *(p+2) ) + { + // In these cases, don't advance the column. These are + // 0-width spaces. + if ( *(pU+1)==TIXML_UTF_LEAD_1 && *(pU+2)==TIXML_UTF_LEAD_2 ) + p += 3; + else if ( *(pU+1)==0xbfU && *(pU+2)==0xbeU ) + p += 3; + else if ( *(pU+1)==0xbfU && *(pU+2)==0xbfU ) + p += 3; + else + { p +=3; ++col; } // A normal character. + } + } + else + { + ++p; + ++col; + } + break; + + default: + if ( encoding == TIXML_ENCODING_UTF8 ) + { + // Eat the 1 to 4 byte utf8 character. + int step = TiXmlBase::utf8ByteTable[*((const unsigned char*)p)]; + if ( step == 0 ) + step = 1; // Error case from bad encoding, but handle gracefully. + p += step; + + // Just advance one column, of course. + ++col; + } + else + { + ++p; + ++col; + } + break; + } + } + cursor.row = row; + cursor.col = col; + assert( cursor.row >= -1 ); + assert( cursor.col >= -1 ); + stamp = p; + assert( stamp ); +} + + +const char* TiXmlBase::SkipWhiteSpace( const char* p, TiXmlEncoding encoding ) +{ + if ( !p || !*p ) + { + return 0; + } + if ( encoding == TIXML_ENCODING_UTF8 ) + { + while ( *p ) + { + const unsigned char* pU = (const unsigned char*)p; + + // Skip the stupid Microsoft UTF-8 Byte order marks + if ( *(pU+0)==TIXML_UTF_LEAD_0 + && *(pU+1)==TIXML_UTF_LEAD_1 + && *(pU+2)==TIXML_UTF_LEAD_2 ) + { + p += 3; + continue; + } + else if(*(pU+0)==TIXML_UTF_LEAD_0 + && *(pU+1)==0xbfU + && *(pU+2)==0xbeU ) + { + p += 3; + continue; + } + else if(*(pU+0)==TIXML_UTF_LEAD_0 + && *(pU+1)==0xbfU + && *(pU+2)==0xbfU ) + { + p += 3; + continue; + } + + if ( IsWhiteSpace( *p ) ) // Still using old rules for white space. + ++p; + else + break; + } + } + else + { + while ( *p && IsWhiteSpace( *p ) ) + ++p; + } + + return p; +} + +#ifdef TIXML_USE_STL +/*static*/ bool TiXmlBase::StreamWhiteSpace( std::istream * in, TIXML_STRING * tag ) +{ + for( ;; ) + { + if ( !in->good() ) return false; + + int c = in->peek(); + // At this scope, we can't get to a document. So fail silently. + if ( !IsWhiteSpace( c ) || c <= 0 ) + return true; + + *tag += (char) in->get(); + } +} + +/*static*/ bool TiXmlBase::StreamTo( std::istream * in, int character, TIXML_STRING * tag ) +{ + //assert( character > 0 && character < 128 ); // else it won't work in utf-8 + while ( in->good() ) + { + int c = in->peek(); + if ( c == character ) + return true; + if ( c <= 0 ) // Silent failure: can't get document at this scope + return false; + + in->get(); + *tag += (char) c; + } + return false; +} +#endif + +// One of TinyXML's more performance demanding functions. Try to keep the memory overhead down. The +// "assign" optimization removes over 10% of the execution time. +// +const char* TiXmlBase::ReadName( const char* p, TIXML_STRING * name, TiXmlEncoding encoding ) +{ + // Oddly, not supported on some comilers, + //name->clear(); + // So use this: + *name = ""; + assert( p ); + + // Names start with letters or underscores. + // Of course, in unicode, tinyxml has no idea what a letter *is*. The + // algorithm is generous. + // + // After that, they can be letters, underscores, numbers, + // hyphens, or colons. (Colons are valid ony for namespaces, + // but tinyxml can't tell namespaces from names.) + if ( p && *p + && ( IsAlpha( (unsigned char) *p, encoding ) || *p == '_' ) ) + { + const char* start = p; + while( p && *p + && ( IsAlphaNum( (unsigned char ) *p, encoding ) + || *p == '_' + || *p == '-' + || *p == '.' + || *p == ':' ) ) + { + //(*name) += *p; // expensive + ++p; + } + if ( p-start > 0 ) { + name->assign( start, p-start ); + } + return p; + } + return 0; +} + +const char* TiXmlBase::GetEntity( const char* p, char* value, int* length, TiXmlEncoding encoding ) +{ + // Presume an entity, and pull it out. + TIXML_STRING ent; + int i; + *length = 0; + + if ( *(p+1) && *(p+1) == '#' && *(p+2) ) + { + unsigned long ucs = 0; + ptrdiff_t delta = 0; + unsigned mult = 1; + + if ( *(p+2) == 'x' ) + { + // Hexadecimal. + if ( !*(p+3) ) return 0; + + const char* q = p+3; + q = strchr( q, ';' ); + + if ( !q || !*q ) return 0; + + delta = q-p; + --q; + + while ( *q != 'x' ) + { + if ( *q >= '0' && *q <= '9' ) + ucs += mult * (*q - '0'); + else if ( *q >= 'a' && *q <= 'f' ) + ucs += mult * (*q - 'a' + 10); + else if ( *q >= 'A' && *q <= 'F' ) + ucs += mult * (*q - 'A' + 10 ); + else + return 0; + mult *= 16; + --q; + } + } + else + { + // Decimal. + if ( !*(p+2) ) return 0; + + const char* q = p+2; + q = strchr( q, ';' ); + + if ( !q || !*q ) return 0; + + delta = q-p; + --q; + + while ( *q != '#' ) + { + if ( *q >= '0' && *q <= '9' ) + ucs += mult * (*q - '0'); + else + return 0; + mult *= 10; + --q; + } + } + if ( encoding == TIXML_ENCODING_UTF8 ) + { + // convert the UCS to UTF-8 + ConvertUTF32ToUTF8( ucs, value, length ); + } + else + { + *value = (char)ucs; + *length = 1; + } + return p + delta + 1; + } + + // Now try to match it. + for( i=0; iappend( cArr, len ); + } + } + else + { + bool whitespace = false; + + // Remove leading white space: + p = SkipWhiteSpace( p, encoding ); + while ( p && *p + && !StringEqual( p, endTag, caseInsensitive, encoding ) ) + { + if ( *p == '\r' || *p == '\n' ) + { + whitespace = true; + ++p; + } + else if ( IsWhiteSpace( *p ) ) + { + whitespace = true; + ++p; + } + else + { + // If we've found whitespace, add it before the + // new character. Any whitespace just becomes a space. + if ( whitespace ) + { + (*text) += ' '; + whitespace = false; + } + int len; + char cArr[4] = { 0, 0, 0, 0 }; + p = GetChar( p, cArr, &len, encoding ); + if ( len == 1 ) + (*text) += cArr[0]; // more efficient + else + text->append( cArr, len ); + } + } + } + if ( p && *p ) + p += strlen( endTag ); + return p; +} + +#ifdef TIXML_USE_STL + +void TiXmlDocument::StreamIn( std::istream * in, TIXML_STRING * tag ) +{ + // The basic issue with a document is that we don't know what we're + // streaming. Read something presumed to be a tag (and hope), then + // identify it, and call the appropriate stream method on the tag. + // + // This "pre-streaming" will never read the closing ">" so the + // sub-tag can orient itself. + + if ( !StreamTo( in, '<', tag ) ) + { + SetError( TIXML_ERROR_PARSING_EMPTY, 0, 0, TIXML_ENCODING_UNKNOWN ); + return; + } + + while ( in->good() ) + { + int tagIndex = (int) tag->length(); + while ( in->good() && in->peek() != '>' ) + { + int c = in->get(); + if ( c <= 0 ) + { + SetError( TIXML_ERROR_EMBEDDED_NULL, 0, 0, TIXML_ENCODING_UNKNOWN ); + break; + } + (*tag) += (char) c; + } + + if ( in->good() ) + { + // We now have something we presume to be a node of + // some sort. Identify it, and call the node to + // continue streaming. + TiXmlNode* node = Identify( tag->c_str() + tagIndex, TIXML_DEFAULT_ENCODING ); + + if ( node ) + { + node->StreamIn( in, tag ); + bool isElement = node->ToElement() != 0; + delete node; + node = 0; + + // If this is the root element, we're done. Parsing will be + // done by the >> operator. + if ( isElement ) + { + return; + } + } + else + { + SetError( TIXML_ERROR, 0, 0, TIXML_ENCODING_UNKNOWN ); + return; + } + } + } + // We should have returned sooner. + SetError( TIXML_ERROR, 0, 0, TIXML_ENCODING_UNKNOWN ); +} + +#endif + +const char* TiXmlDocument::Parse( const char* p, TiXmlParsingData* prevData, TiXmlEncoding encoding ) +{ + ClearError(); + + // Parse away, at the document level. Since a document + // contains nothing but other tags, most of what happens + // here is skipping white space. + if ( !p || !*p ) + { + SetError( TIXML_ERROR_DOCUMENT_EMPTY, 0, 0, TIXML_ENCODING_UNKNOWN ); + return 0; + } + + // Note that, for a document, this needs to come + // before the while space skip, so that parsing + // starts from the pointer we are given. + location.Clear(); + if ( prevData ) + { + location.row = prevData->cursor.row; + location.col = prevData->cursor.col; + } + else + { + location.row = 0; + location.col = 0; + } + TiXmlParsingData data( p, TabSize(), location.row, location.col ); + location = data.Cursor(); + + if ( encoding == TIXML_ENCODING_UNKNOWN ) + { + // Check for the Microsoft UTF-8 lead bytes. + const unsigned char* pU = (const unsigned char*)p; + if ( *(pU+0) && *(pU+0) == TIXML_UTF_LEAD_0 + && *(pU+1) && *(pU+1) == TIXML_UTF_LEAD_1 + && *(pU+2) && *(pU+2) == TIXML_UTF_LEAD_2 ) + { + encoding = TIXML_ENCODING_UTF8; + useMicrosoftBOM = true; + } + } + + p = SkipWhiteSpace( p, encoding ); + if ( !p ) + { + SetError( TIXML_ERROR_DOCUMENT_EMPTY, 0, 0, TIXML_ENCODING_UNKNOWN ); + return 0; + } + + while ( p && *p ) + { + TiXmlNode* node = Identify( p, encoding ); + if ( node ) + { + p = node->Parse( p, &data, encoding ); + LinkEndChild( node ); + } + else + { + break; + } + + // Did we get encoding info? + if ( encoding == TIXML_ENCODING_UNKNOWN + && node->ToDeclaration() ) + { + TiXmlDeclaration* dec = node->ToDeclaration(); + const char* enc = dec->Encoding(); + assert( enc ); + + if ( *enc == 0 ) + encoding = TIXML_ENCODING_UTF8; + else if ( StringEqual( enc, "UTF-8", true, TIXML_ENCODING_UNKNOWN ) ) + encoding = TIXML_ENCODING_UTF8; + else if ( StringEqual( enc, "UTF8", true, TIXML_ENCODING_UNKNOWN ) ) + encoding = TIXML_ENCODING_UTF8; // incorrect, but be nice + else + encoding = TIXML_ENCODING_LEGACY; + } + + p = SkipWhiteSpace( p, encoding ); + } + + // Was this empty? + if ( !firstChild ) { + SetError( TIXML_ERROR_DOCUMENT_EMPTY, 0, 0, encoding ); + return 0; + } + + // All is well. + return p; +} + +void TiXmlDocument::SetError( int err, const char* pError, TiXmlParsingData* data, TiXmlEncoding encoding ) +{ + // The first error in a chain is more accurate - don't set again! + if ( error ) + return; + + assert( err > 0 && err < TIXML_ERROR_STRING_COUNT ); + error = true; + errorId = err; + errorDesc = errorString[ errorId ]; + + errorLocation.Clear(); + if ( pError && data ) + { + data->Stamp( pError, encoding ); + errorLocation = data->Cursor(); + } +} + + +TiXmlNode* TiXmlNode::Identify( const char* p, TiXmlEncoding encoding ) +{ + TiXmlNode* returnNode = 0; + + p = SkipWhiteSpace( p, encoding ); + if( !p || !*p || *p != '<' ) + { + return 0; + } + + p = SkipWhiteSpace( p, encoding ); + + if ( !p || !*p ) + { + return 0; + } + + // What is this thing? + // - Elements start with a letter or underscore, but xml is reserved. + // - Comments: "; + + if ( !StringEqual( p, startTag, false, encoding ) ) + { + document->SetError( TIXML_ERROR_PARSING_COMMENT, p, data, encoding ); + return 0; + } + p += strlen( startTag ); + + // [ 1475201 ] TinyXML parses entities in comments + // Oops - ReadText doesn't work, because we don't want to parse the entities. + // p = ReadText( p, &value, false, endTag, false, encoding ); + // + // from the XML spec: + /* + [Definition: Comments may appear anywhere in a document outside other markup; in addition, + they may appear within the document type declaration at places allowed by the grammar. + They are not part of the document's character data; an XML processor MAY, but need not, + make it possible for an application to retrieve the text of comments. For compatibility, + the string "--" (double-hyphen) MUST NOT occur within comments.] Parameter entity + references MUST NOT be recognized within comments. + + An example of a comment: + + + */ + + value = ""; + // Keep all the white space. + while ( p && *p && !StringEqual( p, endTag, false, encoding ) ) + { + value.append( p, 1 ); + ++p; + } + if ( p && *p ) + p += strlen( endTag ); + + return p; +} + + +const char* TiXmlAttribute::Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding ) +{ + p = SkipWhiteSpace( p, encoding ); + if ( !p || !*p ) return 0; + + if ( data ) + { + data->Stamp( p, encoding ); + location = data->Cursor(); + } + // Read the name, the '=' and the value. + const char* pErr = p; + p = ReadName( p, &name, encoding ); + if ( !p || !*p ) + { + if ( document ) document->SetError( TIXML_ERROR_READING_ATTRIBUTES, pErr, data, encoding ); + return 0; + } + p = SkipWhiteSpace( p, encoding ); + if ( !p || !*p || *p != '=' ) + { + if ( document ) document->SetError( TIXML_ERROR_READING_ATTRIBUTES, p, data, encoding ); + return 0; + } + + ++p; // skip '=' + p = SkipWhiteSpace( p, encoding ); + if ( !p || !*p ) + { + if ( document ) document->SetError( TIXML_ERROR_READING_ATTRIBUTES, p, data, encoding ); + return 0; + } + + const char* end; + const char SINGLE_QUOTE = '\''; + const char DOUBLE_QUOTE = '\"'; + + if ( *p == SINGLE_QUOTE ) + { + ++p; + end = "\'"; // single quote in string + p = ReadText( p, &value, false, end, false, encoding ); + } + else if ( *p == DOUBLE_QUOTE ) + { + ++p; + end = "\""; // double quote in string + p = ReadText( p, &value, false, end, false, encoding ); + } + else + { + // All attribute values should be in single or double quotes. + // But this is such a common error that the parser will try + // its best, even without them. + value = ""; + while ( p && *p // existence + && !IsWhiteSpace( *p ) // whitespace + && *p != '/' && *p != '>' ) // tag end + { + if ( *p == SINGLE_QUOTE || *p == DOUBLE_QUOTE ) { + // [ 1451649 ] Attribute values with trailing quotes not handled correctly + // We did not have an opening quote but seem to have a + // closing one. Give up and throw an error. + if ( document ) document->SetError( TIXML_ERROR_READING_ATTRIBUTES, p, data, encoding ); + return 0; + } + value += *p; + ++p; + } + } + return p; +} + +#ifdef TIXML_USE_STL +void TiXmlText::StreamIn( std::istream * in, TIXML_STRING * tag ) +{ + while ( in->good() ) + { + int c = in->peek(); + if ( !cdata && (c == '<' ) ) + { + return; + } + if ( c <= 0 ) + { + TiXmlDocument* document = GetDocument(); + if ( document ) + document->SetError( TIXML_ERROR_EMBEDDED_NULL, 0, 0, TIXML_ENCODING_UNKNOWN ); + return; + } + + (*tag) += (char) c; + in->get(); // "commits" the peek made above + + if ( cdata && c == '>' && tag->size() >= 3 ) { + size_t len = tag->size(); + if ( (*tag)[len-2] == ']' && (*tag)[len-3] == ']' ) { + // terminator of cdata. + return; + } + } + } +} +#endif + +const char* TiXmlText::Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding ) +{ + value = ""; + TiXmlDocument* document = GetDocument(); + + if ( data ) + { + data->Stamp( p, encoding ); + location = data->Cursor(); + } + + const char* const startTag = ""; + + if ( cdata || StringEqual( p, startTag, false, encoding ) ) + { + cdata = true; + + if ( !StringEqual( p, startTag, false, encoding ) ) + { + document->SetError( TIXML_ERROR_PARSING_CDATA, p, data, encoding ); + return 0; + } + p += strlen( startTag ); + + // Keep all the white space, ignore the encoding, etc. + while ( p && *p + && !StringEqual( p, endTag, false, encoding ) + ) + { + value += *p; + ++p; + } + + TIXML_STRING dummy; + p = ReadText( p, &dummy, false, endTag, false, encoding ); + return p; + } + else + { + bool ignoreWhite = true; + + const char* end = "<"; + p = ReadText( p, &value, ignoreWhite, end, false, encoding ); + if ( p ) + return p-1; // don't truncate the '<' + return 0; + } +} + +#ifdef TIXML_USE_STL +void TiXmlDeclaration::StreamIn( std::istream * in, TIXML_STRING * tag ) +{ + while ( in->good() ) + { + int c = in->get(); + if ( c <= 0 ) + { + TiXmlDocument* document = GetDocument(); + if ( document ) + document->SetError( TIXML_ERROR_EMBEDDED_NULL, 0, 0, TIXML_ENCODING_UNKNOWN ); + return; + } + (*tag) += (char) c; + + if ( c == '>' ) + { + // All is well. + return; + } + } +} +#endif + +const char* TiXmlDeclaration::Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding _encoding ) +{ + p = SkipWhiteSpace( p, _encoding ); + // Find the beginning, find the end, and look for + // the stuff in-between. + TiXmlDocument* document = GetDocument(); + if ( !p || !*p || !StringEqual( p, "SetError( TIXML_ERROR_PARSING_DECLARATION, 0, 0, _encoding ); + return 0; + } + if ( data ) + { + data->Stamp( p, _encoding ); + location = data->Cursor(); + } + p += 5; + + version = ""; + encoding = ""; + standalone = ""; + + while ( p && *p ) + { + if ( *p == '>' ) + { + ++p; + return p; + } + + p = SkipWhiteSpace( p, _encoding ); + if ( StringEqual( p, "version", true, _encoding ) ) + { + TiXmlAttribute attrib; + p = attrib.Parse( p, data, _encoding ); + version = attrib.Value(); + } + else if ( StringEqual( p, "encoding", true, _encoding ) ) + { + TiXmlAttribute attrib; + p = attrib.Parse( p, data, _encoding ); + encoding = attrib.Value(); + } + else if ( StringEqual( p, "standalone", true, _encoding ) ) + { + TiXmlAttribute attrib; + p = attrib.Parse( p, data, _encoding ); + standalone = attrib.Value(); + } + else + { + // Read over whatever it is. + while( p && *p && *p != '>' && !IsWhiteSpace( *p ) ) + ++p; + } + } + return 0; +} + +bool TiXmlText::Blank() const +{ + for ( unsigned i=0; i probleme sur les caractères spéciaux comme ° é à ... + - [1] 10% Search + - [1] 10% Replace + - [1] 80% Undo / Redo ajout de caractères autre que " ", "\t" et "\n" + - [2] 0% Selectionner en colone + - [2] 0% Supression multiple de ligne par la commande ctrl+D + - [3] 0% Multi-file search ==> display it in a result buffer (clickable only) + - [3] 0% basic UTF8 string management ==> bad with the curent buffer + - [5] 0% Replace in all elements of the project file or a part + - [5] 0% Multiple Text Editor in the same Time + - [5] 0% Support des Macros ==> In python ??? or other ... + +# Ctags : + - [1] 100% Parse (use the ctags parser) + - [1] 50% Find + - [1] 50% Jump + - [1] 10% History of move (with display) + +# Buffer Viewer : + - [1] 0% Right menu + - [1] 100% Display buffer in color + - [1] 100% Display buffer Saved / not Saved + - [2] 0% Image of the type of buffer (optionnal) + +# Configuration : + - [1] 0% Creer une IHM pour les configurations de base + - [1] 0% Creer une IHM pour l'edition du hightliner syntaxique (quand il marchera...) + - [1] 0% Creer une IHM pour les couleurs (voir la lier avec l'IHM pour le hightliner) + - [1] 0% saugegarde automatique de la configuration ou sur demande... + +# Project manager : + - [2] 0% Faire un editeur des dossiers du projet a ouvrir ==> automatiquement ajouter dans les Ctags + - [2] 0% Base + - [2] 0% Save All + - [2] 0% TreeView + +# Tree View : + - [2] 0% View + - [2] 0% Open File + - [2] 0% Jump to the curent File + - [2] 0% Hide CVS / Git / SVN elements + +# Diff : + - [4] 0% generate a Diff between files + - [4] 0% same in binary + +# Git : + - [4] 0% Diff with the current wersion commited (local) + - [9] 0% Git branch local display (as gitk --all) ... + - [4] 0% view git chawan history ... (git Log) + +# CVS : + - [6] 0% check the version with CVS + - [6] 0% commit + - [6] 0% display the Branch + - [6] 0% Select a new repository ... + +# Publication : + - [1] 0% faire une publication du logiciel sur le Web... (need a stable version) + - [2] 0% faire un package + +# Repository : + - [2] 0% create my own repository (@home) + - [2] 0% manage right with Git + - [2] 0% create a website fot it (@home) + - [2] 0% reserve edn.org + +# plugin : (never i think ...) + - [ ] 0% Comprendre comment faire un system avec des plugin (interne et simple)... + - [ ] 0% En c++ compiler seulement, pas d'interface pyton ou autre c'est trop moche. + +# notes : + The [x] Represent the version expected of the feature + + +# Global TODO List: + - [1] 0% EdnString ==> a revoir pour etre plus rapide et plus complète... et suporter le << et >> + - [1] 0% Remove wxString from the current code... + + +# note utiles : +http://majutsushi.github.com/tagbar/ ==> je devrais regarder ca pour savoir ce que je peux faire avec du ctags + diff --git a/data/cedit.fbp b/data/cedit.fbp new file mode 100644 index 0000000..c5dba0f --- /dev/null +++ b/data/cedit.fbp @@ -0,0 +1,774 @@ + + + + + + C++ + 1 + UTF-8 + connect + impl_virtual + + 1000 + none + 0 + MyProject1 + + . + + 1 + 0 + 0 + + + + 1 + + + 0 + wxID_ANY + + + MyPanel1 + + 500,196 + + + + wxFILTER_NONE + wxDefaultValidator + + + + wxTAB_TRAVERSAL + + + + + + + + + + + + + + + + + + + + + + + + + + + bSizer1 + wxHORIZONTAL + none + + 1 + + 1 + + + bSizer2 + wxVERTICAL + none + + 5 + wxALL|wxEXPAND + 0 + + + + 1 + + + 0 + wxID_ANY + String to find: + + + m_staticText1 + protected + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + wxALL|wxEXPAND + 0 + + + + 1 + + + 0 + wxID_ANY + + 0 + + m_textCtrl1 + protected + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + + + 1 + + + 0 + wxID_ANY + Replace With: + + + m_staticText2 + protected + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + wxALL|wxEXPAND + 0 + + + + 1 + + + 0 + wxID_ANY + + 0 + + m_textCtrl2 + protected + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + wxALL|wxEXPAND + 0 + + + 0 + + 1 + + + 0 + wxID_ANY + Case Sensitive + + + m_checkBox1 + protected + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + wxALL|wxEXPAND + 0 + + + 0 + + 1 + + + 0 + wxID_ANY + Circular Search + + + m_checkBox2 + protected + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + + 0 + + + bSizer3 + wxVERTICAL + none + + 1 + wxALL|wxEXPAND + 0 + + + + 0 + 1 + + + 0 + wxID_ANY + Find previous + + + m_button1 + protected + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + wxALL|wxEXPAND + 0 + + + + 0 + 1 + + + 0 + wxID_ANY + Find next + + + m_button2 + protected + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + wxALL|wxEXPAND + 0 + + + + 0 + 1 + + + 0 + wxID_ANY + Replace && Find previous + + + m_button3 + protected + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + wxALL|wxEXPAND + 0 + + + + 0 + 1 + + + 0 + wxID_ANY + Replace && Find next + + + m_button4 + protected + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + wxALL|wxEXPAND + 0 + + + + 0 + 1 + + + 0 + wxID_ANY + Replace in all window + + + m_button5 + protected + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + wxALL|wxEXPAND + 0 + + + + 0 + 1 + + + 0 + wxID_ANY + Cancel + + + m_button6 + protected + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/data/color_black.xml b/data/color_black.xml new file mode 100644 index 0000000..63694e0 --- /dev/null +++ b/data/color_black.xml @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/data/config.xml b/data/config.xml new file mode 100644 index 0000000..644938a --- /dev/null +++ b/data/config.xml @@ -0,0 +1,20 @@ + + + diff --git a/data/dox/doxygen.css b/data/dox/doxygen.css new file mode 100644 index 0000000..3d7663c --- /dev/null +++ b/data/dox/doxygen.css @@ -0,0 +1,521 @@ +BODY,H1,H2,H3,H4,H5,H6,P,CENTER,TD,TH,UL,DL,DIV { + font-family: Geneva, Arial, Helvetica, sans-serif; +} +BODY,TD { + font-size: 90%; +} + +body { + counter-reset: chapitre; /* Nous mettons à zéro le compteur chapitre */ +} + +H1 { + text-align: center; + font-size: 160%; +} + +H2 { + font-size: 120%; +} + +H3 { + font-size: 100%; +} + +H4 { + font-size: 100%; +} + + +.contents H1 { + text-align: center; +} + +.contents H2 { + padding-left: 5px; + counter-reset: section; +} + +.contents h2:before { + counter-increment: chapitre; /* Ajoute 1 au compteur chapitre */ + content: counter(chapitre) ". "; +} + + +.contents H3 { + padding-left: 10px; + counter-reset: soussection; +} + +.contents h3:before { + counter-increment: section; /* Ajoute 1 au compteur section */ + content: counter(chapitre) "." counter(section) ". "; +} + +.contents H4 { + font-size: 100%; +} + +.contents h4:before { + counter-increment: soussection; /* Ajoute 1 au compteur section */ + content: counter(chapitre) "." counter(section) "." counter(soussection) ". "; +} + +CAPTION { + font-weight: bold +} +DIV.qindex { + width: 100%; + background-color: #e8eef2; + border: 1px solid #84b0c7; + text-align: center; + margin: 2px; + padding: 2px; + line-height: 140%; +} +DIV.navpath { + width: 100%; + background-color: #e8eef2; + border: 1px solid #84b0c7; + text-align: center; + margin: 2px; + padding: 2px; + line-height: 140%; +} +DIV.navtab { + background-color: #e8eef2; + border: 1px solid #84b0c7; + text-align: center; + margin: 2px; + margin-right: 15px; + padding: 2px; +} +TD.navtab { + font-size: 70%; +} +A.qindex { + text-decoration: none; + font-weight: bold; + color: #1A419D; +} +A.qindex:visited { + text-decoration: none; + font-weight: bold; + color: #1A419D +} +A.qindex:hover { + text-decoration: none; + background-color: #ddddff; +} +A.qindexHL { + text-decoration: none; + font-weight: bold; + background-color: #6666cc; + color: #ffffff; + border: 1px double #9295C2; +} +A.qindexHL:hover { + text-decoration: none; + background-color: #6666cc; + color: #ffffff; +} +A.qindexHL:visited { + text-decoration: none; + background-color: #6666cc; + color: #ffffff +} +A.el { + text-decoration: none; + font-weight: bold +} +A.elRef { + font-weight: bold +} +A.code:link { + text-decoration: none; + font-weight: normal; + color: #0000FF +} +A.code:visited { + text-decoration: none; + font-weight: normal; + color: #0000FF +} +A.codeRef:link { + font-weight: normal; + color: #0000FF +} +A.codeRef:visited { + font-weight: normal; + color: #0000FF +} +A:hover { + text-decoration: none; + background-color: #f2f2ff +} +DL.el { + margin-left: -1cm +} +.fragment { + font-family: monospace, fixed; + font-size: 95%; +} +PRE.fragment { + border: 1px solid #CCCCCC; + background-color: #f5f5f5; + margin-top: 4px; + margin-bottom: 4px; + margin-left: 2px; + margin-right: 8px; + padding-left: 6px; + padding-right: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +DIV.ah { + background-color: black; + font-weight: bold; + color: #ffffff; + margin-bottom: 3px; + margin-top: 3px +} + +DIV.groupHeader { + margin-left: 16px; + margin-top: 12px; + margin-bottom: 6px; + font-weight: bold; +} +DIV.groupText { + margin-left: 16px; + font-style: italic; + font-size: 90% +} +BODY { + background: white; + color: black; + margin-right: 20px; + margin-left: 20px; +} +TD.indexkey { + background-color: #e8eef2; + font-weight: bold; + padding-right : 10px; + padding-top : 2px; + padding-left : 10px; + padding-bottom : 2px; + margin-left : 0px; + margin-right : 0px; + margin-top : 2px; + margin-bottom : 2px; + border: 1px solid #CCCCCC; +} +TD.indexvalue { + background-color: #e8eef2; + font-style: italic; + padding-right : 10px; + padding-top : 2px; + padding-left : 10px; + padding-bottom : 2px; + margin-left : 0px; + margin-right : 0px; + margin-top : 2px; + margin-bottom : 2px; + border: 1px solid #CCCCCC; +} +TR.memlist { + background-color: #f0f0f0; +} +P.formulaDsp { + text-align: center; +} +IMG.formulaDsp { +} +IMG.formulaInl { + vertical-align: middle; +} +SPAN.keyword { color: #008000 } +SPAN.keywordtype { color: #604020 } +SPAN.keywordflow { color: #e08000 } +SPAN.comment { color: #800000 } +SPAN.preprocessor { color: #806020 } +SPAN.stringliteral { color: #002080 } +SPAN.charliteral { color: #008080 } +SPAN.vhdldigit { color: #ff00ff } +SPAN.vhdlchar { color: #000000 } +SPAN.vhdlkeyword { color: #700070 } +SPAN.vhdllogic { color: #ff0000 } + +.mdescLeft { + padding: 0px 8px 4px 8px; + font-size: 80%; + font-style: italic; + background-color: #FAFAFA; + border-top: 1px none #E0E0E0; + border-right: 1px none #E0E0E0; + border-bottom: 1px none #E0E0E0; + border-left: 1px none #E0E0E0; + margin: 0px; +} +.mdescRight { + padding: 0px 8px 4px 8px; + font-size: 80%; + font-style: italic; + background-color: #FAFAFA; + border-top: 1px none #E0E0E0; + border-right: 1px none #E0E0E0; + border-bottom: 1px none #E0E0E0; + border-left: 1px none #E0E0E0; + margin: 0px; +} +.memItemLeft { + padding: 1px 0px 0px 8px; + margin: 4px; + border-top-width: 1px; + border-right-width: 1px; + border-bottom-width: 1px; + border-left-width: 1px; + border-top-color: #E0E0E0; + border-right-color: #E0E0E0; + border-bottom-color: #E0E0E0; + border-left-color: #E0E0E0; + border-top-style: solid; + border-right-style: none; + border-bottom-style: none; + border-left-style: none; + background-color: #FAFAFA; + font-size: 80%; +} +.memItemRight { + padding: 1px 8px 0px 8px; + margin: 4px; + border-top-width: 1px; + border-right-width: 1px; + border-bottom-width: 1px; + border-left-width: 1px; + border-top-color: #E0E0E0; + border-right-color: #E0E0E0; + border-bottom-color: #E0E0E0; + border-left-color: #E0E0E0; + border-top-style: solid; + border-right-style: none; + border-bottom-style: none; + border-left-style: none; + background-color: #FAFAFA; + font-size: 80%; +} +.memTemplItemLeft { + padding: 1px 0px 0px 8px; + margin: 4px; + border-top-width: 1px; + border-right-width: 1px; + border-bottom-width: 1px; + border-left-width: 1px; + border-top-color: #E0E0E0; + border-right-color: #E0E0E0; + border-bottom-color: #E0E0E0; + border-left-color: #E0E0E0; + border-top-style: none; + border-right-style: none; + border-bottom-style: none; + border-left-style: none; + background-color: #FAFAFA; + font-size: 80%; +} +.memTemplItemRight { + padding: 1px 8px 0px 8px; + margin: 4px; + border-top-width: 1px; + border-right-width: 1px; + border-bottom-width: 1px; + border-left-width: 1px; + border-top-color: #E0E0E0; + border-right-color: #E0E0E0; + border-bottom-color: #E0E0E0; + border-left-color: #E0E0E0; + border-top-style: none; + border-right-style: none; + border-bottom-style: none; + border-left-style: none; + background-color: #FAFAFA; + font-size: 80%; +} +.memTemplParams { + padding: 1px 0px 0px 8px; + margin: 4px; + border-top-width: 1px; + border-right-width: 1px; + border-bottom-width: 1px; + border-left-width: 1px; + border-top-color: #E0E0E0; + border-right-color: #E0E0E0; + border-bottom-color: #E0E0E0; + border-left-color: #E0E0E0; + border-top-style: solid; + border-right-style: none; + border-bottom-style: none; + border-left-style: none; + color: #606060; + background-color: #FAFAFA; + font-size: 80%; +} +.search { + color: #003399; + font-weight: bold; +} +FORM.search { + margin-bottom: 0px; + margin-top: 0px; +} +INPUT.search { + font-size: 75%; + color: #000080; + font-weight: normal; + background-color: #e8eef2; +} +TD.tiny { + font-size: 75%; +} +a { + color: #1A41A8; +} +a:visited { + color: #2A3798; +} +.dirtab { + padding: 4px; + border-collapse: collapse; + border: 1px solid #84b0c7; +} +TH.dirtab { + background: #e8eef2; + font-weight: bold; +} +HR { + height: 1px; + border: none; + border-top: 1px solid black; +} + +/* Style for detailed member documentation */ +.memtemplate { + font-size: 80%; + color: #606060; + font-weight: normal; + margin-left: 3px; +} +.memnav { + background-color: #e8eef2; + border: 1px solid #84b0c7; + text-align: center; + margin: 2px; + margin-right: 15px; + padding: 2px; +} +.memitem { + padding: 4px; + background-color: #eef3f5; + border-width: 1px; + border-style: solid; + border-color: #dedeee; + -moz-border-radius: 8px 8px 8px 8px; +} +.memname { + white-space: nowrap; + font-weight: bold; +} +.memdoc{ + padding-left: 10px; +} +.memproto { + background-color: #d5e1e8; + width: 100%; + border-width: 1px; + border-style: solid; + border-color: #84b0c7; + font-weight: bold; + -moz-border-radius: 8px 8px 8px 8px; +} +.paramkey { + text-align: right; +} +.paramtype { + white-space: nowrap; +} +.paramname { + color: #602020; + font-style: italic; + white-space: nowrap; +} +/* End Styling for detailed member documentation */ + +/* for the tree view */ +.ftvtree { + font-family: sans-serif; + margin:0.5em; +} +.directory { + font-size: 9pt; + font-weight: bold; +} +directory.directory h3 { + margin: 0px; + margin-top: 1em; + font-size: 11pt; +} +.directory > h3 { + margin-top: 0; +} +.directory p { + margin: 0px; + white-space: nowrap; +} +.directory div { + display: none; + margin: 0px; +} +.directory img { + vertical-align: -30%; +} + + + + +/* classe mise dans le tableau : table */ +.tableau{ + margin-left:35px; + border: medium solid #6495ed; + border-collapse: collapse; + border-spacing: 0px; +} +.tableau th { + border: thin solid #6495ed; + padding: 5px; + background-color: #D0E3FA; +} +.tableau td { + border: thin solid #6495ed; + padding: 5px; + text-align: center; + background-color: #ffffff; +} + + +.tableau tr p { + padding: 0px; + border: 0px; + margin: 0px; +} + +.contents p{ + padding-left: 35px; +} + + +.contents ul{ + padding-left: 80px; +} + +.contents ul ul{ + padding-left: 65px; +} \ No newline at end of file diff --git a/data/imagesSources/Setting.png b/data/imagesSources/Setting.png new file mode 100644 index 0000000..0cc4646 Binary files /dev/null and b/data/imagesSources/Setting.png differ diff --git a/data/imagesSources/alerte.png b/data/imagesSources/alerte.png new file mode 100644 index 0000000..157c0fa Binary files /dev/null and b/data/imagesSources/alerte.png differ diff --git a/data/imagesSources/computer.png b/data/imagesSources/computer.png new file mode 100644 index 0000000..e12edb2 Binary files /dev/null and b/data/imagesSources/computer.png differ diff --git a/data/imagesSources/copy.png b/data/imagesSources/copy.png new file mode 100644 index 0000000..a64f0f7 Binary files /dev/null and b/data/imagesSources/copy.png differ diff --git a/data/imagesSources/cut.png b/data/imagesSources/cut.png new file mode 100644 index 0000000..230a877 Binary files /dev/null and b/data/imagesSources/cut.png differ diff --git a/data/imagesSources/drawer.png b/data/imagesSources/drawer.png new file mode 100644 index 0000000..5f1eaf5 Binary files /dev/null and b/data/imagesSources/drawer.png differ diff --git a/data/imagesSources/error.png b/data/imagesSources/error.png new file mode 100644 index 0000000..accd3f0 Binary files /dev/null and b/data/imagesSources/error.png differ diff --git a/data/imagesSources/exec.png b/data/imagesSources/exec.png new file mode 100644 index 0000000..2567dd5 Binary files /dev/null and b/data/imagesSources/exec.png differ diff --git a/data/imagesSources/exit.png b/data/imagesSources/exit.png new file mode 100644 index 0000000..8f2d4e6 Binary files /dev/null and b/data/imagesSources/exit.png differ diff --git a/data/imagesSources/file-excel.png b/data/imagesSources/file-excel.png new file mode 100644 index 0000000..8bccffe Binary files /dev/null and b/data/imagesSources/file-excel.png differ diff --git a/data/imagesSources/file-postscript.png b/data/imagesSources/file-postscript.png new file mode 100644 index 0000000..b424d9a Binary files /dev/null and b/data/imagesSources/file-postscript.png differ diff --git a/data/imagesSources/file-source-c.png b/data/imagesSources/file-source-c.png new file mode 100644 index 0000000..ed7d284 Binary files /dev/null and b/data/imagesSources/file-source-c.png differ diff --git a/data/imagesSources/file-source-cpp.png b/data/imagesSources/file-source-cpp.png new file mode 100644 index 0000000..dcc1854 Binary files /dev/null and b/data/imagesSources/file-source-cpp.png differ diff --git a/data/imagesSources/file-source-f.png b/data/imagesSources/file-source-f.png new file mode 100644 index 0000000..e5f8d4b Binary files /dev/null and b/data/imagesSources/file-source-f.png differ diff --git a/data/imagesSources/file-source-h.png b/data/imagesSources/file-source-h.png new file mode 100644 index 0000000..4ffbbae Binary files /dev/null and b/data/imagesSources/file-source-h.png differ diff --git a/data/imagesSources/file-source-html.png b/data/imagesSources/file-source-html.png new file mode 100644 index 0000000..a549d29 Binary files /dev/null and b/data/imagesSources/file-source-html.png differ diff --git a/data/imagesSources/file-source-pl.png b/data/imagesSources/file-source-pl.png new file mode 100644 index 0000000..9616c57 Binary files /dev/null and b/data/imagesSources/file-source-pl.png differ diff --git a/data/imagesSources/file-source-s.png b/data/imagesSources/file-source-s.png new file mode 100644 index 0000000..29ca5b5 Binary files /dev/null and b/data/imagesSources/file-source-s.png differ diff --git a/data/imagesSources/file-source-unknow.png b/data/imagesSources/file-source-unknow.png new file mode 100644 index 0000000..62f3eec Binary files /dev/null and b/data/imagesSources/file-source-unknow.png differ diff --git a/data/imagesSources/folder-doc-image.png b/data/imagesSources/folder-doc-image.png new file mode 100644 index 0000000..6c3f65f Binary files /dev/null and b/data/imagesSources/folder-doc-image.png differ diff --git a/data/imagesSources/folder-doc-text.png b/data/imagesSources/folder-doc-text.png new file mode 100644 index 0000000..bf75db6 Binary files /dev/null and b/data/imagesSources/folder-doc-text.png differ diff --git a/data/imagesSources/folder-empty.png b/data/imagesSources/folder-empty.png new file mode 100644 index 0000000..9b9c3fc Binary files /dev/null and b/data/imagesSources/folder-empty.png differ diff --git a/data/imagesSources/folder-empty.xcf b/data/imagesSources/folder-empty.xcf new file mode 100644 index 0000000..1af0fa6 Binary files /dev/null and b/data/imagesSources/folder-empty.xcf differ diff --git a/data/imagesSources/folder-save.png b/data/imagesSources/folder-save.png new file mode 100644 index 0000000..382be64 Binary files /dev/null and b/data/imagesSources/folder-save.png differ diff --git a/data/imagesSources/harddrive-ethernet.png b/data/imagesSources/harddrive-ethernet.png new file mode 100644 index 0000000..09bdc1b Binary files /dev/null and b/data/imagesSources/harddrive-ethernet.png differ diff --git a/data/imagesSources/harddrive.png b/data/imagesSources/harddrive.png new file mode 100644 index 0000000..985405f Binary files /dev/null and b/data/imagesSources/harddrive.png differ diff --git a/data/imagesSources/help.png b/data/imagesSources/help.png new file mode 100644 index 0000000..2f36484 Binary files /dev/null and b/data/imagesSources/help.png differ diff --git a/data/imagesSources/newFile.png b/data/imagesSources/newFile.png new file mode 100644 index 0000000..87dbb84 Binary files /dev/null and b/data/imagesSources/newFile.png differ diff --git a/data/imagesSources/newFile.xcf b/data/imagesSources/newFile.xcf new file mode 100644 index 0000000..1af0fa6 Binary files /dev/null and b/data/imagesSources/newFile.xcf differ diff --git a/data/imagesSources/open.png b/data/imagesSources/open.png new file mode 100644 index 0000000..0d9bc69 Binary files /dev/null and b/data/imagesSources/open.png differ diff --git a/data/imagesSources/open.xcf b/data/imagesSources/open.xcf new file mode 100644 index 0000000..185bdec Binary files /dev/null and b/data/imagesSources/open.xcf differ diff --git a/data/imagesSources/paste.png b/data/imagesSources/paste.png new file mode 100644 index 0000000..5eb26e6 Binary files /dev/null and b/data/imagesSources/paste.png differ diff --git a/data/imagesSources/plop.png b/data/imagesSources/plop.png new file mode 100644 index 0000000..50554f6 Binary files /dev/null and b/data/imagesSources/plop.png differ diff --git a/data/imagesSources/plugin.png b/data/imagesSources/plugin.png new file mode 100644 index 0000000..996640c Binary files /dev/null and b/data/imagesSources/plugin.png differ diff --git a/data/imagesSources/project.png b/data/imagesSources/project.png new file mode 100644 index 0000000..48de05e Binary files /dev/null and b/data/imagesSources/project.png differ diff --git a/data/imagesSources/redo.png b/data/imagesSources/redo.png new file mode 100644 index 0000000..f978885 Binary files /dev/null and b/data/imagesSources/redo.png differ diff --git a/data/imagesSources/save-all.png b/data/imagesSources/save-all.png new file mode 100644 index 0000000..96261b4 Binary files /dev/null and b/data/imagesSources/save-all.png differ diff --git a/data/imagesSources/save.png b/data/imagesSources/save.png new file mode 100644 index 0000000..605f09f Binary files /dev/null and b/data/imagesSources/save.png differ diff --git a/data/imagesSources/search.png b/data/imagesSources/search.png new file mode 100644 index 0000000..a062f82 Binary files /dev/null and b/data/imagesSources/search.png differ diff --git a/data/imagesSources/trash.png b/data/imagesSources/trash.png new file mode 100644 index 0000000..514dcc8 Binary files /dev/null and b/data/imagesSources/trash.png differ diff --git a/data/imagesSources/undo.png b/data/imagesSources/undo.png new file mode 100644 index 0000000..f12d881 Binary files /dev/null and b/data/imagesSources/undo.png differ diff --git a/data/imagesSources/virussafe.png b/data/imagesSources/virussafe.png new file mode 100644 index 0000000..b027365 Binary files /dev/null and b/data/imagesSources/virussafe.png differ diff --git a/data/lang_Makefile.xml b/data/lang_Makefile.xml new file mode 100644 index 0000000..17ddf1a --- /dev/null +++ b/data/lang_Makefile.xml @@ -0,0 +1,16 @@ + + + Makefile + .mk + + + preprocesseur + # + \n + \ + + + + + + diff --git a/data/lang_boo.xml b/data/lang_boo.xml new file mode 100644 index 0000000..441aacc --- /dev/null +++ b/data/lang_boo.xml @@ -0,0 +1,18 @@ + + + .boo + + + + + SYNTAX_ERROR + ## + \n + + + comment + # + \n + + + diff --git a/data/lang_c.xml b/data/lang_c.xml new file mode 100644 index 0000000..4a77140 --- /dev/null +++ b/data/lang_c.xml @@ -0,0 +1,124 @@ + + + .c + .cpp + .h + .hpp + + + commentDoxygen + /\*\* + \*/ + + macro + \@[A-Z_]{4,500}\@ + + + keyword + @\w*[ \t]*(\[(in|out| |,)*\])?[ \t]*([a-zA-Z0-9\-_]*) + + + + + + SYNTAX_ERROR + /\*[ \t]*@review + \*/ + + + comment + /\* + \*/ + + + preprocesseur + #[ \t]*if 0 + #endif|#else + \ + + + preprocesseur + # + \n + \ + + + commentDoxygen + //! + \n + + + SYNTAX_ERROR + //[ \t]*TODO[ \t]*: + \n + \ + + + comment + // + \n + \ + + + doubleQuoteText + " + " + \ + + + doubleQuoteText + ' + ' + + + + + + keyword + \@return|goto|if|else|case|default|switch|break|continue|while|do|for|sizeof\@ + + + systemFunction + \@try|catch|memset|fopen|fread|fwrite|fgets|fclose|printf|(f|s|diag_)printf|calloc|malloc|realloc|(cyg|sup)_([a-z]|[A-Z]|[0-9]|_)+\@ + + + type + \@bool|BOOL|char|double|float|u?int(8|16|32|64|128)?(_t)?|long|short|signed|size_t|unsigned|void|(I|U)(8|16|32|64|128)\@ + + + 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\@ + + + commonDefine + \@NULL|MAX|MIN|__LINE__|__DATA__|__FILE__|__func__|__TIME__|__STDC__\@ + + + number + \@((0(x|X)[0-9a-fA-F]*)|(\d+\.?\d*|\.\d+)((e|E)(\+|\-)?\d+)?)(L|l|UL|ul|u|U|F|f)?\@ + + + boolean + \@true|TRUE|false|FALSE\@ + + + macro + \@[A-Z_]{4,500}\@ + + + functionName + \@(\w|_)+[ \t]*\( + + + boolean + ==|<=|>=|!=|<|>|&&|\{|\}| + + + + diff --git a/data/projectEx.xml b/data/projectEx.xml new file mode 100644 index 0000000..59ee0b3 --- /dev/null +++ b/data/projectEx.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/doxygen.dox b/doxygen.dox new file mode 100644 index 0000000..6bf9670 --- /dev/null +++ b/doxygen.dox @@ -0,0 +1,265 @@ +# Doxyfile 1.5.6 + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- +DOXYFILE_ENCODING = UTF-8 +PROJECT_NAME = "Editeur De N'ours: " +PROJECT_NUMBER = +OUTPUT_DIRECTORY = "doxygen/" +CREATE_SUBDIRS = YES +OUTPUT_LANGUAGE = English +BRIEF_MEMBER_DESC = YES +REPEAT_BRIEF = YES +ABBREVIATE_BRIEF = YES +ALWAYS_DETAILED_SEC = NO +INLINE_INHERITED_MEMB = NO +FULL_PATH_NAMES = NO +STRIP_FROM_PATH = +STRIP_FROM_INC_PATH = +SHORT_NAMES = NO +JAVADOC_AUTOBRIEF = NO +QT_AUTOBRIEF = NO +MULTILINE_CPP_IS_BRIEF = NO +INHERIT_DOCS = YES +SEPARATE_MEMBER_PAGES = NO +TAB_SIZE = 4 +ALIASES = +OPTIMIZE_OUTPUT_FOR_C = YES +OPTIMIZE_OUTPUT_JAVA = NO +OPTIMIZE_FOR_FORTRAN = NO +OPTIMIZE_OUTPUT_VHDL = NO +EXTENSION_MAPPING = +BUILTIN_STL_SUPPORT = NO +CPP_CLI_SUPPORT = NO +SIP_SUPPORT = NO +IDL_PROPERTY_SUPPORT = YES +DISTRIBUTE_GROUP_DOC = NO +SUBGROUPING = YES +TYPEDEF_HIDES_STRUCT = NO +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- +SYMBOL_CACHE_SIZE = 0 +EXTRACT_ALL = YES +EXTRACT_PRIVATE = YES +EXTRACT_STATIC = YES +EXTRACT_LOCAL_CLASSES = YES +EXTRACT_LOCAL_METHODS = YES +EXTRACT_ANON_NSPACES = YES +HIDE_UNDOC_MEMBERS = NO +HIDE_UNDOC_CLASSES = NO +HIDE_FRIEND_COMPOUNDS = NO +HIDE_IN_BODY_DOCS = NO +INTERNAL_DOCS = YES +CASE_SENSE_NAMES = YES +HIDE_SCOPE_NAMES = NO +SHOW_INCLUDE_FILES = YES +INLINE_INFO = YES +SORT_MEMBER_DOCS = YES +SORT_BRIEF_DOCS = NO +SORT_MEMBERS_CTORS_1ST = NO +SORT_GROUP_NAMES = NO +SORT_BY_SCOPE_NAME = NO +GENERATE_TODOLIST = YES +GENERATE_TESTLIST = YES +GENERATE_BUGLIST = YES +GENERATE_DEPRECATEDLIST= YES +ENABLED_SECTIONS = +MAX_INITIALIZER_LINES = 30 +SHOW_USED_FILES = YES +SHOW_DIRECTORIES = NO +SHOW_FILES = YES +SHOW_NAMESPACES = YES +FILE_VERSION_FILTER = +LAYOUT_FILE = +#--------------------------------------------------------------------------- +# configuration options related to warning and progress messages +#--------------------------------------------------------------------------- +QUIET = NO +WARNINGS = YES +WARN_IF_UNDOCUMENTED = YES +WARN_IF_DOC_ERROR = YES +WARN_NO_PARAMDOC = NO +WARN_FORMAT = "$file($line): $text" +WARN_LOGFILE = "doxygen.log" +#--------------------------------------------------------------------------- +# configuration options related to the input files +#--------------------------------------------------------------------------- +INPUT = Sources +INPUT_ENCODING = UTF-8 +FILE_PATTERNS = *.c \ + *.cpp \ + *.h +RECURSIVE = YES +EXCLUDE = +EXCLUDE_SYMLINKS = NO +EXCLUDE_PATTERNS = +EXCLUDE_SYMBOLS = +EXAMPLE_PATH = +EXAMPLE_PATTERNS = +EXAMPLE_RECURSIVE = NO +IMAGE_PATH = data/dox/ +INPUT_FILTER = +FILTER_PATTERNS = +FILTER_SOURCE_FILES = NO +#--------------------------------------------------------------------------- +# configuration options related to source browsing +#--------------------------------------------------------------------------- +SOURCE_BROWSER = NO +INLINE_SOURCES = NO +STRIP_CODE_COMMENTS = YES +REFERENCED_BY_RELATION = NO +REFERENCES_RELATION = NO +REFERENCES_LINK_SOURCE = YES +USE_HTAGS = NO +VERBATIM_HEADERS = NO +#--------------------------------------------------------------------------- +# configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- +ALPHABETICAL_INDEX = YES +COLS_IN_ALPHA_INDEX = 5 +IGNORE_PREFIX = +#--------------------------------------------------------------------------- +# configuration options related to the HTML output +#--------------------------------------------------------------------------- +GENERATE_HTML = YES +HTML_OUTPUT = ALL +HTML_FILE_EXTENSION = .html +HTML_HEADER = +HTML_FOOTER = +HTML_STYLESHEET = data/dox/doxygen.css +HTML_ALIGN_MEMBERS = YES +HTML_DYNAMIC_SECTIONS = NO +GENERATE_DOCSET = NO +DOCSET_FEEDNAME = "Doxygen generated docs" +DOCSET_BUNDLE_ID = org.doxygen.Project +GENERATE_HTMLHELP = NO +CHM_FILE = +HHC_LOCATION = +GENERATE_CHI = NO +CHM_INDEX_ENCODING = +BINARY_TOC = NO +TOC_EXPAND = YES +GENERATE_QHP = NO +QCH_FILE = +QHP_NAMESPACE = +QHP_VIRTUAL_FOLDER = doc +QHP_CUST_FILTER_NAME = +QHP_CUST_FILTER_ATTRS = +QHP_SECT_FILTER_ATTRS = +QHG_LOCATION = +DISABLE_INDEX = NO +ENUM_VALUES_PER_LINE = 1 +GENERATE_TREEVIEW = YES +USE_INLINE_TREES = NO +TREEVIEW_WIDTH = 250 +FORMULA_FONTSIZE = 10 +SEARCHENGINE = YES +#--------------------------------------------------------------------------- +# configuration options related to the LaTeX output +#--------------------------------------------------------------------------- +GENERATE_LATEX = NO +LATEX_OUTPUT = latex +LATEX_CMD_NAME = latex +MAKEINDEX_CMD_NAME = makeindex +COMPACT_LATEX = NO +PAPER_TYPE = a4wide +EXTRA_PACKAGES = +LATEX_HEADER = +PDF_HYPERLINKS = NO +USE_PDFLATEX = NO +LATEX_BATCHMODE = NO +LATEX_HIDE_INDICES = NO +LATEX_SOURCE_CODE = NO +#--------------------------------------------------------------------------- +# configuration options related to the RTF output +#--------------------------------------------------------------------------- +GENERATE_RTF = NO +RTF_OUTPUT = rtf +COMPACT_RTF = NO +RTF_HYPERLINKS = NO +RTF_STYLESHEET_FILE = +RTF_EXTENSIONS_FILE = +#--------------------------------------------------------------------------- +# configuration options related to the man page output +#--------------------------------------------------------------------------- +GENERATE_MAN = NO +MAN_OUTPUT = man +MAN_EXTENSION = .3 +MAN_LINKS = NO +#--------------------------------------------------------------------------- +# configuration options related to the XML output +#--------------------------------------------------------------------------- +GENERATE_XML = NO +XML_OUTPUT = xml +XML_SCHEMA = +XML_DTD = +XML_PROGRAMLISTING = YES +#--------------------------------------------------------------------------- +# configuration options for the AutoGen Definitions output +#--------------------------------------------------------------------------- +GENERATE_AUTOGEN_DEF = NO +#--------------------------------------------------------------------------- +# configuration options related to the Perl module output +#--------------------------------------------------------------------------- +GENERATE_PERLMOD = NO +PERLMOD_LATEX = NO +PERLMOD_PRETTY = YES +PERLMOD_MAKEVAR_PREFIX = +#--------------------------------------------------------------------------- +# Configuration options related to the preprocessor +#--------------------------------------------------------------------------- +ENABLE_PREPROCESSING = YES +MACRO_EXPANSION = YES +EXPAND_ONLY_PREDEF = YES +SEARCH_INCLUDES = YES +INCLUDE_PATH = +INCLUDE_FILE_PATTERNS = +PREDEFINED = +EXPAND_AS_DEFINED = +SKIP_FUNCTION_MACROS = NO +#--------------------------------------------------------------------------- +# Configuration::additions related to external references +#--------------------------------------------------------------------------- +TAGFILES = +GENERATE_TAGFILE = +ALLEXTERNALS = NO +EXTERNAL_GROUPS = YES +PERL_PATH = /usr/bin/perl +#--------------------------------------------------------------------------- +# Configuration options related to the dot tool +#--------------------------------------------------------------------------- +CLASS_DIAGRAMS = YES +MSCGEN_PATH = +HIDE_UNDOC_RELATIONS = YES +HAVE_DOT = YES +DOT_FONTNAME = FreeSans +DOT_FONTSIZE = 10 +DOT_FONTPATH = +CLASS_GRAPH = YES +COLLABORATION_GRAPH = YES +GROUP_GRAPHS = YES +UML_LOOK = YES +TEMPLATE_RELATIONS = YES +INCLUDE_GRAPH = YES +INCLUDED_BY_GRAPH = YES +CALL_GRAPH = YES +CALLER_GRAPH = YES +GRAPHICAL_HIERARCHY = YES +DIRECTORY_GRAPH = YES +DOT_IMAGE_FORMAT = png +#DOT_PATH = /usr/bin/dot +DOTFILE_DIRS = +MAX_DOT_GRAPH_WIDTH = 1024 +MAX_DOT_GRAPH_HEIGHT = 1024 +DOT_GRAPH_MAX_NODES = 50 +MAX_DOT_GRAPH_DEPTH = 0 +DOT_TRANSPARENT = YES +DOT_MULTI_TARGETS = NO +GENERATE_LEGEND = YES +DOT_CLEANUP = YES +#--------------------------------------------------------------------------- +# Configuration::additions related to the search engine +#--------------------------------------------------------------------------- +SEARCHENGINE = YES diff --git a/licence.txt b/licence.txt new file mode 100644 index 0000000..c7a2ce7 --- /dev/null +++ b/licence.txt @@ -0,0 +1,27 @@ +===================================================================== +== Copyright 2010 Edouard DUPIN, all right reserved == +===================================================================== + +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. + +Terms of license: + +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. + - Write Java sources code with this software. + +I reserve the right to change this licence. If it change the version of the copy you have keep its own license + diff --git a/tags b/tags new file mode 100644 index 0000000..0997ec8 --- /dev/null +++ b/tags @@ -0,0 +1,2041 @@ +!_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/ +!_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/ +!_TAG_PROGRAM_AUTHOR Darren Hiebert /dhiebert@users.sourceforge.net/ +!_TAG_PROGRAM_NAME Exuberant Ctags // +!_TAG_PROGRAM_URL http://ctags.sourceforge.net /official site/ +!_TAG_PROGRAM_VERSION 5.8 // +AL_MUTEX Sources/tools/AL/AL_Mutex.h /^typedef pthread_mutex_t AL_MUTEX;$/;" t +AL_mutex_destroy Sources/tools/AL/AL_Mutex.cpp /^erreurCode_te AL_mutex_destroy(AL_MUTEX * pointerMutex)$/;" f +AL_mutex_init Sources/tools/AL/AL_Mutex.cpp /^erreurCode_te AL_mutex_init(AL_MUTEX * pointerMutex,bool recursive)$/;" f +AL_mutex_lock Sources/tools/AL/AL_Mutex.cpp /^void AL_mutex_lock(AL_MUTEX * pointerMutex)$/;" f +AL_mutex_timedlock Sources/tools/AL/AL_Mutex.cpp /^erreurCode_te AL_mutex_timedlock(AL_MUTEX * pointerMutex, int32_t delay)$/;" f +AL_mutex_trylock Sources/tools/AL/AL_Mutex.cpp /^erreurCode_te AL_mutex_trylock(AL_MUTEX * pointerMutex)$/;" f +AL_mutex_unlock Sources/tools/AL/AL_Mutex.cpp /^void AL_mutex_unlock(AL_MUTEX * pointerMutex)$/;" f +AccelKey Sources/tools/MsgBroadcast/AccelKey.cpp /^AccelKey::AccelKey(void)$/;" f class:AccelKey +AccelKey Sources/tools/MsgBroadcast/AccelKey.h /^class AccelKey: public Singleton$/;" c +Accept Sources/tools/tinyXML/tinyxml.cpp /^bool TiXmlComment::Accept( TiXmlVisitor* visitor ) const$/;" f class:TiXmlComment +Accept Sources/tools/tinyXML/tinyxml.cpp /^bool TiXmlDeclaration::Accept( TiXmlVisitor* visitor ) const$/;" f class:TiXmlDeclaration +Accept Sources/tools/tinyXML/tinyxml.cpp /^bool TiXmlDocument::Accept( TiXmlVisitor* visitor ) const$/;" f class:TiXmlDocument +Accept Sources/tools/tinyXML/tinyxml.cpp /^bool TiXmlElement::Accept( TiXmlVisitor* visitor ) const$/;" f class:TiXmlElement +Accept Sources/tools/tinyXML/tinyxml.cpp /^bool TiXmlText::Accept( TiXmlVisitor* visitor ) const$/;" f class:TiXmlText +Accept Sources/tools/tinyXML/tinyxml.cpp /^bool TiXmlUnknown::Accept( TiXmlVisitor* visitor ) const$/;" f class:TiXmlUnknown +Add Sources/GuiTools/MainWindows/MenuBar.cpp /^ void Add(const char * title, const char * accelKey, messageType_te id = EDN_MSG__NONE, bool enable = false, int32_t dataSpecificID = -1)$/;" f class:MenuBarMain +Add Sources/GuiTools/MainWindows/ToolBar.cpp /^void ToolBar::Add(const char * title, const char * labelHelp, messageType_te id, bool enable)$/;" f class:ToolBar +Add Sources/tools/EdnTemplate/EdnTree.h /^ int32_t Add(T &maNouvelleClass, int32_t parent=-1)$/;" f class:EdnTree +Add Sources/tools/NameSpaceEdn/String.cpp /^void Edn::String::Add(int32_t currentID, const char* inputData)$/;" f class:Edn::String +Add Sources/tools/tinyXML/tinyxml.cpp /^void TiXmlAttributeSet::Add( TiXmlAttribute* addMe )$/;" f class:TiXmlAttributeSet +AddChar Sources/Buffer/Buffer.cpp /^void Buffer::AddChar(char * UTF8data)$/;" f class:Buffer +AddChar Sources/Buffer/BufferText.cpp /^void BufferText::AddChar(char * UTF8data)$/;" f class:BufferText +AddGen Sources/GuiTools/MainWindows/MenuBar.cpp /^ void AddGen(const char * title, const char * accelKey, messageType_te id = EDN_MSG__NONE, bool enable = false, int32_t dataSpecificID = -1)$/;" f class:MenuBarMain +AddInternal Sources/GuiTools/MainWindows/MenuBar.cpp /^ void AddInternal(const char * title, const char * accelKey, const char * msg, bool enable = false)$/;" f class:MenuBarMain +AddReceiver Sources/tools/MsgBroadcast/MsgBroadcast.cpp /^void MsgBroadcastCore::AddReceiver(MsgBroadcast * pointerOnReceiver)$/;" f class:MsgBroadcastCore +AddSeparator Sources/GuiTools/MainWindows/MenuBar.cpp /^ void AddSeparator(void)$/;" f class:MenuBarMain +AddSeparator Sources/GuiTools/MainWindows/ToolBar.cpp /^void ToolBar::AddSeparator(void)$/;" f class:ToolBar +AddToHistory Sources/ctags/CTagsManager.cpp /^void CTagsManager::AddToHistory(int32_t bufferID)$/;" f class:CTagsManager +AllocatedSize Sources/tools/EdnTemplate/EdnVectorBin.h /^ int32_t AllocatedSize() const$/;" f class:EdnVectorBin +ApplyBG Sources/Colorize/Colorize.h /^ void ApplyBG(cairo_t * cr) { cairo_set_source_rgb(cr, m_colorBG.red, m_colorBG.green, m_colorBG.blue); };$/;" f class:Colorize +ApplyFG Sources/Colorize/Colorize.h /^ void ApplyFG(cairo_t * cr) { cairo_set_source_rgb(cr, m_colorFG.red, m_colorFG.green, m_colorFG.blue); };$/;" f class:Colorize +Attribute Sources/tools/tinyXML/tinyxml.cpp /^const char* TiXmlElement::Attribute( const char* name ) const$/;" f class:TiXmlElement +Attribute Sources/tools/tinyXML/tinyxml.cpp /^const char* TiXmlElement::Attribute( const char* name, double* d ) const$/;" f class:TiXmlElement +Attribute Sources/tools/tinyXML/tinyxml.cpp /^const char* TiXmlElement::Attribute( const char* name, int* i ) const$/;" f class:TiXmlElement +Attribute Sources/tools/tinyXML/tinyxml.cpp /^const std::string* TiXmlElement::Attribute( const std::string& name ) const$/;" f class:TiXmlElement +Attribute Sources/tools/tinyXML/tinyxml.cpp /^const std::string* TiXmlElement::Attribute( const std::string& name, double* d ) const$/;" f class:TiXmlElement +Attribute Sources/tools/tinyXML/tinyxml.cpp /^const std::string* TiXmlElement::Attribute( const std::string& name, int* i ) const$/;" f class:TiXmlElement +AutoIndent Sources/tools/globals/tools_globals.cpp /^static bool AutoIndent = true;$/;" v file: +BOOL Sources/tools/debug/types_generique.h /^typedef bool BOOL;$/;" t +BasicInit Sources/Buffer/BufferText.cpp /^void BufferText::BasicInit(void)$/;" f class:BufferText +Begin Sources/tools/EdnTemplate/EdnVector.h /^ Iterator Begin()$/;" f class:EdnVector +Begin Sources/tools/EdnTemplate/EdnVectorBin.h /^ Iterator Begin(void)$/;" f class:EdnVectorBin +Begin Sources/tools/EdnTemplate/EdnVectorBuf.h /^ Iterator Begin()$/;" f class:EdnVectorBuf +Blank Sources/tools/tinyXML/tinyxmlparser.cpp /^bool TiXmlText::Blank() const$/;" f class:TiXmlText +Buffer Sources/Buffer/Buffer.cpp /^Buffer::Buffer()$/;" f class:Buffer +Buffer Sources/Buffer/Buffer.cpp /^Buffer::Buffer(Edn::String &newFileName)$/;" f class:Buffer +Buffer Sources/Buffer/Buffer.h /^class Buffer {$/;" c +BufferEmpty Sources/Buffer/BufferEmpty.cpp /^BufferEmpty::BufferEmpty()$/;" f class:BufferEmpty +BufferEmpty Sources/Buffer/BufferEmpty.h /^class BufferEmpty : public Buffer {$/;" c +BufferManager Sources/Buffer/BufferManager.cpp /^BufferManager::BufferManager(void) : MsgBroadcast("Buffer Manager", EDN_CAT_BUFFER_MANAGER)$/;" f class:BufferManager +BufferManager Sources/Buffer/BufferManager.h /^class BufferManager: public Singleton, public MsgBroadcast$/;" c +BufferNotExiste Sources/Buffer/BufferManager.h /^ Buffer * BufferNotExiste; \/\/!< When an error arrive in get buffer we return the Error buffer (not writable)$/;" m class:BufferManager +BufferText Sources/Buffer/BufferText.cpp /^BufferText::BufferText()$/;" f class:BufferText +BufferText Sources/Buffer/BufferText.cpp /^BufferText::BufferText(Edn::String &newFileName)$/;" f class:BufferText +BufferText Sources/Buffer/BufferText.h /^class BufferText : public Buffer {$/;" c +BufferView Sources/CustumWidget/BufferView/BufferView.cpp /^BufferView::BufferView(void) : MsgBroadcast("Buffer View", EDN_CAT_GUI)$/;" f class:BufferView +BufferView Sources/CustumWidget/BufferView/BufferView.h /^class BufferView : public MsgBroadcast$/;" c +CB_displayDraw Sources/CustumWidget/BufferView/BufferView.cpp /^gboolean BufferView::CB_displayDraw( GtkWidget *widget, GdkEventExpose *event, gpointer data)$/;" f class:BufferView +CB_displayDraw Sources/CustumWidget/CodeView/CodeView.cpp /^gboolean CodeView::CB_displayDraw( GtkWidget *widget, GdkEventExpose *event, gpointer data)$/;" f class:CodeView +CB_displayInit Sources/CustumWidget/BufferView/BufferView.cpp /^gboolean BufferView::CB_displayInit( GtkWidget *widget, gpointer data)$/;" f class:BufferView +CB_displayInit Sources/CustumWidget/CodeView/CodeView.cpp /^gboolean CodeView::CB_displayInit( GtkWidget *widget, gpointer data)$/;" f class:CodeView +CB_focusGet Sources/CustumWidget/BufferView/BufferView.cpp /^gint BufferView::CB_focusGet( GtkWidget *widget, GdkEventFocus *event, gpointer data)$/;" f class:BufferView +CB_focusGet Sources/CustumWidget/CodeView/CodeView.cpp /^gint CodeView::CB_focusGet( GtkWidget *widget, GdkEventFocus *event, gpointer data)$/;" f class:CodeView +CB_focusLost Sources/CustumWidget/BufferView/BufferView.cpp /^gint BufferView::CB_focusLost( GtkWidget *widget, GdkEventFocus *event, gpointer data)$/;" f class:BufferView +CB_focusLost Sources/CustumWidget/CodeView/CodeView.cpp /^gint CodeView::CB_focusLost( GtkWidget *widget, GdkEventFocus *event, gpointer data)$/;" f class:CodeView +CB_keyboardEvent Sources/CustumWidget/BufferView/BufferView.cpp /^gint BufferView::CB_keyboardEvent( GtkWidget *widget, GdkEventKey *event, gpointer data)$/;" f class:BufferView +CB_keyboardEvent Sources/CustumWidget/CodeView/CodeView.cpp /^gint CodeView::CB_keyboardEvent(GtkWidget *widget, GdkEventKey *event, gpointer data)$/;" f class:CodeView +CB_menuGenerique Sources/GuiTools/MainWindows/MenuBar.cpp /^static void CB_menuGenerique(GtkMenuItem *menu_item, gpointer data)$/;" f file: +CB_menuGenerique Sources/GuiTools/MainWindows/ToolBar.cpp /^static void CB_menuGenerique(GtkMenuItem *menu_item, gpointer data)$/;" f file: +CB_menuInternal Sources/GuiTools/MainWindows/MenuBar.cpp /^static void CB_menuInternal(GtkMenuItem *menu_item, gpointer data)$/;" f file: +CB_mouseButtonEvent Sources/CustumWidget/BufferView/BufferView.cpp /^gint BufferView::CB_mouseButtonEvent(GtkWidget *widget, GdkEventButton *event, gpointer data)$/;" f class:BufferView +CB_mouseButtonEvent Sources/CustumWidget/CodeView/CodeView.cpp /^gint CodeView::CB_mouseButtonEvent(GtkWidget *widget, GdkEventButton *event, gpointer data)$/;" f class:CodeView +CB_mouseMotionEvent Sources/CustumWidget/BufferView/BufferView.cpp /^gint BufferView::CB_mouseMotionEvent( GtkWidget *widget, GdkEventMotion *event, gpointer data)$/;" f class:BufferView +CB_mouseMotionEvent Sources/CustumWidget/CodeView/CodeView.cpp /^gint CodeView::CB_mouseMotionEvent( GtkWidget *widget, GdkEventMotion *event, gpointer data)$/;" f class:CodeView +CB_mouseScrollEvent Sources/CustumWidget/CodeView/CodeView.cpp /^gint CodeView::CB_mouseScrollEvent( GtkWidget *widget, GdkEventScroll *event, gpointer data)$/;" f class:CodeView +CDATA Sources/tools/tinyXML/tinyxml.h /^ bool CDATA() const { return cdata; }$/;" f class:TiXmlText +CHECK_MAGIC Sources/tools/debug/tools_debug.h 144;" d +CHECK_MAGIC Sources/tools/debug/tools_debug.h 147;" d +COLOR_BG_BLACK Sources/tools/debug/tools_debug.h 55;" d +COLOR_BG_BLUE Sources/tools/debug/tools_debug.h 59;" d +COLOR_BG_CYAN Sources/tools/debug/tools_debug.h 61;" d +COLOR_BG_GREEN Sources/tools/debug/tools_debug.h 57;" d +COLOR_BG_MAGENTA Sources/tools/debug/tools_debug.h 60;" d +COLOR_BG_RED Sources/tools/debug/tools_debug.h 56;" d +COLOR_BG_WHITE Sources/tools/debug/tools_debug.h 62;" d +COLOR_BG_YELLOW Sources/tools/debug/tools_debug.h 58;" d +COLOR_BLACK Sources/tools/debug/tools_debug.h 37;" d +COLOR_BLUE Sources/tools/debug/tools_debug.h 41;" d +COLOR_BOLD_BLACK Sources/tools/debug/tools_debug.h 46;" d +COLOR_BOLD_BLUE Sources/tools/debug/tools_debug.h 50;" d +COLOR_BOLD_CYAN Sources/tools/debug/tools_debug.h 52;" d +COLOR_BOLD_GREEN Sources/tools/debug/tools_debug.h 48;" d +COLOR_BOLD_MAGENTA Sources/tools/debug/tools_debug.h 51;" d +COLOR_BOLD_RED Sources/tools/debug/tools_debug.h 47;" d +COLOR_BOLD_WHITE Sources/tools/debug/tools_debug.h 53;" d +COLOR_BOLD_YELLOW Sources/tools/debug/tools_debug.h 49;" d +COLOR_CODE_BASIC_BG Sources/Colorize/ColorizeManager.h /^ COLOR_CODE_BASIC_BG,$/;" e enum:__anon17 +COLOR_CODE_CURSOR Sources/Colorize/ColorizeManager.h /^ COLOR_CODE_CURSOR,$/;" e enum:__anon17 +COLOR_CODE_LINE_NUMBER Sources/Colorize/ColorizeManager.h /^ COLOR_CODE_LINE_NUMBER,$/;" e enum:__anon17 +COLOR_CODE_SPACE Sources/Colorize/ColorizeManager.h /^ COLOR_CODE_SPACE,$/;" e enum:__anon17 +COLOR_CODE_TAB Sources/Colorize/ColorizeManager.h /^ COLOR_CODE_TAB,$/;" e enum:__anon17 +COLOR_CYAN Sources/tools/debug/tools_debug.h 43;" d +COLOR_GREEN Sources/tools/debug/tools_debug.h 39;" d +COLOR_LIST_BG_1 Sources/Colorize/ColorizeManager.h /^ COLOR_LIST_BG_1,$/;" e enum:__anon17 +COLOR_LIST_BG_2 Sources/Colorize/ColorizeManager.h /^ COLOR_LIST_BG_2,$/;" e enum:__anon17 +COLOR_LIST_BG_SELECTED Sources/Colorize/ColorizeManager.h /^ COLOR_LIST_BG_SELECTED,$/;" e enum:__anon17 +COLOR_LIST_TEXT_MODIFY Sources/Colorize/ColorizeManager.h /^ COLOR_LIST_TEXT_MODIFY,$/;" e enum:__anon17 +COLOR_LIST_TEXT_NORMAL Sources/Colorize/ColorizeManager.h /^ COLOR_LIST_TEXT_NORMAL,$/;" e enum:__anon17 +COLOR_MAGENTA Sources/tools/debug/tools_debug.h 42;" d +COLOR_NORMAL Sources/tools/debug/tools_debug.h 64;" d +COLOR_NUMBER_MAX Sources/Colorize/ColorizeManager.h /^ COLOR_NUMBER_MAX,$/;" e enum:__anon17 +COLOR_RED Sources/tools/debug/tools_debug.h 38;" d +COLOR_WHITE Sources/tools/debug/tools_debug.h 44;" d +COLOR_YELLOW Sources/tools/debug/tools_debug.h 40;" d +COPY_MIDDLE_BUTTON Sources/tools/ClipBoard/ClipBoard.h 33;" d +COPY_STD Sources/tools/ClipBoard/ClipBoard.h 34;" d +CStr Sources/tools/tinyXML/tinyxml.h /^ const char* CStr() { return buffer.c_str(); }$/;" f class:TiXmlPrinter +CTagsManager Sources/ctags/CTagsManager.cpp /^CTagsManager::CTagsManager(void) : MsgBroadcast("C-Tags Manager", EDN_CAT_CTAGS)$/;" f class:CTagsManager +CTagsManager Sources/ctags/CTagsManager.h /^class CTagsManager: public Singleton, public MsgBroadcast$/;" c +CURSOR_DISPLAY_MODE_INSERT Sources/Buffer/BufferText.h /^ CURSOR_DISPLAY_MODE_INSERT,$/;" e enum:__anon35 +CURSOR_DISPLAY_MODE_NORMAL Sources/Buffer/BufferText.h /^ CURSOR_DISPLAY_MODE_NORMAL = 259,$/;" e enum:__anon35 +CURSOR_DISPLAY_MODE_NOT_FOCUS Sources/Buffer/BufferText.h /^ CURSOR_DISPLAY_MODE_NOT_FOCUS,$/;" e enum:__anon35 +CURSOR_WIDTH Sources/tools/Display/Display.cpp 399;" d file: +ChangeAllocation Sources/tools/EdnTemplate/EdnVector.h /^ void ChangeAllocation(int count)$/;" f class:EdnVector +ChangeAllocation Sources/tools/EdnTemplate/EdnVectorBin.h /^ void ChangeAllocation(int32_t newSize)$/;" f class:EdnVectorBin +ChangeAllocation Sources/tools/EdnTemplate/EdnVectorBuf.cpp /^void EdnVectorBuf::ChangeAllocation(int32_t newSize)$/;" f class:EdnVectorBuf +CharWidth Sources/tools/EdnBuf/EdnBuf.cpp /^int32_t EdnBuf::CharWidth(char c, int32_t indent)$/;" f class:EdnBuf +CheckGoodPosition Sources/tools/EdnRegExp/EdnRegExp.cpp /^bool EdnRegExp::CheckGoodPosition(EdnVectorBin tmpExp)$/;" f class:EdnRegExp +CheckGoodPosition Sources/tools/EdnRegExp/EdnRegExp.cpp /^bool EdnRegExp::CheckGoodPosition(EdnVectorBin tmpExp, int32_t &pos)$/;" f class:EdnRegExp +CheckPresence Sources/tools/EdnTemplate/EdnTree.h /^ bool CheckPresence(int32_t id)$/;" f class:EdnTree +CheckPresenceParrent Sources/tools/EdnTemplate/EdnTree.h /^ bool CheckPresenceParrent(int32_t parrentId)$/;" f class:EdnTree +CheckSubMenu Sources/GuiTools/MainWindows/MenuBar.cpp /^ void CheckSubMenu(void)$/;" f class:MenuBarMain file: +Child Sources/tools/tinyXML/tinyxml.cpp /^TiXmlHandle TiXmlHandle::Child( const char* value, int count ) const$/;" f class:TiXmlHandle +Child Sources/tools/tinyXML/tinyxml.cpp /^TiXmlHandle TiXmlHandle::Child( int count ) const$/;" f class:TiXmlHandle +Child Sources/tools/tinyXML/tinyxml.h /^ TiXmlHandle Child( const std::string& _value, int index ) const { return Child( _value.c_str(), index ); }$/;" f class:TiXmlHandle +ChildElement Sources/tools/tinyXML/tinyxml.cpp /^TiXmlHandle TiXmlHandle::ChildElement( const char* value, int count ) const$/;" f class:TiXmlHandle +ChildElement Sources/tools/tinyXML/tinyxml.cpp /^TiXmlHandle TiXmlHandle::ChildElement( int count ) const$/;" f class:TiXmlHandle +ChildElement Sources/tools/tinyXML/tinyxml.h /^ TiXmlHandle ChildElement( const std::string& _value, int index ) const { return ChildElement( _value.c_str(), index ); }$/;" f class:TiXmlHandle +Clean Sources/tools/Display/Display.cpp /^void DrawerManager::Clean(Colorize *SelectColor)$/;" f class:DrawerManager +Clean Sources/tools/Display/Display.cpp /^void DrawerManager::Clean(color_ts & SelectColor)$/;" f class:DrawerManager +CleanHighLight Sources/tools/EdnBuf/EdnBuf_HighLight.cpp /^void EdnBuf::CleanHighLight(void)$/;" f class:EdnBuf +Clear Sources/tools/EdnTemplate/EdnTree.h /^ bool Clear(void)$/;" f class:EdnTree +Clear Sources/tools/EdnTemplate/EdnVectorBin.h /^ void Clear(void)$/;" f class:EdnVectorBin +Clear Sources/tools/EdnTemplate/EdnVectorBuf.cpp /^void EdnVectorBuf::Clear(void)$/;" f class:EdnVectorBuf +Clear Sources/tools/NameSpaceEdn/String.cpp /^void Edn::String::Clear(void)$/;" f class:Edn::String +Clear Sources/tools/tinyXML/tinyxml.cpp /^void TiXmlNode::Clear()$/;" f class:TiXmlNode +Clear Sources/tools/tinyXML/tinyxml.h /^ void Clear() { row = col = -1; }$/;" f struct:TiXmlCursor +ClearError Sources/tools/tinyXML/tinyxml.h /^ void ClearError() { error = false; $/;" f class:TiXmlDocument +ClearThis Sources/tools/tinyXML/tinyxml.cpp /^void TiXmlElement::ClearThis()$/;" f class:TiXmlElement +ClipBoard Sources/tools/ClipBoard/ClipBoard.h /^ namespace ClipBoard$/;" n +Clone Sources/tools/tinyXML/tinyxml.cpp /^TiXmlNode* TiXmlComment::Clone() const$/;" f class:TiXmlComment +Clone Sources/tools/tinyXML/tinyxml.cpp /^TiXmlNode* TiXmlDeclaration::Clone() const$/;" f class:TiXmlDeclaration +Clone Sources/tools/tinyXML/tinyxml.cpp /^TiXmlNode* TiXmlDocument::Clone() const$/;" f class:TiXmlDocument +Clone Sources/tools/tinyXML/tinyxml.cpp /^TiXmlNode* TiXmlElement::Clone() const$/;" f class:TiXmlElement +Clone Sources/tools/tinyXML/tinyxml.cpp /^TiXmlNode* TiXmlText::Clone() const$/;" f class:TiXmlText +Clone Sources/tools/tinyXML/tinyxml.cpp /^TiXmlNode* TiXmlUnknown::Clone() const$/;" f class:TiXmlUnknown +CodeView Sources/CustumWidget/CodeView/CodeView.cpp /^CodeView::CodeView(void) : MsgBroadcast("Code View", EDN_CAT_WORK_AREA)$/;" f class:CodeView +CodeView Sources/CustumWidget/CodeView/CodeView.h /^class CodeView : public MsgBroadcast$/;" c +ColorName Sources/Colorize/Colorize.h /^ Edn::String ColorName; \/\/!< curent color Name$/;" m class:Colorize +Colorize Sources/Colorize/Colorize.cpp /^Colorize::Colorize( Edn::String &newColorName)$/;" f class:Colorize +Colorize Sources/Colorize/Colorize.cpp /^Colorize::Colorize(void)$/;" f class:Colorize +Colorize Sources/Colorize/Colorize.h /^class Colorize {$/;" c +ColorizeManager Sources/Colorize/ColorizeManager.cpp /^ColorizeManager::ColorizeManager(void)$/;" f class:ColorizeManager +ColorizeManager Sources/Colorize/ColorizeManager.h /^class ColorizeManager: public Singleton$/;" c +Column Sources/tools/tinyXML/tinyxml.h /^ int Column() const { return location.col + 1; } \/\/\/< See Row()$/;" f class:TiXmlBase +ControlCodeTable Sources/tools/EdnBuf/EdnBuf.cpp /^static const char *ControlCodeTable[32] = {$/;" v file: +ConvertInput Sources/tools/charset/charset.cpp /^void ConvertInput(GdkEventKey *event, char* Utf8Out, bool &controlKey, bool &moveKey, int32_t &key)$/;" f +ConvertUTF32ToUTF8 Sources/tools/tinyXML/tinyxmlparser.cpp /^void TiXmlBase::ConvertUTF32ToUTF8( unsigned long input, char* output, int* length )$/;" f class:TiXmlBase +Copy Sources/Buffer/Buffer.cpp /^void Buffer::Copy(int8_t clipboardID)$/;" f class:Buffer +Copy Sources/Buffer/BufferText.cpp /^void BufferText::Copy(int8_t clipboardID)$/;" f class:BufferText +CopyTo Sources/tools/tinyXML/tinyxml.cpp /^void TiXmlComment::CopyTo( TiXmlComment* target ) const$/;" f class:TiXmlComment +CopyTo Sources/tools/tinyXML/tinyxml.cpp /^void TiXmlDeclaration::CopyTo( TiXmlDeclaration* target ) const$/;" f class:TiXmlDeclaration +CopyTo Sources/tools/tinyXML/tinyxml.cpp /^void TiXmlDocument::CopyTo( TiXmlDocument* target ) const$/;" f class:TiXmlDocument +CopyTo Sources/tools/tinyXML/tinyxml.cpp /^void TiXmlElement::CopyTo( TiXmlElement* target ) const$/;" f class:TiXmlElement +CopyTo Sources/tools/tinyXML/tinyxml.cpp /^void TiXmlNode::CopyTo( TiXmlNode* target ) const$/;" f class:TiXmlNode +CopyTo Sources/tools/tinyXML/tinyxml.cpp /^void TiXmlText::CopyTo( TiXmlText* target ) const$/;" f class:TiXmlText +CopyTo Sources/tools/tinyXML/tinyxml.cpp /^void TiXmlUnknown::CopyTo( TiXmlUnknown* target ) const$/;" f class:TiXmlUnknown +CountBackwardNLines Sources/tools/EdnBuf/EdnBuf.cpp /^int32_t EdnBuf::CountBackwardNLines(int32_t startPos, int32_t nLines)$/;" f class:EdnBuf +CountDispChars Sources/tools/EdnBuf/EdnBuf.cpp /^int32_t EdnBuf::CountDispChars(int32_t lineStartPos, int32_t targetPos)$/;" f class:EdnBuf +CountForwardDispChars Sources/tools/EdnBuf/EdnBuf.cpp /^int32_t EdnBuf::CountForwardDispChars(int32_t lineStartPos, int32_t nChars)$/;" f class:EdnBuf +CountForwardNLines Sources/tools/EdnBuf/EdnBuf.cpp /^int32_t EdnBuf::CountForwardNLines(int32_t startPos, int32_t nLines)$/;" f class:EdnBuf +CountLines Sources/tools/EdnBuf/EdnBuf.cpp /^int32_t EdnBuf::CountLines(EdnVectorBin &data)$/;" f class:EdnBuf +CountLines Sources/tools/EdnBuf/EdnBuf.cpp /^int32_t EdnBuf::CountLines(int32_t startPos, int32_t endPos)$/;" f class:EdnBuf +CountLines Sources/tools/EdnBuf/EdnBuf.cpp /^int32_t EdnBuf::CountLines(void)$/;" f class:EdnBuf +CountNumberOfLines Sources/tools/EdnBuf/EdnBuf.cpp /^void EdnBuf::CountNumberOfLines(void)$/;" f class:EdnBuf +Create Sources/Buffer/BufferManager.cpp /^int32_t BufferManager::Create(void)$/;" f class:BufferManager +Cursor Sources/tools/Display/Display.cpp /^void DrawerManager::Cursor(int32_t x, int32_t y)$/;" f class:DrawerManager +Cursor Sources/tools/tinyXML/tinyxmlparser.cpp /^ const TiXmlCursor& Cursor() { return cursor; }$/;" f class:TiXmlParsingData +Cut Sources/Buffer/Buffer.cpp /^void Buffer::Cut(int8_t clipboardID)$/;" f class:Buffer +Cut Sources/Buffer/BufferText.cpp /^void BufferText::Cut(int8_t clipboardID)$/;" f class:BufferText +DEBUG Sources/tools/tinyXML/tinyxml.h 43;" d +Destroy Sources/GuiTools/Search/Search.cpp /^void Search::Destroy(void)$/;" f class:Search +Destroy Sources/tools/EdnTemplate/EdnVector.h /^ void Destroy()$/;" f class:EdnVector +DirectRectangle Sources/tools/Display/Display.cpp /^void DrawerManager::DirectRectangle(Colorize *SelectColor, int32_t x, int32_t y, int32_t width, int32_t height)$/;" f class:DrawerManager +DirectRectangle Sources/tools/Display/Display.cpp /^void DrawerManager::DirectRectangle(color_ts &SelectColor, int32_t x, int32_t y, int32_t width, int32_t height)$/;" f class:DrawerManager +Display Sources/Buffer/Buffer.cpp /^int32_t Buffer::Display(DrawerManager &drawer)$/;" f class:Buffer +Display Sources/Buffer/BufferEmpty.cpp /^int32_t BufferEmpty::Display(DrawerManager &drawer)$/;" f class:BufferEmpty +Display Sources/Buffer/BufferText.cpp /^int32_t BufferText::Display(DrawerManager &drawer)$/;" f class:BufferText +Display Sources/Colorize/Colorize.h /^ void Display(int32_t i) { EDN_INFO(" " << i << " : \\"" << ColorName.c_str() << "\\"" \/*<< " fg="<< m_colorFG.red <<","<< m_colorFG.green <<","<< m_colorFG.blue <<" bg="<< m_colorBG.red <<","<< m_colorBG.green <<","<< m_colorBG.blue*\/ ); };$/;" f class:Colorize +Display Sources/GuiTools/Search/Search.cpp /^void Search::Display(void)$/;" f class:Search +Display Sources/Highlight/Highlight.cpp /^void Highlight::Display(void)$/;" f class:Highlight +Display Sources/Highlight/HighlightPattern.cpp /^void HighlightPattern::Display(void)$/;" f class:HighlightPattern +Display Sources/tools/Display/Display.h /^namespace Display$/;" n +Display Sources/tools/EdnRegExp/EdnRegExp.cpp /^void EdnRegExp::Display(void)$/;" f class:EdnRegExp +Display Sources/tools/EdnRegExp/EdnRegExp.cpp /^void RegExpNode::Display(int32_t level)$/;" f class:RegExpNode +Display Sources/tools/EdnRegExp/EdnRegExp.cpp /^void RegExpNodeBracket::Display(int32_t level)$/;" f class:RegExpNodeBracket +Display Sources/tools/EdnRegExp/EdnRegExp.cpp /^void RegExpNodeDigit::Display(int32_t level)$/;" f class:RegExpNodeDigit +Display Sources/tools/EdnRegExp/EdnRegExp.cpp /^void RegExpNodeDigitNot::Display(int32_t level)$/;" f class:RegExpNodeDigitNot +Display Sources/tools/EdnRegExp/EdnRegExp.cpp /^void RegExpNodeDot::Display(int32_t level)$/;" f class:RegExpNodeDot +Display Sources/tools/EdnRegExp/EdnRegExp.cpp /^void RegExpNodeEOL::Display(int32_t level)$/;" f class:RegExpNodeEOL +Display Sources/tools/EdnRegExp/EdnRegExp.cpp /^void RegExpNodeLetter::Display(int32_t level)$/;" f class:RegExpNodeLetter +Display Sources/tools/EdnRegExp/EdnRegExp.cpp /^void RegExpNodeLetterNot::Display(int32_t level)$/;" f class:RegExpNodeLetterNot +Display Sources/tools/EdnRegExp/EdnRegExp.cpp /^void RegExpNodePThese::Display(int32_t level)$/;" f class:RegExpNodePThese +Display Sources/tools/EdnRegExp/EdnRegExp.cpp /^void RegExpNodePTheseElem::Display(int32_t level)$/;" f class:RegExpNodePTheseElem +Display Sources/tools/EdnRegExp/EdnRegExp.cpp /^void RegExpNodeSOL::Display(int32_t level)$/;" f class:RegExpNodeSOL +Display Sources/tools/EdnRegExp/EdnRegExp.cpp /^void RegExpNodeValue::Display(int32_t level)$/;" f class:RegExpNodeValue +Display Sources/tools/EdnRegExp/EdnRegExp.cpp /^void RegExpNodeWhiteSpace::Display(int32_t level)$/;" f class:RegExpNodeWhiteSpace +Display Sources/tools/EdnRegExp/EdnRegExp.cpp /^void RegExpNodeWhiteSpaceNot::Display(int32_t level)$/;" f class:RegExpNodeWhiteSpaceNot +Display Sources/tools/EdnRegExp/EdnRegExp.cpp /^void RegExpNodeWordChar::Display(int32_t level)$/;" f class:RegExpNodeWordChar +Display Sources/tools/EdnRegExp/EdnRegExp.cpp /^void RegExpNodeWordCharNot::Display(int32_t level)$/;" f class:RegExpNodeWordCharNot +Display Sources/tools/EdnTemplate/EdnVectorBuf.cpp /^void EdnVectorBuf::Display(void)$/;" f class:EdnVectorBuf +DisplayData Sources/tools/EdnRegExp/EdnRegExp.cpp /^static void DisplayData(EdnVectorBin &data)$/;" f file: +DisplayElem Sources/tools/EdnRegExp/EdnRegExp.cpp /^static void DisplayElem(EdnVectorBin &data, int32_t start=0, int32_t stop=0x7FFFFFFF)$/;" f file: +DisplayListOfColor Sources/Colorize/ColorizeManager.cpp /^void ColorizeManager::DisplayListOfColor(void)$/;" f class:ColorizeManager +DisplaySystemString Sources/tools/globals/tools_globals.cpp /^void globals::DisplaySystemString(std::vector &data)$/;" f class:globals +DoIndent Sources/tools/tinyXML/tinyxml.h /^ void DoIndent() {$/;" f class:TiXmlPrinter +DoLineBreak Sources/tools/tinyXML/tinyxml.h /^ void DoLineBreak() {$/;" f class:TiXmlPrinter +DoubleValue Sources/tools/tinyXML/tinyxml.cpp /^double TiXmlAttribute::DoubleValue() const$/;" f class:TiXmlAttribute +DrawLineNumber Sources/Buffer/BufferText.cpp /^void BufferText::DrawLineNumber(DrawerManager &drawer,char *myPrint, int32_t lineNumber, int32_t positionY)$/;" f class:BufferText +DrawerManager Sources/tools/Display/Display.cpp /^DrawerManager::DrawerManager(GtkWidget * widget, int32_t x, int32_t y)$/;" f class:DrawerManager +DrawerManager Sources/tools/Display/Display.h /^class DrawerManager {$/;" c +DumpFrom Sources/tools/EdnBuf/EdnBuf.cpp /^bool EdnBuf::DumpFrom(FILE *myFile)$/;" f class:EdnBuf +DumpFrom Sources/tools/EdnTemplate/EdnVectorBuf.cpp /^bool EdnVectorBuf::DumpFrom(FILE *myFile)$/;" f class:EdnVectorBuf +DumpIn Sources/tools/EdnBuf/EdnBuf.cpp /^bool EdnBuf::DumpIn(FILE *myFile)$/;" f class:EdnBuf +DumpIn Sources/tools/EdnTemplate/EdnVectorBuf.cpp /^bool EdnVectorBuf::DumpIn(FILE *myFile)$/;" f class:EdnVectorBuf +EDN_ASSERT Sources/tools/debug/tools_debug.h 112;" d +EDN_ASSERT Sources/tools/debug/tools_debug.h 120;" d +EDN_CALLOC Sources/tools/memory/toolsMemory.h 42;" d +EDN_CALLOC Sources/tools/memory/toolsMemory.h 65;" d +EDN_CALLOC_CAST Sources/tools/memory/toolsMemory.h 45;" d +EDN_CALLOC_CAST Sources/tools/memory/toolsMemory.h 69;" d +EDN_CAT_BUFFER_MANAGER Sources/tools/MsgBroadcast/MsgBroadcast.h /^ EDN_CAT_BUFFER_MANAGER,$/;" e enum:__anon11 +EDN_CAT_CTAGS Sources/tools/MsgBroadcast/MsgBroadcast.h /^ EDN_CAT_CTAGS,$/;" e enum:__anon11 +EDN_CAT_GUI Sources/tools/MsgBroadcast/MsgBroadcast.h /^ EDN_CAT_GUI,$/;" e enum:__anon11 +EDN_CAT_GUI_MANAGER Sources/tools/MsgBroadcast/MsgBroadcast.h /^ EDN_CAT_GUI_MANAGER,$/;" e enum:__anon11 +EDN_CAT_NONE Sources/tools/MsgBroadcast/MsgBroadcast.h /^ EDN_CAT_NONE,$/;" e enum:__anon11 +EDN_CAT_SYSTEM Sources/tools/MsgBroadcast/MsgBroadcast.h /^ EDN_CAT_SYSTEM,$/;" e enum:__anon11 +EDN_CAT_WORK_AREA Sources/tools/MsgBroadcast/MsgBroadcast.h /^ EDN_CAT_WORK_AREA,$/;" e enum:__anon11 +EDN_CHARSET_ISO_8859_1 Sources/tools/charset/charset.h /^ EDN_CHARSET_ISO_8859_1,$/;" e enum:__anon9 +EDN_CHARSET_ISO_8859_10 Sources/tools/charset/charset.h /^ EDN_CHARSET_ISO_8859_10,$/;" e enum:__anon9 +EDN_CHARSET_ISO_8859_11 Sources/tools/charset/charset.h /^ EDN_CHARSET_ISO_8859_11,$/;" e enum:__anon9 +EDN_CHARSET_ISO_8859_13 Sources/tools/charset/charset.h /^ EDN_CHARSET_ISO_8859_13,$/;" e enum:__anon9 +EDN_CHARSET_ISO_8859_14 Sources/tools/charset/charset.h /^ EDN_CHARSET_ISO_8859_14,$/;" e enum:__anon9 +EDN_CHARSET_ISO_8859_15 Sources/tools/charset/charset.h /^ EDN_CHARSET_ISO_8859_15,$/;" e enum:__anon9 +EDN_CHARSET_ISO_8859_2 Sources/tools/charset/charset.h /^ EDN_CHARSET_ISO_8859_2,$/;" e enum:__anon9 +EDN_CHARSET_ISO_8859_3 Sources/tools/charset/charset.h /^ EDN_CHARSET_ISO_8859_3,$/;" e enum:__anon9 +EDN_CHARSET_ISO_8859_4 Sources/tools/charset/charset.h /^ EDN_CHARSET_ISO_8859_4,$/;" e enum:__anon9 +EDN_CHARSET_ISO_8859_5 Sources/tools/charset/charset.h /^ EDN_CHARSET_ISO_8859_5,$/;" e enum:__anon9 +EDN_CHARSET_ISO_8859_6 Sources/tools/charset/charset.h /^ EDN_CHARSET_ISO_8859_6,$/;" e enum:__anon9 +EDN_CHARSET_ISO_8859_7 Sources/tools/charset/charset.h /^ EDN_CHARSET_ISO_8859_7,$/;" e enum:__anon9 +EDN_CHARSET_ISO_8859_8 Sources/tools/charset/charset.h /^ EDN_CHARSET_ISO_8859_8,$/;" e enum:__anon9 +EDN_CHARSET_ISO_8859_9 Sources/tools/charset/charset.h /^ EDN_CHARSET_ISO_8859_9,$/;" e enum:__anon9 +EDN_CHARSET_UTF8 Sources/tools/charset/charset.h /^ EDN_CHARSET_UTF8,$/;" e enum:__anon9 +EDN_CHECK_INOUT Sources/tools/debug/tools_debug.h 127;" d +EDN_CHECK_INOUT Sources/tools/debug/tools_debug.h 130;" d +EDN_CHECK_INOUT Sources/tools/debug/tools_debug.h 138;" d +EDN_CRITICAL Sources/tools/debug/tools_debug.h 87;" d +EDN_DBG_COMMON Sources/tools/debug/tools_debug.h 79;" d +EDN_DEBUG Sources/tools/debug/tools_debug.h 104;" d +EDN_DEBUG Sources/tools/debug/tools_debug.h 106;" d +EDN_ENABLE_CHECK_MAGIC Sources/tools/debug/tools_debug.h 145;" d +EDN_ERROR Sources/tools/debug/tools_debug.h 91;" d +EDN_ERROR Sources/tools/debug/tools_debug.h 94;" d +EDN_FREE Sources/tools/memory/toolsMemory.h 48;" d +EDN_FREE Sources/tools/memory/toolsMemory.h 81;" d +EDN_INFO Sources/tools/debug/tools_debug.h 100;" d +EDN_INFO Sources/tools/debug/tools_debug.h 98;" d +EDN_LOG_MAX_LENGTH Sources/tools/debug/tools_debug.cpp 30;" d file: +EDN_MALLOC Sources/tools/memory/toolsMemory.h 36;" d +EDN_MALLOC Sources/tools/memory/toolsMemory.h 57;" d +EDN_MALLOC_CAST Sources/tools/memory/toolsMemory.h 39;" d +EDN_MALLOC_CAST Sources/tools/memory/toolsMemory.h 61;" d +EDN_MEM_SHOW_LOG Sources/tools/memory/toolsMemory.h 52;" d +EDN_MEM_SHOW_LOG Sources/tools/memory/toolsMemory.h 86;" d +EDN_MSG__BUFFER_ADD Sources/tools/MsgBroadcast/MsgBroadcast.h /^ EDN_MSG__BUFFER_ADD,$/;" e enum:__anon10 +EDN_MSG__BUFFER_CHANGE_CURRENT Sources/tools/MsgBroadcast/MsgBroadcast.h /^ EDN_MSG__BUFFER_CHANGE_CURRENT, \/\/ set the new current BUFFER ...$/;" e enum:__anon10 +EDN_MSG__BUFFER_CHANGE_HAS_FUTURE_HISTORY Sources/tools/MsgBroadcast/MsgBroadcast.h /^ EDN_MSG__BUFFER_CHANGE_HAS_FUTURE_HISTORY,$/;" e enum:__anon10 +EDN_MSG__BUFFER_CHANGE_HAS_HISTORY Sources/tools/MsgBroadcast/MsgBroadcast.h /^ EDN_MSG__BUFFER_CHANGE_HAS_HISTORY,$/;" e enum:__anon10 +EDN_MSG__BUFFER_CHANGE_HAS_NOT_FUTURE_HISTORY Sources/tools/MsgBroadcast/MsgBroadcast.h /^ EDN_MSG__BUFFER_CHANGE_HAS_NOT_FUTURE_HISTORY,$/;" e enum:__anon10 +EDN_MSG__BUFFER_CHANGE_HAS_NOT_HISTORY Sources/tools/MsgBroadcast/MsgBroadcast.h /^ EDN_MSG__BUFFER_CHANGE_HAS_NOT_HISTORY,$/;" e enum:__anon10 +EDN_MSG__BUFFER_CHANGE_MODIFY Sources/tools/MsgBroadcast/MsgBroadcast.h /^ EDN_MSG__BUFFER_CHANGE_MODIFY,$/;" e enum:__anon10 +EDN_MSG__BUFFER_CHANGE_NAME Sources/tools/MsgBroadcast/MsgBroadcast.h /^ EDN_MSG__BUFFER_CHANGE_NAME,$/;" e enum:__anon10 +EDN_MSG__BUFFER_CHANGE_STATE Sources/tools/MsgBroadcast/MsgBroadcast.h /^ EDN_MSG__BUFFER_CHANGE_STATE,$/;" e enum:__anon10 +EDN_MSG__BUFFER_REMOVE Sources/tools/MsgBroadcast/MsgBroadcast.h /^ EDN_MSG__BUFFER_REMOVE,$/;" e enum:__anon10 +EDN_MSG__BUFFER_REMOVE_ALL Sources/tools/MsgBroadcast/MsgBroadcast.h /^ EDN_MSG__BUFFER_REMOVE_ALL,$/;" e enum:__anon10 +EDN_MSG__BUFF_ALL_CLOSE Sources/tools/MsgBroadcast/MsgBroadcast.h /^ EDN_MSG__BUFF_ALL_CLOSE,$/;" e enum:__anon10 +EDN_MSG__BUFF_ALL_SAVE Sources/tools/MsgBroadcast/MsgBroadcast.h /^ EDN_MSG__BUFF_ALL_SAVE,$/;" e enum:__anon10 +EDN_MSG__BUFF_ID_CLOSE Sources/tools/MsgBroadcast/MsgBroadcast.h /^ EDN_MSG__BUFF_ID_CLOSE,$/;" e enum:__anon10 +EDN_MSG__BUFF_ID_SAVE Sources/tools/MsgBroadcast/MsgBroadcast.h /^ EDN_MSG__BUFF_ID_SAVE,$/;" e enum:__anon10 +EDN_MSG__CURRENT_CHANGE_BUFFER_ID Sources/tools/MsgBroadcast/MsgBroadcast.h /^ EDN_MSG__CURRENT_CHANGE_BUFFER_ID,$/;" e enum:__anon10 +EDN_MSG__CURRENT_CLOSE Sources/tools/MsgBroadcast/MsgBroadcast.h /^ EDN_MSG__CURRENT_CLOSE,$/;" e enum:__anon10 +EDN_MSG__CURRENT_COPY Sources/tools/MsgBroadcast/MsgBroadcast.h /^ EDN_MSG__CURRENT_COPY,$/;" e enum:__anon10 +EDN_MSG__CURRENT_CUT Sources/tools/MsgBroadcast/MsgBroadcast.h /^ EDN_MSG__CURRENT_CUT,$/;" e enum:__anon10 +EDN_MSG__CURRENT_FIND_NEXT Sources/tools/MsgBroadcast/MsgBroadcast.h /^ EDN_MSG__CURRENT_FIND_NEXT,$/;" e enum:__anon10 +EDN_MSG__CURRENT_FIND_OLD_NEXT Sources/tools/MsgBroadcast/MsgBroadcast.h /^ EDN_MSG__CURRENT_FIND_OLD_NEXT,$/;" e enum:__anon10 +EDN_MSG__CURRENT_FIND_OLD_PREVIOUS Sources/tools/MsgBroadcast/MsgBroadcast.h /^ EDN_MSG__CURRENT_FIND_OLD_PREVIOUS,$/;" e enum:__anon10 +EDN_MSG__CURRENT_FIND_PREVIOUS Sources/tools/MsgBroadcast/MsgBroadcast.h /^ EDN_MSG__CURRENT_FIND_PREVIOUS,$/;" e enum:__anon10 +EDN_MSG__CURRENT_GOTO_LINE Sources/tools/MsgBroadcast/MsgBroadcast.h /^ EDN_MSG__CURRENT_GOTO_LINE,$/;" e enum:__anon10 +EDN_MSG__CURRENT_PASTE Sources/tools/MsgBroadcast/MsgBroadcast.h /^ EDN_MSG__CURRENT_PASTE,$/;" e enum:__anon10 +EDN_MSG__CURRENT_REDO Sources/tools/MsgBroadcast/MsgBroadcast.h /^ EDN_MSG__CURRENT_REDO,$/;" e enum:__anon10 +EDN_MSG__CURRENT_REMOVE_LINE Sources/tools/MsgBroadcast/MsgBroadcast.h /^ EDN_MSG__CURRENT_REMOVE_LINE,$/;" e enum:__anon10 +EDN_MSG__CURRENT_REPLACE Sources/tools/MsgBroadcast/MsgBroadcast.h /^ EDN_MSG__CURRENT_REPLACE,$/;" e enum:__anon10 +EDN_MSG__CURRENT_REPLACE_ALL Sources/tools/MsgBroadcast/MsgBroadcast.h /^ EDN_MSG__CURRENT_REPLACE_ALL,$/;" e enum:__anon10 +EDN_MSG__CURRENT_SAVE Sources/tools/MsgBroadcast/MsgBroadcast.h /^ EDN_MSG__CURRENT_SAVE,$/;" e enum:__anon10 +EDN_MSG__CURRENT_SAVE_AS Sources/tools/MsgBroadcast/MsgBroadcast.h /^ EDN_MSG__CURRENT_SAVE_AS,$/;" e enum:__anon10 +EDN_MSG__CURRENT_SELECT_ALL Sources/tools/MsgBroadcast/MsgBroadcast.h /^ EDN_MSG__CURRENT_SELECT_ALL,$/;" e enum:__anon10 +EDN_MSG__CURRENT_SET_CHARSET Sources/tools/MsgBroadcast/MsgBroadcast.h /^ EDN_MSG__CURRENT_SET_CHARSET,$/;" e enum:__anon10 +EDN_MSG__CURRENT_UNDO Sources/tools/MsgBroadcast/MsgBroadcast.h /^ EDN_MSG__CURRENT_UNDO,$/;" e enum:__anon10 +EDN_MSG__CURRENT_UN_SELECT Sources/tools/MsgBroadcast/MsgBroadcast.h /^ EDN_MSG__CURRENT_UN_SELECT,$/;" e enum:__anon10 +EDN_MSG__GUI_SHOW_GOTO_LINE Sources/tools/MsgBroadcast/MsgBroadcast.h /^ EDN_MSG__GUI_SHOW_GOTO_LINE,$/;" e enum:__anon10 +EDN_MSG__GUI_SHOW_MAIN_WINDOWS Sources/tools/MsgBroadcast/MsgBroadcast.h /^ EDN_MSG__GUI_SHOW_MAIN_WINDOWS,$/;" e enum:__anon10 +EDN_MSG__GUI_SHOW_OPEN_FILE Sources/tools/MsgBroadcast/MsgBroadcast.h /^ EDN_MSG__GUI_SHOW_OPEN_FILE,$/;" e enum:__anon10 +EDN_MSG__GUI_SHOW_PREFERENCE Sources/tools/MsgBroadcast/MsgBroadcast.h /^ EDN_MSG__GUI_SHOW_PREFERENCE,$/;" e enum:__anon10 +EDN_MSG__GUI_SHOW_REPLACE Sources/tools/MsgBroadcast/MsgBroadcast.h /^ EDN_MSG__GUI_SHOW_REPLACE,$/;" e enum:__anon10 +EDN_MSG__GUI_SHOW_SAVE_AS Sources/tools/MsgBroadcast/MsgBroadcast.h /^ EDN_MSG__GUI_SHOW_SAVE_AS,$/;" e enum:__anon10 +EDN_MSG__GUI_SHOW_SEARCH Sources/tools/MsgBroadcast/MsgBroadcast.h /^ EDN_MSG__GUI_SHOW_SEARCH,$/;" e enum:__anon10 +EDN_MSG__JUMP_BACK Sources/tools/MsgBroadcast/MsgBroadcast.h /^ EDN_MSG__JUMP_BACK,$/;" e enum:__anon10 +EDN_MSG__JUMP_TO_CURRENT_SELECTION Sources/tools/MsgBroadcast/MsgBroadcast.h /^ EDN_MSG__JUMP_TO_CURRENT_SELECTION,$/;" e enum:__anon10 +EDN_MSG__NEW Sources/tools/MsgBroadcast/MsgBroadcast.h /^ EDN_MSG__NEW,$/;" e enum:__anon10 +EDN_MSG__NONE Sources/tools/MsgBroadcast/MsgBroadcast.h /^ EDN_MSG__NONE = 0,$/;" e enum:__anon10 +EDN_MSG__OPEN_CTAGS Sources/tools/MsgBroadcast/MsgBroadcast.h /^ EDN_MSG__OPEN_CTAGS,$/;" e enum:__anon10 +EDN_MSG__QUIT Sources/tools/MsgBroadcast/MsgBroadcast.h /^ EDN_MSG__QUIT,$/;" e enum:__anon10 +EDN_MSG__REFRESH_DISPLAY Sources/tools/MsgBroadcast/MsgBroadcast.h /^ EDN_MSG__REFRESH_DISPLAY,$/;" e enum:__anon10 +EDN_MSG__RELOAD_CTAGS Sources/tools/MsgBroadcast/MsgBroadcast.h /^ EDN_MSG__RELOAD_CTAGS,$/;" e enum:__anon10 +EDN_REALLOC Sources/tools/memory/toolsMemory.h 73;" d +EDN_REALLOC_CAST Sources/tools/memory/toolsMemory.h 77;" d +EDN_WARNING Sources/tools/debug/tools_debug.h 90;" d +EDN_WARNING Sources/tools/debug/tools_debug.h 93;" d +ERR_BUSY Sources/tools/debug/types_generique.h /^ ERR_BUSY, \/\/!< Element curently Busy$/;" e enum:__anon4 +ERR_FAIL Sources/tools/debug/types_generique.h /^ ERR_FAIL, \/\/!< Miscellaneous failure$/;" e enum:__anon4 +ERR_INVAL Sources/tools/debug/types_generique.h /^ ERR_INVAL, \/\/!< Invalid entry parameter$/;" e enum:__anon4 +ERR_MEM Sources/tools/debug/types_generique.h /^ ERR_MEM, \/\/!< Dynamic memory allocation failure$/;" e enum:__anon4 +ERR_NONE Sources/tools/debug/types_generique.h /^ ERR_NONE = 0, \/\/!< No error, luckily everything went fine$/;" e enum:__anon4 +ERR_TIMEOUT Sources/tools/debug/types_generique.h /^ ERR_TIMEOUT, \/\/!< Request time out$/;" e enum:__anon4 +Edn Sources/tools/NameSpaceEdn/Edn.h /^namespace Edn$/;" n +EdnBuf Sources/tools/EdnBuf/EdnBuf.cpp /^EdnBuf::EdnBuf(void)$/;" f class:EdnBuf +EdnBuf Sources/tools/EdnBuf/EdnBuf.h /^class EdnBuf {$/;" c +EdnBufHistory Sources/tools/EdnBuf/EdnBufHistory.cpp /^EdnBufHistory::EdnBufHistory(int32_t pos, int32_t nInserted, EdnVectorBin &deletedText)$/;" f class:EdnBufHistory +EdnBufHistory Sources/tools/EdnBuf/EdnBufHistory.cpp /^EdnBufHistory::EdnBufHistory(void)$/;" f class:EdnBufHistory +EdnBufHistory Sources/tools/EdnBuf/EdnBufHistory.h /^class EdnBufHistory{$/;" c +EdnRegExp Sources/tools/EdnRegExp/EdnRegExp.cpp /^EdnRegExp::EdnRegExp(void)$/;" f class:EdnRegExp +EdnRegExp Sources/tools/EdnRegExp/EdnRegExp.h /^class EdnRegExp {$/;" c +EdnTree Sources/tools/EdnTemplate/EdnTree.h /^ EdnTree(void)$/;" f class:EdnTree +EdnTree Sources/tools/EdnTemplate/EdnTree.h /^template < class T > class EdnTree $/;" c +EdnTreeElement Sources/tools/EdnTemplate/EdnTree.h /^ EdnTreeElement(const EdnTreeElement &mustCopy ) : elementPtr(NULL), m_parent(mustCopy.m_parent), m_id(mustCopy.m_id)$/;" f class:EdnTreeElement +EdnTreeElement Sources/tools/EdnTemplate/EdnTree.h /^ EdnTreeElement(int32_t parent, int32_t id, T &maNouvelleClass) : elementPtr(NULL), m_parent(parent), m_id(id)$/;" f class:EdnTreeElement +EdnTreeElement Sources/tools/EdnTemplate/EdnTree.h /^template < class T > class EdnTreeElement$/;" c +EdnVector Sources/tools/EdnTemplate/EdnVector.h /^ EdnVector(const EdnVector & EdnVector):$/;" f class:EdnVector +EdnVector Sources/tools/EdnTemplate/EdnVector.h /^ EdnVector(int count = 0):$/;" f class:EdnVector +EdnVector Sources/tools/EdnTemplate/EdnVector.h /^template class EdnVector:$/;" c +EdnVectorBin Sources/tools/EdnTemplate/EdnVectorBin.h /^ EdnVectorBin(const EdnVectorBin & Evb)$/;" f class:EdnVectorBin +EdnVectorBin Sources/tools/EdnTemplate/EdnVectorBin.h /^ EdnVectorBin(int32_t count = 0):$/;" f class:EdnVectorBin +EdnVectorBin Sources/tools/EdnTemplate/EdnVectorBin.h /^template class EdnVectorBin$/;" c +EdnVectorBuf Sources/tools/EdnTemplate/EdnVectorBuf.cpp /^EdnVectorBuf::EdnVectorBuf(const EdnVectorBuf & Evb)$/;" f class:EdnVectorBuf +EdnVectorBuf Sources/tools/EdnTemplate/EdnVectorBuf.cpp /^EdnVectorBuf::EdnVectorBuf(int32_t count)$/;" f class:EdnVectorBuf +EdnVectorBuf Sources/tools/EdnTemplate/EdnVectorBuf.h /^class EdnVectorBuf$/;" c +Element Sources/tools/tinyXML/tinyxml.h /^ TiXmlElement* Element() const { return ToElement(); }$/;" f class:TiXmlHandle +EmptyString Sources/ctags/readtags.cpp /^const char *const EmptyString = "";$/;" v +EncodeString Sources/tools/tinyXML/tinyxml.cpp /^void TiXmlBase::EncodeString( const TIXML_STRING& str, TIXML_STRING* outString )$/;" f class:TiXmlBase +Encoding Sources/tools/tinyXML/tinyxml.h /^ const char *Encoding() const { return encoding.c_str (); }$/;" f class:TiXmlDeclaration +End Sources/tools/EdnTemplate/EdnVector.h /^ Iterator End()$/;" f class:EdnVector +End Sources/tools/EdnTemplate/EdnVectorBin.h /^ Iterator End(void)$/;" f class:EdnVectorBin +End Sources/tools/EdnTemplate/EdnVectorBuf.h /^ Iterator End()$/;" f class:EdnVectorBuf +EndOfLine Sources/tools/Display/Display.cpp /^void DrawerManager::EndOfLine(int32_t x, int32_t y)$/;" f class:DrawerManager +EndOfLine Sources/tools/EdnBuf/EdnBuf.cpp /^int32_t EdnBuf::EndOfLine(int32_t pos)$/;" f class:EdnBuf +Entity Sources/tools/tinyXML/tinyxml.h /^ struct Entity$/;" s class:TiXmlBase +Erase Sources/tools/EdnTemplate/EdnVectorBin.h /^ void Erase(int32_t pos)$/;" f class:EdnVectorBin +Erase Sources/tools/EdnTemplate/EdnVectorBin.h /^ void Erase(int32_t pos, int32_t nbElement)$/;" f class:EdnVectorBin +Error Sources/tools/tinyXML/tinyxml.h /^ bool Error() const { return error; }$/;" f class:TiXmlDocument +ErrorCol Sources/tools/tinyXML/tinyxml.h /^ int ErrorCol() const { return errorLocation.col+1; } \/\/\/< The column where the error occured. See ErrorRow()$/;" f class:TiXmlDocument +ErrorDesc Sources/tools/tinyXML/tinyxml.h /^ const char * ErrorDesc() const { return errorDesc.c_str (); }$/;" f class:TiXmlDocument +ErrorId Sources/tools/tinyXML/tinyxml.h /^ int ErrorId() const { return errorId; }$/;" f class:TiXmlDocument +ErrorRow Sources/tools/tinyXML/tinyxml.h /^ int ErrorRow() const { return errorLocation.row+1; }$/;" f class:TiXmlDocument +Exist Sources/Buffer/BufferManager.cpp /^bool BufferManager::Exist(Edn::String &filename)$/;" f class:BufferManager +Exist Sources/Buffer/BufferManager.cpp /^bool BufferManager::Exist(int32_t BufferID)$/;" f class:BufferManager +Exist Sources/Colorize/ColorizeManager.cpp /^bool ColorizeManager::Exist(Edn::String &colorName)$/;" f class:ColorizeManager +Exist Sources/Colorize/ColorizeManager.cpp /^bool ColorizeManager::Exist(const char *colorName)$/;" f class:ColorizeManager +Exist Sources/Highlight/HighlightManager.cpp /^bool HighlightManager::Exist(Edn::String &fileName)$/;" f class:HighlightManager +ExpandCharacter Sources/tools/EdnBuf/EdnBuf.cpp /^int32_t EdnBuf::ExpandCharacter(char c, int32_t indent, char outUTF8[MAX_EXP_CHAR_LEN])$/;" f class:EdnBuf +Extract Sources/tools/EdnTemplate/EdnVectorBin.h /^ EdnVectorBin Extract(int32_t posStart = 0, int32_t posEnd=0x7FFFFFFF)$/;" f class:EdnVectorBin +Extract Sources/tools/NameSpaceEdn/String.cpp /^Edn::String Edn::String::Extract(int32_t posStart, int32_t posEnd)$/;" f class:Edn::String +ExtranctAndName Sources/tools/NameSpaceEdn/File.cpp /^void Edn::File::ExtranctAndName(Edn::String &inputString)$/;" f class:Edn::File +FONT_BOLD_NO Sources/tools/Display/Display.cpp 37;" d file: +FONT_BOLD_YES Sources/tools/Display/Display.cpp 38;" d file: +FONT_ITALIC_NO Sources/tools/Display/Display.cpp 39;" d file: +FONT_ITALIC_YES Sources/tools/Display/Display.cpp 40;" d file: +FUNCTION_NAME_SIZE Sources/tools/debug/tools_debug.cpp 33;" d file: +File Sources/tools/NameSpaceEdn/File.cpp /^Edn::File::File(Edn::String &filename, Edn::String &folder, int32_t lineNumber)$/;" f class:Edn::File +File Sources/tools/NameSpaceEdn/File.cpp /^Edn::File::File(Edn::String &filename, int32_t LineNumber)$/;" f class:Edn::File +File Sources/tools/NameSpaceEdn/File.h /^ File(void) { m_lineNumberOpen=0; }$/;" f class:File +File Sources/tools/NameSpaceEdn/File.h /^class File$/;" c +FileNameCompatible Sources/Highlight/Highlight.cpp /^bool Highlight::FileNameCompatible(Edn::String &fileName)$/;" f class:Highlight +Find Sources/Highlight/HighlightPattern.cpp /^resultFind_te HighlightPattern::Find(int32_t start, int32_t stop, colorInformation_ts &resultat, EdnVectorBuf &buffer)$/;" f class:HighlightPattern +Find Sources/tools/tinyXML/tinyxml.cpp /^TiXmlAttribute* TiXmlAttributeSet::Find( const char* name ) const$/;" f class:TiXmlAttributeSet +Find Sources/tools/tinyXML/tinyxml.cpp /^TiXmlAttribute* TiXmlAttributeSet::Find( const std::string& name ) const$/;" f class:TiXmlAttributeSet +FindBack Sources/tools/NameSpaceEdn/String.cpp /^int32_t Edn::String::FindBack(const char element, int32_t startPos)$/;" f class:Edn::String +FindElementWithId Sources/tools/EdnTemplate/EdnTree.h /^ int32_t FindElementWithId(int32_t id)$/;" f class:EdnTree +FindForward Sources/tools/NameSpaceEdn/String.cpp /^int32_t Edn::String::FindForward(const char element, int32_t startPos)$/;" f class:Edn::String +FindLine Sources/Buffer/Buffer.cpp /^int32_t Buffer::FindLine(Edn::String &data)$/;" f class:Buffer +FindLine Sources/Buffer/BufferText.cpp /^int32_t BufferText::FindLine(Edn::String &data)$/;" f class:BufferText +FindMainHighLightPosition Sources/tools/EdnBuf/EdnBuf_HighLight.cpp /^void EdnBuf::FindMainHighLightPosition(int32_t startPos, int32_t endPos, int32_t &startId, int32_t &stopId, bool backPreviousNotEnded)$/;" f class:EdnBuf +FindOrCreate Sources/tools/tinyXML/tinyxml.cpp /^TiXmlAttribute* TiXmlAttributeSet::FindOrCreate( const char* _name )$/;" f class:TiXmlAttributeSet +FindOrCreate Sources/tools/tinyXML/tinyxml.cpp /^TiXmlAttribute* TiXmlAttributeSet::FindOrCreate( const std::string& _name )$/;" f class:TiXmlAttributeSet +First Sources/tools/tinyXML/tinyxml.h /^ TiXmlAttribute* First() { return ( sentinel.next == &sentinel ) ? 0 : sentinel.next; }$/;" f class:TiXmlAttributeSet +First Sources/tools/tinyXML/tinyxml.h /^ const TiXmlAttribute* First() const { return ( sentinel.next == &sentinel ) ? 0 : sentinel.next; }$/;" f class:TiXmlAttributeSet +FirstAttribute Sources/tools/tinyXML/tinyxml.h /^ TiXmlAttribute* FirstAttribute() { return attributeSet.First(); }$/;" f class:TiXmlElement +FirstAttribute Sources/tools/tinyXML/tinyxml.h /^ const TiXmlAttribute* FirstAttribute() const { return attributeSet.First(); } \/\/\/< Access the first attribute in this element.$/;" f class:TiXmlElement +FirstChild Sources/tools/tinyXML/tinyxml.cpp /^TiXmlHandle TiXmlHandle::FirstChild( const char * value ) const$/;" f class:TiXmlHandle +FirstChild Sources/tools/tinyXML/tinyxml.cpp /^TiXmlHandle TiXmlHandle::FirstChild() const$/;" f class:TiXmlHandle +FirstChild Sources/tools/tinyXML/tinyxml.cpp /^const TiXmlNode* TiXmlNode::FirstChild( const char * _value ) const$/;" f class:TiXmlNode +FirstChild Sources/tools/tinyXML/tinyxml.h /^ TiXmlHandle FirstChild( const std::string& _value ) const { return FirstChild( _value.c_str() ); }$/;" f class:TiXmlHandle +FirstChild Sources/tools/tinyXML/tinyxml.h /^ TiXmlNode* FirstChild( const char * _value ) {$/;" f class:TiXmlNode +FirstChild Sources/tools/tinyXML/tinyxml.h /^ TiXmlNode* FirstChild( const std::string& _value ) { return FirstChild (_value.c_str ()); } \/\/\/< STL std::string form.$/;" f class:TiXmlNode +FirstChild Sources/tools/tinyXML/tinyxml.h /^ TiXmlNode* FirstChild() { return firstChild; }$/;" f class:TiXmlNode +FirstChild Sources/tools/tinyXML/tinyxml.h /^ const TiXmlNode* FirstChild( const std::string& _value ) const { return FirstChild (_value.c_str ()); } \/\/\/< STL std::string form.$/;" f class:TiXmlNode +FirstChild Sources/tools/tinyXML/tinyxml.h /^ const TiXmlNode* FirstChild() const { return firstChild; } \/\/\/< The first child of this node. Will be null if there are no children.$/;" f class:TiXmlNode +FirstChildElement Sources/tools/tinyXML/tinyxml.cpp /^TiXmlHandle TiXmlHandle::FirstChildElement( const char * value ) const$/;" f class:TiXmlHandle +FirstChildElement Sources/tools/tinyXML/tinyxml.cpp /^TiXmlHandle TiXmlHandle::FirstChildElement() const$/;" f class:TiXmlHandle +FirstChildElement Sources/tools/tinyXML/tinyxml.cpp /^const TiXmlElement* TiXmlNode::FirstChildElement( const char * _value ) const$/;" f class:TiXmlNode +FirstChildElement Sources/tools/tinyXML/tinyxml.cpp /^const TiXmlElement* TiXmlNode::FirstChildElement() const$/;" f class:TiXmlNode +FirstChildElement Sources/tools/tinyXML/tinyxml.h /^ TiXmlElement* FirstChildElement( const char * _value ) {$/;" f class:TiXmlNode +FirstChildElement Sources/tools/tinyXML/tinyxml.h /^ TiXmlElement* FirstChildElement( const std::string& _value ) { return FirstChildElement (_value.c_str ()); } \/\/\/< STL std::string form.$/;" f class:TiXmlNode +FirstChildElement Sources/tools/tinyXML/tinyxml.h /^ TiXmlElement* FirstChildElement() {$/;" f class:TiXmlNode +FirstChildElement Sources/tools/tinyXML/tinyxml.h /^ TiXmlHandle FirstChildElement( const std::string& _value ) const { return FirstChildElement( _value.c_str() ); }$/;" f class:TiXmlHandle +FirstChildElement Sources/tools/tinyXML/tinyxml.h /^ const TiXmlElement* FirstChildElement( const std::string& _value ) const { return FirstChildElement (_value.c_str ()); } \/\/\/< STL std::string form.$/;" f class:TiXmlNode +Fit Sources/tools/EdnTemplate/EdnVectorBin.h /^ void Fit(void)$/;" f class:EdnVectorBin +Flush Sources/tools/Display/Display.cpp /^void DrawerManager::Flush(void)$/;" f class:DrawerManager +ForceReDraw Sources/Buffer/Buffer.cpp /^void Buffer::ForceReDraw(bool allElement)$/;" f class:Buffer +ForceReDraw Sources/Buffer/BufferText.cpp /^void BufferText::ForceReDraw(bool allElement)$/;" f class:BufferText +GAP_SIZE_MAX Sources/tools/EdnTemplate/EdnVectorBuf.h 38;" d +GAP_SIZE_MIN Sources/tools/EdnTemplate/EdnVectorBuf.h 36;" d +GDK_Alt_Gr Sources/tools/charset/charset.h 76;" d +GDK_Esc Sources/tools/charset/charset.h 75;" d +GDK_KEY_Alt_Gr Sources/tools/charset/charset.h 71;" d +GDK_KEY_Esc Sources/tools/charset/charset.h 70;" d +GDK_KEY_Pomme_L Sources/tools/charset/charset.h 72;" d +GDK_KEY_Pomme_R Sources/tools/charset/charset.h 73;" d +GDK_Pomme_L Sources/tools/charset/charset.h 77;" d +GDK_Pomme_R Sources/tools/charset/charset.h 78;" d +GO_TOP Sources/tools/debug/tools_debug.h 66;" d +GapCheckMaxSize Sources/tools/EdnTemplate/EdnVectorBuf.cpp /^void EdnVectorBuf::GapCheckMaxSize(void)$/;" f class:EdnVectorBuf +GapMove Sources/tools/EdnTemplate/EdnVectorBuf.cpp /^bool EdnVectorBuf::GapMove(int32_t pos)$/;" f class:EdnVectorBuf +GapResize Sources/tools/EdnTemplate/EdnVectorBuf.cpp /^bool EdnVectorBuf::GapResize(int32_t pos, int32_t newGapLen)$/;" f class:EdnVectorBuf +GapSize Sources/tools/EdnTemplate/EdnVectorBuf.h /^ int32_t GapSize( void) { return m_gapEnd - m_gapStart; };$/;" f class:EdnVectorBuf +GeneralSendMessage Sources/tools/MsgBroadcast/MsgBroadcast.cpp /^void GeneralSendMessage(messageType_te id, int32_t dataID)$/;" f +Generate Sources/tools/EdnRegExp/EdnRegExp.cpp /^int32_t RegExpNode::Generate(EdnVectorBin &data, int32_t start, int32_t stop)$/;" f class:RegExpNode +Generate Sources/tools/EdnRegExp/EdnRegExp.cpp /^int32_t RegExpNodeBracket::Generate(EdnVectorBin &data)$/;" f class:RegExpNodeBracket +Generate Sources/tools/EdnRegExp/EdnRegExp.cpp /^int32_t RegExpNodePThese::Generate(EdnVectorBin &data)$/;" f class:RegExpNodePThese +Generate Sources/tools/EdnRegExp/EdnRegExp.cpp /^int32_t RegExpNodePTheseElem::Generate(EdnVectorBin &data)$/;" f class:RegExpNodePTheseElem +Generate Sources/tools/EdnRegExp/EdnRegExp.cpp /^int32_t RegExpNodeValue::Generate(EdnVectorBin &data)$/;" f class:RegExpNodeValue +GenerateHighLightAt Sources/tools/EdnBuf/EdnBuf_HighLight.cpp /^void EdnBuf::GenerateHighLightAt(int32_t pos, int32_t endPos, int32_t addinPos)$/;" f class:EdnBuf +Get Sources/Buffer/BufferManager.cpp /^Buffer * BufferManager::Get(int32_t BufferID)$/;" f class:BufferManager +Get Sources/Colorize/ColorizeManager.cpp /^Colorize *ColorizeManager::Get(Edn::String &colorName)$/;" f class:ColorizeManager +Get Sources/Colorize/ColorizeManager.cpp /^Colorize *ColorizeManager::Get(const char *colorName)$/;" f class:ColorizeManager +Get Sources/Colorize/ColorizeManager.cpp /^color_ts & ColorizeManager::Get(basicColor_te myColor)$/;" f class:ColorizeManager +Get Sources/Highlight/HighlightManager.cpp /^Highlight *HighlightManager::Get(Edn::String &fileName)$/;" f class:HighlightManager +Get Sources/tools/ClipBoard/ClipBoard.cpp /^void ClipBoard::Get(uint8_t clipboardID, EdnVectorBin &data)$/;" f class:ClipBoard +Get Sources/tools/EdnTemplate/EdnTree.h /^ T* Get(int32_t id)$/;" f class:EdnTree +Get Sources/tools/EdnTemplate/EdnVector.h /^ Iterator Get(int pos)$/;" f class:EdnVector +Get Sources/tools/EdnTemplate/EdnVector.h /^ T& Get(int32_t pos)$/;" f class:EdnVector +Get Sources/tools/EdnTemplate/EdnVectorBin.h /^ MY_TYPE& Get(int32_t pos)$/;" f class:EdnVectorBin +Get Sources/tools/EdnTemplate/EdnVectorBuf.cpp /^int8_t& EdnVectorBuf::Get(int32_t pos)$/;" f class:EdnVectorBuf +Get Sources/tools/EdnTemplate/EdnVectorBuf.cpp /^void EdnVectorBuf::Get(int32_t pos, int32_t nbElement, EdnVectorBin &tmpBuffer)$/;" f class:EdnVectorBuf +GetAccel Sources/tools/MsgBroadcast/AccelKey.h /^ GtkAccelGroup * GetAccel(void) { return m_accelGroup; };$/;" f class:AccelKey +GetAll Sources/tools/EdnBuf/EdnBuf.cpp /^void EdnBuf::GetAll(EdnVectorBin &text)$/;" f class:EdnBuf +GetBG Sources/Colorize/Colorize.h /^ color_ts & GetBG(void) { return m_colorBG; };$/;" f class:Colorize +GetBold Sources/Colorize/Colorize.cpp /^bool Colorize::GetBold(void)$/;" f class:Colorize +GetCase Sources/GuiTools/Search/SearchData.cpp /^bool SearchData::GetCase(void)$/;" f class:SearchData +GetCat Sources/tools/MsgBroadcast/MsgBroadcast.h /^ messageCat_te GetCat(void) { return m_cat; };$/;" f class:MsgBroadcast +GetChar Sources/tools/tinyXML/tinyxml.h /^ inline static const char* GetChar( const char* p, char* _value, int* length, TiXmlEncoding encoding )$/;" f class:TiXmlBase +GetCharsetType Sources/tools/EdnBuf/EdnBuf.h /^ charset_te GetCharsetType(void) { return m_charsetType; };$/;" f class:EdnBuf +GetColor Sources/Highlight/HighlightPattern.h /^ Colorize * GetColor(void) { return m_color; };$/;" f class:HighlightPattern +GetCompleateName Sources/tools/NameSpaceEdn/File.cpp /^Edn::String Edn::File::GetCompleateName(void)$/;" f class:Edn::File +GetDepth Sources/tools/EdnTemplate/EdnTree.h /^ int32_t GetDepth(void)$/;" f class:EdnTree +GetDirect Sources/tools/EdnTemplate/EdnVectorBuf.h /^ int8_t & GetDirect(int32_t RealElementPosition){ return m_data[RealElementPosition]; };$/;" f class:EdnVectorBuf +GetDocument Sources/tools/tinyXML/tinyxml.cpp /^const TiXmlDocument* TiXmlNode::GetDocument() const$/;" f class:TiXmlNode +GetDocument Sources/tools/tinyXML/tinyxml.h /^ TiXmlDocument* GetDocument() {$/;" f class:TiXmlNode +GetElementColorAtPosition Sources/tools/EdnBuf/EdnBuf_HighLight.cpp /^colorInformation_ts * EdnBuf::GetElementColorAtPosition(displayHLData_ts & MData, int32_t pos)$/;" f class:EdnBuf +GetElementColorAtPosition Sources/tools/EdnBuf/EdnBuf_HighLight.cpp /^colorInformation_ts *EdnBuf::GetElementColorAtPosition(int32_t pos, int32_t &starPos)$/;" f class:EdnBuf +GetEntity Sources/tools/tinyXML/tinyxmlparser.cpp /^const char* TiXmlBase::GetEntity( const char* p, char* value, int* length, TiXmlEncoding encoding )$/;" f class:TiXmlBase +GetExpandedChar Sources/tools/EdnBuf/EdnBuf.cpp /^int32_t EdnBuf::GetExpandedChar(int32_t &pos, int32_t indent, char outUTF8[MAX_EXP_CHAR_LEN], uint32_t ¤tChar)$/;" f class:EdnBuf +GetFG Sources/Colorize/Colorize.h /^ color_ts & GetFG(void) { return m_colorFG; };$/;" f class:Colorize +GetFileName Sources/Buffer/Buffer.cpp /^Edn::File Buffer::GetFileName(void)$/;" f class:Buffer +GetFolder Sources/Buffer/Buffer.cpp /^Edn::String Buffer::GetFolder(void)$/;" f class:Buffer +GetFolder Sources/Buffer/BufferText.cpp /^Edn::String BufferText::GetFolder(void)$/;" f class:BufferText +GetFolder Sources/ctags/CTagsManager.cpp /^Edn::String CTagsManager::GetFolder(Edn::String &inputString)$/;" f class:CTagsManager +GetFolder Sources/tools/NameSpaceEdn/File.cpp /^Edn::String Edn::File::GetFolder(void)$/;" f class:Edn::File +GetFont Sources/tools/Display/Display.cpp /^cairo_font_face_t * Display::GetFont(bool bold, bool italic)$/;" f class:Display +GetFontHeight Sources/tools/Display/Display.cpp /^int32_t Display::GetFontHeight(void)$/;" f class:Display +GetFontWidth Sources/tools/Display/Display.cpp /^int32_t Display::GetFontWidth(void)$/;" f class:Display +GetHeight Sources/tools/Display/Display.h /^ int32_t GetHeight(void) { return m_size.y; };$/;" f class:DrawerManager +GetId Sources/Buffer/BufferManager.cpp /^int32_t BufferManager::GetId(Edn::String &filename)$/;" f class:BufferManager +GetId Sources/tools/EdnTemplate/EdnTree.h /^ int32_t GetId(void) { return m_id;};$/;" f class:EdnTreeElement +GetInfo Sources/Buffer/Buffer.cpp /^void Buffer::GetInfo(infoStatBuffer_ts &infoToUpdate)$/;" f class:Buffer +GetInfo Sources/Buffer/BufferText.cpp /^void BufferText::GetInfo(infoStatBuffer_ts &infoToUpdate)$/;" f class:BufferText +GetItalic Sources/Colorize/Colorize.cpp /^bool Colorize::GetItalic(void)$/;" f class:Colorize +GetLenOfBrace Sources/tools/EdnRegExp/EdnRegExp.cpp /^static int32_t GetLenOfBrace(EdnVectorBin &data, int32_t startPos)$/;" f file: +GetLenOfBracket Sources/tools/EdnRegExp/EdnRegExp.cpp /^static int32_t GetLenOfBracket(EdnVectorBin &data, int32_t startPos)$/;" f file: +GetLenOfNormal Sources/tools/EdnRegExp/EdnRegExp.cpp /^static int32_t GetLenOfNormal(EdnVectorBin &data, int32_t startPos)$/;" f file: +GetLenOfPThese Sources/tools/EdnRegExp/EdnRegExp.cpp /^static int32_t GetLenOfPThese(EdnVectorBin &data, int32_t startPos)$/;" f file: +GetLenOfPTheseElem Sources/tools/EdnRegExp/EdnRegExp.cpp /^static int32_t GetLenOfPTheseElem(EdnVectorBin &data, int32_t startPos)$/;" f file: +GetLevel Sources/Highlight/HighlightPattern.h /^ int32_t GetLevel(void) { return m_level; };$/;" f class:HighlightPattern +GetLineNumber Sources/tools/NameSpaceEdn/File.cpp /^int32_t Edn::File::GetLineNumber(void)$/;" f class:Edn::File +GetLineText Sources/tools/EdnBuf/EdnBuf.cpp /^void EdnBuf::GetLineText(int32_t pos, EdnVectorBin &text)$/;" f class:EdnBuf +GetListSubNode Sources/tools/EdnTemplate/EdnTree.h /^ std::vector GetListSubNode( int32_t parentId = ROOT_NODE_ID)$/;" f class:EdnTree +GetMainWidget Sources/CustumWidget/BufferView/BufferView.cpp /^GtkWidget * BufferView::GetMainWidget(void)$/;" f class:BufferView +GetMainWidget Sources/CustumWidget/CodeView/CodeView.cpp /^GtkWidget * CodeView::GetMainWidget(void)$/;" f class:CodeView +GetMessageChar Sources/tools/MsgBroadcast/MsgBroadcast.cpp /^static char * GetMessageChar(messageType_te Id)$/;" f file: +GetMessageTypeChar Sources/tools/MsgBroadcast/MsgBroadcast.cpp /^static char * GetMessageTypeChar(messageCat_te Id)$/;" f file: +GetMousePosition Sources/Buffer/BufferText.cpp /^void BufferText::GetMousePosition(int32_t width, int32_t height, int32_t &x, int32_t &y)$/;" f class:BufferText +GetMultMax Sources/tools/EdnRegExp/EdnRegExp.h /^ int32_t GetMultMax(void) { return m_multipleMax; };$/;" f class:RegExpNode +GetMultMin Sources/tools/EdnRegExp/EdnRegExp.h /^ int32_t GetMultMin(void) { return m_multipleMin; };$/;" f class:RegExpNode +GetName Sources/Buffer/Buffer.cpp /^Edn::String Buffer::GetName(void)$/;" f class:Buffer +GetName Sources/Buffer/BufferText.cpp /^Edn::String BufferText::GetName(void)$/;" f class:BufferText +GetName Sources/Colorize/Colorize.cpp /^Edn::String Colorize::GetName(void)$/;" f class:Colorize +GetName Sources/Highlight/HighlightPattern.h /^ Edn::String GetName(void) { return m_paternName;};$/;" f class:HighlightPattern +GetName Sources/tools/MsgBroadcast/MsgBroadcast.h /^ Edn::String& GetName(void) { return m_className; };$/;" f class:MsgBroadcast +GetNumberNode Sources/tools/EdnTemplate/EdnTree.h /^ int32_t GetNumberNode(void)$/;" f class:EdnTree +GetParrent Sources/tools/EdnTemplate/EdnTree.h /^ int32_t GetParrent(void) { return m_parent;};$/;" f class:EdnTreeElement +GetPtr Sources/tools/EdnTemplate/EdnTree.h /^ T* GetPtr() const $/;" f class:EdnTreeElement +GetRange Sources/tools/EdnBuf/EdnBuf.cpp /^void EdnBuf::GetRange(int32_t start, int32_t end, EdnVectorBin &output)$/;" f class:EdnBuf +GetRegExp Sources/GuiTools/Search/SearchData.cpp /^bool SearchData::GetRegExp(void)$/;" f class:SearchData +GetRegExp Sources/tools/EdnRegExp/EdnRegExp.h /^ Edn::String GetRegExp(void) { return m_expressionRequested;};$/;" f class:EdnRegExp +GetReplace Sources/GuiTools/Search/SearchData.cpp /^void SearchData::GetReplace(Edn::String &myData)$/;" f class:SearchData +GetSearch Sources/GuiTools/Search/SearchData.cpp /^void SearchData::GetSearch(Edn::String &myData)$/;" f class:SearchData +GetSelected Sources/Buffer/BufferManager.h /^ int32_t GetSelected(void) { return m_idSelected;};$/;" f class:BufferManager +GetSelectionPos Sources/tools/EdnBuf/EdnBuf_Selection.cpp /^bool EdnBuf::GetSelectionPos(selectionType_te select, int32_t &start, int32_t &end, bool &isRect, int32_t &rectStart, int32_t &rectEnd)$/;" f class:EdnBuf +GetSelectionText Sources/tools/EdnBuf/EdnBuf_Selection.cpp /^void EdnBuf::GetSelectionText(selectionType_te select, EdnVectorBin &text)$/;" f class:EdnBuf +GetShortFilename Sources/tools/NameSpaceEdn/File.cpp /^Edn::String Edn::File::GetShortFilename(void)$/;" f class:Edn::File +GetShortName Sources/Buffer/Buffer.cpp /^Edn::String Buffer::GetShortName(void)$/;" f class:Buffer +GetShortName Sources/Buffer/BufferText.cpp /^Edn::String BufferText::GetShortName(void)$/;" f class:BufferText +GetStatus Sources/tools/EdnRegExp/EdnRegExp.h /^ bool GetStatus(void) { return m_isOk;};$/;" f class:EdnRegExp +GetTabDistance Sources/tools/EdnBuf/EdnBuf.h /^ int32_t GetTabDistance(void) { return m_tabDist; } ;$/;" f class:EdnBuf +GetText Sources/tools/tinyXML/tinyxml.cpp /^const char* TiXmlElement::GetText() const$/;" f class:TiXmlElement +GetUTF8Mode Sources/tools/EdnBuf/EdnBuf.h /^ bool GetUTF8Mode(void) { return m_isUtf8; };$/;" f class:EdnBuf +GetUserData Sources/tools/tinyXML/tinyxml.h /^ const void* GetUserData() const { return userData; } \/\/\/< Get a pointer to arbitrary user data.$/;" f class:TiXmlBase +GetUserData Sources/tools/tinyXML/tinyxml.h /^ void* GetUserData() { return userData; } \/\/\/< Get a pointer to arbitrary user data.$/;" f class:TiXmlBase +GetVector Sources/tools/NameSpaceEdn/String.h /^ EdnVectorBin GetVector(void) { return m_data; };$/;" f class:String +GetWidget Sources/GuiTools/MainWindows/MainWindows.h /^ GtkWidget * GetWidget(void) { return m_mainWindow;};$/;" f class:MainWindows +GetWidget Sources/GuiTools/MainWindows/MenuBar.h /^ GtkWidget * GetWidget(void) { return m_mainWidget; };$/;" f class:MenuBar +GetWidget Sources/GuiTools/MainWindows/StatusBar.h /^ GtkWidget * GetWidget(void) { return m_mainWidget; };$/;" f class:StatusBar +GetWidget Sources/GuiTools/MainWindows/ToolBar.h /^ GtkWidget * GetWidget(void) { return m_mainWidget; };$/;" f class:ToolBar +GetWidth Sources/tools/Display/Display.h /^ int32_t GetWidth(void) { return m_size.x; };$/;" f class:DrawerManager +GetWrap Sources/GuiTools/Search/SearchData.cpp /^bool SearchData::GetWrap(void)$/;" f class:SearchData +HLData Sources/tools/EdnBuf/EdnBuf.h /^ std::vector HLData;$/;" m struct:__anon8 +HLP_FIND_ERROR Sources/Highlight/HighlightPattern.h /^ HLP_FIND_ERROR,$/;" e enum:__anon32 +HLP_FIND_OK Sources/Highlight/HighlightPattern.h /^ HLP_FIND_OK,$/;" e enum:__anon32 +HLP_FIND_OK_NO_END Sources/Highlight/HighlightPattern.h /^ HLP_FIND_OK_NO_END,$/;" e enum:__anon32 +HasExtention Sources/Highlight/Highlight.cpp /^bool Highlight::HasExtention(Edn::String &ext)$/;" f class:Highlight +HaveBg Sources/Colorize/Colorize.cpp /^bool Colorize::HaveBg(void)$/;" f class:Colorize +HaveName Sources/Buffer/Buffer.cpp /^bool Buffer::HaveName(void)$/;" f class:Buffer +HaveName Sources/Buffer/BufferText.cpp /^bool BufferText::HaveName(void)$/;" f class:BufferText +Hide Sources/GuiTools/Search/Search.cpp /^void Search::Hide(void)$/;" f class:Search +Highlight Sources/Highlight/Highlight.cpp /^Highlight::Highlight(Edn::String &xmlFilename)$/;" f class:Highlight +Highlight Sources/Highlight/Highlight.h /^class Highlight {$/;" c +HighlightManager Sources/Highlight/HighlightManager.cpp /^HighlightManager::HighlightManager(void)$/;" f class:HighlightManager +HighlightManager Sources/Highlight/HighlightManager.h /^class HighlightManager: public Singleton$/;" c +HighlightPattern Sources/Highlight/HighlightPattern.cpp /^HighlightPattern::HighlightPattern(void)$/;" f class:HighlightPattern +HighlightPattern Sources/Highlight/HighlightPattern.h /^class HighlightPattern {$/;" c +HightlightGenerateLines Sources/tools/EdnBuf/EdnBuf_HighLight.cpp /^void EdnBuf::HightlightGenerateLines(displayHLData_ts & MData, int32_t HLStart, int32_t nbLines)$/;" f class:EdnBuf +IN_NAMESPACE_EDN Sources/tools/NameSpaceEdn/Edn.h 42;" d +Identify Sources/tools/tinyXML/tinyxmlparser.cpp /^TiXmlNode* TiXmlNode::Identify( const char* p, TiXmlEncoding encoding )$/;" f class:TiXmlNode +Indent Sources/tools/EdnBuf/EdnBuf.cpp /^int32_t EdnBuf::Indent(selectionType_te select)$/;" f class:EdnBuf +Indent Sources/tools/tinyXML/tinyxml.h /^ const char* Indent() { return indent.c_str(); }$/;" f class:TiXmlPrinter +IndexOf Sources/tools/EdnTemplate/EdnVector.h /^ int IndexOf(const T * item) const$/;" f class:EdnVector +Init Sources/tools/ClipBoard/ClipBoard.cpp /^void ClipBoard::Init(void)$/;" f class:ClipBoard +Init Sources/tools/Display/Display.cpp /^void Display::Init(void)$/;" f class:Display +Insert Sources/tools/EdnBuf/EdnBuf.cpp /^void EdnBuf::Insert(int32_t pos, EdnVectorBin &insertText)$/;" f class:EdnBuf +Insert Sources/tools/EdnTemplate/EdnVectorBin.h /^ void Insert(int32_t pos, const MY_TYPE * item, int32_t nbElement)$/;" f class:EdnVectorBin +Insert Sources/tools/EdnTemplate/EdnVectorBin.h /^ void Insert(int32_t pos, const MY_TYPE& item)$/;" f class:EdnVectorBin +Insert Sources/tools/EdnTemplate/EdnVectorBuf.cpp /^void EdnVectorBuf::Insert(int32_t pos, EdnVectorBin& items)$/;" f class:EdnVectorBuf +Insert Sources/tools/EdnTemplate/EdnVectorBuf.cpp /^void EdnVectorBuf::Insert(int32_t pos, const int8_t& item)$/;" f class:EdnVectorBuf +InsertAfterChild Sources/tools/tinyXML/tinyxml.cpp /^TiXmlNode* TiXmlNode::InsertAfterChild( TiXmlNode* afterThis, const TiXmlNode& addThis )$/;" f class:TiXmlNode +InsertBeforeChild Sources/tools/tinyXML/tinyxml.cpp /^TiXmlNode* TiXmlNode::InsertBeforeChild( TiXmlNode* beforeThis, const TiXmlNode& addThis )$/;" f class:TiXmlNode +InsertEndChild Sources/tools/tinyXML/tinyxml.cpp /^TiXmlNode* TiXmlNode::InsertEndChild( const TiXmlNode& addThis )$/;" f class:TiXmlNode +IntValue Sources/tools/tinyXML/tinyxml.cpp /^int TiXmlAttribute::IntValue() const$/;" f class:TiXmlAttribute +IsAlpha Sources/tools/tinyXML/tinyxmlparser.cpp /^\/*static*\/ int TiXmlBase::IsAlpha( unsigned char anyByte, TiXmlEncoding \/*encoding*\/ )$/;" f class:TiXmlBase +IsAlphaNum Sources/tools/tinyXML/tinyxmlparser.cpp /^\/*static*\/ int TiXmlBase::IsAlphaNum( unsigned char anyByte, TiXmlEncoding \/*encoding*\/ )$/;" f class:TiXmlBase +IsEmpty Sources/tools/NameSpaceEdn/String.cpp /^bool Edn::String::IsEmpty(void) const$/;" f class:Edn::String +IsEnable Sources/Highlight/HighlightPattern.cpp /^bool HighlightPattern::IsEnable(void)$/;" f class:HighlightPattern +IsModify Sources/Buffer/Buffer.cpp /^bool Buffer::IsModify(void)$/;" f class:Buffer +IsReplaceEmpty Sources/GuiTools/Search/SearchData.cpp /^bool SearchData::IsReplaceEmpty(void)$/;" f class:SearchData +IsSearchEmpty Sources/GuiTools/Search/SearchData.cpp /^bool SearchData::IsSearchEmpty(void)$/;" f class:SearchData +IsSetAlt Sources/tools/globals/tools_globals.cpp /^bool globals::IsSetAlt(void)$/;" f class:globals +IsSetAutoIndent Sources/tools/globals/tools_globals.cpp /^bool globals::IsSetAutoIndent(void)$/;" f class:globals +IsSetCtrl Sources/tools/globals/tools_globals.cpp /^bool globals::IsSetCtrl(void)$/;" f class:globals +IsSetDisplayEndOfLine Sources/tools/globals/tools_globals.cpp /^bool globals::IsSetDisplayEndOfLine(void)$/;" f class:globals +IsSetDisplaySpaceChar Sources/tools/globals/tools_globals.cpp /^bool globals::IsSetDisplaySpaceChar(void)$/;" f class:globals +IsSetInsert Sources/tools/globals/tools_globals.cpp /^bool globals::IsSetInsert(void)$/;" f class:globals +IsSetPomme Sources/tools/globals/tools_globals.cpp /^bool globals::IsSetPomme(void)$/;" f class:globals +IsSetShift Sources/tools/globals/tools_globals.cpp /^bool globals::IsSetShift(void)$/;" f class:globals +IsWhiteSpace Sources/tools/tinyXML/tinyxml.h /^ inline static bool IsWhiteSpace( char c ) $/;" f class:TiXmlBase +IsWhiteSpace Sources/tools/tinyXML/tinyxml.h /^ inline static bool IsWhiteSpace( int c )$/;" f class:TiXmlBase +IsWhiteSpaceCondensed Sources/tools/tinyXML/tinyxml.h /^ static bool IsWhiteSpaceCondensed() { return condenseWhiteSpace; }$/;" f class:TiXmlBase +IterateChildren Sources/tools/tinyXML/tinyxml.cpp /^const TiXmlNode* TiXmlNode::IterateChildren( const TiXmlNode* previous ) const$/;" f class:TiXmlNode +IterateChildren Sources/tools/tinyXML/tinyxml.cpp /^const TiXmlNode* TiXmlNode::IterateChildren( const char * val, const TiXmlNode* previous ) const$/;" f class:TiXmlNode +IterateChildren Sources/tools/tinyXML/tinyxml.h /^ TiXmlNode* IterateChildren( const TiXmlNode* previous ) {$/;" f class:TiXmlNode +IterateChildren Sources/tools/tinyXML/tinyxml.h /^ TiXmlNode* IterateChildren( const char * _value, const TiXmlNode* previous ) {$/;" f class:TiXmlNode +IterateChildren Sources/tools/tinyXML/tinyxml.h /^ TiXmlNode* IterateChildren( const std::string& _value, const TiXmlNode* previous ) { return IterateChildren (_value.c_str (), previous); } \/\/\/< STL std::string form.$/;" f class:TiXmlNode +IterateChildren Sources/tools/tinyXML/tinyxml.h /^ const TiXmlNode* IterateChildren( const std::string& _value, const TiXmlNode* previous ) const { return IterateChildren (_value.c_str (), previous); } \/\/\/< STL std::string form.$/;" f class:TiXmlNode +Iterator Sources/tools/EdnTemplate/EdnVector.h /^ Iterator():$/;" f class:EdnVector::Iterator +Iterator Sources/tools/EdnTemplate/EdnVector.h /^ Iterator(EdnVector * EdnVector, int pos):$/;" f class:EdnVector::Iterator +Iterator Sources/tools/EdnTemplate/EdnVector.h /^ Iterator(const Iterator & otherIterator):$/;" f class:EdnVector::Iterator +Iterator Sources/tools/EdnTemplate/EdnVector.h /^ class Iterator:$/;" c class:EdnVector +Iterator Sources/tools/EdnTemplate/EdnVectorBin.h /^ Iterator():$/;" f class:EdnVectorBin::Iterator +Iterator Sources/tools/EdnTemplate/EdnVectorBin.h /^ Iterator(EdnVectorBin * Evb, int32_t pos):$/;" f class:EdnVectorBin::Iterator +Iterator Sources/tools/EdnTemplate/EdnVectorBin.h /^ Iterator(const Iterator & otherIterator):$/;" f class:EdnVectorBin::Iterator +Iterator Sources/tools/EdnTemplate/EdnVectorBin.h /^ class Iterator$/;" c class:EdnVectorBin +Iterator Sources/tools/EdnTemplate/EdnVectorBuf.h /^ Iterator(EdnVectorBuf * Evb, int32_t pos):$/;" f class:EdnVectorBuf::Iterator +Iterator Sources/tools/EdnTemplate/EdnVectorBuf.h /^ Iterator(const Iterator & otherIterator):$/;" f class:EdnVectorBuf::Iterator +Iterator Sources/tools/EdnTemplate/EdnVectorBuf.h /^ Iterator(void):$/;" f class:EdnVectorBuf::Iterator +Iterator Sources/tools/EdnTemplate/EdnVectorBuf.h /^ class Iterator$/;" c class:EdnVectorBuf +JUMP_BACK Sources/ctags/readtags.cpp 561;" d file: +JumpAtLine Sources/Buffer/Buffer.cpp /^void Buffer::JumpAtLine(int32_t newLine)$/;" f class:Buffer +JumpAtLine Sources/Buffer/BufferText.cpp /^void BufferText::JumpAtLine(int32_t newLine)$/;" f class:BufferText +JumpTo Sources/ctags/CTagsManager.cpp /^void CTagsManager::JumpTo(void)$/;" f class:CTagsManager +Last Sources/tools/tinyXML/tinyxml.h /^ TiXmlAttribute* Last() { return ( sentinel.prev == &sentinel ) ? 0 : sentinel.prev; }$/;" f class:TiXmlAttributeSet +Last Sources/tools/tinyXML/tinyxml.h /^ const TiXmlAttribute* Last() const { return ( sentinel.prev == &sentinel ) ? 0 : sentinel.prev; }$/;" f class:TiXmlAttributeSet +LastAttribute Sources/tools/tinyXML/tinyxml.h /^ TiXmlAttribute* LastAttribute() { return attributeSet.Last(); }$/;" f class:TiXmlElement +LastAttribute Sources/tools/tinyXML/tinyxml.h /^ const TiXmlAttribute* LastAttribute() const { return attributeSet.Last(); } \/\/\/< Access the last attribute in this element.$/;" f class:TiXmlElement +LastChild Sources/tools/tinyXML/tinyxml.cpp /^const TiXmlNode* TiXmlNode::LastChild( const char * _value ) const$/;" f class:TiXmlNode +LastChild Sources/tools/tinyXML/tinyxml.h /^ TiXmlNode* LastChild( const char * _value ) {$/;" f class:TiXmlNode +LastChild Sources/tools/tinyXML/tinyxml.h /^ TiXmlNode* LastChild( const std::string& _value ) { return LastChild (_value.c_str ()); } \/\/\/< STL std::string form.$/;" f class:TiXmlNode +LastChild Sources/tools/tinyXML/tinyxml.h /^ TiXmlNode* LastChild() { return lastChild; }$/;" f class:TiXmlNode +LastChild Sources/tools/tinyXML/tinyxml.h /^ const TiXmlNode* LastChild( const std::string& _value ) const { return LastChild (_value.c_str ()); } \/\/\/< STL std::string form.$/;" f class:TiXmlNode +LastChild Sources/tools/tinyXML/tinyxml.h /^ const TiXmlNode* LastChild() const { return lastChild; } \/\/\/ The last child of this node. Will be null if there are no children.$/;" f class:TiXmlNode +LineBreak Sources/tools/tinyXML/tinyxml.h /^ const char* LineBreak() { return lineBreak.c_str(); }$/;" f class:TiXmlPrinter +LinkCommonAccel Sources/tools/MsgBroadcast/AccelKey.cpp /^void AccelKey::LinkCommonAccel(GtkWidget * widget)$/;" f class:AccelKey +LinkCommonAccel Sources/tools/MsgBroadcast/AccelKey.cpp /^void AccelKey::LinkCommonAccel(GtkWindow * widget)$/;" f class:AccelKey +LinkEndChild Sources/tools/tinyXML/tinyxml.cpp /^TiXmlNode* TiXmlNode::LinkEndChild( TiXmlNode* node )$/;" f class:TiXmlNode +LoadFile Sources/Colorize/ColorizeManager.cpp /^void ColorizeManager::LoadFile(Edn::String &xmlFilename)$/;" f class:ColorizeManager +LoadFile Sources/Colorize/ColorizeManager.cpp /^void ColorizeManager::LoadFile(const char * xmlFilename)$/;" f class:ColorizeManager +LoadFile Sources/tools/tinyXML/tinyxml.cpp /^bool TiXmlDocument::LoadFile( FILE* file, TiXmlEncoding encoding )$/;" f class:TiXmlDocument +LoadFile Sources/tools/tinyXML/tinyxml.cpp /^bool TiXmlDocument::LoadFile( TiXmlEncoding encoding )$/;" f class:TiXmlDocument +LoadFile Sources/tools/tinyXML/tinyxml.cpp /^bool TiXmlDocument::LoadFile( const char* _filename, TiXmlEncoding encoding )$/;" f class:TiXmlDocument +LoadFile Sources/tools/tinyXML/tinyxml.h /^ bool LoadFile( const std::string& filename, TiXmlEncoding encoding = TIXML_DEFAULT_ENCODING ) \/\/\/< STL std::string version.$/;" f class:TiXmlDocument +LoadTagFile Sources/ctags/CTagsManager.cpp /^void CTagsManager::LoadTagFile(void)$/;" f class:CTagsManager +MACRO_DISPLAY_MSG Sources/tools/MsgBroadcast/MsgBroadcast.cpp 76;" d file: +MAX_CARACTER_CYCLE Sources/tools/Display/Display.h 48;" d +MAX_ENTITY_LENGTH Sources/tools/tinyXML/tinyxml.h /^ MAX_ENTITY_LENGTH = 6$/;" e enum:TiXmlBase::__anon3 +MAX_EXP_CHAR_LEN Sources/tools/EdnBuf/EdnBuf.h 30;" d +MENU_MSG Sources/GuiTools/MainWindows/MenuBar.cpp 32;" d file: +MSG_LINK Sources/GuiTools/MainWindows/MenuBar.cpp 39;" d file: +MSG_SetCharsetIso559_1 Sources/GuiTools/MainWindows/MenuBar.cpp /^const char * MSG_SetCharsetIso559_1 = "Set ISO 5589-1";$/;" v +MSG_SetCharsetIso559_15 Sources/GuiTools/MainWindows/MenuBar.cpp /^const char * MSG_SetCharsetIso559_15 = "Set ISO 5589-15";$/;" v +MSG_SetCharsetUTF8 Sources/GuiTools/MainWindows/MenuBar.cpp /^const char * MSG_SetCharsetUTF8 = "Set UTF 8";$/;" v +MSG_TO_BUFFER_MANAGER__START Sources/tools/MsgBroadcast/MsgBroadcast.h /^ MSG_TO_BUFFER_MANAGER__START,$/;" e enum:__anon10 +MSG_TO_BUFFER_MANAGER__STOP Sources/tools/MsgBroadcast/MsgBroadcast.h /^ MSG_TO_BUFFER_MANAGER__STOP,$/;" e enum:__anon10 +MSG_TO_CTAGS__START Sources/tools/MsgBroadcast/MsgBroadcast.h /^ MSG_TO_CTAGS__START,$/;" e enum:__anon10 +MSG_TO_CTAGS__STOP Sources/tools/MsgBroadcast/MsgBroadcast.h /^ MSG_TO_CTAGS__STOP,$/;" e enum:__anon10 +MSG_TO_GUI_MANAGER__START Sources/tools/MsgBroadcast/MsgBroadcast.h /^ MSG_TO_GUI_MANAGER__START,$/;" e enum:__anon10 +MSG_TO_GUI_MANAGER__STOP Sources/tools/MsgBroadcast/MsgBroadcast.h /^ MSG_TO_GUI_MANAGER__STOP,$/;" e enum:__anon10 +MSG_TO_GUI__START Sources/tools/MsgBroadcast/MsgBroadcast.h /^ MSG_TO_GUI__START,$/;" e enum:__anon10 +MSG_TO_GUI__STOP Sources/tools/MsgBroadcast/MsgBroadcast.h /^ MSG_TO_GUI__STOP,$/;" e enum:__anon10 +MSG_TO_SYSTEM__START Sources/tools/MsgBroadcast/MsgBroadcast.h /^ MSG_TO_SYSTEM__START,$/;" e enum:__anon10 +MSG_TO_SYSTEM__STOP Sources/tools/MsgBroadcast/MsgBroadcast.h /^ MSG_TO_SYSTEM__STOP,$/;" e enum:__anon10 +MSG_TO_WORKING_AREA__START Sources/tools/MsgBroadcast/MsgBroadcast.h /^ MSG_TO_WORKING_AREA__START,$/;" e enum:__anon10 +MSG_TO_WORKING_AREA__STOP Sources/tools/MsgBroadcast/MsgBroadcast.h /^ MSG_TO_WORKING_AREA__STOP,$/;" e enum:__anon10 +MSG_TogleAutoIndent Sources/GuiTools/MainWindows/MenuBar.cpp /^const char * MSG_TogleAutoIndent = "Request a Togle of Auto Indent";$/;" v +MSG_TogleDisplayChar Sources/GuiTools/MainWindows/MenuBar.cpp /^const char * MSG_TogleDisplayChar = "Request a Togle of char displaying";$/;" v +MSG_TogleDisplayEOL Sources/GuiTools/MainWindows/MenuBar.cpp /^const char * MSG_TogleDisplayEOL = "Request a Togle of displaying EndOfLine";$/;" v +MainAreaView Sources/CustumWidget/MainAreaView/MainAreaView.cpp /^class MainAreaView: public Singleton$/;" c file: +MainWindows Sources/GuiTools/MainWindows/MainWindows.cpp /^MainWindows::MainWindows(void) : MsgBroadcast("Main Windows", EDN_CAT_GUI)$/;" f class:MainWindows +MainWindows Sources/GuiTools/MainWindows/MainWindows.h /^class MainWindows: public Singleton, public MsgBroadcast$/;" c +MenuBar Sources/GuiTools/MainWindows/MenuBar.cpp /^MenuBar::MenuBar(void) : MsgBroadcast("Menu bar", EDN_CAT_GUI)$/;" f class:MenuBar +MenuBar Sources/GuiTools/MainWindows/MenuBar.h /^class MenuBar: public MsgBroadcast$/;" c +MenuBarMain Sources/GuiTools/MainWindows/MenuBar.cpp /^ MenuBarMain(const char * title, GtkWidget * parent) : m_parent(NULL), m_menu(NULL), m_menuListe(NULL)$/;" f class:MenuBarMain +MenuBarMain Sources/GuiTools/MainWindows/MenuBar.cpp /^class MenuBarMain$/;" c file: +MouseEvent Sources/Buffer/Buffer.cpp /^void Buffer::MouseEvent(int32_t width, int32_t height)$/;" f class:Buffer +MouseEvent Sources/Buffer/BufferText.cpp /^void BufferText::MouseEvent(int32_t width, int32_t height)$/;" f class:BufferText +MouseEventDouble Sources/Buffer/Buffer.cpp /^void Buffer::MouseEventDouble(void)$/;" f class:Buffer +MouseEventDouble Sources/Buffer/BufferText.cpp /^void BufferText::MouseEventDouble(void)$/;" f class:BufferText +MouseEventTriple Sources/Buffer/Buffer.cpp /^void Buffer::MouseEventTriple(void)$/;" f class:Buffer +MouseEventTriple Sources/Buffer/BufferText.cpp /^void BufferText::MouseEventTriple(void)$/;" f class:BufferText +MouseSelectFromCursorTo Sources/Buffer/Buffer.cpp /^void Buffer::MouseSelectFromCursorTo(int32_t width, int32_t height)$/;" f class:Buffer +MouseSelectFromCursorTo Sources/Buffer/BufferText.cpp /^void BufferText::MouseSelectFromCursorTo(int32_t width, int32_t height)$/;" f class:BufferText +MoveUpDown Sources/Buffer/BufferText.cpp /^void BufferText::MoveUpDown(int32_t ofset)$/;" f class:BufferText +MsgBroadcast Sources/tools/MsgBroadcast/MsgBroadcast.cpp /^MsgBroadcast::MsgBroadcast(const char * className, messageCat_te cat)$/;" f class:MsgBroadcast +MsgBroadcast Sources/tools/MsgBroadcast/MsgBroadcast.h /^class MsgBroadcast$/;" c +MsgBroadcastCore Sources/tools/MsgBroadcast/MsgBroadcast.cpp /^MsgBroadcastCore::MsgBroadcastCore(void)$/;" f class:MsgBroadcastCore +MsgBroadcastCore Sources/tools/MsgBroadcast/MsgBroadcast.h /^class MsgBroadcastCore: public Singleton$/;" c +NUM_ENTITY Sources/tools/tinyXML/tinyxml.h /^ NUM_ENTITY = 5,$/;" e enum:TiXmlBase::__anon3 +Name Sources/tools/tinyXML/tinyxml.h /^ const char* Name() const { return name.c_str(); } \/\/\/< Return the name of this attribute.$/;" f class:TiXmlAttribute +NameTStr Sources/tools/tinyXML/tinyxml.h /^ const TIXML_STRING& NameTStr() const { return name; }$/;" f class:TiXmlAttribute +NeedToCleanEndPage Sources/Buffer/BufferText.h /^ bool NeedToCleanEndPage; \/\/!< if true, the end of the page need to be clean (arrive after a remove line)$/;" m class:BufferText +Next Sources/tools/tinyXML/tinyxml.cpp /^const TiXmlAttribute* TiXmlAttribute::Next() const$/;" f class:TiXmlAttribute +Next Sources/tools/tinyXML/tinyxml.h /^ TiXmlAttribute* Next() {$/;" f class:TiXmlAttribute +NextSibling Sources/tools/tinyXML/tinyxml.cpp /^const TiXmlNode* TiXmlNode::NextSibling( const char * _value ) const $/;" f class:TiXmlNode +NextSibling Sources/tools/tinyXML/tinyxml.h /^ TiXmlNode* NextSibling( const char* _next ) {$/;" f class:TiXmlNode +NextSibling Sources/tools/tinyXML/tinyxml.h /^ TiXmlNode* NextSibling( const std::string& _value) { return NextSibling (_value.c_str ()); } \/\/\/< STL std::string form.$/;" f class:TiXmlNode +NextSibling Sources/tools/tinyXML/tinyxml.h /^ TiXmlNode* NextSibling() { return next; }$/;" f class:TiXmlNode +NextSibling Sources/tools/tinyXML/tinyxml.h /^ const TiXmlNode* NextSibling( const std::string& _value) const { return NextSibling (_value.c_str ()); } \/\/\/< STL std::string form.$/;" f class:TiXmlNode +NextSibling Sources/tools/tinyXML/tinyxml.h /^ const TiXmlNode* NextSibling() const { return next; }$/;" f class:TiXmlNode +NextSiblingElement Sources/tools/tinyXML/tinyxml.cpp /^const TiXmlElement* TiXmlNode::NextSiblingElement( const char * _value ) const$/;" f class:TiXmlNode +NextSiblingElement Sources/tools/tinyXML/tinyxml.cpp /^const TiXmlElement* TiXmlNode::NextSiblingElement() const$/;" f class:TiXmlNode +NextSiblingElement Sources/tools/tinyXML/tinyxml.h /^ TiXmlElement* NextSiblingElement( const char *_next ) {$/;" f class:TiXmlNode +NextSiblingElement Sources/tools/tinyXML/tinyxml.h /^ TiXmlElement* NextSiblingElement( const std::string& _value) { return NextSiblingElement (_value.c_str ()); } \/\/\/< STL std::string form.$/;" f class:TiXmlNode +NextSiblingElement Sources/tools/tinyXML/tinyxml.h /^ TiXmlElement* NextSiblingElement() {$/;" f class:TiXmlNode +NextSiblingElement Sources/tools/tinyXML/tinyxml.h /^ const TiXmlElement* NextSiblingElement( const std::string& _value) const { return NextSiblingElement (_value.c_str ()); } \/\/\/< STL std::string form.$/;" f class:TiXmlNode +NoChildren Sources/tools/tinyXML/tinyxml.h /^ bool NoChildren() const { return !firstChild; }$/;" f class:TiXmlNode +Node Sources/tools/tinyXML/tinyxml.h /^ TiXmlNode* Node() const { return ToNode(); } $/;" f class:TiXmlHandle +NodeType Sources/tools/tinyXML/tinyxml.h /^ enum NodeType$/;" g class:TiXmlNode +NumberOfLines Sources/tools/EdnBuf/EdnBuf.h /^ int32_t NumberOfLines(void) {return m_nbLine;};$/;" f class:EdnBuf +OPCODE_BRACE_IN Sources/tools/EdnRegExp/EdnRegExp.cpp 37;" d file: +OPCODE_BRACE_OUT Sources/tools/EdnRegExp/EdnRegExp.cpp 38;" d file: +OPCODE_BRACKET_IN Sources/tools/EdnRegExp/EdnRegExp.cpp 35;" d file: +OPCODE_BRACKET_OUT Sources/tools/EdnRegExp/EdnRegExp.cpp 36;" d file: +OPCODE_DIGIT Sources/tools/EdnRegExp/EdnRegExp.cpp 47;" d file: +OPCODE_DIGIT_NOT Sources/tools/EdnRegExp/EdnRegExp.cpp 48;" d file: +OPCODE_DOT Sources/tools/EdnRegExp/EdnRegExp.cpp 41;" d file: +OPCODE_END_OF_LINE Sources/tools/EdnRegExp/EdnRegExp.cpp 46;" d file: +OPCODE_LETTER Sources/tools/EdnRegExp/EdnRegExp.cpp 49;" d file: +OPCODE_LETTER_NOT Sources/tools/EdnRegExp/EdnRegExp.cpp 50;" d file: +OPCODE_NO_CHAR Sources/tools/EdnRegExp/EdnRegExp.cpp 55;" d file: +OPCODE_PIPE Sources/tools/EdnRegExp/EdnRegExp.cpp 44;" d file: +OPCODE_PLUS Sources/tools/EdnRegExp/EdnRegExp.cpp 43;" d file: +OPCODE_PTHESE_IN Sources/tools/EdnRegExp/EdnRegExp.cpp 33;" d file: +OPCODE_PTHESE_OUT Sources/tools/EdnRegExp/EdnRegExp.cpp 34;" d file: +OPCODE_QUESTION Sources/tools/EdnRegExp/EdnRegExp.cpp 42;" d file: +OPCODE_SPACE Sources/tools/EdnRegExp/EdnRegExp.cpp 51;" d file: +OPCODE_SPACE_NOT Sources/tools/EdnRegExp/EdnRegExp.cpp 52;" d file: +OPCODE_STAR Sources/tools/EdnRegExp/EdnRegExp.cpp 40;" d file: +OPCODE_START_OF_LINE Sources/tools/EdnRegExp/EdnRegExp.cpp 45;" d file: +OPCODE_TO Sources/tools/EdnRegExp/EdnRegExp.cpp 39;" d file: +OPCODE_WORD Sources/tools/EdnRegExp/EdnRegExp.cpp 53;" d file: +OPCODE_WORD_NOT Sources/tools/EdnRegExp/EdnRegExp.cpp 54;" d file: +OnButtonNext Sources/GuiTools/Search/Search.cpp /^void Search::OnButtonNext(GtkWidget *widget, gpointer data)$/;" f class:Search +OnButtonPrevious Sources/GuiTools/Search/Search.cpp /^void Search::OnButtonPrevious(GtkWidget *widget, gpointer data)$/;" f class:Search +OnButtonQuit Sources/GuiTools/Search/Search.cpp /^void Search::OnButtonQuit(GtkWidget *widget, gpointer data)$/;" f class:Search +OnButtonReplace Sources/GuiTools/Search/Search.cpp /^void Search::OnButtonReplace(GtkWidget *widget, gpointer data)$/;" f class:Search +OnButtonReplaceAndNext Sources/GuiTools/Search/Search.cpp /^void Search::OnButtonReplaceAndNext(GtkWidget *widget, gpointer data)$/;" f class:Search +OnCheckBoxEventCase Sources/GuiTools/Search/Search.cpp /^void Search::OnCheckBoxEventCase(GtkWidget *widget, gpointer data)$/;" f class:Search +OnCheckBoxEventRegExp Sources/GuiTools/Search/Search.cpp /^void Search::OnCheckBoxEventRegExp(GtkWidget *widget, gpointer data)$/;" f class:Search +OnCheckBoxEventWrap Sources/GuiTools/Search/Search.cpp /^void Search::OnCheckBoxEventWrap(GtkWidget *widget, gpointer data)$/;" f class:Search +OnEntryReplaceChange Sources/GuiTools/Search/Search.cpp /^void Search::OnEntryReplaceChange(GtkWidget *widget, gpointer data)$/;" f class:Search +OnEntrySearchChange Sources/GuiTools/Search/Search.cpp /^void Search::OnEntrySearchChange(GtkWidget *widget, gpointer data)$/;" f class:Search +OnMessage Sources/Buffer/BufferManager.cpp /^void BufferManager::OnMessage(int32_t id, int32_t dataID)$/;" f class:BufferManager +OnMessage Sources/CustumWidget/BufferView/BufferView.cpp /^void BufferView::OnMessage(int32_t id, int32_t dataID)$/;" f class:BufferView +OnMessage Sources/CustumWidget/CodeView/CodeView.cpp /^void CodeView::OnMessage(int32_t id, int32_t dataID)$/;" f class:CodeView +OnMessage Sources/GuiTools/MainWindows/MainWindows.cpp /^void MainWindows::OnMessage(int32_t id, int32_t dataID)$/;" f class:MainWindows +OnMessage Sources/GuiTools/MainWindows/MenuBar.cpp /^void MenuBar::OnMessage(int32_t id, int32_t dataID)$/;" f class:MenuBar +OnMessage Sources/GuiTools/MainWindows/StatusBar.cpp /^void StatusBar::OnMessage(int32_t id, int32_t dataID)$/;" f class:StatusBar +OnMessage Sources/GuiTools/MainWindows/ToolBar.cpp /^void ToolBar::OnMessage(int32_t id, int32_t dataID)$/;" f class:ToolBar +OnMessage Sources/GuiTools/WindowsManager/WindowsManager.cpp /^void WindowsManager::OnMessage(int32_t id, int32_t dataID)$/;" f class:WindowsManager +OnMessage Sources/ctags/CTagsManager.cpp /^void CTagsManager::OnMessage(int32_t id, int32_t dataID)$/;" f class:CTagsManager +OnMessage Sources/tools/MsgBroadcast/MsgBroadcast.cpp /^void MsgBroadcast::OnMessage(int32_t id, int32_t dataID)$/;" f class:MsgBroadcast +Open Sources/Buffer/BufferManager.cpp /^int32_t BufferManager::Open(Edn::String &filename)$/;" f class:BufferManager +PFX Sources/Colorize/ColorizeManager.cpp 30;" d file: +POLICE_NAME Sources/tools/Display/Display.cpp 44;" d file: +POLICE_SIZE Sources/tools/Display/Display.cpp 56;" d file: +Parent Sources/tools/tinyXML/tinyxml.h /^ TiXmlNode* Parent() { return parent; }$/;" f class:TiXmlNode +Parent Sources/tools/tinyXML/tinyxml.h /^ const TiXmlNode* Parent() const { return parent; }$/;" f class:TiXmlNode +Parse Sources/Highlight/Highlight.cpp /^void Highlight::Parse(int32_t start, int32_t stop, std::vector &metaData, int32_t &addingPos, EdnVectorBuf &buffer, int32_t elementID)$/;" f class:Highlight +Parse Sources/tools/EdnRegExp/EdnRegExp.cpp /^bool RegExpNode::Parse(EdnVectorBuf &data, int32_t currentPos, int32_t lenMax, int32_t &findLen)$/;" f class:RegExpNode +Parse Sources/tools/EdnRegExp/EdnRegExp.cpp /^bool RegExpNodeBracket::Parse(EdnVectorBuf &data, int32_t currentPos, int32_t lenMax, int32_t &findLen)$/;" f class:RegExpNodeBracket +Parse Sources/tools/EdnRegExp/EdnRegExp.cpp /^bool RegExpNodeDigit::Parse(EdnVectorBuf &data, int32_t currentPos, int32_t lenMax, int32_t &findLen)$/;" f class:RegExpNodeDigit +Parse Sources/tools/EdnRegExp/EdnRegExp.cpp /^bool RegExpNodeDigitNot::Parse(EdnVectorBuf &data, int32_t currentPos, int32_t lenMax, int32_t &findLen)$/;" f class:RegExpNodeDigitNot +Parse Sources/tools/EdnRegExp/EdnRegExp.cpp /^bool RegExpNodeDot::Parse(EdnVectorBuf &data, int32_t currentPos, int32_t lenMax, int32_t &findLen)$/;" f class:RegExpNodeDot +Parse Sources/tools/EdnRegExp/EdnRegExp.cpp /^bool RegExpNodeEOL::Parse(EdnVectorBuf &data, int32_t currentPos, int32_t lenMax, int32_t &findLen)$/;" f class:RegExpNodeEOL +Parse Sources/tools/EdnRegExp/EdnRegExp.cpp /^bool RegExpNodeLetter::Parse(EdnVectorBuf &data, int32_t currentPos, int32_t lenMax, int32_t &findLen)$/;" f class:RegExpNodeLetter +Parse Sources/tools/EdnRegExp/EdnRegExp.cpp /^bool RegExpNodeLetterNot::Parse(EdnVectorBuf &data, int32_t currentPos, int32_t lenMax, int32_t &findLen)$/;" f class:RegExpNodeLetterNot +Parse Sources/tools/EdnRegExp/EdnRegExp.cpp /^bool RegExpNodePThese::Parse(EdnVectorBuf &data, int32_t currentPos, int32_t lenMax, int32_t &findLen)$/;" f class:RegExpNodePThese +Parse Sources/tools/EdnRegExp/EdnRegExp.cpp /^bool RegExpNodePTheseElem::Parse(EdnVectorBuf &data, int32_t currentPos, int32_t lenMax, int32_t &findLen)$/;" f class:RegExpNodePTheseElem +Parse Sources/tools/EdnRegExp/EdnRegExp.cpp /^bool RegExpNodeSOL::Parse(EdnVectorBuf &data, int32_t currentPos, int32_t lenMax, int32_t &findLen)$/;" f class:RegExpNodeSOL +Parse Sources/tools/EdnRegExp/EdnRegExp.cpp /^bool RegExpNodeValue::Parse(EdnVectorBuf &data, int32_t currentPos, int32_t lenMax, int32_t &findLen)$/;" f class:RegExpNodeValue +Parse Sources/tools/EdnRegExp/EdnRegExp.cpp /^bool RegExpNodeWhiteSpace::Parse(EdnVectorBuf &data, int32_t currentPos, int32_t lenMax, int32_t &findLen)$/;" f class:RegExpNodeWhiteSpace +Parse Sources/tools/EdnRegExp/EdnRegExp.cpp /^bool RegExpNodeWhiteSpaceNot::Parse(EdnVectorBuf &data, int32_t currentPos, int32_t lenMax, int32_t &findLen)$/;" f class:RegExpNodeWhiteSpaceNot +Parse Sources/tools/EdnRegExp/EdnRegExp.cpp /^bool RegExpNodeWordChar::Parse(EdnVectorBuf &data, int32_t currentPos, int32_t lenMax, int32_t &findLen)$/;" f class:RegExpNodeWordChar +Parse Sources/tools/EdnRegExp/EdnRegExp.cpp /^bool RegExpNodeWordCharNot::Parse(EdnVectorBuf &data, int32_t currentPos, int32_t lenMax, int32_t &findLen)$/;" f class:RegExpNodeWordCharNot +Parse Sources/tools/tinyXML/tinyxmlparser.cpp /^const char* TiXmlAttribute::Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding )$/;" f class:TiXmlAttribute +Parse Sources/tools/tinyXML/tinyxmlparser.cpp /^const char* TiXmlComment::Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding )$/;" f class:TiXmlComment +Parse Sources/tools/tinyXML/tinyxmlparser.cpp /^const char* TiXmlDeclaration::Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding _encoding )$/;" f class:TiXmlDeclaration +Parse Sources/tools/tinyXML/tinyxmlparser.cpp /^const char* TiXmlDocument::Parse( const char* p, TiXmlParsingData* prevData, TiXmlEncoding encoding )$/;" f class:TiXmlDocument +Parse Sources/tools/tinyXML/tinyxmlparser.cpp /^const char* TiXmlElement::Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding )$/;" f class:TiXmlElement +Parse Sources/tools/tinyXML/tinyxmlparser.cpp /^const char* TiXmlText::Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding )$/;" f class:TiXmlText +Parse Sources/tools/tinyXML/tinyxmlparser.cpp /^const char* TiXmlUnknown::Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding )$/;" f class:TiXmlUnknown +Parse2 Sources/Highlight/Highlight.cpp /^void Highlight::Parse2(int32_t start, int32_t stop, std::vector &metaData, EdnVectorBuf &buffer, int32_t elementID)$/;" f class:Highlight +ParseBrace Sources/tools/EdnRegExp/EdnRegExp.cpp /^static bool ParseBrace(EdnVectorBin &data, int32_t &min, int32_t &max)$/;" f file: +ParseRules Sources/Highlight/Highlight.cpp /^void Highlight::ParseRules(TiXmlNode *child, std::vector &mListPatern, int32_t level)$/;" f class:Highlight +ParseRules Sources/Highlight/HighlightPattern.cpp /^void HighlightPattern::ParseRules(TiXmlNode *child, int32_t level)$/;" f class:HighlightPattern +Paste Sources/Buffer/Buffer.cpp /^void Buffer::Paste(int8_t clipboardID)$/;" f class:Buffer +Paste Sources/Buffer/BufferText.cpp /^void BufferText::Paste(int8_t clipboardID)$/;" f class:BufferText +PopBack Sources/tools/EdnTemplate/EdnVectorBin.h /^ void PopBack(void)$/;" f class:EdnVectorBin +PopBack Sources/tools/EdnTemplate/EdnVectorBuf.cpp /^void EdnVectorBuf::PopBack(void)$/;" f class:EdnVectorBuf +Position Sources/tools/EdnTemplate/EdnVectorBin.h /^ Iterator Position(int32_t pos)$/;" f class:EdnVectorBin +Position Sources/tools/EdnTemplate/EdnVectorBuf.h /^ int32_t Position(void)$/;" f class:EdnVectorBuf::Iterator +Position Sources/tools/EdnTemplate/EdnVectorBuf.h /^ Iterator Position(int32_t pos)$/;" f class:EdnVectorBuf +Previous Sources/tools/tinyXML/tinyxml.cpp /^const TiXmlAttribute* TiXmlAttribute::Previous() const$/;" f class:TiXmlAttribute +Previous Sources/tools/tinyXML/tinyxml.h /^ TiXmlAttribute* Previous() {$/;" f class:TiXmlAttribute +PreviousSibling Sources/tools/tinyXML/tinyxml.cpp /^const TiXmlNode* TiXmlNode::PreviousSibling( const char * _value ) const$/;" f class:TiXmlNode +PreviousSibling Sources/tools/tinyXML/tinyxml.h /^ TiXmlNode* PreviousSibling( const char *_prev ) {$/;" f class:TiXmlNode +PreviousSibling Sources/tools/tinyXML/tinyxml.h /^ TiXmlNode* PreviousSibling( const std::string& _value ) { return PreviousSibling (_value.c_str ()); } \/\/\/< STL std::string form.$/;" f class:TiXmlNode +PreviousSibling Sources/tools/tinyXML/tinyxml.h /^ TiXmlNode* PreviousSibling() { return prev; }$/;" f class:TiXmlNode +PreviousSibling Sources/tools/tinyXML/tinyxml.h /^ const TiXmlNode* PreviousSibling( const std::string& _value ) const { return PreviousSibling (_value.c_str ()); } \/\/\/< STL std::string form.$/;" f class:TiXmlNode +PreviousSibling Sources/tools/tinyXML/tinyxml.h /^ const TiXmlNode* PreviousSibling() const { return prev; }$/;" f class:TiXmlNode +Print Sources/tools/tinyXML/tinyxml.cpp /^void TiXmlAttribute::Print( FILE* cfile, int \/*depth*\/, TIXML_STRING* str ) const$/;" f class:TiXmlAttribute +Print Sources/tools/tinyXML/tinyxml.cpp /^void TiXmlComment::Print( FILE* cfile, int depth ) const$/;" f class:TiXmlComment +Print Sources/tools/tinyXML/tinyxml.cpp /^void TiXmlDeclaration::Print( FILE* cfile, int \/*depth*\/, TIXML_STRING* str ) const$/;" f class:TiXmlDeclaration +Print Sources/tools/tinyXML/tinyxml.cpp /^void TiXmlDocument::Print( FILE* cfile, int depth ) const$/;" f class:TiXmlDocument +Print Sources/tools/tinyXML/tinyxml.cpp /^void TiXmlElement::Print( FILE* cfile, int depth ) const$/;" f class:TiXmlElement +Print Sources/tools/tinyXML/tinyxml.cpp /^void TiXmlText::Print( FILE* cfile, int depth ) const$/;" f class:TiXmlText +Print Sources/tools/tinyXML/tinyxml.cpp /^void TiXmlUnknown::Print( FILE* cfile, int depth ) const$/;" f class:TiXmlUnknown +Print Sources/tools/tinyXML/tinyxml.h /^ virtual void Print( FILE* cfile, int depth ) const {$/;" f class:TiXmlAttribute +Print Sources/tools/tinyXML/tinyxml.h /^ virtual void Print( FILE* cfile, int depth ) const {$/;" f class:TiXmlDeclaration +Print Sources/tools/tinyXML/tinyxml.h /^ void Print() const { Print( stdout, 0 ); }$/;" f class:TiXmlDocument +PrintTag Sources/ctags/CTagsManager.cpp /^void CTagsManager::PrintTag (const tagEntry *entry)$/;" f class:CTagsManager +Process Sources/tools/EdnRegExp/EdnRegExp.cpp /^bool EdnRegExp::Process( EdnVectorBuf &SearchIn,$/;" f class:EdnRegExp +ProgramName Sources/ctags/readtags.cpp /^static const char *ProgramName;$/;" v file: +PseudoTagPrefix Sources/ctags/readtags.cpp /^const char *const PseudoTagPrefix = "!_";$/;" v +PushBack Sources/tools/EdnTemplate/EdnVector.h /^ void PushBack(const T& item)$/;" f class:EdnVector +PushBack Sources/tools/EdnTemplate/EdnVectorBin.h /^ void PushBack(const MY_TYPE * item, int32_t nbElement)$/;" f class:EdnVectorBin +PushBack Sources/tools/EdnTemplate/EdnVectorBin.h /^ void PushBack(const MY_TYPE& item)$/;" f class:EdnVectorBin +PushBack Sources/tools/EdnTemplate/EdnVectorBuf.cpp /^void EdnVectorBuf::PushBack(const int8_t& item)$/;" f class:EdnVectorBuf +QueryDoubleAttribute Sources/tools/tinyXML/tinyxml.cpp /^int TiXmlElement::QueryDoubleAttribute( const char* name, double* dval ) const$/;" f class:TiXmlElement +QueryDoubleAttribute Sources/tools/tinyXML/tinyxml.cpp /^int TiXmlElement::QueryDoubleAttribute( const std::string& name, double* dval ) const$/;" f class:TiXmlElement +QueryDoubleValue Sources/tools/tinyXML/tinyxml.cpp /^int TiXmlAttribute::QueryDoubleValue( double* dval ) const$/;" f class:TiXmlAttribute +QueryFloatAttribute Sources/tools/tinyXML/tinyxml.h /^ int QueryFloatAttribute( const char* name, float* _value ) const {$/;" f class:TiXmlElement +QueryIntAttribute Sources/tools/tinyXML/tinyxml.cpp /^int TiXmlElement::QueryIntAttribute( const char* name, int* ival ) const$/;" f class:TiXmlElement +QueryIntAttribute Sources/tools/tinyXML/tinyxml.cpp /^int TiXmlElement::QueryIntAttribute( const std::string& name, int* ival ) const$/;" f class:TiXmlElement +QueryIntValue Sources/tools/tinyXML/tinyxml.cpp /^int TiXmlAttribute::QueryIntValue( int* ival ) const$/;" f class:TiXmlAttribute +QueryStringAttribute Sources/tools/tinyXML/tinyxml.h /^ int QueryStringAttribute( const char* name, std::string* _value ) const {$/;" f class:TiXmlElement +QueryValueAttribute Sources/tools/tinyXML/tinyxml.h /^ int QueryValueAttribute( const std::string& name, std::string* outValue ) const$/;" f class:TiXmlElement +QueryValueAttribute Sources/tools/tinyXML/tinyxml.h /^ template< typename T > int QueryValueAttribute( const std::string& name, T* outValue ) const$/;" f class:TiXmlElement +READTAGS_H Sources/ctags/readtags.h 22;" d +ROOT_NODE_ID Sources/tools/EdnTemplate/EdnTree.h 62;" d +ReadName Sources/tools/tinyXML/tinyxmlparser.cpp /^const char* TiXmlBase::ReadName( const char* p, TIXML_STRING * name, TiXmlEncoding encoding )$/;" f class:TiXmlBase +ReadText Sources/tools/tinyXML/tinyxmlparser.cpp /^const char* TiXmlBase::ReadText( const char* p, $/;" f class:TiXmlBase +ReadValue Sources/tools/tinyXML/tinyxmlparser.cpp /^const char* TiXmlElement::ReadValue( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding )$/;" f class:TiXmlElement +RectSelect Sources/tools/EdnBuf/EdnBuf_Selection.cpp /^void EdnBuf::RectSelect(selectionType_te select, int32_t start, int32_t end, int32_t rectStart, int32_t rectEnd)$/;" f class:EdnBuf +Rectangle Sources/tools/Display/Display.cpp /^void DrawerManager::Rectangle(Colorize *SelectColor, int32_t x, int32_t y, int32_t width, int32_t height)$/;" f class:DrawerManager +Rectangle Sources/tools/Display/Display.h /^ void Rectangle(color_ts & SelectColor, int32_t x, int32_t y, int32_t width, int32_t height) {$/;" f class:DrawerManager +Redo Sources/Buffer/Buffer.cpp /^void Buffer::Redo(void)$/;" f class:Buffer +Redo Sources/Buffer/BufferText.cpp /^void BufferText::Redo(void)$/;" f class:BufferText +Redo Sources/tools/EdnBuf/EdnBuf_History.cpp /^int32_t EdnBuf::Redo(void)$/;" f class:EdnBuf +RegExpNode Sources/tools/EdnRegExp/EdnRegExp.cpp /^RegExpNode::RegExpNode(void)$/;" f class:RegExpNode +RegExpNode Sources/tools/EdnRegExp/EdnRegExp.h /^class RegExpNode{$/;" c +RegExpNodeBracket Sources/tools/EdnRegExp/EdnRegExp.h /^ RegExpNodeBracket(void) { };$/;" f class:RegExpNodeBracket +RegExpNodeBracket Sources/tools/EdnRegExp/EdnRegExp.h /^class RegExpNodeBracket : public RegExpNode {$/;" c +RegExpNodeDigit Sources/tools/EdnRegExp/EdnRegExp.h /^ RegExpNodeDigit(void) { };$/;" f class:RegExpNodeDigit +RegExpNodeDigit Sources/tools/EdnRegExp/EdnRegExp.h /^class RegExpNodeDigit : public RegExpNode {$/;" c +RegExpNodeDigitNot Sources/tools/EdnRegExp/EdnRegExp.h /^ RegExpNodeDigitNot(void) { };$/;" f class:RegExpNodeDigitNot +RegExpNodeDigitNot Sources/tools/EdnRegExp/EdnRegExp.h /^class RegExpNodeDigitNot : public RegExpNode {$/;" c +RegExpNodeDot Sources/tools/EdnRegExp/EdnRegExp.h /^ RegExpNodeDot(void) { };$/;" f class:RegExpNodeDot +RegExpNodeDot Sources/tools/EdnRegExp/EdnRegExp.h /^class RegExpNodeDot : public RegExpNode {$/;" c +RegExpNodeEOL Sources/tools/EdnRegExp/EdnRegExp.h /^ RegExpNodeEOL(void) { };$/;" f class:RegExpNodeEOL +RegExpNodeEOL Sources/tools/EdnRegExp/EdnRegExp.h /^class RegExpNodeEOL : public RegExpNode {$/;" c +RegExpNodeLetter Sources/tools/EdnRegExp/EdnRegExp.h /^ RegExpNodeLetter(void) { };$/;" f class:RegExpNodeLetter +RegExpNodeLetter Sources/tools/EdnRegExp/EdnRegExp.h /^class RegExpNodeLetter : public RegExpNode {$/;" c +RegExpNodeLetterNot Sources/tools/EdnRegExp/EdnRegExp.h /^ RegExpNodeLetterNot(void) { };$/;" f class:RegExpNodeLetterNot +RegExpNodeLetterNot Sources/tools/EdnRegExp/EdnRegExp.h /^class RegExpNodeLetterNot : public RegExpNode {$/;" c +RegExpNodePThese Sources/tools/EdnRegExp/EdnRegExp.h /^ RegExpNodePThese(void) { };$/;" f class:RegExpNodePThese +RegExpNodePThese Sources/tools/EdnRegExp/EdnRegExp.h /^class RegExpNodePThese : public RegExpNode {$/;" c +RegExpNodePTheseElem Sources/tools/EdnRegExp/EdnRegExp.h /^ RegExpNodePTheseElem(void) { };$/;" f class:RegExpNodePTheseElem +RegExpNodePTheseElem Sources/tools/EdnRegExp/EdnRegExp.h /^class RegExpNodePTheseElem : public RegExpNode {$/;" c +RegExpNodeSOL Sources/tools/EdnRegExp/EdnRegExp.h /^ RegExpNodeSOL(void) { };$/;" f class:RegExpNodeSOL +RegExpNodeSOL Sources/tools/EdnRegExp/EdnRegExp.h /^class RegExpNodeSOL : public RegExpNode {$/;" c +RegExpNodeValue Sources/tools/EdnRegExp/EdnRegExp.h /^ RegExpNodeValue(void) { };$/;" f class:RegExpNodeValue +RegExpNodeValue Sources/tools/EdnRegExp/EdnRegExp.h /^class RegExpNodeValue : public RegExpNode {$/;" c +RegExpNodeWhiteSpace Sources/tools/EdnRegExp/EdnRegExp.h /^ RegExpNodeWhiteSpace(void) { };$/;" f class:RegExpNodeWhiteSpace +RegExpNodeWhiteSpace Sources/tools/EdnRegExp/EdnRegExp.h /^class RegExpNodeWhiteSpace : public RegExpNode {$/;" c +RegExpNodeWhiteSpaceNot Sources/tools/EdnRegExp/EdnRegExp.h /^ RegExpNodeWhiteSpaceNot(void) { };$/;" f class:RegExpNodeWhiteSpaceNot +RegExpNodeWhiteSpaceNot Sources/tools/EdnRegExp/EdnRegExp.h /^class RegExpNodeWhiteSpaceNot : public RegExpNode {$/;" c +RegExpNodeWordChar Sources/tools/EdnRegExp/EdnRegExp.h /^ RegExpNodeWordChar(void) { };$/;" f class:RegExpNodeWordChar +RegExpNodeWordChar Sources/tools/EdnRegExp/EdnRegExp.h /^class RegExpNodeWordChar : public RegExpNode {$/;" c +RegExpNodeWordCharNot Sources/tools/EdnRegExp/EdnRegExp.h /^ RegExpNodeWordCharNot(void) { };$/;" f class:RegExpNodeWordCharNot +RegExpNodeWordCharNot Sources/tools/EdnRegExp/EdnRegExp.h /^class RegExpNodeWordCharNot : public RegExpNode {$/;" c +RegenerateHighLightAt Sources/tools/EdnBuf/EdnBuf_HighLight.cpp /^void EdnBuf::RegenerateHighLightAt(int32_t pos, int32_t nbDeleted, int32_t nbAdded)$/;" f class:EdnBuf +Remove Sources/Buffer/BufferManager.cpp /^bool BufferManager::Remove(int32_t BufferID)$/;" f class:BufferManager +Remove Sources/tools/EdnBuf/EdnBuf.cpp /^void EdnBuf::Remove(int32_t start, int32_t end)$/;" f class:EdnBuf +Remove Sources/tools/EdnTemplate/EdnTree.h /^ bool Remove(int32_t id)$/;" f class:EdnTree +Remove Sources/tools/EdnTemplate/EdnVectorBuf.cpp /^void EdnVectorBuf::Remove(int32_t pos, int32_t nbRemoveElement)$/;" f class:EdnVectorBuf +Remove Sources/tools/NameSpaceEdn/String.cpp /^void Edn::String::Remove(int32_t currentID, int32_t len)$/;" f class:Edn::String +Remove Sources/tools/tinyXML/tinyxml.cpp /^void TiXmlAttributeSet::Remove( TiXmlAttribute* removeMe )$/;" f class:TiXmlAttributeSet +RemoveAll Sources/Buffer/BufferManager.cpp /^void BufferManager::RemoveAll(void)$/;" f class:BufferManager +RemoveAttribute Sources/tools/tinyXML/tinyxml.cpp /^void TiXmlElement::RemoveAttribute( const char * name )$/;" f class:TiXmlElement +RemoveAttribute Sources/tools/tinyXML/tinyxml.h /^ void RemoveAttribute( const std::string& name ) { RemoveAttribute (name.c_str ()); } \/\/\/< STL std::string form.$/;" f class:TiXmlElement +RemoveChild Sources/tools/tinyXML/tinyxml.cpp /^bool TiXmlNode::RemoveChild( TiXmlNode* removeThis )$/;" f class:TiXmlNode +RemoveLine Sources/Buffer/Buffer.cpp /^void Buffer::RemoveLine(void)$/;" f class:Buffer +RemoveLine Sources/Buffer/BufferText.cpp /^void BufferText::RemoveLine(void)$/;" f class:BufferText +RemoveSelected Sources/tools/EdnBuf/EdnBuf_Selection.cpp /^void EdnBuf::RemoveSelected(selectionType_te select)$/;" f class:EdnBuf +Rep Sources/tools/tinyXML/tinystr.h /^ struct Rep$/;" s class:TiXmlString +Replace Sources/Buffer/Buffer.cpp /^void Buffer::Replace(Edn::String &data)$/;" f class:Buffer +Replace Sources/Buffer/BufferText.cpp /^void BufferText::Replace(Edn::String &data)$/;" f class:BufferText +Replace Sources/tools/EdnBuf/EdnBuf.cpp /^void EdnBuf::Replace(int32_t start, int32_t end, EdnVectorBin &insertText)$/;" f class:EdnBuf +Replace Sources/tools/EdnTemplate/EdnVectorBuf.cpp /^void EdnVectorBuf::Replace(int32_t pos, const int8_t& item)$/;" f class:EdnVectorBuf +Replace Sources/tools/EdnTemplate/EdnVectorBuf.cpp /^void EdnVectorBuf::Replace(int32_t pos, int32_t nbRemoveElement, EdnVectorBin& items)$/;" f class:EdnVectorBuf +ReplaceChild Sources/tools/tinyXML/tinyxml.cpp /^TiXmlNode* TiXmlNode::ReplaceChild( TiXmlNode* replaceThis, const TiXmlNode& withThis )$/;" f class:TiXmlNode +ReplaceSelected Sources/tools/EdnBuf/EdnBuf_Selection.cpp /^void EdnBuf::ReplaceSelected(selectionType_te select, EdnVectorBin &text)$/;" f class:EdnBuf +Resize Sources/tools/EdnTemplate/EdnVector.h /^ void Resize(int32_t count)$/;" f class:EdnVector +Resize Sources/tools/EdnTemplate/EdnVectorBin.h /^ void Resize(int32_t newSize)$/;" f class:EdnVectorBin +RmReceiver Sources/tools/MsgBroadcast/MsgBroadcast.cpp /^void MsgBroadcastCore::RmReceiver(MsgBroadcast * pointerOnReceiver)$/;" f class:MsgBroadcastCore +Root Sources/tools/EdnTemplate/EdnTree.h /^ std::vector Root(void)$/;" f class:EdnTree +RootElement Sources/tools/tinyXML/tinyxml.h /^ TiXmlElement* RootElement() { return FirstChildElement(); }$/;" f class:TiXmlDocument +RootElement Sources/tools/tinyXML/tinyxml.h /^ const TiXmlElement* RootElement() const { return FirstChildElement(); }$/;" f class:TiXmlDocument +Row Sources/tools/tinyXML/tinyxml.h /^ int Row() const { return location.row + 1; }$/;" f class:TiXmlBase +SELECTION_HIGHTLIGHT Sources/tools/EdnBuf/EdnBuf.h /^ SELECTION_HIGHTLIGHT,$/;" e enum:__anon7 +SELECTION_PRIMARY Sources/tools/EdnBuf/EdnBuf.h /^ SELECTION_PRIMARY,$/;" e enum:__anon7 +SELECTION_SECONDARY Sources/tools/EdnBuf/EdnBuf.h /^ SELECTION_SECONDARY,$/;" e enum:__anon7 +SELECTION_SIZE Sources/tools/EdnBuf/EdnBuf.h /^ SELECTION_SIZE$/;" e enum:__anon7 +Save Sources/Buffer/Buffer.cpp /^void Buffer::Save(void)$/;" f class:Buffer +Save Sources/Buffer/BufferText.cpp /^void BufferText::Save(void)$/;" f class:BufferText +SaveFile Sources/tools/tinyXML/tinyxml.cpp /^bool TiXmlDocument::SaveFile( FILE* fp ) const$/;" f class:TiXmlDocument +SaveFile Sources/tools/tinyXML/tinyxml.cpp /^bool TiXmlDocument::SaveFile( const char * filename ) const$/;" f class:TiXmlDocument +SaveFile Sources/tools/tinyXML/tinyxml.cpp /^bool TiXmlDocument::SaveFile() const$/;" f class:TiXmlDocument +SaveFile Sources/tools/tinyXML/tinyxml.h /^ bool SaveFile( const std::string& filename ) const \/\/\/< STL std::string version.$/;" f class:TiXmlDocument +ScrollDown Sources/Buffer/Buffer.cpp /^void Buffer::ScrollDown(void)$/;" f class:Buffer +ScrollDown Sources/Buffer/BufferText.cpp /^void BufferText::ScrollDown(void)$/;" f class:BufferText +ScrollUp Sources/Buffer/Buffer.cpp /^void Buffer::ScrollUp(void)$/;" f class:Buffer +ScrollUp Sources/Buffer/BufferText.cpp /^void BufferText::ScrollUp(void)$/;" f class:BufferText +Search Sources/Buffer/Buffer.cpp /^void Buffer::Search(Edn::String &data, bool back, bool caseSensitive, bool wrap, bool regExp)$/;" f class:Buffer +Search Sources/Buffer/BufferText.cpp /^void BufferText::Search(Edn::String &data, bool back, bool caseSensitive, bool wrap, bool regExp)$/;" f class:BufferText +Search Sources/GuiTools/Search/Search.cpp /^Search::Search(void)$/;" f class:Search +Search Sources/GuiTools/Search/Search.h /^class Search: public Singleton$/;" c +SearchBackward Sources/tools/EdnBuf/EdnBuf.cpp /^bool EdnBuf::SearchBackward(int32_t startPos, EdnVectorBin &searchVect, int32_t *foundPos, bool caseSensitive)$/;" f class:EdnBuf +SearchBackward Sources/tools/EdnBuf/EdnBuf.cpp /^bool EdnBuf::SearchBackward(int32_t startPos, char searchChar, int32_t *foundPos)$/;" f class:EdnBuf +SearchData Sources/GuiTools/Search/SearchData.h /^namespace SearchData$/;" n +SearchForward Sources/tools/EdnBuf/EdnBuf.cpp /^bool EdnBuf::SearchForward(int32_t startPos, EdnVectorBin &searchVect, int32_t *foundPos, bool caseSensitive)$/;" f class:EdnBuf +SearchForward Sources/tools/EdnBuf/EdnBuf.cpp /^bool EdnBuf::SearchForward(int32_t startPos, char searchChar, int32_t *foundPos)$/;" f class:EdnBuf +Select Sources/tools/EdnBuf/EdnBuf_Selection.cpp /^void EdnBuf::Select(selectionType_te select, int32_t start, int32_t end)$/;" f class:EdnBuf +SelectAll Sources/Buffer/Buffer.cpp /^void Buffer::SelectAll(void)$/;" f class:Buffer +SelectAll Sources/Buffer/BufferText.cpp /^void BufferText::SelectAll(void)$/;" f class:BufferText +SelectAround Sources/tools/EdnBuf/EdnBuf.cpp /^bool EdnBuf::SelectAround(int32_t startPos, int32_t &beginPos, int32_t &endPos)$/;" f class:EdnBuf +SelectHasSelection Sources/tools/EdnBuf/EdnBuf_Selection.cpp /^bool EdnBuf::SelectHasSelection(selectionType_te select)$/;" f class:EdnBuf +SelectNone Sources/Buffer/Buffer.cpp /^void Buffer::SelectNone(void)$/;" f class:Buffer +SelectNone Sources/Buffer/BufferText.cpp /^void BufferText::SelectNone(void)$/;" f class:BufferText +SelectionCheckMode Sources/Buffer/BufferText.cpp /^void BufferText::SelectionCheckMode(void)$/;" f class:BufferText +SelectionEnd Sources/Buffer/BufferText.cpp /^void BufferText::SelectionEnd(void)$/;" f class:BufferText +SelectionStart Sources/Buffer/BufferText.cpp /^void BufferText::SelectionStart(void)$/;" f class:BufferText +SendMessage Sources/tools/MsgBroadcast/MsgBroadcast.cpp /^void MsgBroadcast::SendMessage(messageType_te id, int32_t dataID)$/;" f class:MsgBroadcast +SendMessage Sources/tools/MsgBroadcast/MsgBroadcast.cpp /^void MsgBroadcastCore::SendMessage(MsgBroadcast * pointerOnSender, messageType_te id, int32_t dataID)$/;" f class:MsgBroadcastCore +Set Sources/tools/ClipBoard/ClipBoard.cpp /^void ClipBoard::Set(uint8_t clipboardID, EdnVectorBin &data)$/;" f class:ClipBoard +Set Sources/tools/EdnBuf/EdnBufHistory.cpp /^void EdnBufHistory::Set(int32_t pos, int32_t nInserted, EdnVectorBin &deletedText)$/;" f class:EdnBufHistory +Set Sources/tools/NameSpaceEdn/String.cpp /^void Edn::String::Set(const char * inputData, int32_t len)$/;" f class:Edn::String +SetAccel Sources/tools/MsgBroadcast/AccelKey.cpp /^void AccelKey::SetAccel(GtkWidget * widget, GtkAccelGroup * accel, char * accelKey)$/;" f class:AccelKey +SetAccel Sources/tools/MsgBroadcast/AccelKey.cpp /^void AccelKey::SetAccel(GtkWidget * widget, char * accelKey)$/;" f class:AccelKey +SetAll Sources/tools/EdnBuf/EdnBuf.cpp /^void EdnBuf::SetAll(EdnVectorBin &text)$/;" f class:EdnBuf +SetAlt Sources/tools/globals/tools_globals.cpp /^void globals::SetAlt(void)$/;" f class:globals +SetAttribute Sources/tools/tinyXML/tinyxml.cpp /^void TiXmlElement::SetAttribute( const char * cname, const char * cvalue )$/;" f class:TiXmlElement +SetAttribute Sources/tools/tinyXML/tinyxml.cpp /^void TiXmlElement::SetAttribute( const char * name, int val )$/;" f class:TiXmlElement +SetAttribute Sources/tools/tinyXML/tinyxml.cpp /^void TiXmlElement::SetAttribute( const std::string& _name, const std::string& _value )$/;" f class:TiXmlElement +SetAttribute Sources/tools/tinyXML/tinyxml.cpp /^void TiXmlElement::SetAttribute( const std::string& name, int val )$/;" f class:TiXmlElement +SetAutoIndent Sources/tools/globals/tools_globals.cpp /^void globals::SetAutoIndent(bool newVal)$/;" f class:globals +SetBgColor Sources/Colorize/Colorize.cpp /^void Colorize::SetBgColor(const char *myColor)$/;" f class:Colorize +SetBold Sources/Colorize/Colorize.cpp /^void Colorize::SetBold(bool enable)$/;" f class:Colorize +SetCDATA Sources/tools/tinyXML/tinyxml.h /^ void SetCDATA( bool _cdata ) { cdata = _cdata; }$/;" f class:TiXmlText +SetCase Sources/GuiTools/Search/SearchData.cpp /^void SearchData::SetCase(bool value)$/;" f class:SearchData +SetCharset Sources/Buffer/Buffer.h /^ virtual void SetCharset(charset_te newCharset) {};$/;" f class:Buffer +SetCharset Sources/Buffer/BufferText.cpp /^void BufferText::SetCharset(charset_te newCharset)$/;" f class:BufferText +SetCharsetType Sources/tools/EdnBuf/EdnBuf.h /^ void SetCharsetType(charset_te newOne) { m_charsetType = newOne; if (EDN_CHARSET_UTF8==newOne){m_isUtf8=true;} else {m_isUtf8=false;} };$/;" f class:EdnBuf +SetColor Sources/Highlight/HighlightPattern.cpp /^void HighlightPattern::SetColor(Edn::String &colorName)$/;" f class:HighlightPattern +SetCompleateName Sources/tools/NameSpaceEdn/File.cpp /^void Edn::File::SetCompleateName(Edn::String &newFilename)$/;" f class:Edn::File +SetCondenseWhiteSpace Sources/tools/tinyXML/tinyxml.h /^ static void SetCondenseWhiteSpace( bool condense ) { condenseWhiteSpace = condense; }$/;" f class:TiXmlBase +SetCtrl Sources/tools/globals/tools_globals.cpp /^void globals::SetCtrl(void)$/;" f class:globals +SetDisplayEndOfLine Sources/tools/globals/tools_globals.cpp /^void globals::SetDisplayEndOfLine(bool newVal)$/;" f class:globals +SetDisplaySpaceChar Sources/tools/globals/tools_globals.cpp /^void globals::SetDisplaySpaceChar(bool newVal)$/;" f class:globals +SetDocument Sources/tools/tinyXML/tinyxml.h /^ void SetDocument( TiXmlDocument* doc ) { document = doc; }$/;" f class:TiXmlAttribute +SetDoubleAttribute Sources/tools/tinyXML/tinyxml.cpp /^void TiXmlElement::SetDoubleAttribute( const char * name, double val )$/;" f class:TiXmlElement +SetDoubleAttribute Sources/tools/tinyXML/tinyxml.cpp /^void TiXmlElement::SetDoubleAttribute( const std::string& name, double val )$/;" f class:TiXmlElement +SetDoubleValue Sources/tools/tinyXML/tinyxml.cpp /^void TiXmlAttribute::SetDoubleValue( double _value )$/;" f class:TiXmlAttribute +SetError Sources/tools/tinyXML/tinyxmlparser.cpp /^void TiXmlDocument::SetError( int err, const char* pError, TiXmlParsingData* data, TiXmlEncoding encoding )$/;" f class:TiXmlDocument +SetEscapeChar Sources/Highlight/HighlightPattern.cpp /^void HighlightPattern::SetEscapeChar(Edn::String &EscapeChar)$/;" f class:HighlightPattern +SetFgColor Sources/Colorize/Colorize.cpp /^void Colorize::SetFgColor(const char *myColor)$/;" f class:Colorize +SetHLSystem Sources/tools/EdnBuf/EdnBuf_HighLight.cpp /^void EdnBuf::SetHLSystem(Highlight * newHLSystem)$/;" f class:EdnBuf +SetIncrement Sources/tools/EdnTemplate/EdnVectorBin.h /^ void SetIncrement(int32_t newIncrementNumber)$/;" f class:EdnVectorBin +SetIndent Sources/tools/tinyXML/tinyxml.h /^ void SetIndent( const char* _indent ) { indent = _indent ? _indent : "" ; }$/;" f class:TiXmlPrinter +SetInsert Sources/tools/globals/tools_globals.cpp /^void globals::SetInsert(void)$/;" f class:globals +SetInsertPosition Sources/Buffer/BufferText.cpp /^void BufferText::SetInsertPosition(int32_t newPos, bool insertChar)$/;" f class:BufferText +SetIntValue Sources/tools/tinyXML/tinyxml.cpp /^void TiXmlAttribute::SetIntValue( int _value )$/;" f class:TiXmlAttribute +SetItalic Sources/Colorize/Colorize.cpp /^void Colorize::SetItalic(bool enable)$/;" f class:Colorize +SetLevel Sources/Highlight/HighlightPattern.h /^ void SetLevel(int32_t newLevel) { m_level = newLevel; };$/;" f class:HighlightPattern +SetLineBreak Sources/tools/tinyXML/tinyxml.h /^ void SetLineBreak( const char* _lineBreak ) { lineBreak = _lineBreak ? _lineBreak : ""; }$/;" f class:TiXmlPrinter +SetLineDisplay Sources/Buffer/Buffer.cpp /^void Buffer::SetLineDisplay(uint32_t lineNumber)$/;" f class:Buffer +SetLineDisplay Sources/Buffer/BufferText.cpp /^void BufferText::SetLineDisplay(uint32_t lineNumber)$/;" f class:BufferText +SetModify Sources/Buffer/Buffer.cpp /^void Buffer::SetModify(bool status)$/;" f class:Buffer +SetMult Sources/tools/EdnRegExp/EdnRegExp.cpp /^void RegExpNode::SetMult(int32_t min, int32_t max)$/;" f class:RegExpNode +SetMultiline Sources/Highlight/HighlightPattern.h /^ void SetMultiline(bool enable) { m_multiline = enable; };$/;" f class:HighlightPattern +SetMultiplicityOnLastNode Sources/tools/EdnRegExp/EdnRegExp.cpp /^bool RegExpNodePTheseElem::SetMultiplicityOnLastNode(int32_t min, int32_t max)$/;" f class:RegExpNodePTheseElem +SetName Sources/Buffer/Buffer.cpp /^void Buffer::SetName(Edn::String &newName)$/;" f class:Buffer +SetName Sources/Buffer/BufferText.cpp /^void BufferText::SetName(Edn::String &newName)$/;" f class:BufferText +SetName Sources/Colorize/Colorize.cpp /^void Colorize::SetName(Edn::String &newColorName)$/;" f class:Colorize +SetName Sources/Colorize/Colorize.cpp /^void Colorize::SetName(const char *newColorName)$/;" f class:Colorize +SetName Sources/Highlight/HighlightPattern.h /^ void SetName(Edn::String &name) { m_paternName = name;};$/;" f class:HighlightPattern +SetName Sources/tools/tinyXML/tinyxml.h /^ void SetName( const char* _name ) { name = _name; } \/\/\/< Set the name of this attribute.$/;" f class:TiXmlAttribute +SetName Sources/tools/tinyXML/tinyxml.h /^ void SetName( const std::string& _name ) { name = _name; } $/;" f class:TiXmlAttribute +SetPaternStart Sources/Highlight/HighlightPattern.cpp /^void HighlightPattern::SetPaternStart(Edn::String ®Exp)$/;" f class:HighlightPattern +SetPaternStop Sources/Highlight/HighlightPattern.cpp /^void HighlightPattern::SetPaternStop(Edn::String ®Exp)$/;" f class:HighlightPattern +SetPomme Sources/tools/globals/tools_globals.cpp /^void globals::SetPomme(void)$/;" f class:globals +SetRegExp Sources/GuiTools/Search/SearchData.cpp /^void SearchData::SetRegExp(bool value)$/;" f class:SearchData +SetRegExp Sources/tools/EdnRegExp/EdnRegExp.cpp /^void EdnRegExp::SetRegExp(Edn::String &expressionRequested)$/;" f class:EdnRegExp +SetRegExp Sources/tools/EdnRegExp/EdnRegExp.cpp /^void EdnRegExp::SetRegExp(const char *exp)$/;" f class:EdnRegExp +SetReplace Sources/GuiTools/Search/SearchData.cpp /^void SearchData::SetReplace(Edn::String &myData)$/;" f class:SearchData +SetSearch Sources/GuiTools/Search/SearchData.cpp /^void SearchData::SetSearch(Edn::String &myData)$/;" f class:SearchData +SetSelected Sources/Buffer/BufferManager.h /^ void SetSelected(int32_t id) {m_idSelected = id;};$/;" f class:BufferManager +SetShift Sources/tools/globals/tools_globals.cpp /^void globals::SetShift(void)$/;" f class:globals +SetStreamPrinting Sources/tools/tinyXML/tinyxml.h /^ void SetStreamPrinting() { indent = "";$/;" f class:TiXmlPrinter +SetTabDistance Sources/tools/EdnBuf/EdnBuf.h /^ void SetTabDistance(int32_t tabDist) { m_tabDist = tabDist; };$/;" f class:EdnBuf +SetTabSize Sources/tools/tinyXML/tinyxml.h /^ void SetTabSize( int _tabsize ) { tabsize = _tabsize; }$/;" f class:TiXmlDocument +SetTitle Sources/GuiTools/MainWindows/MainWindows.cpp /^void MainWindows::SetTitle(Edn::String &fileName, bool isModify)$/;" f class:MainWindows +SetUTF8Mode Sources/tools/EdnBuf/EdnBuf.h /^ void SetUTF8Mode(bool newOne) { m_isUtf8 = newOne; m_charsetType=EDN_CHARSET_UTF8; };$/;" f class:EdnBuf +SetUserData Sources/tools/tinyXML/tinyxml.h /^ void SetUserData( void* user ) { userData = user; } \/\/\/< Set a pointer to arbitrary user data.$/;" f class:TiXmlBase +SetValue Sources/tools/tinyXML/tinyxml.h /^ void SetValue( const char* _value ) { value = _value; } \/\/\/< Set the value.$/;" f class:TiXmlAttribute +SetValue Sources/tools/tinyXML/tinyxml.h /^ void SetValue( const std::string& _value ) { value = _value; }$/;" f class:TiXmlAttribute +SetValue Sources/tools/tinyXML/tinyxml.h /^ void SetValue( const std::string& _value ) { value = _value; }$/;" f class:TiXmlNode +SetValue Sources/tools/tinyXML/tinyxml.h /^ void SetValue(const char * _value) { value = _value;}$/;" f class:TiXmlNode +SetWrap Sources/GuiTools/Search/SearchData.cpp /^void SearchData::SetWrap(bool value)$/;" f class:SearchData +Singleton Sources/tools/EdnTemplate/Singleton.h /^ Singleton() { }$/;" f class:Singleton +Singleton Sources/tools/EdnTemplate/Singleton.h /^class Singleton$/;" c +Size Sources/Buffer/BufferManager.cpp /^uint32_t BufferManager::Size(void)$/;" f class:BufferManager +Size Sources/tools/EdnBuf/EdnBuf.h /^ int32_t Size(void) { return m_data.Size(); };$/;" f class:EdnBuf +Size Sources/tools/EdnTemplate/EdnVector.h /^ int32_t Size()$/;" f class:EdnVector +Size Sources/tools/EdnTemplate/EdnVectorBin.h /^ int32_t Size() const$/;" f class:EdnVectorBin +Size Sources/tools/EdnTemplate/EdnVectorBuf.h /^ int32_t Size(void) { return m_allocated - GapSize(); };$/;" f class:EdnVectorBuf +Size Sources/tools/NameSpaceEdn/String.cpp /^int32_t Edn::String::Size(void) const$/;" f class:Edn::String +Size Sources/tools/tinyXML/tinyxml.h /^ size_t Size() { return buffer.size(); }$/;" f class:TiXmlPrinter +SkipWhiteSpace Sources/tools/tinyXML/tinyxmlparser.cpp /^const char* TiXmlBase::SkipWhiteSpace( const char* p, TiXmlEncoding encoding )$/;" f class:TiXmlBase +SortMethod Sources/ctags/readtags.cpp /^static sortType SortMethod;$/;" v file: +SortOverride Sources/ctags/readtags.cpp /^static int SortOverride;$/;" v file: +SpaceText Sources/tools/Display/Display.cpp /^void DrawerManager::SpaceText(color_ts & SelectColor, int32_t x, int32_t y,int32_t nbChar)$/;" f class:DrawerManager +Stamp Sources/tools/tinyXML/tinyxmlparser.cpp /^void TiXmlParsingData::Stamp( const char* now, TiXmlEncoding encoding )$/;" f class:TiXmlParsingData +Standalone Sources/tools/tinyXML/tinyxml.h /^ const char *Standalone() const { return standalone.c_str (); }$/;" f class:TiXmlDeclaration +Start Sources/tools/EdnRegExp/EdnRegExp.h /^ int32_t Start(void) { return m_areaFind.start; };$/;" f class:EdnRegExp +StartOfLine Sources/tools/EdnBuf/EdnBuf.cpp /^int32_t EdnBuf::StartOfLine(int32_t pos)$/;" f class:EdnBuf +StatusBar Sources/GuiTools/MainWindows/StatusBar.cpp /^StatusBar::StatusBar(void) : MsgBroadcast("Status bar", EDN_CAT_GUI)$/;" f class:StatusBar +StatusBar Sources/GuiTools/MainWindows/StatusBar.h /^class StatusBar: public MsgBroadcast$/;" c +Stop Sources/tools/EdnRegExp/EdnRegExp.h /^ int32_t Stop(void) { return m_areaFind.stop; };$/;" f class:EdnRegExp +Str Sources/tools/tinyXML/tinyxml.h /^ const std::string& Str() { return buffer; }$/;" f class:TiXmlPrinter +StreamIn Sources/tools/tinyXML/tinyxmlparser.cpp /^void TiXmlComment::StreamIn( std::istream * in, TIXML_STRING * tag )$/;" f class:TiXmlComment +StreamIn Sources/tools/tinyXML/tinyxmlparser.cpp /^void TiXmlDeclaration::StreamIn( std::istream * in, TIXML_STRING * tag )$/;" f class:TiXmlDeclaration +StreamIn Sources/tools/tinyXML/tinyxmlparser.cpp /^void TiXmlDocument::StreamIn( std::istream * in, TIXML_STRING * tag )$/;" f class:TiXmlDocument +StreamIn Sources/tools/tinyXML/tinyxmlparser.cpp /^void TiXmlElement::StreamIn (std::istream * in, TIXML_STRING * tag)$/;" f class:TiXmlElement +StreamIn Sources/tools/tinyXML/tinyxmlparser.cpp /^void TiXmlText::StreamIn( std::istream * in, TIXML_STRING * tag )$/;" f class:TiXmlText +StreamIn Sources/tools/tinyXML/tinyxmlparser.cpp /^void TiXmlUnknown::StreamIn( std::istream * in, TIXML_STRING * tag )$/;" f class:TiXmlUnknown +StreamTo Sources/tools/tinyXML/tinyxmlparser.cpp /^\/*static*\/ bool TiXmlBase::StreamTo( std::istream * in, int character, TIXML_STRING * tag )$/;" f class:TiXmlBase +StreamWhiteSpace Sources/tools/tinyXML/tinyxmlparser.cpp /^\/*static*\/ bool TiXmlBase::StreamWhiteSpace( std::istream * in, TIXML_STRING * tag )$/;" f class:TiXmlBase +String Sources/tools/NameSpaceEdn/String.cpp /^Edn::String::String(const Edn::String &ednS)$/;" f class:Edn::String +String Sources/tools/NameSpaceEdn/String.cpp /^Edn::String::String(const char myInput)$/;" f class:Edn::String +String Sources/tools/NameSpaceEdn/String.cpp /^Edn::String::String(const char* inputData, int32_t len)$/;" f class:Edn::String +String Sources/tools/NameSpaceEdn/String.cpp /^Edn::String::String(int inputData)$/;" f class:Edn::String +String Sources/tools/NameSpaceEdn/String.cpp /^Edn::String::String(unsigned int inputData)$/;" f class:Edn::String +String Sources/tools/NameSpaceEdn/String.cpp /^Edn::String::String(void)$/;" f class:Edn::String +String Sources/tools/NameSpaceEdn/String.h /^ class String$/;" c +StringEqual Sources/tools/tinyXML/tinyxmlparser.cpp /^bool TiXmlBase::StringEqual( const char* p,$/;" f class:TiXmlBase +TAB Sources/ctags/readtags.cpp 26;" d file: +TAG_FOLDSORTED Sources/ctags/readtags.h /^ TAG_UNSORTED, TAG_SORTED, TAG_FOLDSORTED$/;" e enum:__anon18 +TAG_FULLMATCH Sources/ctags/readtags.h 38;" d +TAG_IGNORECASE Sources/ctags/readtags.h 42;" d +TAG_OBSERVECASE Sources/ctags/readtags.h 41;" d +TAG_PARTIALMATCH Sources/ctags/readtags.h 39;" d +TAG_SORTED Sources/ctags/readtags.h /^ TAG_UNSORTED, TAG_SORTED, TAG_FOLDSORTED$/;" e enum:__anon18 +TAG_UNSORTED Sources/ctags/readtags.h /^ TAG_UNSORTED, TAG_SORTED, TAG_FOLDSORTED$/;" e enum:__anon18 +TINYXML_COMMENT Sources/tools/tinyXML/tinyxml.h /^ TINYXML_COMMENT,$/;" e enum:TiXmlNode::NodeType +TINYXML_DECLARATION Sources/tools/tinyXML/tinyxml.h /^ TINYXML_DECLARATION,$/;" e enum:TiXmlNode::NodeType +TINYXML_DOCUMENT Sources/tools/tinyXML/tinyxml.h /^ TINYXML_DOCUMENT,$/;" e enum:TiXmlNode::NodeType +TINYXML_ELEMENT Sources/tools/tinyXML/tinyxml.h /^ TINYXML_ELEMENT,$/;" e enum:TiXmlNode::NodeType +TINYXML_INCLUDED Sources/tools/tinyXML/tinyxml.h 27;" d +TINYXML_TEXT Sources/tools/tinyXML/tinyxml.h /^ TINYXML_TEXT,$/;" e enum:TiXmlNode::NodeType +TINYXML_TYPECOUNT Sources/tools/tinyXML/tinyxml.h /^ TINYXML_TYPECOUNT$/;" e enum:TiXmlNode::NodeType +TINYXML_UNKNOWN Sources/tools/tinyXML/tinyxml.h /^ TINYXML_UNKNOWN,$/;" e enum:TiXmlNode::NodeType +TIXML_DEFAULT_ENCODING Sources/tools/tinyXML/tinyxml.h /^const TiXmlEncoding TIXML_DEFAULT_ENCODING = TIXML_ENCODING_UNKNOWN;$/;" v +TIXML_ENCODING_LEGACY Sources/tools/tinyXML/tinyxml.h /^ TIXML_ENCODING_LEGACY$/;" e enum:TiXmlEncoding +TIXML_ENCODING_UNKNOWN Sources/tools/tinyXML/tinyxml.h /^ TIXML_ENCODING_UNKNOWN,$/;" e enum:TiXmlEncoding +TIXML_ENCODING_UTF8 Sources/tools/tinyXML/tinyxml.h /^ TIXML_ENCODING_UTF8,$/;" e enum:TiXmlEncoding +TIXML_ERROR Sources/tools/tinyXML/tinyxml.h /^ TIXML_ERROR,$/;" e enum:TiXmlBase::__anon2 +TIXML_ERROR_DOCUMENT_EMPTY Sources/tools/tinyXML/tinyxml.h /^ TIXML_ERROR_DOCUMENT_EMPTY,$/;" e enum:TiXmlBase::__anon2 +TIXML_ERROR_DOCUMENT_TOP_ONLY Sources/tools/tinyXML/tinyxml.h /^ TIXML_ERROR_DOCUMENT_TOP_ONLY,$/;" e enum:TiXmlBase::__anon2 +TIXML_ERROR_EMBEDDED_NULL Sources/tools/tinyXML/tinyxml.h /^ TIXML_ERROR_EMBEDDED_NULL,$/;" e enum:TiXmlBase::__anon2 +TIXML_ERROR_FAILED_TO_READ_ELEMENT_NAME Sources/tools/tinyXML/tinyxml.h /^ TIXML_ERROR_FAILED_TO_READ_ELEMENT_NAME,$/;" e enum:TiXmlBase::__anon2 +TIXML_ERROR_OPENING_FILE Sources/tools/tinyXML/tinyxml.h /^ TIXML_ERROR_OPENING_FILE,$/;" e enum:TiXmlBase::__anon2 +TIXML_ERROR_PARSING_CDATA Sources/tools/tinyXML/tinyxml.h /^ TIXML_ERROR_PARSING_CDATA,$/;" e enum:TiXmlBase::__anon2 +TIXML_ERROR_PARSING_COMMENT Sources/tools/tinyXML/tinyxml.h /^ TIXML_ERROR_PARSING_COMMENT,$/;" e enum:TiXmlBase::__anon2 +TIXML_ERROR_PARSING_DECLARATION Sources/tools/tinyXML/tinyxml.h /^ TIXML_ERROR_PARSING_DECLARATION,$/;" e enum:TiXmlBase::__anon2 +TIXML_ERROR_PARSING_ELEMENT Sources/tools/tinyXML/tinyxml.h /^ TIXML_ERROR_PARSING_ELEMENT,$/;" e enum:TiXmlBase::__anon2 +TIXML_ERROR_PARSING_EMPTY Sources/tools/tinyXML/tinyxml.h /^ TIXML_ERROR_PARSING_EMPTY,$/;" e enum:TiXmlBase::__anon2 +TIXML_ERROR_PARSING_UNKNOWN Sources/tools/tinyXML/tinyxml.h /^ TIXML_ERROR_PARSING_UNKNOWN,$/;" e enum:TiXmlBase::__anon2 +TIXML_ERROR_READING_ATTRIBUTES Sources/tools/tinyXML/tinyxml.h /^ TIXML_ERROR_READING_ATTRIBUTES,$/;" e enum:TiXmlBase::__anon2 +TIXML_ERROR_READING_ELEMENT_VALUE Sources/tools/tinyXML/tinyxml.h /^ TIXML_ERROR_READING_ELEMENT_VALUE,$/;" e enum:TiXmlBase::__anon2 +TIXML_ERROR_READING_END_TAG Sources/tools/tinyXML/tinyxml.h /^ TIXML_ERROR_READING_END_TAG,$/;" e enum:TiXmlBase::__anon2 +TIXML_ERROR_STRING_COUNT Sources/tools/tinyXML/tinyxml.h /^ TIXML_ERROR_STRING_COUNT$/;" e enum:TiXmlBase::__anon2 +TIXML_EXPLICIT Sources/tools/tinyXML/tinystr.h 51;" d +TIXML_EXPLICIT Sources/tools/tinyXML/tinystr.h 54;" d +TIXML_EXPLICIT Sources/tools/tinyXML/tinystr.h 56;" d +TIXML_LOG Sources/tools/tinyXML/tinyxmlparser.cpp 34;" d file: +TIXML_LOG Sources/tools/tinyXML/tinyxmlparser.cpp 36;" d file: +TIXML_MAJOR_VERSION Sources/tools/tinyXML/tinyxml.h /^const int TIXML_MAJOR_VERSION = 2;$/;" v +TIXML_MINOR_VERSION Sources/tools/tinyXML/tinyxml.h /^const int TIXML_MINOR_VERSION = 6;$/;" v +TIXML_NO_ATTRIBUTE Sources/tools/tinyXML/tinyxml.h /^ TIXML_NO_ATTRIBUTE,$/;" e enum:__anon1 +TIXML_NO_ERROR Sources/tools/tinyXML/tinyxml.h /^ TIXML_NO_ERROR = 0,$/;" e enum:TiXmlBase::__anon2 +TIXML_PATCH_VERSION Sources/tools/tinyXML/tinyxml.h /^const int TIXML_PATCH_VERSION = 1;$/;" v +TIXML_SAFE Sources/tools/tinyXML/tinyxml.h 60;" d +TIXML_SNPRINTF Sources/tools/tinyXML/tinyxml.h 65;" d +TIXML_SNPRINTF Sources/tools/tinyXML/tinyxml.h 70;" d +TIXML_SNPRINTF Sources/tools/tinyXML/tinyxml.h 75;" d +TIXML_SNPRINTF Sources/tools/tinyXML/tinyxml.h 78;" d +TIXML_SSCANF Sources/tools/tinyXML/tinyxml.h 66;" d +TIXML_SSCANF Sources/tools/tinyXML/tinyxml.h 71;" d +TIXML_SSCANF Sources/tools/tinyXML/tinyxml.h 76;" d +TIXML_SSCANF Sources/tools/tinyXML/tinyxml.h 79;" d +TIXML_STRING Sources/tools/tinyXML/tinyxml.h 50;" d +TIXML_STRING Sources/tools/tinyXML/tinyxml.h 53;" d +TIXML_STRING_INCLUDED Sources/tools/tinyXML/tinystr.h 40;" d +TIXML_SUCCESS Sources/tools/tinyXML/tinyxml.h /^ TIXML_SUCCESS,$/;" e enum:__anon1 +TIXML_UTF_LEAD_0 Sources/tools/tinyXML/tinyxmlparser.cpp /^const unsigned char TIXML_UTF_LEAD_0 = 0xefU;$/;" v +TIXML_UTF_LEAD_1 Sources/tools/tinyXML/tinyxmlparser.cpp /^const unsigned char TIXML_UTF_LEAD_1 = 0xbbU;$/;" v +TIXML_UTF_LEAD_2 Sources/tools/tinyXML/tinyxmlparser.cpp /^const unsigned char TIXML_UTF_LEAD_2 = 0xbfU;$/;" v +TIXML_WRONG_TYPE Sources/tools/tinyXML/tinyxml.h /^ TIXML_WRONG_TYPE$/;" e enum:__anon1 +TOOLS_DisplayFuncName Sources/tools/debug/tools_debug.cpp /^void TOOLS_DisplayFuncName(int32_t ligne, const char* className, const char* funcName)$/;" f +TOOLS_DisplayTime Sources/tools/debug/tools_debug.cpp /^void TOOLS_DisplayTime(void)$/;" f +TOTAL_OF_CLICKBOARD Sources/tools/ClipBoard/ClipBoard.h 32;" d +TabSize Sources/tools/tinyXML/tinyxml.h /^ int TabSize() const { return tabsize; }$/;" f class:TiXmlDocument +TableIso8859_1 Sources/tools/charset/charsetTable.cpp /^ const int32_t TableIso8859_1[] = {$/;" v +TableIso8859_10 Sources/tools/charset/charsetTable.cpp /^ const int32_t TableIso8859_10[] = {$/;" v +TableIso8859_11 Sources/tools/charset/charsetTable.cpp /^ const int32_t TableIso8859_11[] = {$/;" v +TableIso8859_13 Sources/tools/charset/charsetTable.cpp /^ const int32_t TableIso8859_13[] = {$/;" v +TableIso8859_14 Sources/tools/charset/charsetTable.cpp /^ const int32_t TableIso8859_14[] = {$/;" v +TableIso8859_15 Sources/tools/charset/charsetTable.cpp /^ const int32_t TableIso8859_15[] = {$/;" v +TableIso8859_2 Sources/tools/charset/charsetTable.cpp /^ const int32_t TableIso8859_2[] = {$/;" v +TableIso8859_3 Sources/tools/charset/charsetTable.cpp /^ const int32_t TableIso8859_3[] = {$/;" v +TableIso8859_4 Sources/tools/charset/charsetTable.cpp /^ const int32_t TableIso8859_4[] = {$/;" v +TableIso8859_5 Sources/tools/charset/charsetTable.cpp /^ const int32_t TableIso8859_5[] = {$/;" v +TableIso8859_6 Sources/tools/charset/charsetTable.cpp /^ const int32_t TableIso8859_6[] = {$/;" v +TableIso8859_7 Sources/tools/charset/charsetTable.cpp /^ const int32_t TableIso8859_7[] = {$/;" v +TableIso8859_8 Sources/tools/charset/charsetTable.cpp /^ const int32_t TableIso8859_8[] = {$/;" v +TableIso8859_9 Sources/tools/charset/charsetTable.cpp /^ const int32_t TableIso8859_9[] = {$/;" v +Tabulation Sources/tools/Display/Display.cpp /^void DrawerManager::Tabulation(Colorize *SelectColor, int32_t x, int32_t y, int32_t mbColomn)$/;" f class:DrawerManager +TagFailure Sources/ctags/readtags.h /^typedef enum { TagFailure = 0, TagSuccess = 1 } tagResult;$/;" e enum:__anon19 +TagFileName Sources/ctags/readtags.cpp /^static const char *TagFileName = "tags";$/;" v file: +TagSuccess Sources/ctags/readtags.h /^typedef enum { TagFailure = 0, TagSuccess = 1 } tagResult;$/;" e enum:__anon19 +TestEdnVectorBuf Sources/tools/EdnTemplate/EdnVectorBuf.cpp /^void TestEdnVectorBuf(void)$/;" f +TestTemplate Sources/tools/EdnTemplate/EdnTemplateTest.cpp /^void TestTemplate(void)$/;" f +TestUntaire_String Sources/tools/NameSpaceEdn/String.cpp /^void Edn::TestUntaire_String(void)$/;" f class:Edn +Text Sources/tools/Display/Display.cpp /^void DrawerManager::Text(Colorize *SelectColor, int32_t x, int32_t y,const char *myUTF8Text, int32_t len)$/;" f class:DrawerManager +Text Sources/tools/Display/Display.cpp /^void DrawerManager::Text(color_ts & SelectColorFg, color_ts & SelectColorBg, int32_t x, int32_t y,const char *myText)$/;" f class:DrawerManager +Text Sources/tools/Display/Display.cpp /^void DrawerManager::Text(color_ts & SelectColorFg, int32_t x, int32_t y,const char *myText)$/;" f class:DrawerManager +Text Sources/tools/tinyXML/tinyxml.h /^ TiXmlText* Text() const { return ToText(); }$/;" f class:TiXmlHandle +TextDMoveDown Sources/Buffer/BufferText.cpp /^bool BufferText::TextDMoveDown(int32_t offset)$/;" f class:BufferText +TextDMoveUp Sources/Buffer/BufferText.cpp /^bool BufferText::TextDMoveUp(int32_t offset)$/;" f class:BufferText +TiXmlAttribute Sources/tools/tinyXML/tinyxml.h /^ TiXmlAttribute( const char * _name, const char * _value )$/;" f class:TiXmlAttribute +TiXmlAttribute Sources/tools/tinyXML/tinyxml.h /^ TiXmlAttribute( const std::string& _name, const std::string& _value )$/;" f class:TiXmlAttribute +TiXmlAttribute Sources/tools/tinyXML/tinyxml.h /^ TiXmlAttribute() : TiXmlBase()$/;" f class:TiXmlAttribute +TiXmlAttribute Sources/tools/tinyXML/tinyxml.h /^class TiXmlAttribute : public TiXmlBase$/;" c +TiXmlAttributeSet Sources/tools/tinyXML/tinyxml.cpp /^TiXmlAttributeSet::TiXmlAttributeSet()$/;" f class:TiXmlAttributeSet +TiXmlAttributeSet Sources/tools/tinyXML/tinyxml.h /^class TiXmlAttributeSet$/;" c +TiXmlBase Sources/tools/tinyXML/tinyxml.h /^ TiXmlBase() : userData(0) {}$/;" f class:TiXmlBase +TiXmlBase Sources/tools/tinyXML/tinyxml.h /^class TiXmlBase$/;" c +TiXmlComment Sources/tools/tinyXML/tinyxml.cpp /^TiXmlComment::TiXmlComment( const TiXmlComment& copy ) : TiXmlNode( TiXmlNode::TINYXML_COMMENT )$/;" f class:TiXmlComment +TiXmlComment Sources/tools/tinyXML/tinyxml.h /^ TiXmlComment( const char* _value ) : TiXmlNode( TiXmlNode::TINYXML_COMMENT ) {$/;" f class:TiXmlComment +TiXmlComment Sources/tools/tinyXML/tinyxml.h /^ TiXmlComment() : TiXmlNode( TiXmlNode::TINYXML_COMMENT ) {}$/;" f class:TiXmlComment +TiXmlComment Sources/tools/tinyXML/tinyxml.h /^class TiXmlComment : public TiXmlNode$/;" c +TiXmlCursor Sources/tools/tinyXML/tinyxml.h /^ TiXmlCursor() { Clear(); }$/;" f struct:TiXmlCursor +TiXmlCursor Sources/tools/tinyXML/tinyxml.h /^struct TiXmlCursor$/;" s +TiXmlDeclaration Sources/tools/tinyXML/tinyxml.cpp /^TiXmlDeclaration::TiXmlDeclaration( const std::string& _version,$/;" f class:TiXmlDeclaration +TiXmlDeclaration Sources/tools/tinyXML/tinyxml.cpp /^TiXmlDeclaration::TiXmlDeclaration( const TiXmlDeclaration& copy )$/;" f class:TiXmlDeclaration +TiXmlDeclaration Sources/tools/tinyXML/tinyxml.cpp /^TiXmlDeclaration::TiXmlDeclaration( const char * _version,$/;" f class:TiXmlDeclaration +TiXmlDeclaration Sources/tools/tinyXML/tinyxml.h /^ TiXmlDeclaration() : TiXmlNode( TiXmlNode::TINYXML_DECLARATION ) {}$/;" f class:TiXmlDeclaration +TiXmlDeclaration Sources/tools/tinyXML/tinyxml.h /^class TiXmlDeclaration : public TiXmlNode$/;" c +TiXmlDocument Sources/tools/tinyXML/tinyxml.cpp /^TiXmlDocument::TiXmlDocument( const TiXmlDocument& copy ) : TiXmlNode( TiXmlNode::TINYXML_DOCUMENT )$/;" f class:TiXmlDocument +TiXmlDocument Sources/tools/tinyXML/tinyxml.cpp /^TiXmlDocument::TiXmlDocument( const char * documentName ) : TiXmlNode( TiXmlNode::TINYXML_DOCUMENT )$/;" f class:TiXmlDocument +TiXmlDocument Sources/tools/tinyXML/tinyxml.cpp /^TiXmlDocument::TiXmlDocument( const std::string& documentName ) : TiXmlNode( TiXmlNode::TINYXML_DOCUMENT )$/;" f class:TiXmlDocument +TiXmlDocument Sources/tools/tinyXML/tinyxml.cpp /^TiXmlDocument::TiXmlDocument() : TiXmlNode( TiXmlNode::TINYXML_DOCUMENT )$/;" f class:TiXmlDocument +TiXmlDocument Sources/tools/tinyXML/tinyxml.h /^class TiXmlDocument : public TiXmlNode$/;" c +TiXmlElement Sources/tools/tinyXML/tinyxml.cpp /^TiXmlElement::TiXmlElement (const char * _value)$/;" f class:TiXmlElement +TiXmlElement Sources/tools/tinyXML/tinyxml.cpp /^TiXmlElement::TiXmlElement( const TiXmlElement& copy)$/;" f class:TiXmlElement +TiXmlElement Sources/tools/tinyXML/tinyxml.cpp /^TiXmlElement::TiXmlElement( const std::string& _value ) $/;" f class:TiXmlElement +TiXmlElement Sources/tools/tinyXML/tinyxml.h /^class TiXmlElement : public TiXmlNode$/;" c +TiXmlEncoding Sources/tools/tinyXML/tinyxml.h /^enum TiXmlEncoding$/;" g +TiXmlFOpen Sources/tools/tinyXML/tinyxml.cpp /^FILE* TiXmlFOpen( const char* filename, const char* mode )$/;" f +TiXmlHandle Sources/tools/tinyXML/tinyxml.h /^ TiXmlHandle( TiXmlNode* _node ) { this->node = _node; }$/;" f class:TiXmlHandle +TiXmlHandle Sources/tools/tinyXML/tinyxml.h /^ TiXmlHandle( const TiXmlHandle& ref ) { this->node = ref.node; }$/;" f class:TiXmlHandle +TiXmlHandle Sources/tools/tinyXML/tinyxml.h /^class TiXmlHandle$/;" c +TiXmlNode Sources/tools/tinyXML/tinyxml.cpp /^TiXmlNode::TiXmlNode( NodeType _type ) : TiXmlBase()$/;" f class:TiXmlNode +TiXmlNode Sources/tools/tinyXML/tinyxml.h /^class TiXmlNode : public TiXmlBase$/;" c +TiXmlOutStream Sources/tools/tinyXML/tinystr.h /^class TiXmlOutStream : public TiXmlString$/;" c +TiXmlParsingData Sources/tools/tinyXML/tinyxmlparser.cpp /^ TiXmlParsingData( const char* start, int _tabsize, int row, int col )$/;" f class:TiXmlParsingData file: +TiXmlParsingData Sources/tools/tinyXML/tinyxmlparser.cpp /^class TiXmlParsingData$/;" c file: +TiXmlPrinter Sources/tools/tinyXML/tinyxml.h /^ TiXmlPrinter() : depth( 0 ), simpleTextPrint( false ),$/;" f class:TiXmlPrinter +TiXmlPrinter Sources/tools/tinyXML/tinyxml.h /^class TiXmlPrinter : public TiXmlVisitor$/;" c +TiXmlString Sources/tools/tinyXML/tinystr.h /^ TIXML_EXPLICIT TiXmlString ( const char * copy) : rep_(0)$/;" f class:TiXmlString +TiXmlString Sources/tools/tinyXML/tinystr.h /^ TIXML_EXPLICIT TiXmlString ( const char * str, size_type len) : rep_(0)$/;" f class:TiXmlString +TiXmlString Sources/tools/tinyXML/tinystr.h /^ TiXmlString ( const TiXmlString & copy) : rep_(0)$/;" f class:TiXmlString +TiXmlString Sources/tools/tinyXML/tinystr.h /^ TiXmlString () : rep_(&nullrep_)$/;" f class:TiXmlString +TiXmlString Sources/tools/tinyXML/tinystr.h /^class TiXmlString$/;" c +TiXmlText Sources/tools/tinyXML/tinyxml.h /^ TiXmlText (const char * initValue ) : TiXmlNode (TiXmlNode::TINYXML_TEXT)$/;" f class:TiXmlText +TiXmlText Sources/tools/tinyXML/tinyxml.h /^ TiXmlText( const TiXmlText& copy ) : TiXmlNode( TiXmlNode::TINYXML_TEXT ) { copy.CopyTo( this ); }$/;" f class:TiXmlText +TiXmlText Sources/tools/tinyXML/tinyxml.h /^ TiXmlText( const std::string& initValue ) : TiXmlNode (TiXmlNode::TINYXML_TEXT)$/;" f class:TiXmlText +TiXmlText Sources/tools/tinyXML/tinyxml.h /^class TiXmlText : public TiXmlNode$/;" c +TiXmlUnknown Sources/tools/tinyXML/tinyxml.h /^ TiXmlUnknown( const TiXmlUnknown& copy ) : TiXmlNode( TiXmlNode::TINYXML_UNKNOWN ) { copy.CopyTo( this ); }$/;" f class:TiXmlUnknown +TiXmlUnknown Sources/tools/tinyXML/tinyxml.h /^ TiXmlUnknown() : TiXmlNode( TiXmlNode::TINYXML_UNKNOWN ) {}$/;" f class:TiXmlUnknown +TiXmlUnknown Sources/tools/tinyXML/tinyxml.h /^class TiXmlUnknown : public TiXmlNode$/;" c +TiXmlVisitor Sources/tools/tinyXML/tinyxml.h /^class TiXmlVisitor$/;" c +ToComment Sources/tools/tinyXML/tinyxml.h /^ virtual TiXmlComment* ToComment() { return 0; } \/\/\/< Cast to a more defined type. Will return null if not of the requested type.$/;" f class:TiXmlNode +ToComment Sources/tools/tinyXML/tinyxml.h /^ virtual TiXmlComment* ToComment() { return this; } \/\/\/< Cast to a more defined type. Will return null not of the requested type.$/;" f class:TiXmlComment +ToComment Sources/tools/tinyXML/tinyxml.h /^ virtual const TiXmlComment* ToComment() const { return 0; } \/\/\/< Cast to a more defined type. Will return null if not of the requested type.$/;" f class:TiXmlNode +ToComment Sources/tools/tinyXML/tinyxml.h /^ virtual const TiXmlComment* ToComment() const { return this; } \/\/\/< Cast to a more defined type. Will return null not of the requested type.$/;" f class:TiXmlComment +ToDeclaration Sources/tools/tinyXML/tinyxml.h /^ virtual TiXmlDeclaration* ToDeclaration() { return this; } \/\/\/< Cast to a more defined type. Will return null not of the requested type.$/;" f class:TiXmlDeclaration +ToDeclaration Sources/tools/tinyXML/tinyxml.h /^ virtual TiXmlDeclaration* ToDeclaration() { return 0; } \/\/\/< Cast to a more defined type. Will return null if not of the requested type.$/;" f class:TiXmlNode +ToDeclaration Sources/tools/tinyXML/tinyxml.h /^ virtual const TiXmlDeclaration* ToDeclaration() const { return 0; } \/\/\/< Cast to a more defined type. Will return null if not of the requested type.$/;" f class:TiXmlNode +ToDeclaration Sources/tools/tinyXML/tinyxml.h /^ virtual const TiXmlDeclaration* ToDeclaration() const { return this; } \/\/\/< Cast to a more defined type. Will return null not of the requested type.$/;" f class:TiXmlDeclaration +ToDocument Sources/tools/tinyXML/tinyxml.h /^ virtual TiXmlDocument* ToDocument() { return this; } \/\/\/< Cast to a more defined type. Will return null not of the requested type.$/;" f class:TiXmlDocument +ToDocument Sources/tools/tinyXML/tinyxml.h /^ virtual TiXmlDocument* ToDocument() { return 0; } \/\/\/< Cast to a more defined type. Will return null if not of the requested type.$/;" f class:TiXmlNode +ToDocument Sources/tools/tinyXML/tinyxml.h /^ virtual const TiXmlDocument* ToDocument() const { return 0; } \/\/\/< Cast to a more defined type. Will return null if not of the requested type.$/;" f class:TiXmlNode +ToDocument Sources/tools/tinyXML/tinyxml.h /^ virtual const TiXmlDocument* ToDocument() const { return this; } \/\/\/< Cast to a more defined type. Will return null not of the requested type.$/;" f class:TiXmlDocument +ToElement Sources/tools/tinyXML/tinyxml.h /^ TiXmlElement* ToElement() const { return ( ( node && node->ToElement() ) ? node->ToElement() : 0 ); }$/;" f class:TiXmlHandle +ToElement Sources/tools/tinyXML/tinyxml.h /^ virtual TiXmlElement* ToElement() { return this; } \/\/\/< Cast to a more defined type. Will return null not of the requested type.$/;" f class:TiXmlElement +ToElement Sources/tools/tinyXML/tinyxml.h /^ virtual TiXmlElement* ToElement() { return 0; } \/\/\/< Cast to a more defined type. Will return null if not of the requested type.$/;" f class:TiXmlNode +ToElement Sources/tools/tinyXML/tinyxml.h /^ virtual const TiXmlElement* ToElement() const { return 0; } \/\/\/< Cast to a more defined type. Will return null if not of the requested type.$/;" f class:TiXmlNode +ToElement Sources/tools/tinyXML/tinyxml.h /^ virtual const TiXmlElement* ToElement() const { return this; } \/\/\/< Cast to a more defined type. Will return null not of the requested type.$/;" f class:TiXmlElement +ToLower Sources/tools/tinyXML/tinyxml.h /^ inline static int ToLower( int v, TiXmlEncoding encoding )$/;" f class:TiXmlBase +ToNode Sources/tools/tinyXML/tinyxml.h /^ TiXmlNode* ToNode() const { return node; } $/;" f class:TiXmlHandle +ToText Sources/tools/tinyXML/tinyxml.h /^ TiXmlText* ToText() const { return ( ( node && node->ToText() ) ? node->ToText() : 0 ); }$/;" f class:TiXmlHandle +ToText Sources/tools/tinyXML/tinyxml.h /^ virtual TiXmlText* ToText() { return 0; } \/\/\/< Cast to a more defined type. Will return null if not of the requested type.$/;" f class:TiXmlNode +ToText Sources/tools/tinyXML/tinyxml.h /^ virtual TiXmlText* ToText() { return this; } \/\/\/< Cast to a more defined type. Will return null not of the requested type.$/;" f class:TiXmlText +ToText Sources/tools/tinyXML/tinyxml.h /^ virtual const TiXmlText* ToText() const { return 0; } \/\/\/< Cast to a more defined type. Will return null if not of the requested type.$/;" f class:TiXmlNode +ToText Sources/tools/tinyXML/tinyxml.h /^ virtual const TiXmlText* ToText() const { return this; } \/\/\/< Cast to a more defined type. Will return null not of the requested type.$/;" f class:TiXmlText +ToUnknown Sources/tools/tinyXML/tinyxml.h /^ TiXmlUnknown* ToUnknown() const { return ( ( node && node->ToUnknown() ) ? node->ToUnknown() : 0 ); }$/;" f class:TiXmlHandle +ToUnknown Sources/tools/tinyXML/tinyxml.h /^ virtual TiXmlUnknown* ToUnknown() { return 0; } \/\/\/< Cast to a more defined type. Will return null if not of the requested type.$/;" f class:TiXmlNode +ToUnknown Sources/tools/tinyXML/tinyxml.h /^ virtual TiXmlUnknown* ToUnknown() { return this; } \/\/\/< Cast to a more defined type. Will return null not of the requested type.$/;" f class:TiXmlUnknown +ToUnknown Sources/tools/tinyXML/tinyxml.h /^ virtual const TiXmlUnknown* ToUnknown() const { return 0; } \/\/\/< Cast to a more defined type. Will return null if not of the requested type.$/;" f class:TiXmlNode +ToUnknown Sources/tools/tinyXML/tinyxml.h /^ virtual const TiXmlUnknown* ToUnknown() const { return this; } \/\/\/< Cast to a more defined type. Will return null not of the requested type.$/;" f class:TiXmlUnknown +ToggleInsert Sources/tools/globals/tools_globals.cpp /^void globals::ToggleInsert(void)$/;" f class:globals +ToolBar Sources/GuiTools/MainWindows/ToolBar.cpp /^ToolBar::ToolBar(void) : MsgBroadcast("Tool bar", EDN_CAT_GUI)$/;" f class:ToolBar +ToolBar Sources/GuiTools/MainWindows/ToolBar.h /^class ToolBar: public MsgBroadcast$/;" c +Type Sources/tools/tinyXML/tinyxml.h /^ int Type() const { return type; }$/;" f class:TiXmlNode +UTF8UnknownElement Sources/tools/Display/Display.cpp /^void DrawerManager::UTF8UnknownElement(Colorize *SelectColor, int32_t x, int32_t y, int8_t utf8Size, bool ValidUtf8)$/;" f class:DrawerManager +UnIndent Sources/tools/EdnBuf/EdnBuf.cpp /^int32_t EdnBuf::UnIndent(selectionType_te select)$/;" f class:EdnBuf +UnInit Sources/tools/Display/Display.cpp /^void Display::UnInit(void)$/;" f class:Display +UnSetAlt Sources/tools/globals/tools_globals.cpp /^void globals::UnSetAlt(void)$/;" f class:globals +UnSetCtrl Sources/tools/globals/tools_globals.cpp /^void globals::UnSetCtrl(void)$/;" f class:globals +UnSetInsert Sources/tools/globals/tools_globals.cpp /^void globals::UnSetInsert(void)$/;" f class:globals +UnSetPomme Sources/tools/globals/tools_globals.cpp /^void globals::UnSetPomme(void)$/;" f class:globals +UnSetShift Sources/tools/globals/tools_globals.cpp /^void globals::UnSetShift(void)$/;" f class:globals +Undo Sources/Buffer/Buffer.cpp /^void Buffer::Undo(void)$/;" f class:Buffer +Undo Sources/Buffer/BufferText.cpp /^void BufferText::Undo(void)$/;" f class:BufferText +Undo Sources/tools/EdnBuf/EdnBuf_History.cpp /^int32_t EdnBuf::Undo(void)$/;" f class:EdnBuf +Unknown Sources/tools/tinyXML/tinyxml.h /^ TiXmlUnknown* Unknown() const { return ToUnknown(); }$/;" f class:TiXmlHandle +Unselect Sources/tools/EdnBuf/EdnBuf_Selection.cpp /^void EdnBuf::Unselect(selectionType_te select)$/;" f class:EdnBuf +UpdateSelection Sources/tools/EdnBuf/EdnBuf_Selection.cpp /^void EdnBuf::UpdateSelection(selectionType_te select, int32_t pos, int32_t nDeleted, int32_t nInserted)$/;" f class:EdnBuf +UpdateSelections Sources/tools/EdnBuf/EdnBuf_Selection.cpp /^void EdnBuf::UpdateSelections(int32_t pos, int32_t nDeleted, int32_t nInserted)$/;" f class:EdnBuf +UpdateWindowsPosition Sources/Buffer/BufferText.cpp /^void BufferText::UpdateWindowsPosition(bool centerPage)$/;" f class:BufferText +Usage Sources/ctags/readtags.cpp /^const char *const Usage =$/;" v +Utf8_SizeElement Sources/tools/charset/charset.cpp /^void Utf8_SizeElement(const char * data, int32_t lenMax , uint8_t &size, bool &baseValid)$/;" f +Utf8_SizePreviousElement Sources/tools/charset/charset.cpp /^static void Utf8_SizePreviousElement(const char * data, int32_t lenMax, uint8_t &size, bool &baseValid)$/;" f file: +Value Sources/tools/tinyXML/tinyxml.h /^ const char *Value() const { return value.c_str (); }$/;" f class:TiXmlNode +Value Sources/tools/tinyXML/tinyxml.h /^ const char* Value() const { return value.c_str(); } \/\/\/< Return the value of this attribute.$/;" f class:TiXmlAttribute +ValueStr Sources/tools/tinyXML/tinyxml.h /^ const std::string& ValueStr() const { return value; } \/\/\/< Return the value of this attribute.$/;" f class:TiXmlAttribute +ValueStr Sources/tools/tinyXML/tinyxml.h /^ const std::string& ValueStr() const { return value; }$/;" f class:TiXmlNode +ValueTStr Sources/tools/tinyXML/tinyxml.h /^ const TIXML_STRING& ValueTStr() const { return value; }$/;" f class:TiXmlNode +Version Sources/tools/tinyXML/tinyxml.h /^ const char *Version() const { return version.c_str (); }$/;" f class:TiXmlDeclaration +Visit Sources/tools/tinyXML/tinyxml.cpp /^bool TiXmlPrinter::Visit( const TiXmlComment& comment )$/;" f class:TiXmlPrinter +Visit Sources/tools/tinyXML/tinyxml.cpp /^bool TiXmlPrinter::Visit( const TiXmlDeclaration& declaration )$/;" f class:TiXmlPrinter +Visit Sources/tools/tinyXML/tinyxml.cpp /^bool TiXmlPrinter::Visit( const TiXmlText& text )$/;" f class:TiXmlPrinter +Visit Sources/tools/tinyXML/tinyxml.cpp /^bool TiXmlPrinter::Visit( const TiXmlUnknown& unknown )$/;" f class:TiXmlPrinter +Visit Sources/tools/tinyXML/tinyxml.h /^ virtual bool Visit( const TiXmlComment& \/*comment*\/ ) { return true; }$/;" f class:TiXmlVisitor +Visit Sources/tools/tinyXML/tinyxml.h /^ virtual bool Visit( const TiXmlDeclaration& \/*declaration*\/ ) { return true; }$/;" f class:TiXmlVisitor +Visit Sources/tools/tinyXML/tinyxml.h /^ virtual bool Visit( const TiXmlText& \/*text*\/ ) { return true; }$/;" f class:TiXmlVisitor +Visit Sources/tools/tinyXML/tinyxml.h /^ virtual bool Visit( const TiXmlUnknown& \/*unknown*\/ ) { return true; }$/;" f class:TiXmlVisitor +VisitEnter Sources/tools/tinyXML/tinyxml.cpp /^bool TiXmlPrinter::VisitEnter( const TiXmlDocument& )$/;" f class:TiXmlPrinter +VisitEnter Sources/tools/tinyXML/tinyxml.cpp /^bool TiXmlPrinter::VisitEnter( const TiXmlElement& element, const TiXmlAttribute* firstAttribute )$/;" f class:TiXmlPrinter +VisitEnter Sources/tools/tinyXML/tinyxml.h /^ virtual bool VisitEnter( const TiXmlDocument& \/*doc*\/ ) { return true; }$/;" f class:TiXmlVisitor +VisitEnter Sources/tools/tinyXML/tinyxml.h /^ virtual bool VisitEnter( const TiXmlElement& \/*element*\/, const TiXmlAttribute* \/*firstAttribute*\/ ) { return true; }$/;" f class:TiXmlVisitor +VisitExit Sources/tools/tinyXML/tinyxml.cpp /^bool TiXmlPrinter::VisitExit( const TiXmlDocument& )$/;" f class:TiXmlPrinter +VisitExit Sources/tools/tinyXML/tinyxml.cpp /^bool TiXmlPrinter::VisitExit( const TiXmlElement& element )$/;" f class:TiXmlPrinter +VisitExit Sources/tools/tinyXML/tinyxml.h /^ virtual bool VisitExit( const TiXmlDocument& \/*doc*\/ ) { return true; }$/;" f class:TiXmlVisitor +VisitExit Sources/tools/tinyXML/tinyxml.h /^ virtual bool VisitExit( const TiXmlElement& \/*element*\/ ) { return true; }$/;" f class:TiXmlVisitor +WindowsManager Sources/GuiTools/WindowsManager/WindowsManager.cpp /^WindowsManager::WindowsManager(void) : MsgBroadcast("Windows Manager", EDN_CAT_GUI_MANAGER)$/;" f class:WindowsManager +WindowsManager Sources/GuiTools/WindowsManager/WindowsManager.h /^class WindowsManager: public Singleton, public MsgBroadcast$/;" c +WitchBuffer Sources/Buffer/BufferManager.cpp /^int32_t BufferManager::WitchBuffer(int32_t iEmeElement)$/;" f class:BufferManager +_IN_NAMESPACE_EDN_ Sources/tools/NameSpaceEdn/Edn.h 34;" d +__ACCEL_KEY_H__ Sources/tools/MsgBroadcast/AccelKey.h 27;" d +__AL_MUTEX_H__ Sources/tools/AL/AL_Mutex.h 27;" d +__BUFFER_EMPTY_H__ Sources/Buffer/BufferEmpty.h 27;" d +__BUFFER_H__ Sources/Buffer/Buffer.h 27;" d +__BUFFER_MANAGER_H__ Sources/Buffer/BufferManager.h 27;" d +__BUFFER_TEXT_H__ Sources/Buffer/BufferText.h 27;" d +__BUFFER_VIEW_H__ Sources/CustumWidget/BufferView/BufferView.h 26;" d +__CHARSET_H__ Sources/tools/charset/charset.h 27;" d +__CHARSET_TABLE_H__ Sources/tools/charset/charsetTable.h 27;" d +__CLIP_BOARD_H__ Sources/tools/ClipBoard/ClipBoard.h 27;" d +__CODE_VIEW_H__ Sources/CustumWidget/CodeView/CodeView.h 27;" d +__COLORIZE_H__ Sources/Colorize/Colorize.h 27;" d +__COLORIZE_MANAGER_H__ Sources/Colorize/ColorizeManager.h 27;" d +__C_TAGS_MANAGER_H__ Sources/ctags/CTagsManager.h 27;" d +__EDN_BUFFER_HISTORY_H__ Sources/tools/EdnBuf/EdnBufHistory.h 27;" d +__EDN_BUF_H__ Sources/tools/EdnBuf/EdnBuf.h 26;" d +__EDN_EdnVector_H__ Sources/tools/EdnTemplate/EdnVector.h 26;" d +__EDN_H__ Sources/tools/NameSpaceEdn/Edn.h 32;" d +__EDN_REG_EXP_H__ Sources/tools/EdnRegExp/EdnRegExp.h 26;" d +__EDN_TREE_H__ Sources/tools/EdnTemplate/EdnTree.h 26;" d +__EDN_VECTOR_BIN_H__ Sources/tools/EdnTemplate/EdnVectorBin.h 27;" d +__EDN_VECTOR_BUF_H__ Sources/tools/EdnTemplate/EdnVectorBuf.h 27;" d +__HIGHLIGHT_H__ Sources/Highlight/Highlight.h 27;" d +__HIGHLIGHT_MANAGER_H__ Sources/Highlight/HighlightManager.h 27;" d +__HIGHLIGHT_PATTERN_H__ Sources/Highlight/HighlightPattern.h 27;" d +__MAIN_WINDOWS_H__ Sources/GuiTools/MainWindows/MainWindows.h 40;" d +__MENU_BAR_H__ Sources/GuiTools/MainWindows/MenuBar.h 33;" d +__MSG_BROADCAST_H__ Sources/tools/MsgBroadcast/MsgBroadcast.h 27;" d +__SEARCH_DATA_H__ Sources/GuiTools/Search/SearchData.h 27;" d +__SEARCH_H__ Sources/CustumWidget/MainAreaView/MainAreaView.cpp 27;" d file: +__SEARCH_H__ Sources/GuiTools/Search/Search.h 27;" d +__SINGLETON_H__ Sources/tools/EdnTemplate/Singleton.h 27;" d +__STATUS_BAR_H__ Sources/GuiTools/MainWindows/StatusBar.h 29;" d +__TOOLS_DEBUG_H__ Sources/tools/debug/tools_debug.h 27;" d +__TOOLS_DISPLAY_H__ Sources/tools/Display/Display.h 27;" d +__TOOLS_GLOBALS_H__ Sources/tools/globals/tools_globals.h 27;" d +__TOOLS_MEMORY_H__ Sources/tools/memory/toolsMemory.h 27;" d +__TOOLS_TYPES_GENERIQUE_H__ Sources/tools/debug/types_generique.h 27;" d +__TOOL_BAR_H__ Sources/GuiTools/MainWindows/ToolBar.h 29;" d +__WINDOWS_MANAGER_H__ Sources/GuiTools/WindowsManager/WindowsManager.h 27;" d +__class__ Sources/Buffer/Buffer.cpp 31;" d file: +__class__ Sources/Buffer/Buffer.cpp 32;" d file: +__class__ Sources/Buffer/BufferEmpty.cpp 32;" d file: +__class__ Sources/Buffer/BufferEmpty.cpp 33;" d file: +__class__ Sources/Buffer/BufferManager.cpp 32;" d file: +__class__ Sources/Buffer/BufferManager.cpp 33;" d file: +__class__ Sources/Buffer/BufferText.cpp 33;" d file: +__class__ Sources/Buffer/BufferText.cpp 34;" d file: +__class__ Sources/Colorize/Colorize.cpp 32;" d file: +__class__ Sources/Colorize/Colorize.cpp 33;" d file: +__class__ Sources/CustumWidget/BufferView/BufferView.cpp 34;" d file: +__class__ Sources/CustumWidget/BufferView/BufferView.cpp 35;" d file: +__class__ Sources/GuiTools/MainWindows/MainWindows.cpp 36;" d file: +__class__ Sources/GuiTools/MainWindows/MainWindows.cpp 37;" d file: +__class__ Sources/GuiTools/MainWindows/MenuBar.cpp 195;" d file: +__class__ Sources/GuiTools/MainWindows/MenuBar.cpp 196;" d file: +__class__ Sources/GuiTools/MainWindows/MenuBar.cpp 80;" d file: +__class__ Sources/GuiTools/MainWindows/MenuBar.cpp 81;" d file: +__class__ Sources/GuiTools/Search/Search.cpp 34;" d file: +__class__ Sources/GuiTools/Search/Search.cpp 35;" d file: +__class__ Sources/GuiTools/Search/SearchData.cpp 31;" d file: +__class__ Sources/GuiTools/Search/SearchData.cpp 32;" d file: +__class__ Sources/GuiTools/WindowsManager/WindowsManager.cpp 35;" d file: +__class__ Sources/GuiTools/WindowsManager/WindowsManager.cpp 36;" d file: +__class__ Sources/Highlight/Highlight.cpp 32;" d file: +__class__ Sources/Highlight/Highlight.cpp 33;" d file: +__class__ Sources/Highlight/HighlightManager.cpp 30;" d file: +__class__ Sources/Highlight/HighlightManager.cpp 31;" d file: +__class__ Sources/Highlight/HighlightPattern.cpp 31;" d file: +__class__ Sources/Highlight/HighlightPattern.cpp 32;" d file: +__class__ Sources/ctags/CTagsManager.cpp 35;" d file: +__class__ Sources/ctags/CTagsManager.cpp 36;" d file: +__class__ Sources/tools/ClipBoard/ClipBoard.cpp 29;" d file: +__class__ Sources/tools/ClipBoard/ClipBoard.cpp 30;" d file: +__class__ Sources/tools/Display/Display.cpp 132;" d file: +__class__ Sources/tools/Display/Display.cpp 133;" d file: +__class__ Sources/tools/Display/Display.cpp 33;" d file: +__class__ Sources/tools/Display/Display.cpp 34;" d file: +__class__ Sources/tools/EdnBuf/EdnBuf.cpp 31;" d file: +__class__ Sources/tools/EdnBuf/EdnBuf.cpp 32;" d file: +__class__ Sources/tools/EdnBuf/EdnBufHistory.cpp 32;" d file: +__class__ Sources/tools/EdnBuf/EdnBufHistory.cpp 33;" d file: +__class__ Sources/tools/EdnBuf/EdnBuf_HighLight.cpp 31;" d file: +__class__ Sources/tools/EdnBuf/EdnBuf_HighLight.cpp 32;" d file: +__class__ Sources/tools/EdnBuf/EdnBuf_History.cpp 31;" d file: +__class__ Sources/tools/EdnBuf/EdnBuf_History.cpp 32;" d file: +__class__ Sources/tools/EdnBuf/EdnBuf_Selection.cpp 31;" d file: +__class__ Sources/tools/EdnBuf/EdnBuf_Selection.cpp 32;" d file: +__class__ Sources/tools/EdnRegExp/EdnRegExp.cpp 1001;" d file: +__class__ Sources/tools/EdnRegExp/EdnRegExp.cpp 1002;" d file: +__class__ Sources/tools/EdnRegExp/EdnRegExp.cpp 1042;" d file: +__class__ Sources/tools/EdnRegExp/EdnRegExp.cpp 1043;" d file: +__class__ Sources/tools/EdnRegExp/EdnRegExp.cpp 1080;" d file: +__class__ Sources/tools/EdnRegExp/EdnRegExp.cpp 1081;" d file: +__class__ Sources/tools/EdnRegExp/EdnRegExp.cpp 1120;" d file: +__class__ Sources/tools/EdnRegExp/EdnRegExp.cpp 1121;" d file: +__class__ Sources/tools/EdnRegExp/EdnRegExp.cpp 1160;" d file: +__class__ Sources/tools/EdnRegExp/EdnRegExp.cpp 1161;" d file: +__class__ Sources/tools/EdnRegExp/EdnRegExp.cpp 1199;" d file: +__class__ Sources/tools/EdnRegExp/EdnRegExp.cpp 1200;" d file: +__class__ Sources/tools/EdnRegExp/EdnRegExp.cpp 1238;" d file: +__class__ Sources/tools/EdnRegExp/EdnRegExp.cpp 1239;" d file: +__class__ Sources/tools/EdnRegExp/EdnRegExp.cpp 1277;" d file: +__class__ Sources/tools/EdnRegExp/EdnRegExp.cpp 1278;" d file: +__class__ Sources/tools/EdnRegExp/EdnRegExp.cpp 1316;" d file: +__class__ Sources/tools/EdnRegExp/EdnRegExp.cpp 1317;" d file: +__class__ Sources/tools/EdnRegExp/EdnRegExp.cpp 1357;" d file: +__class__ Sources/tools/EdnRegExp/EdnRegExp.cpp 1358;" d file: +__class__ Sources/tools/EdnRegExp/EdnRegExp.cpp 1371;" d file: +__class__ Sources/tools/EdnRegExp/EdnRegExp.cpp 1372;" d file: +__class__ Sources/tools/EdnRegExp/EdnRegExp.cpp 1391;" d file: +__class__ Sources/tools/EdnRegExp/EdnRegExp.cpp 1392;" d file: +__class__ Sources/tools/EdnRegExp/EdnRegExp.cpp 532;" d file: +__class__ Sources/tools/EdnRegExp/EdnRegExp.cpp 533;" d file: +__class__ Sources/tools/EdnRegExp/EdnRegExp.cpp 563;" d file: +__class__ Sources/tools/EdnRegExp/EdnRegExp.cpp 564;" d file: +__class__ Sources/tools/EdnRegExp/EdnRegExp.cpp 645;" d file: +__class__ Sources/tools/EdnRegExp/EdnRegExp.cpp 646;" d file: +__class__ Sources/tools/EdnRegExp/EdnRegExp.cpp 860;" d file: +__class__ Sources/tools/EdnRegExp/EdnRegExp.cpp 861;" d file: +__class__ Sources/tools/EdnRegExp/EdnRegExp.cpp 923;" d file: +__class__ Sources/tools/EdnRegExp/EdnRegExp.cpp 924;" d file: +__class__ Sources/tools/EdnTemplate/EdnTree.h 182;" d +__class__ Sources/tools/EdnTemplate/EdnTree.h 183;" d +__class__ Sources/tools/EdnTemplate/EdnTree.h 28;" d +__class__ Sources/tools/EdnTemplate/EdnTree.h 29;" d +__class__ Sources/tools/EdnTemplate/EdnTree.h 59;" d +__class__ Sources/tools/EdnTemplate/EdnTree.h 60;" d +__class__ Sources/tools/EdnTemplate/EdnVector.h 28;" d +__class__ Sources/tools/EdnTemplate/EdnVector.h 29;" d +__class__ Sources/tools/EdnTemplate/EdnVector.h 496;" d +__class__ Sources/tools/EdnTemplate/EdnVector.h 497;" d +__class__ Sources/tools/EdnTemplate/EdnVectorBin.h 31;" d +__class__ Sources/tools/EdnTemplate/EdnVectorBin.h 32;" d +__class__ Sources/tools/EdnTemplate/EdnVectorBin.h 640;" d +__class__ Sources/tools/EdnTemplate/EdnVectorBin.h 641;" d +__class__ Sources/tools/EdnTemplate/EdnVectorBuf.cpp 32;" d file: +__class__ Sources/tools/EdnTemplate/EdnVectorBuf.cpp 33;" d file: +__class__ Sources/tools/EdnTemplate/EdnVectorBuf.h 32;" d +__class__ Sources/tools/EdnTemplate/EdnVectorBuf.h 337;" d +__class__ Sources/tools/EdnTemplate/EdnVectorBuf.h 338;" d +__class__ Sources/tools/EdnTemplate/EdnVectorBuf.h 33;" d +__class__ Sources/tools/MsgBroadcast/MsgBroadcast.cpp 30;" d file: +__class__ Sources/tools/MsgBroadcast/MsgBroadcast.cpp 31;" d file: +__class__ Sources/tools/MsgBroadcast/MsgBroadcast.cpp 60;" d file: +__class__ Sources/tools/MsgBroadcast/MsgBroadcast.cpp 61;" d file: +__class__ Sources/tools/NameSpaceEdn/String.cpp 30;" d file: +__class__ Sources/tools/NameSpaceEdn/String.cpp 31;" d file: +__class__ Sources/tools/debug/tools_debug.h 68;" d +__class__ Sources/tools/debug/tools_debug.h 69;" d +__class__ Sources/tools/globals/tools_globals.cpp 31;" d file: +__class__ Sources/tools/globals/tools_globals.cpp 32;" d file: +__int8_t_defined Sources/tools/debug/types_generique.h 46;" d +_singleton Sources/tools/EdnTemplate/Singleton.h /^ T *Singleton::_singleton = NULL;$/;" m class:Singleton +_singleton Sources/tools/EdnTemplate/Singleton.h /^ static T *_singleton;$/;" m class:Singleton +address Sources/ctags/readtags.h /^ } address;$/;" m struct:__anon25 typeref:struct:__anon25::__anon26 +altIsSet Sources/tools/globals/tools_globals.cpp /^static bool altIsSet = false;$/;" v file: +append Sources/tools/tinyXML/tinystr.cpp /^TiXmlString& TiXmlString::append(const char* str, size_type len)$/;" f class:TiXmlString +assign Sources/tools/tinyXML/tinystr.cpp /^TiXmlString& TiXmlString::assign(const char* str, size_type len)$/;" f class:TiXmlString +at Sources/tools/tinyXML/tinystr.h /^ const char& at (size_type index) const$/;" f class:TiXmlString +attributeSet Sources/tools/tinyXML/tinyxml.h /^ TiXmlAttributeSet attributeSet;$/;" m class:TiXmlElement +author Sources/ctags/readtags.cpp /^ char *author;$/;" m struct:sTagFile::__anon31 file: +author Sources/ctags/readtags.h /^ const char *author;$/;" m struct:__anon20::__anon23 +basicColor_te Sources/Colorize/ColorizeManager.h /^}basicColor_te;$/;" t typeref:enum:__anon17 +basicColors Sources/Colorize/ColorizeManager.h /^ color_ts basicColors[COLOR_NUMBER_MAX];$/;" m class:ColorizeManager +beginStart Sources/Highlight/Highlight.h /^ int32_t beginStart;$/;" m struct:__anon33 +beginStop Sources/Highlight/Highlight.h /^ int32_t beginStop;$/;" m struct:__anon33 +blue Sources/Colorize/Colorize.h /^ float blue;$/;" m struct:__anon16 +bold Sources/Colorize/Colorize.h /^ bool bold;$/;" m class:Colorize +buffer Sources/ctags/readtags.cpp /^ char *buffer;$/;" m struct:__anon28 file: +buffer Sources/tools/tinyXML/tinyxml.h /^ TIXML_STRING buffer;$/;" m class:TiXmlPrinter +c_str Sources/tools/NameSpaceEdn/String.h /^ char * c_str(void) { return (char*)&m_data[0]; };$/;" f class:String +c_str Sources/tools/tinyXML/tinystr.h /^ const char * c_str () const { return rep_->str; }$/;" f class:TiXmlString +capacity Sources/tools/tinyXML/tinystr.h /^ size_type size, capacity;$/;" m struct:TiXmlString::Rep +capacity Sources/tools/tinyXML/tinystr.h /^ size_type capacity () const { return rep_->capacity; }$/;" f class:TiXmlString +cdata Sources/tools/tinyXML/tinyxml.h /^ bool cdata; \/\/ true if this should be input and output as a CDATA style text element$/;" m class:TiXmlText +charMatch Sources/tools/EdnBuf/EdnBuf.cpp /^bool EdnBuf::charMatch(char first, char second, bool caseSensitive)$/;" f class:EdnBuf +charset_te Sources/tools/charset/charset.h /^} charset_te;$/;" t typeref:enum:__anon9 +chr Sources/tools/tinyXML/tinyxml.h /^ char chr;$/;" m struct:TiXmlBase::Entity +clear Sources/tools/tinyXML/tinystr.h /^ void clear ()$/;" f class:TiXmlString +col Sources/tools/tinyXML/tinyxml.h /^ int col; \/\/ 0 based.$/;" m struct:TiXmlCursor +colorInformation_ts Sources/Highlight/Highlight.h /^ } colorInformation_ts;$/;" t typeref:struct:__anon33 +color_ts Sources/Colorize/Colorize.h /^ } color_ts;$/;" t typeref:struct:__anon16 +condenseWhiteSpace Sources/tools/tinyXML/tinyxml.cpp /^bool TiXmlBase::condenseWhiteSpace = true;$/;" m class:TiXmlBase file: +condenseWhiteSpace Sources/tools/tinyXML/tinyxml.h /^ static bool condenseWhiteSpace;$/;" m class:TiXmlBase +constConvertionTable Sources/tools/EdnRegExp/EdnRegExp.cpp /^const convertionTable_ts constConvertionTable[] = {$/;" v +constConvertionTableSize Sources/tools/EdnRegExp/EdnRegExp.cpp /^const int32_t constConvertionTableSize = sizeof(constConvertionTable) \/ sizeof(convertionTable_ts) ;$/;" v +convertIsoToUnicode Sources/tools/charset/charset.cpp /^int32_t convertIsoToUnicode(charset_te inputCharset, EdnVectorBin& input_ISO, EdnVectorBin& output_Unicode)$/;" f +convertIsoToUnicode Sources/tools/charset/charset.cpp /^void convertIsoToUnicode(charset_te inputCharset, char input_ISO, int32_t & output_Unicode)$/;" f +convertIsoToUtf8 Sources/tools/charset/charset.cpp /^int32_t convertIsoToUtf8(charset_te inputCharset, EdnVectorBin& input_ISO, EdnVectorBin& output_UTF8)$/;" f +convertIsoToUtf8 Sources/tools/charset/charset.cpp /^void convertIsoToUtf8(charset_te inputCharset, char input_ISO, char * output_UTF8)$/;" f +convertUnicodeToIso Sources/tools/charset/charset.cpp /^int32_t convertUnicodeToIso(charset_te inputCharset, EdnVectorBin& input_Unicode, EdnVectorBin& output_ISO)$/;" f +convertUnicodeToIso Sources/tools/charset/charset.cpp /^void convertUnicodeToIso(charset_te inputCharset, int32_t input_Unicode, char & output_ISO)$/;" f +convertUnicodeToUtf8 Sources/tools/charset/charset.cpp /^int32_t convertUnicodeToUtf8(EdnVectorBin& input_Unicode, EdnVectorBin& output_UTF8)$/;" f +convertUnicodeToUtf8 Sources/tools/charset/charset.cpp /^void convertUnicodeToUtf8(int32_t input_Unicode, char * output_UTF8)$/;" f +convertUtf8ToIso Sources/tools/charset/charset.cpp /^int32_t convertUtf8ToIso(charset_te inputCharset, EdnVectorBin& input_UTF8, EdnVectorBin& output_ISO)$/;" f +convertUtf8ToIso Sources/tools/charset/charset.cpp /^void convertUtf8ToIso(charset_te inputCharset, char * input_UTF8, char & output_ISO)$/;" f +convertUtf8ToUnicode Sources/tools/charset/charset.cpp /^int32_t convertUtf8ToUnicode(EdnVectorBin& input_UTF8, EdnVectorBin& output_Unicode)$/;" f +convertUtf8ToUnicode Sources/tools/charset/charset.cpp /^void convertUtf8ToUnicode(char * input_UTF8, int32_t &output_Unicode)$/;" f +convertionTable_ts Sources/tools/EdnRegExp/EdnRegExp.cpp /^}convertionTable_ts;$/;" t typeref:struct:__anon14 file: +copyName Sources/ctags/readtags.cpp /^static void copyName (tagFile *const file)$/;" f file: +count Sources/ctags/readtags.h /^ unsigned short count;$/;" m struct:__anon25::__anon27 +ctrlIsSet Sources/tools/globals/tools_globals.cpp /^static bool ctrlIsSet = false;$/;" v file: +curentFileName Sources/tools/globals/tools_globals.cpp /^static std::string curentFileName = "???";$/;" v file: +cursor Sources/tools/tinyXML/tinyxmlparser.cpp /^ TiXmlCursor cursor;$/;" m class:TiXmlParsingData file: +cursorDisplayMode_te Sources/Buffer/BufferText.h /^} cursorDisplayMode_te;$/;" t typeref:enum:__anon35 +cursorMove Sources/Buffer/Buffer.cpp /^void Buffer::cursorMove(int32_t gtkKey)$/;" f class:Buffer +cursorMove Sources/Buffer/BufferText.cpp /^void BufferText::cursorMove(int32_t gtkKey)$/;" f class:BufferText +data Sources/tools/MsgBroadcast/MsgBroadcast.h /^ int32_t data;$/;" m struct:__anon13 +data Sources/tools/tinyXML/tinystr.h /^ const char * data () const { return rep_->str; }$/;" f class:TiXmlString +dataId Sources/tools/MsgBroadcast/MsgBroadcast.h /^ int32_t dataId;$/;" m struct:__anon12 +depth Sources/tools/tinyXML/tinyxml.h /^ int depth;$/;" m class:TiXmlPrinter +diplayableColomn Sources/Buffer/Buffer.h /^ uint32_t diplayableColomn; \/\/!< NB colomn that can be displayed$/;" m struct:__anon34 +diplayableLine Sources/Buffer/Buffer.h /^ uint32_t diplayableLine; \/\/!< NB Line that can be displayed$/;" m struct:__anon34 +displayEOL Sources/tools/globals/tools_globals.cpp /^static bool displayEOL = false;$/;" v file: +displayHLData_ts Sources/tools/EdnBuf/EdnBuf.h /^}displayHLData_ts;$/;" t typeref:struct:__anon8 +displaySpaceChar Sources/tools/globals/tools_globals.cpp /^static bool displaySpaceChar = true;$/;" v file: +document Sources/tools/tinyXML/tinyxml.h /^ TiXmlDocument* document; \/\/ A pointer back to a document, for error reporting.$/;" m class:TiXmlAttribute +duplicate Sources/ctags/readtags.cpp /^static char *duplicate (const char *str)$/;" f file: +edn_average Sources/tools/debug/types_generique.h 72;" d +edn_max Sources/tools/debug/types_generique.h 71;" d +edn_min Sources/tools/debug/types_generique.h 70;" d +elementPos_ts Sources/tools/EdnRegExp/EdnRegExp.h /^}elementPos_ts;$/;" t typeref:struct:__anon15 +elementPtr Sources/tools/EdnTemplate/EdnTree.h /^ T* elementPtr; \/\/ pointer on the curent element$/;" m class:EdnTreeElement +empty Sources/tools/tinyXML/tinystr.h /^ bool empty () const { return rep_->size == 0; }$/;" f class:TiXmlString +encoding Sources/tools/tinyXML/tinyxml.h /^ TIXML_STRING encoding;$/;" m class:TiXmlDeclaration +end Sources/tools/EdnBuf/EdnBuf.h /^ int32_t end; \/\/!< Pos. of end of selection, or if rectangular end of line containing it.$/;" m struct:__anon6 +endStart Sources/Highlight/Highlight.h /^ int32_t endStart;$/;" m struct:__anon33 +endStop Sources/Highlight/Highlight.h /^ int32_t endStop;$/;" m struct:__anon33 +entity Sources/tools/tinyXML/tinyxml.h /^ static Entity entity[ NUM_ENTITY ];$/;" m class:TiXmlBase +entity Sources/tools/tinyXML/tinyxmlparser.cpp /^TiXmlBase::Entity TiXmlBase::entity[ NUM_ENTITY ] = $/;" m class:TiXmlBase file: +erreurCode_te Sources/tools/debug/types_generique.h /^}erreurCode_te;$/;" t typeref:enum:__anon4 +error Sources/tools/tinyXML/tinyxml.h /^ bool error;$/;" m class:TiXmlDocument +errorColor Sources/Colorize/ColorizeManager.h /^ Colorize* errorColor;$/;" m class:ColorizeManager +errorDesc Sources/tools/tinyXML/tinyxml.h /^ TIXML_STRING errorDesc;$/;" m class:TiXmlDocument +errorId Sources/tools/tinyXML/tinyxml.h /^ int errorId;$/;" m class:TiXmlDocument +errorLocation Sources/tools/tinyXML/tinyxml.h /^ TiXmlCursor errorLocation;$/;" m class:TiXmlDocument +errorString Sources/tools/tinyXML/tinyxml.h /^ static const char* errorString[ TIXML_ERROR_STRING_COUNT ];$/;" m class:TiXmlBase +errorString Sources/tools/tinyXML/tinyxmlerror.cpp /^const char* TiXmlBase::errorString[ TIXML_ERROR_STRING_COUNT ] =$/;" m class:TiXmlBase file: +error_number Sources/ctags/readtags.h /^ int error_number;$/;" m struct:__anon20::__anon21 +eventModification Sources/tools/EdnBuf/EdnBuf.cpp /^void EdnBuf::eventModification(int32_t pos, int32_t nInserted, EdnVectorBin &deletedText)$/;" f class:EdnBuf +extensionFields Sources/ctags/readtags.cpp /^static int extensionFields;$/;" v file: +fields Sources/ctags/readtags.cpp /^ } fields;$/;" m struct:sTagFile typeref:struct:sTagFile::__anon30 file: +fields Sources/ctags/readtags.h /^ } fields;$/;" m struct:__anon25 typeref:struct:__anon25::__anon27 +file Sources/ctags/readtags.h /^ const char *file;$/;" m struct:__anon25 +file Sources/ctags/readtags.h /^ } file;$/;" m struct:__anon20 typeref:struct:__anon20::__anon22 +fileScope Sources/ctags/readtags.h /^ short fileScope;$/;" m struct:__anon25 +filename Sources/Buffer/BufferText.h /^ Edn::String filename; \/\/!< filename of the curent buffer$/;" m class:BufferText +find Sources/ctags/readtags.cpp /^static tagResult find (tagFile *const file, tagEntry *const entry,$/;" f file: +find Sources/tools/tinyXML/tinystr.h /^ size_type find (char lookup) const$/;" f class:TiXmlString +find Sources/tools/tinyXML/tinystr.h /^ size_type find (char tofind, size_type offset) const$/;" f class:TiXmlString +findBinary Sources/ctags/readtags.cpp /^static tagResult findBinary (tagFile *const file)$/;" f file: +findFirstMatchBefore Sources/ctags/readtags.cpp /^static tagResult findFirstMatchBefore (tagFile *const file)$/;" f file: +findFirstNonMatchBefore Sources/ctags/readtags.cpp /^static void findFirstNonMatchBefore (tagFile *const file)$/;" f file: +findNext Sources/ctags/readtags.cpp /^static tagResult findNext (tagFile *const file, tagEntry *const entry)$/;" f file: +findSequential Sources/ctags/readtags.cpp /^static tagResult findSequential (tagFile *const file)$/;" f file: +findTag Sources/ctags/readtags.cpp /^static void findTag (const char *const name, const int options)$/;" f file: +finish Sources/tools/tinyXML/tinystr.h /^ char* finish() const { return rep_->str + rep_->size; }$/;" f class:TiXmlString +firstChild Sources/tools/tinyXML/tinyxml.h /^ TiXmlNode* firstChild;$/;" m class:TiXmlNode +format Sources/ctags/readtags.cpp /^ short format;$/;" m struct:sTagFile file: +format Sources/ctags/readtags.h /^ short format;$/;" m struct:__anon20::__anon22 +fp Sources/ctags/readtags.cpp /^ FILE* fp;$/;" m struct:sTagFile file: +getData Sources/tools/EdnBuf/EdnBufHistory.cpp /^void EdnBufHistory::getData(EdnVectorBin &deletedText)$/;" f class:EdnBufHistory +getFileSize Sources/tools/EdnTemplate/EdnVectorBuf.cpp /^static int32_t getFileSize(FILE *myFile)$/;" f file: +getInstance Sources/tools/EdnTemplate/Singleton.h /^ static T *getInstance()$/;" f class:Singleton +getNbColoneBorder Sources/tools/globals/tools_globals.cpp /^int32_t globals::getNbColoneBorder(void)$/;" f class:globals +getNbLineBorder Sources/tools/globals/tools_globals.cpp /^int32_t globals::getNbLineBorder(void)$/;" f class:globals +getPos Sources/tools/EdnBuf/EdnBufHistory.cpp /^int32_t EdnBufHistory::getPos(void)$/;" f class:EdnBufHistory +getnbDeleted Sources/tools/EdnBuf/EdnBufHistory.cpp /^int32_t EdnBufHistory::getnbDeleted(void)$/;" f class:EdnBufHistory +getnbInserted Sources/tools/EdnBuf/EdnBufHistory.cpp /^int32_t EdnBufHistory::getnbInserted(void)$/;" f class:EdnBufHistory +globals Sources/tools/globals/tools_globals.h /^namespace globals$/;" n +gotoFirstLogicalTag Sources/ctags/readtags.cpp /^static void gotoFirstLogicalTag (tagFile *const file)$/;" f file: +green Sources/Colorize/Colorize.h /^ float green;$/;" m struct:__anon16 +growFields Sources/ctags/readtags.cpp /^static tagResult growFields (tagFile *const file)$/;" f file: +growString Sources/ctags/readtags.cpp /^static int growString (vstring *s)$/;" f file: +haveBG Sources/Colorize/Colorize.h /^ bool haveBG;$/;" m class:Colorize +haveBackSlash Sources/tools/EdnRegExp/EdnRegExp.cpp /^ bool haveBackSlash;$/;" m struct:__anon14 file: +haveFG Sources/Colorize/Colorize.h /^ bool haveFG;$/;" m class:Colorize +haveName Sources/Buffer/BufferText.h /^ bool haveName; \/\/!< to know if the file have a name or NOT$/;" m class:BufferText +idSequence Sources/tools/EdnBuf/EdnBuf.h /^ int32_t idSequence;$/;" m struct:__anon8 +ignorecase Sources/ctags/readtags.cpp /^ short ignorecase;$/;" m struct:sTagFile::__anon29 file: +indent Sources/tools/tinyXML/tinyxml.h /^ TIXML_STRING indent;$/;" m class:TiXmlPrinter +infoStatBuffer_ts Sources/Buffer/Buffer.h /^}infoStatBuffer_ts;$/;" t typeref:struct:__anon34 +init Sources/tools/globals/tools_globals.cpp /^erreurCode_te globals::init(void)$/;" f class:globals +init Sources/tools/tinyXML/tinystr.h /^ void init(size_type sz) { init(sz, sz); }$/;" f class:TiXmlString +init Sources/tools/tinyXML/tinystr.h /^ void init(size_type sz, size_type cap)$/;" f class:TiXmlString +initialize Sources/ctags/readtags.cpp /^static tagFile *initialize (const char *const filePath, tagFileInfo *const info)$/;" f file: +initialized Sources/ctags/readtags.cpp /^ short initialized;$/;" m struct:sTagFile file: +inputValue Sources/tools/EdnRegExp/EdnRegExp.cpp /^ char inputValue;$/;" m struct:__anon14 file: +insert Sources/tools/EdnBuf/EdnBuf.cpp /^int32_t EdnBuf::insert(int32_t pos, EdnVectorBin &insertText)$/;" f class:EdnBuf +insertIsSet Sources/tools/globals/tools_globals.cpp /^static bool insertIsSet = false;$/;" v file: +int16_t Sources/tools/debug/types_generique.h /^ typedef signed short int int16_t;$/;" t +int32_t Sources/tools/debug/types_generique.h /^ typedef int int32_t;$/;" t +int64_t Sources/tools/debug/types_generique.h /^ typedef signed long long int int64_t;$/;" t +int8_t Sources/tools/debug/types_generique.h /^ typedef signed char int8_t;$/;" t +isChar Sources/tools/EdnBuf/EdnBuf.cpp /^static bool isChar(char value)$/;" f file: +italic Sources/Colorize/Colorize.h /^ bool italic;$/;" m class:Colorize +key Sources/ctags/readtags.h /^ const char *key;$/;" m struct:__anon24 +kill Sources/tools/EdnTemplate/Singleton.h /^ static void kill()$/;" f class:Singleton +kind Sources/ctags/readtags.h /^ const char *kind;$/;" m struct:__anon25 +lastChild Sources/tools/tinyXML/tinyxml.h /^ TiXmlNode* lastChild;$/;" m class:TiXmlNode +length Sources/tools/tinyXML/tinystr.h /^ size_type length () const { return rep_->size; }$/;" f class:TiXmlString +levelSpace Sources/tools/EdnRegExp/EdnRegExp.cpp /^static char * levelSpace(int32_t level)$/;" f file: +line Sources/ctags/readtags.cpp /^ vstring line;$/;" m struct:sTagFile file: +lineBreak Sources/tools/tinyXML/tinyxml.h /^ TIXML_STRING lineBreak;$/;" m class:TiXmlPrinter +lineNumber Sources/ctags/readtags.h /^ unsigned long lineNumber;$/;" m struct:__anon25::__anon26 +list Sources/ctags/readtags.cpp /^ tagExtensionField *list;$/;" m struct:sTagFile::__anon30 file: +list Sources/ctags/readtags.h /^ tagExtensionField *list;$/;" m struct:__anon25::__anon27 +listBuffer Sources/Buffer/BufferManager.h /^ std::vector listBuffer; \/\/!< element List of the char Elements$/;" m class:BufferManager +listHighlight Sources/Highlight/HighlightManager.h /^ std::vector listHighlight; \/\/!< List of ALL hightlight modules$/;" m class:HighlightManager +listMyColor Sources/Colorize/ColorizeManager.h /^ std::vector listMyColor; \/\/!< List of ALL Color$/;" m class:ColorizeManager +listTags Sources/ctags/readtags.cpp /^static void listTags (void)$/;" f file: +loadLanguages Sources/Highlight/HighlightManager.cpp /^void HighlightManager::loadLanguages(void)$/;" f class:HighlightManager +localMessageID Sources/tools/MsgBroadcast/MsgBroadcast.h /^ int32_t localMessageID;$/;" m struct:__anon13 +location Sources/tools/tinyXML/tinyxml.h /^ TiXmlCursor location;$/;" m class:TiXmlBase +m_BtNext Sources/GuiTools/Search/Search.h /^ GtkWidget * m_BtNext; \/\/!< Button Next$/;" m class:Search +m_BtPrevious Sources/GuiTools/Search/Search.h /^ GtkWidget * m_BtPrevious; \/\/!< Button Previous$/;" m class:Search +m_BtQuit Sources/GuiTools/Search/Search.h /^ GtkWidget * m_BtQuit; \/\/!< Button Quit$/;" m class:Search +m_BtReplace Sources/GuiTools/Search/Search.h /^ GtkWidget * m_BtReplace; \/\/!< Button Replace$/;" m class:Search +m_BtReplaceAndNext Sources/GuiTools/Search/Search.h /^ GtkWidget * m_BtReplaceAndNext; \/\/!< Button Replace and find next$/;" m class:Search +m_BufferView Sources/GuiTools/MainWindows/MainWindows.h /^ BufferView m_BufferView;$/;" m class:MainWindows +m_CkMatchCase Sources/GuiTools/Search/Search.h /^ GtkWidget * m_CkMatchCase; \/\/!< tick of the case matching$/;" m class:Search +m_CkRegularExpression Sources/GuiTools/Search/Search.h /^ GtkWidget * m_CkRegularExpression; \/\/!< the test is a regular expression$/;" m class:Search +m_CkWrapAround Sources/GuiTools/Search/Search.h /^ GtkWidget * m_CkWrapAround; \/\/!< tick of the wrap the file$/;" m class:Search +m_CodeView Sources/GuiTools/MainWindows/MainWindows.h /^ CodeView m_CodeView;$/;" m class:MainWindows +m_EdnBuf Sources/Buffer/BufferText.h /^ EdnBuf m_EdnBuf; \/\/!< buffer associated on this displayer$/;" m class:BufferText +m_EdnVector Sources/tools/EdnTemplate/EdnVector.h /^ EdnVector * m_EdnVector; \/\/ Pointer on the curent element of the vector$/;" m class:EdnVector::Iterator +m_EdnVectorBin Sources/tools/EdnTemplate/EdnVectorBin.h /^ EdnVectorBin * m_EdnVectorBin; \/\/ Pointer on the curent element of the vectorBin$/;" m class:EdnVectorBin::Iterator +m_EdnVectorBuf Sources/tools/EdnTemplate/EdnVectorBuf.h /^ EdnVectorBuf * m_EdnVectorBuf; \/\/ Pointer on the curent element of the vectorBin$/;" m class:EdnVectorBuf::Iterator +m_EntrySearch Sources/CustumWidget/MainAreaView/MainAreaView.cpp /^ ViewArea * m_EntrySearch[6];$/;" m class:MainAreaView file: +m_HLDataPass1 Sources/tools/EdnBuf/EdnBuf.h /^ std::vector m_HLDataPass1; \/\/!< colorisation position in the current buffer pass 1$/;" m class:EdnBuf +m_HLDataSequence Sources/tools/EdnBuf/EdnBuf.h /^ int32_t m_HLDataSequence; \/\/!< position of the start of line requested by the screen viewer$/;" m class:EdnBuf +m_Highlight Sources/tools/EdnBuf/EdnBuf.h /^ Highlight * m_Highlight; \/\/!< internal link with the Highlight system$/;" m class:EdnBuf +m_LastId Sources/tools/EdnTemplate/EdnTree.h /^ int32_t m_LastId;$/;" m class:EdnTree +m_MenuBar Sources/GuiTools/MainWindows/MainWindows.h /^ MenuBar m_MenuBar;$/;" m class:MainWindows +m_RegExp Sources/GuiTools/Search/SearchData.cpp /^static bool m_RegExp = false;$/;" v file: +m_RegExpData Sources/tools/EdnRegExp/EdnRegExp.h /^ EdnVectorBin m_RegExpData; \/\/!< data to parse and compare in some case ...$/;" m class:RegExpNode +m_StatusBar Sources/GuiTools/MainWindows/MainWindows.h /^ StatusBar m_StatusBar;$/;" m class:MainWindows +m_ToolBar Sources/GuiTools/MainWindows/MainWindows.h /^ ToolBar m_ToolBar;$/;" m class:MainWindows +m_accelGroup Sources/GuiTools/MainWindows/MenuBar.h /^ GtkAccelGroup * m_accelGroup;$/;" m class:MenuBar +m_accelGroup Sources/tools/MsgBroadcast/AccelKey.h /^ GtkAccelGroup * m_accelGroup;$/;" m class:AccelKey +m_allocated Sources/tools/EdnTemplate/EdnVectorBin.h /^ int32_t m_allocated; \/\/!< Current allocated size$/;" m class:EdnVectorBin +m_allocated Sources/tools/EdnTemplate/EdnVectorBuf.h /^ int32_t m_allocated; \/\/!< Current allocated size$/;" m class:EdnVectorBuf +m_areaFind Sources/tools/EdnRegExp/EdnRegExp.h /^ elementPos_ts m_areaFind; \/\/!< position around selection$/;" m class:EdnRegExp +m_bufferID Sources/CustumWidget/CodeView/CodeView.h /^ int32_t m_bufferID;$/;" m class:CodeView +m_bufferManager Sources/CustumWidget/BufferView/BufferView.h /^ BufferManager * m_bufferManager;$/;" m class:BufferView +m_bufferManager Sources/CustumWidget/CodeView/CodeView.h /^ BufferManager * m_bufferManager;$/;" m class:CodeView +m_buttunOneSelected Sources/CustumWidget/CodeView/CodeView.h /^ bool m_buttunOneSelected;$/;" m class:CodeView +m_cairo Sources/tools/Display/Display.h /^ cairo_t * m_cairo; \/\/!< Cairo Layout pointer$/;" m class:DrawerManager +m_cairoFont Sources/tools/Display/Display.cpp /^static cairo_font_face_t * m_cairoFont[2][2] = {{NULL, NULL},{ NULL, NULL}};$/;" v file: +m_case Sources/GuiTools/Search/SearchData.cpp /^static bool m_case = false;$/;" v file: +m_cat Sources/tools/MsgBroadcast/MsgBroadcast.h /^ messageCat_te m_cat;$/;" m class:MsgBroadcast +m_charsetType Sources/tools/EdnBuf/EdnBuf.h /^ charset_te m_charsetType; \/\/!< if UTF8 mode is at false : the charset type of the buffer$/;" m class:EdnBuf +m_className Sources/tools/MsgBroadcast/MsgBroadcast.h /^ Edn::String m_className;$/;" m class:MsgBroadcast +m_color Sources/Highlight/HighlightPattern.h /^ Colorize * m_color; \/\/!< Link to the color manager$/;" m class:HighlightPattern +m_colorBG Sources/Colorize/Colorize.h /^ color_ts m_colorBG;$/;" m class:Colorize +m_colorFG Sources/Colorize/Colorize.h /^ color_ts m_colorFG;$/;" m class:Colorize +m_colorManager Sources/CustumWidget/BufferView/BufferView.h /^ ColorizeManager * m_colorManager;$/;" m class:BufferView +m_colorManager Sources/CustumWidget/CodeView/CodeView.h /^ ColorizeManager * m_colorManager;$/;" m class:CodeView +m_colorName Sources/Highlight/HighlightPattern.h /^ Edn::String m_colorName; \/\/!< Current color name$/;" m class:HighlightPattern +m_count Sources/tools/EdnTemplate/EdnVector.h /^ int32_t m_count; \/\/!< number of element$/;" m class:EdnVector +m_ctagFile Sources/ctags/CTagsManager.h /^ tagFile * m_ctagFile;$/;" m class:CTagsManager +m_current Sources/tools/EdnTemplate/EdnVector.h /^ int32_t m_current; \/\/ curent Id on the vector$/;" m class:EdnVector::Iterator +m_current Sources/tools/EdnTemplate/EdnVectorBin.h /^ int32_t m_current; \/\/ curent Id on the vector$/;" m class:EdnVectorBin::Iterator +m_current Sources/tools/EdnTemplate/EdnVectorBuf.h /^ int32_t m_current; \/\/ curent Id on the vector$/;" m class:EdnVectorBuf::Iterator +m_currentBufferID Sources/GuiTools/WindowsManager/WindowsManager.h /^ int32_t m_currentBufferID;$/;" m class:WindowsManager +m_currentSelectedID Sources/ctags/CTagsManager.h /^ int32_t m_currentSelectedID;$/;" m class:CTagsManager +m_cursorMode Sources/Buffer/BufferText.h /^ cursorDisplayMode_te m_cursorMode; \/\/!< type of cursor Selected$/;" m class:BufferText +m_cursorOn Sources/Buffer/BufferText.h /^ bool m_cursorOn; \/\/!< the blink of the cursor ...$/;" m class:BufferText +m_cursorPos Sources/Buffer/BufferText.h /^ int32_t m_cursorPos; \/\/!< position in the buffer of the cursor$/;" m class:BufferText +m_cursorPreferredCol Sources/Buffer/BufferText.h /^ int32_t m_cursorPreferredCol; \/\/!< colomn of the last up and down ...$/;" m class:BufferText +m_data Sources/tools/EdnBuf/EdnBuf.h /^ EdnVectorBuf m_data; \/\/!< buffer of the data in the mode int8_t$/;" m class:EdnBuf +m_data Sources/tools/EdnRegExp/EdnRegExp.h /^ EdnVectorBin m_data;$/;" m class:RegExpNodeBracket +m_data Sources/tools/EdnRegExp/EdnRegExp.h /^ EdnVectorBin m_data;$/;" m class:RegExpNodeValue +m_data Sources/tools/EdnTemplate/EdnVector.h /^ T * m_data; \/\/!< pointer on the current Data$/;" m class:EdnVector +m_data Sources/tools/EdnTemplate/EdnVectorBin.h /^ MY_TYPE * m_data; \/\/!< pointer on the curetn table of Data$/;" m class:EdnVectorBin +m_data Sources/tools/EdnTemplate/EdnVectorBuf.h /^ int8_t * m_data; \/\/!< pointer on the curetn table of Data$/;" m class:EdnVectorBuf +m_data Sources/tools/NameSpaceEdn/String.h /^ EdnVectorBin m_data;$/;" m class:String +m_dataToDisplay Sources/tools/Display/Display.h /^ char m_dataToDisplay[MAX_CARACTER_CYCLE]; \/\/!< curent string to display$/;" m class:DrawerManager +m_deletedText Sources/tools/EdnBuf/EdnBufHistory.h /^ EdnVectorBin m_deletedText;$/;" m class:EdnBufHistory +m_displayLocalSyntax Sources/Buffer/BufferText.h /^ displayHLData_ts m_displayLocalSyntax; \/\/!< for the display of the local elements (display HL mode)$/;" m class:BufferText +m_displaySize Sources/Buffer/BufferText.h /^ position_ts m_displaySize; \/\/!< number of char displayable in the screan$/;" m class:BufferText +m_displayStart Sources/Buffer/BufferText.h /^ position_ts m_displayStart; \/\/!< position where the display is starting$/;" m class:BufferText +m_displayStartBufferPos Sources/Buffer/BufferText.h /^ int32_t m_displayStartBufferPos; \/\/!< position where the buffer start$/;" m class:BufferText +m_escapeChar Sources/Highlight/HighlightPattern.h /^ char m_escapeChar; \/\/!< Escape char to prevent exeit of patern ....$/;" m class:HighlightPattern +m_exprRootNode Sources/tools/EdnRegExp/EdnRegExp.h /^ RegExpNodePThese m_exprRootNode; \/\/!< The tree where data is set$/;" m class:EdnRegExp +m_expressionRequested Sources/tools/EdnRegExp/EdnRegExp.h /^ Edn::String m_expressionRequested; \/\/ TODO : Remove ...$/;" m class:EdnRegExp +m_fileModify Sources/Buffer/Buffer.h /^ bool m_fileModify;$/;" m class:Buffer +m_fileName Sources/Buffer/Buffer.h /^ Edn::File m_fileName;$/;" m class:Buffer +m_findRequest Sources/GuiTools/Search/SearchData.cpp /^static Edn::String m_findRequest = "";$/;" v file: +m_folder Sources/tools/NameSpaceEdn/File.h /^ Edn::String m_folder;$/;" m class:File +m_gapEnd Sources/tools/EdnTemplate/EdnVectorBuf.h /^ int32_t m_gapEnd; \/\/!< points to the first char after the gap$/;" m class:EdnVectorBuf +m_gapStart Sources/tools/EdnTemplate/EdnVectorBuf.h /^ int32_t m_gapStart; \/\/!< points to the first character of the gap$/;" m class:EdnVectorBuf +m_haveName Sources/Buffer/Buffer.h /^ bool m_haveName; \/\/!< to know if the file have a name or NOT$/;" m class:Buffer +m_haveReplaceData Sources/GuiTools/Search/Search.h /^ bool m_haveReplaceData;$/;" m class:Search +m_haveSearchData Sources/GuiTools/Search/Search.h /^ bool m_haveSearchData;$/;" m class:Search +m_haveStopPatern Sources/Highlight/HighlightPattern.h /^ bool m_haveStopPatern; \/\/!< Stop patern presence$/;" m class:HighlightPattern +m_haveWork Sources/tools/Display/Display.h /^ bool m_haveWork; \/\/!< if data might be print (true)$/;" m class:DrawerManager +m_historyList Sources/ctags/CTagsManager.h /^ EdnVectorBin m_historyList;$/;" m class:CTagsManager +m_historyPos Sources/ctags/CTagsManager.h /^ int32_t m_historyPos;$/;" m class:CTagsManager +m_historyRedo Sources/tools/EdnBuf/EdnBuf.h /^ EdnVectorBin m_historyRedo;$/;" m class:EdnBuf +m_historyUndo Sources/tools/EdnBuf/EdnBuf.h /^ EdnVectorBin m_historyUndo;$/;" m class:EdnBuf +m_iContextId Sources/GuiTools/MainWindows/StatusBar.h /^ guint m_iContextId;$/;" m class:StatusBar +m_id Sources/tools/EdnTemplate/EdnTree.h /^ int32_t m_id;$/;" m class:EdnTreeElement +m_idSelected Sources/Buffer/BufferManager.h /^ int32_t m_idSelected;$/;" m class:BufferManager +m_increment Sources/tools/EdnTemplate/EdnVectorBin.h /^ int32_t m_increment; \/\/!< methode of increment$/;" m class:EdnVectorBin +m_isOk Sources/tools/EdnRegExp/EdnRegExp.h /^ bool m_isOk; \/\/!< Known if we can process with this regExp$/;" m class:EdnRegExp +m_isRedoProcessing Sources/tools/EdnBuf/EdnBuf.h /^ bool m_isRedoProcessing;$/;" m class:EdnBuf +m_isUndoProcessing Sources/tools/EdnBuf/EdnBuf.h /^ bool m_isUndoProcessing;$/;" m class:EdnBuf +m_isUtf8 Sources/tools/EdnBuf/EdnBuf.h /^ bool m_isUtf8; \/\/!< true if we are in UTF8 mode ==> if true the size of a char is 0, otherwise .. 1->4 ( TODO : not now)$/;" m class:EdnBuf +m_level Sources/Highlight/HighlightPattern.h /^ int32_t m_level; \/\/!< Level of the pattern ==> this is to overwrite next pattern when we create an higher ....$/;" m class:HighlightPattern +m_lineNumberOpen Sources/tools/NameSpaceEdn/File.h /^ int32_t m_lineNumberOpen;$/;" m class:File +m_listElement Sources/tools/EdnTemplate/EdnTree.h /^ std::vector< EdnTreeElement > m_listElement; \/\/!< list of element...$/;" m class:EdnTree +m_listExtentions Sources/Highlight/Highlight.h /^ std::vector m_listExtentions; \/\/!< List of possible extention for this high-light, like : ".c", ".cpp", ".h"$/;" m class:Highlight +m_listHighlightPass1 Sources/Highlight/Highlight.h /^ std::vector m_listHighlightPass1; \/\/!< List of ALL hightlight modules (pass 1 ==> when we load and wride data on the buffer)$/;" m class:Highlight +m_listHighlightPass2 Sources/Highlight/Highlight.h /^ std::vector m_listHighlightPass2; \/\/!< List of ALL hightlight modules (pass 2 ==> When we display the buffer( only the display area (100 lines)) )$/;" m class:Highlight +m_listMenu Sources/GuiTools/MainWindows/MenuBar.h /^ EdnVectorBin m_listMenu;$/;" m class:MenuBar +m_listMessage Sources/tools/MsgBroadcast/MsgBroadcast.h /^ EdnVectorBin m_listMessage;$/;" m class:MsgBroadcastCore +m_listOfMessage Sources/tools/MsgBroadcast/MsgBroadcast.h /^ EdnVectorBin m_listOfMessage;$/;" m class:MsgBroadcastCore +m_localDialog Sources/CustumWidget/MainAreaView/MainAreaView.cpp /^ GtkWidget * m_localDialog; \/\/!< local dialog element$/;" m class:MainAreaView file: +m_localDialog Sources/GuiTools/Search/Search.h /^ GtkWidget * m_localDialog; \/\/!< local dialog element$/;" m class:Search +m_mainWidget Sources/GuiTools/MainWindows/MenuBar.h /^ GtkWidget * m_mainWidget;$/;" m class:MenuBar +m_mainWidget Sources/GuiTools/MainWindows/StatusBar.h /^ GtkWidget * m_mainWidget;$/;" m class:StatusBar +m_mainWidget Sources/GuiTools/MainWindows/ToolBar.h /^ GtkWidget * m_mainWidget;$/;" m class:ToolBar +m_mainWindow Sources/GuiTools/MainWindows/MainWindows.h /^ GtkWidget * m_mainWindow;$/;" m class:MainWindows +m_mainWindow Sources/GuiTools/WindowsManager/WindowsManager.h /^ MainWindows * m_mainWindow;$/;" m class:WindowsManager +m_menu Sources/GuiTools/MainWindows/MenuBar.cpp /^ GtkWidget * m_menu;$/;" m class:MenuBarMain file: +m_menuListe Sources/GuiTools/MainWindows/MenuBar.cpp /^ GtkWidget * m_menuListe;$/;" m class:MenuBarMain file: +m_message Sources/GuiTools/MainWindows/MenuBar.cpp /^ EdnVectorBin m_message;$/;" m class:MenuBarMain file: +m_message Sources/GuiTools/MainWindows/ToolBar.h /^ EdnVectorBin m_message;$/;" m class:ToolBar +m_messageID Sources/tools/MsgBroadcast/MsgBroadcast.h /^ uint32_t m_messageID;$/;" m class:MsgBroadcastCore +m_messageSystem Sources/tools/MsgBroadcast/MsgBroadcast.h /^ MsgBroadcastCore * m_messageSystem;$/;" m class:MsgBroadcast +m_multiline Sources/Highlight/HighlightPattern.h /^ bool m_multiline; \/\/!< The patern is multiline$/;" m class:HighlightPattern +m_multipleMax Sources/tools/EdnRegExp/EdnRegExp.h /^ int32_t m_multipleMax; \/\/!< maximum repetition (included)$/;" m class:RegExpNode +m_multipleMin Sources/tools/EdnRegExp/EdnRegExp.h /^ int32_t m_multipleMin; \/\/!< minimum repetition (included)$/;" m class:RegExpNode +m_nInserted Sources/tools/EdnBuf/EdnBufHistory.h /^ int32_t m_nInserted;$/;" m class:EdnBufHistory +m_nbElement Sources/tools/Display/Display.h /^ uint32_t m_nbElement; \/\/!< nb element in the string$/;" m class:DrawerManager +m_nbLine Sources/tools/EdnBuf/EdnBuf.h /^ int32_t m_nbLine; \/\/!< Number of line in the biffer$/;" m class:EdnBuf +m_notBeginWithChar Sources/tools/EdnRegExp/EdnRegExp.h /^ bool m_notBeginWithChar; \/\/!< The regular expression must not have previously a char [a-zA-Z0-9_]$/;" m class:EdnRegExp +m_notEndWithChar Sources/tools/EdnRegExp/EdnRegExp.h /^ bool m_notEndWithChar; \/\/!< The regular expression must not have after the end a char [a-zA-Z0-9_]$/;" m class:EdnRegExp +m_pangoFontHeight Sources/tools/Display/Display.cpp /^static int32_t m_pangoFontHeight = 19;$/;" v file: +m_pangoFontWidth Sources/tools/Display/Display.cpp /^static int32_t m_pangoFontWidth = 9;$/;" v file: +m_parent Sources/GuiTools/MainWindows/MenuBar.cpp /^ GtkWidget * m_parent;$/;" m class:MenuBarMain file: +m_parent Sources/tools/EdnTemplate/EdnTree.h /^ int32_t m_parent;$/;" m class:EdnTreeElement +m_paternName Sources/Highlight/HighlightPattern.h /^ Edn::String m_paternName; \/\/!< Current style name (like "c++" or "c" or "script Bash")$/;" m class:HighlightPattern +m_pos Sources/tools/Display/Display.h /^ position_ts m_pos; \/\/!< position where start the string display (X,Y)$/;" m class:DrawerManager +m_pos Sources/tools/EdnBuf/EdnBufHistory.h /^ int32_t m_pos;$/;" m class:EdnBufHistory +m_regExpStart Sources/Highlight/HighlightPattern.h /^ EdnRegExp * m_regExpStart; \/\/!< Start of Regular expression$/;" m class:HighlightPattern +m_regExpStop Sources/Highlight/HighlightPattern.h /^ EdnRegExp * m_regExpStop; \/\/!< Stop of Regular Expression$/;" m class:HighlightPattern +m_replaceEntry Sources/GuiTools/Search/Search.h /^ GtkWidget * m_replaceEntry; \/\/!< gtk entry of the replace section$/;" m class:Search +m_replaceLabel Sources/GuiTools/Search/Search.h /^ GtkWidget * m_replaceLabel; \/\/!< gtk label of the replace section$/;" m class:Search +m_replaceRequest Sources/GuiTools/Search/SearchData.cpp /^static Edn::String m_replaceRequest = "";$/;" v file: +m_searchEntry Sources/GuiTools/Search/Search.h /^ GtkWidget * m_searchEntry; \/\/!< gtk entry of the search section$/;" m class:Search +m_searchLabel Sources/GuiTools/Search/Search.h /^ GtkWidget * m_searchLabel; \/\/!< gtk label of the search section$/;" m class:Search +m_selectColor Sources/tools/Display/Display.h /^ Colorize * m_selectColor; \/\/!< curent color to display$/;" m class:DrawerManager +m_selectedID Sources/CustumWidget/BufferView/BufferView.h /^ int32_t m_selectedID;$/;" m class:BufferView +m_selectionList Sources/tools/EdnBuf/EdnBuf.h /^ selection m_selectionList[SELECTION_SIZE]; \/\/!< Selection area of the buffer$/;" m class:EdnBuf +m_shawableAreaX Sources/CustumWidget/BufferView/BufferView.h /^ int32_t m_shawableAreaX;$/;" m class:BufferView +m_shawableAreaX Sources/CustumWidget/CodeView/CodeView.h /^ int32_t m_shawableAreaX;$/;" m class:CodeView +m_shawableAreaY Sources/CustumWidget/BufferView/BufferView.h /^ int32_t m_shawableAreaY;$/;" m class:BufferView +m_shawableAreaY Sources/CustumWidget/CodeView/CodeView.h /^ int32_t m_shawableAreaY;$/;" m class:CodeView +m_shortFilename Sources/tools/NameSpaceEdn/File.h /^ Edn::String m_shortFilename;$/;" m class:File +m_size Sources/tools/Display/Display.h /^ position_ts m_size; \/\/!< Total size$/;" m class:DrawerManager +m_size Sources/tools/EdnTemplate/EdnVector.h /^ int32_t m_size; \/\/!< current allocated size$/;" m class:EdnVector +m_size Sources/tools/EdnTemplate/EdnVectorBin.h /^ int32_t m_size; \/\/!< nb Element in the buffer$/;" m class:EdnVectorBin +m_styleName Sources/Highlight/Highlight.h /^ Edn::String m_styleName; \/\/!< curent style name (like "c++" or "c" or "script Bash")$/;" m class:Highlight +m_subNode Sources/tools/EdnRegExp/EdnRegExp.h /^ EdnVectorBin m_subNode;$/;" m class:RegExpNodePThese +m_subNode Sources/tools/EdnRegExp/EdnRegExp.h /^ EdnVectorBin m_subNode;$/;" m class:RegExpNodePTheseElem +m_subPatern Sources/Highlight/HighlightPattern.h /^ EdnVectorBin m_subPatern; \/\/!< Under patern of this one$/;" m class:HighlightPattern +m_tabDist Sources/tools/EdnBuf/EdnBuf.h /^ int32_t m_tabDist; \/\/!< equiv. number of characters in a tab$/;" m class:EdnBuf +m_tagFilename Sources/ctags/CTagsManager.h /^ Edn::String m_tagFilename;$/;" m class:CTagsManager +m_tagFolderBase Sources/ctags/CTagsManager.h /^ Edn::String m_tagFolderBase;$/;" m class:CTagsManager +m_useTabs Sources/tools/EdnBuf/EdnBuf.h /^ bool m_useTabs; \/\/!< True if buffer routines are allowed to use tabs for padding in rectangular operations$/;" m class:EdnBuf +m_widget Sources/CustumWidget/BufferView/BufferView.h /^ GtkWidget * m_widget;$/;" m class:BufferView +m_widget Sources/CustumWidget/CodeView/CodeView.h /^ GtkWidget * m_widget;$/;" m class:CodeView +m_wrap Sources/GuiTools/Search/SearchData.cpp /^static bool m_wrap = false;$/;" v file: +main Sources/ctags/readtags.cpp /^extern int main (int argc, char **argv)$/;" f +main Sources/init.cpp /^int main (int argc, char *argv[])$/;" f +max Sources/ctags/readtags.cpp /^ unsigned short max;$/;" m struct:sTagFile::__anon30 file: +mesCopy Sources/tools/ClipBoard/ClipBoard.cpp /^static EdnVectorBin mesCopy[TOTAL_OF_CLICKBOARD];$/;" v file: +messageCat_te Sources/tools/MsgBroadcast/MsgBroadcast.h /^}messageCat_te;$/;" t typeref:enum:__anon11 +messageData_ts Sources/tools/MsgBroadcast/MsgBroadcast.h /^}messageData_ts;$/;" t typeref:struct:__anon12 +messageElement_ts Sources/tools/MsgBroadcast/MsgBroadcast.h /^}messageElement_ts;$/;" t typeref:struct:__anon13 +messageType_te Sources/tools/MsgBroadcast/MsgBroadcast.h /^}messageType_te;$/;" t typeref:enum:__anon10 +msgCatDest Sources/tools/MsgBroadcast/MsgBroadcast.h /^ messageCat_te msgCatDest;$/;" m struct:__anon13 +msgId Sources/tools/MsgBroadcast/MsgBroadcast.h /^ messageType_te msgId;$/;" m struct:__anon12 +msgId Sources/tools/MsgBroadcast/MsgBroadcast.h /^ messageType_te msgId;$/;" m struct:__anon13 +myColorManager Sources/Buffer/BufferText.h /^ ColorizeManager * myColorManager; \/\/!< for the background color : $/;" m class:BufferText +name Sources/ctags/readtags.cpp /^ char *name;$/;" m struct:sTagFile::__anon29 file: +name Sources/ctags/readtags.cpp /^ char *name;$/;" m struct:sTagFile::__anon31 file: +name Sources/ctags/readtags.cpp /^ vstring name;$/;" m struct:sTagFile file: +name Sources/ctags/readtags.h /^ const char *name;$/;" m struct:__anon20::__anon23 +name Sources/ctags/readtags.h /^ const char *name;$/;" m struct:__anon25 +name Sources/tools/tinyXML/tinyxml.h /^ TIXML_STRING name;$/;" m class:TiXmlAttribute +nameComparison Sources/ctags/readtags.cpp /^static int nameComparison (tagFile *const file)$/;" f file: +nameLength Sources/ctags/readtags.cpp /^ size_t nameLength;$/;" m struct:sTagFile::__anon29 file: +nbColoneForLineNumber Sources/Buffer/BufferText.h /^ uint32_t nbColoneForLineNumber; \/\/!< number of colome used to display the line Number$/;" m class:BufferText +nbLineAllocatedInBase Sources/Buffer/BufferText.cpp /^const uint32_t nbLineAllocatedInBase = 300;$/;" v +nbTotalColomn Sources/Buffer/Buffer.h /^ uint32_t nbTotalColomn; \/\/!< Number of line in the buffer$/;" m struct:__anon34 +nbTotalLine Sources/Buffer/Buffer.h /^ uint32_t nbTotalLine; \/\/!< Number of line in the buffer$/;" m struct:__anon34 +newValue Sources/tools/EdnRegExp/EdnRegExp.cpp /^ int16_t newValue;$/;" m struct:__anon14 file: +next Sources/tools/tinyXML/tinyxml.h /^ TiXmlAttribute* next;$/;" m class:TiXmlAttribute +next Sources/tools/tinyXML/tinyxml.h /^ TiXmlNode* next;$/;" m class:TiXmlNode +node Sources/tools/tinyXML/tinyxml.h /^ TiXmlNode* node;$/;" m class:TiXmlHandle +notEnded Sources/Highlight/Highlight.h /^ bool notEnded;$/;" m struct:__anon33 +npos Sources/tools/tinyXML/tinystr.cpp /^const TiXmlString::size_type TiXmlString::npos = static_cast< TiXmlString::size_type >(-1);$/;" m class:TiXmlString file: +npos Sources/tools/tinyXML/tinystr.h /^ static const size_type npos; \/\/ = -1;$/;" m class:TiXmlString +nullrep_ Sources/tools/tinyXML/tinystr.cpp /^TiXmlString::Rep TiXmlString::nullrep_ = { 0, 0, { '\\0' } };$/;" m class:TiXmlString file: +nullrep_ Sources/tools/tinyXML/tinystr.h /^ static Rep nullrep_;$/;" m class:TiXmlString +opened Sources/ctags/readtags.h /^ int opened;$/;" m struct:__anon20::__anon21 +operator != Sources/tools/NameSpaceEdn/String.cpp /^bool Edn::String::operator!= (const Edn::String& ednS) const$/;" f class:Edn::String +operator != Sources/tools/NameSpaceEdn/String.cpp /^bool Edn::String::operator!= (const char * inputData) const$/;" f class:Edn::String +operator != Sources/tools/tinyXML/tinystr.h /^inline bool operator != (const TiXmlString & a, const TiXmlString & b) { return !(a == b); }$/;" f +operator != Sources/tools/tinyXML/tinystr.h /^inline bool operator != (const TiXmlString & a, const char* b) { return !(a == b); }$/;" f +operator != Sources/tools/tinyXML/tinystr.h /^inline bool operator != (const char* a, const TiXmlString & b) { return !(b == a); }$/;" f +operator * Sources/tools/EdnTemplate/EdnVector.h /^ T & operator* () const$/;" f class:EdnVector::Iterator +operator * Sources/tools/EdnTemplate/EdnVectorBin.h /^ MY_TYPE & operator* () const$/;" f class:EdnVectorBin::Iterator +operator * Sources/tools/EdnTemplate/EdnVectorBuf.h /^ int8_t & operator* () const$/;" f class:EdnVectorBuf::Iterator +operator + Sources/tools/NameSpaceEdn/String.cpp /^Edn::String Edn::String::operator+ (const Edn::String &ednS)$/;" f class:Edn::String +operator + Sources/tools/NameSpaceEdn/String.cpp /^Edn::String Edn::String::operator+ (const char * inputData)$/;" f class:Edn::String +operator + Sources/tools/tinyXML/tinystr.cpp /^TiXmlString operator + (const TiXmlString & a, const TiXmlString & b)$/;" f +operator + Sources/tools/tinyXML/tinystr.cpp /^TiXmlString operator + (const TiXmlString & a, const char* b)$/;" f +operator + Sources/tools/tinyXML/tinystr.cpp /^TiXmlString operator + (const char* a, const TiXmlString & b)$/;" f +operator ++ Sources/tools/EdnTemplate/EdnVector.h /^ Iterator operator++ (int32_t)$/;" f class:EdnVector::Iterator +operator ++ Sources/tools/EdnTemplate/EdnVector.h /^ Iterator& operator++ ()$/;" f class:EdnVector::Iterator +operator ++ Sources/tools/EdnTemplate/EdnVectorBin.h /^ Iterator operator++ (int32_t)$/;" f class:EdnVectorBin::Iterator +operator ++ Sources/tools/EdnTemplate/EdnVectorBin.h /^ Iterator& operator++ ()$/;" f class:EdnVectorBin::Iterator +operator ++ Sources/tools/EdnTemplate/EdnVectorBuf.h /^ Iterator operator++ (int32_t)$/;" f class:EdnVectorBuf::Iterator +operator ++ Sources/tools/EdnTemplate/EdnVectorBuf.h /^ Iterator& operator++ ()$/;" f class:EdnVectorBuf::Iterator +operator += Sources/tools/EdnTemplate/EdnVectorBin.h /^ EdnVectorBin& operator+= (const EdnVectorBin & Evb) \/\/ += operator$/;" f class:EdnVectorBin +operator += Sources/tools/NameSpaceEdn/String.cpp /^const Edn::String& Edn::String::operator+= (const Edn::String &ednS)$/;" f class:Edn::String +operator += Sources/tools/NameSpaceEdn/String.cpp /^const Edn::String& Edn::String::operator+= (const char * inputData)$/;" f class:Edn::String +operator += Sources/tools/tinyXML/tinystr.h /^ TiXmlString& operator += (char single)$/;" f class:TiXmlString +operator += Sources/tools/tinyXML/tinystr.h /^ TiXmlString& operator += (const TiXmlString & suffix)$/;" f class:TiXmlString +operator += Sources/tools/tinyXML/tinystr.h /^ TiXmlString& operator += (const char * suffix)$/;" f class:TiXmlString +operator -- Sources/tools/EdnTemplate/EdnVector.h /^ Iterator operator-- (int32_t)$/;" f class:EdnVector::Iterator +operator -- Sources/tools/EdnTemplate/EdnVector.h /^ Iterator& operator-- ()$/;" f class:EdnVector::Iterator +operator -- Sources/tools/EdnTemplate/EdnVectorBin.h /^ Iterator operator-- (int32_t)$/;" f class:EdnVectorBin::Iterator +operator -- Sources/tools/EdnTemplate/EdnVectorBin.h /^ Iterator& operator-- ()$/;" f class:EdnVectorBin::Iterator +operator -- Sources/tools/EdnTemplate/EdnVectorBuf.h /^ Iterator operator-- (int32_t)$/;" f class:EdnVectorBuf::Iterator +operator -- Sources/tools/EdnTemplate/EdnVectorBuf.h /^ Iterator& operator-- ()$/;" f class:EdnVectorBuf::Iterator +operator -> Sources/tools/EdnTemplate/EdnVector.h /^ T * operator-> () const$/;" f class:EdnVector::Iterator +operator -> Sources/tools/EdnTemplate/EdnVectorBin.h /^ MY_TYPE & operator-> () const$/;" f class:EdnVectorBin::Iterator +operator -> Sources/tools/EdnTemplate/EdnVectorBuf.h /^ int8_t & operator-> () const$/;" f class:EdnVectorBuf::Iterator +operator < Sources/tools/tinyXML/tinystr.h /^inline bool operator < (const TiXmlString & a, const TiXmlString & b)$/;" f +operator < Sources/tools/tinyXML/tinyxml.h /^ bool operator<( const TiXmlAttribute& rhs ) const { return name < rhs.name; }$/;" f class:TiXmlAttribute +operator << Sources/tools/tinyXML/tinystr.h /^ TiXmlOutStream & operator << (const TiXmlString & in)$/;" f class:TiXmlOutStream +operator << Sources/tools/tinyXML/tinystr.h /^ TiXmlOutStream & operator << (const char * in)$/;" f class:TiXmlOutStream +operator << Sources/tools/tinyXML/tinyxml.cpp /^std::ostream& operator<< (std::ostream & out, const TiXmlNode & base)$/;" f +operator << Sources/tools/tinyXML/tinyxml.cpp /^std::string& operator<< (std::string& out, const TiXmlNode& base )$/;" f +operator <= Sources/tools/tinyXML/tinystr.h /^inline bool operator <= (const TiXmlString & a, const TiXmlString & b) { return !(b < a); }$/;" f +operator = Sources/tools/EdnTemplate/EdnVector.h /^ Iterator& operator=(const Iterator & otherIterator)$/;" f class:EdnVector::Iterator +operator = Sources/tools/EdnTemplate/EdnVector.h /^ EdnVector& operator=(const EdnVector & EdnVector)$/;" f class:EdnVector +operator = Sources/tools/EdnTemplate/EdnVectorBin.h /^ Iterator& operator=(const Iterator & otherIterator)$/;" f class:EdnVectorBin::Iterator +operator = Sources/tools/EdnTemplate/EdnVectorBin.h /^ EdnVectorBin& operator=(const EdnVectorBin & Evb)$/;" f class:EdnVectorBin +operator = Sources/tools/EdnTemplate/EdnVectorBuf.cpp /^EdnVectorBuf& EdnVectorBuf::operator=(const EdnVectorBuf & Evb)$/;" f class:EdnVectorBuf +operator = Sources/tools/EdnTemplate/EdnVectorBuf.h /^ Iterator& operator=(const Iterator & otherIterator)$/;" f class:EdnVectorBuf::Iterator +operator = Sources/tools/NameSpaceEdn/String.cpp /^const Edn::String& Edn::String::operator= (EdnVectorBin inputData)$/;" f class:Edn::String +operator = Sources/tools/NameSpaceEdn/String.cpp /^const Edn::String& Edn::String::operator= (const Edn::String &ednS )$/;" f class:Edn::String +operator = Sources/tools/NameSpaceEdn/String.cpp /^const Edn::String& Edn::String::operator= (const char * inputData)$/;" f class:Edn::String +operator = Sources/tools/tinyXML/tinystr.h /^ TiXmlString& operator = (const TiXmlString & copy)$/;" f class:TiXmlString +operator = Sources/tools/tinyXML/tinystr.h /^ TiXmlString& operator = (const char * copy)$/;" f class:TiXmlString +operator = Sources/tools/tinyXML/tinyxml.cpp /^void TiXmlComment::operator=( const TiXmlComment& base )$/;" f class:TiXmlComment +operator = Sources/tools/tinyXML/tinyxml.cpp /^void TiXmlDeclaration::operator=( const TiXmlDeclaration& copy )$/;" f class:TiXmlDeclaration +operator = Sources/tools/tinyXML/tinyxml.cpp /^void TiXmlDocument::operator=( const TiXmlDocument& copy )$/;" f class:TiXmlDocument +operator = Sources/tools/tinyXML/tinyxml.cpp /^void TiXmlElement::operator=( const TiXmlElement& base )$/;" f class:TiXmlElement +operator = Sources/tools/tinyXML/tinyxml.h /^ TiXmlHandle operator=( const TiXmlHandle& ref ) { this->node = ref.node; return *this; }$/;" f class:TiXmlHandle +operator = Sources/tools/tinyXML/tinyxml.h /^ void operator=( const TiXmlText& base ) { base.CopyTo( this ); }$/;" f class:TiXmlText +operator = Sources/tools/tinyXML/tinyxml.h /^ void operator=( const TiXmlUnknown& copy ) { copy.CopyTo( this ); }$/;" f class:TiXmlUnknown +operator == Sources/tools/NameSpaceEdn/String.cpp /^bool Edn::String::operator== (const Edn::String& ednS) const$/;" f class:Edn::String +operator == Sources/tools/NameSpaceEdn/String.cpp /^bool Edn::String::operator== (const char * inputData) const$/;" f class:Edn::String +operator == Sources/tools/tinyXML/tinystr.h /^inline bool operator == (const TiXmlString & a, const TiXmlString & b)$/;" f +operator == Sources/tools/tinyXML/tinystr.h /^inline bool operator == (const TiXmlString & a, const char* b) { return strcmp(a.c_str(), b) == 0; }$/;" f +operator == Sources/tools/tinyXML/tinystr.h /^inline bool operator == (const char* a, const TiXmlString & b) { return b == a; }$/;" f +operator == Sources/tools/tinyXML/tinyxml.h /^ bool operator==( const TiXmlAttribute& rhs ) const { return rhs.name == name; }$/;" f class:TiXmlAttribute +operator > Sources/tools/tinyXML/tinystr.h /^inline bool operator > (const TiXmlString & a, const TiXmlString & b) { return b < a; }$/;" f +operator > Sources/tools/tinyXML/tinyxml.h /^ bool operator>( const TiXmlAttribute& rhs ) const { return name > rhs.name; }$/;" f class:TiXmlAttribute +operator >= Sources/tools/tinyXML/tinystr.h /^inline bool operator >= (const TiXmlString & a, const TiXmlString & b) { return !(a < b); }$/;" f +operator >> Sources/tools/tinyXML/tinyxml.cpp /^std::istream& operator>> (std::istream & in, TiXmlNode & base)$/;" f +operator [] Sources/tools/EdnBuf/EdnBuf.cpp /^int8_t EdnBuf::operator[] (int32_t pos)$/;" f class:EdnBuf +operator [] Sources/tools/EdnTemplate/EdnVector.h /^ T& operator[] (int32_t pos)$/;" f class:EdnVector +operator [] Sources/tools/EdnTemplate/EdnVector.h /^ const T& operator[] (int32_t pos) const$/;" f class:EdnVector +operator [] Sources/tools/EdnTemplate/EdnVectorBin.h /^ MY_TYPE& operator[] (int32_t pos)$/;" f class:EdnVectorBin +operator [] Sources/tools/EdnTemplate/EdnVectorBin.h /^ const MY_TYPE& operator[] (int32_t pos) const$/;" f class:EdnVectorBin +operator [] Sources/tools/EdnTemplate/EdnVectorBuf.cpp /^int8_t EdnVectorBuf::operator[] (int32_t pos)$/;" f class:EdnVectorBuf +operator [] Sources/tools/tinyXML/tinystr.h /^ char& operator [] (size_type index) const$/;" f class:TiXmlString +operator bool Sources/tools/EdnTemplate/EdnVector.h /^ operator bool ()$/;" f class:EdnVector::Iterator +operator bool Sources/tools/EdnTemplate/EdnVectorBin.h /^ operator bool ()$/;" f class:EdnVectorBin::Iterator +operator bool Sources/tools/EdnTemplate/EdnVectorBuf.h /^ operator bool ()$/;" f class:EdnVectorBuf::Iterator +parent Sources/tools/tinyXML/tinyxml.h /^ TiXmlNode* parent;$/;" m class:TiXmlNode +parseExtensionFields Sources/ctags/readtags.cpp /^static void parseExtensionFields (tagFile *const file, tagEntry *const entry,$/;" f file: +parseTagLine Sources/ctags/readtags.cpp /^static void parseTagLine (tagFile *file, tagEntry *const entry)$/;" f file: +partial Sources/ctags/readtags.cpp /^ short partial;$/;" m struct:sTagFile::__anon29 file: +patern Sources/Highlight/Highlight.h /^ HighlightPattern * patern; \/\/ pointer on class : $/;" m struct:__anon33 +pattern Sources/ctags/readtags.h /^ const char *pattern;$/;" m struct:__anon25::__anon26 +pommeIsSet Sources/tools/globals/tools_globals.cpp /^static bool pommeIsSet = false;$/;" v file: +pos Sources/ctags/readtags.cpp /^ off_t pos; $/;" m struct:sTagFile::__anon29 file: +pos Sources/ctags/readtags.cpp /^ off_t pos;$/;" m struct:sTagFile file: +posHLPass1 Sources/tools/EdnBuf/EdnBuf.h /^ int32_t posHLPass1;$/;" m struct:__anon8 +posHLPass2 Sources/tools/EdnBuf/EdnBuf.h /^ int32_t posHLPass2;$/;" m struct:__anon8 +position_ts Sources/tools/debug/types_generique.h /^} position_ts;$/;" t typeref:struct:__anon5 +prev Sources/tools/tinyXML/tinyxml.h /^ TiXmlAttribute* prev;$/;" m class:TiXmlAttribute +prev Sources/tools/tinyXML/tinyxml.h /^ TiXmlNode* prev;$/;" m class:TiXmlNode +printTag Sources/ctags/readtags.cpp /^static void printTag (const tagEntry *entry)$/;" f file: +program Sources/ctags/readtags.cpp /^ } program;$/;" m struct:sTagFile typeref:struct:sTagFile::__anon31 file: +program Sources/ctags/readtags.h /^ } program;$/;" m struct:__anon20 typeref:struct:__anon20::__anon23 +quit Sources/tools/tinyXML/tinystr.h /^ void quit()$/;" f class:TiXmlString +readFieldValue Sources/ctags/readtags.cpp /^static const char *readFieldValue ($/;" f file: +readNext Sources/ctags/readtags.cpp /^static tagResult readNext (tagFile *const file, tagEntry *const entry)$/;" f file: +readPseudoTags Sources/ctags/readtags.cpp /^static void readPseudoTags (tagFile *const file, tagFileInfo *const info)$/;" f file: +readTagLine Sources/ctags/readtags.cpp /^static int readTagLine (tagFile *const file)$/;" f file: +readTagLineRaw Sources/ctags/readtags.cpp /^static int readTagLineRaw (tagFile *const file)$/;" f file: +readTagLineSeek Sources/ctags/readtags.cpp /^static int readTagLineSeek (tagFile *const file, const off_t pos)$/;" f file: +rectEnd Sources/tools/EdnBuf/EdnBuf.h /^ int32_t rectEnd; \/\/!< Indent of right edge of rect. selection$/;" m struct:__anon6 +rectStart Sources/tools/EdnBuf/EdnBuf.h /^ int32_t rectStart; \/\/!< Indent of left edge of rect. selection$/;" m struct:__anon6 +rectangular Sources/tools/EdnBuf/EdnBuf.h /^ bool rectangular; \/\/!< True if the selection is rectangular$/;" m struct:__anon6 +red Sources/Colorize/Colorize.h /^ float red;$/;" m struct:__anon16 +rep_ Sources/tools/tinyXML/tinystr.h /^ Rep * rep_;$/;" m class:TiXmlString +reserve Sources/tools/tinyXML/tinystr.cpp /^void TiXmlString::reserve (size_type cap)$/;" f class:TiXmlString +resultFind_te Sources/Highlight/HighlightPattern.h /^}resultFind_te;$/;" t typeref:enum:__anon32 +row Sources/tools/tinyXML/tinyxml.h /^ int row; \/\/ 0 based.$/;" m struct:TiXmlCursor +sTagFile Sources/ctags/readtags.cpp /^struct sTagFile {$/;" s file: +search Sources/ctags/readtags.cpp /^ } search;$/;" m struct:sTagFile typeref:struct:sTagFile::__anon29 file: +selected Sources/tools/EdnBuf/EdnBuf.h /^ bool selected; \/\/!< True if the selection is active$/;" m struct:__anon6 +selection Sources/tools/EdnBuf/EdnBuf.h /^} selection;$/;" t typeref:struct:__anon6 +selectionType_te Sources/tools/EdnBuf/EdnBuf.h /^}selectionType_te;$/;" t typeref:enum:__anon7 +sentinel Sources/tools/tinyXML/tinyxml.h /^ TiXmlAttribute sentinel;$/;" m class:TiXmlAttributeSet +sep Sources/ctags/readtags.cpp 802;" d file: +sep Sources/ctags/readtags.cpp 820;" d file: +set_size Sources/tools/tinyXML/tinystr.h /^ void set_size(size_type sz) { rep_->str[ rep_->size = sz ] = '\\0'; }$/;" f class:TiXmlString +shiftIsSet Sources/tools/globals/tools_globals.cpp /^static bool shiftIsSet = false;$/;" v file: +simpleTextPrint Sources/tools/tinyXML/tinyxml.h /^ bool simpleTextPrint;$/;" m class:TiXmlPrinter +size Sources/ctags/readtags.cpp /^ off_t size;$/;" m struct:sTagFile file: +size Sources/ctags/readtags.cpp /^ size_t size;$/;" m struct:__anon28 file: +size Sources/tools/tinyXML/tinystr.h /^ size_type size, capacity;$/;" m struct:TiXmlString::Rep +size Sources/tools/tinyXML/tinystr.h /^ size_type size () const { return rep_->size; }$/;" f class:TiXmlString +size_type Sources/tools/tinyXML/tinystr.h /^ typedef size_t size_type;$/;" t class:TiXmlString +sort Sources/ctags/readtags.h /^ sortType sort;$/;" m struct:__anon20::__anon22 +sortMethod Sources/ctags/readtags.cpp /^ sortType sortMethod;$/;" m struct:sTagFile file: +sortType Sources/ctags/readtags.h /^} sortType ;$/;" t typeref:enum:__anon18 +stamp Sources/tools/tinyXML/tinyxmlparser.cpp /^ const char* stamp;$/;" m class:TiXmlParsingData file: +standalone Sources/tools/tinyXML/tinyxml.h /^ TIXML_STRING standalone;$/;" m class:TiXmlDeclaration +start Sources/tools/EdnBuf/EdnBuf.h /^ int32_t start; \/\/!< Pos. of start of selection, or if rectangular start of line containing it.$/;" m struct:__anon6 +start Sources/tools/EdnRegExp/EdnRegExp.h /^ int32_t start;$/;" m struct:__anon15 +start Sources/tools/tinyXML/tinystr.h /^ char* start() const { return rep_->str; }$/;" f class:TiXmlString +startColomnDisplay Sources/Buffer/Buffer.h /^ uint32_t startColomnDisplay; \/\/!< First Colomn displayed$/;" m struct:__anon34 +startLineDisplay Sources/Buffer/Buffer.h /^ uint32_t startLineDisplay; \/\/!< First line display.$/;" m struct:__anon34 +status Sources/ctags/readtags.h /^ } status;$/;" m struct:__anon20 typeref:struct:__anon20::__anon21 +stop Sources/tools/EdnRegExp/EdnRegExp.h /^ int32_t stop;$/;" m struct:__anon15 +str Sources/tools/tinyXML/tinystr.h /^ char str[1];$/;" m struct:TiXmlString::Rep +str Sources/tools/tinyXML/tinyxml.h /^ const char* str;$/;" m struct:TiXmlBase::Entity +strLength Sources/tools/tinyXML/tinyxml.h /^ unsigned int strLength;$/;" m struct:TiXmlBase::Entity +strUtf8Len Sources/tools/charset/charset.cpp /^int32_t strUtf8Len(const char *input_UTF8)$/;" f +strnuppercmp Sources/ctags/readtags.cpp /^static int strnuppercmp (const char *s1, const char *s2, size_t n)$/;" f file: +struppercmp Sources/ctags/readtags.cpp /^static int struppercmp (const char *s1, const char *s2)$/;" f file: +swap Sources/tools/tinyXML/tinystr.h /^ void swap (TiXmlString& other)$/;" f class:TiXmlString +tabsize Sources/tools/tinyXML/tinyxml.h /^ int tabsize;$/;" m class:TiXmlDocument +tabsize Sources/tools/tinyXML/tinyxmlparser.cpp /^ int tabsize;$/;" m class:TiXmlParsingData file: +tagEntry Sources/ctags/readtags.h /^} tagEntry;$/;" t typeref:struct:__anon25 +tagExtensionField Sources/ctags/readtags.h /^} tagExtensionField;$/;" t typeref:struct:__anon24 +tagFile Sources/ctags/readtags.h /^typedef struct sTagFile tagFile;$/;" t typeref:struct:sTagFile +tagFileInfo Sources/ctags/readtags.h /^} tagFileInfo;$/;" t typeref:struct:__anon20 +tagResult Sources/ctags/readtags.h /^typedef enum { TagFailure = 0, TagSuccess = 1 } tagResult;$/;" t typeref:enum:__anon19 +tagsClose Sources/ctags/readtags.cpp /^extern tagResult tagsClose (tagFile *const file)$/;" f +tagsField Sources/ctags/readtags.cpp /^extern const char *tagsField (const tagEntry *const entry, const char *const key)$/;" f +tagsFind Sources/ctags/readtags.cpp /^extern tagResult tagsFind (tagFile *const file, tagEntry *const entry,$/;" f +tagsFindNext Sources/ctags/readtags.cpp /^extern tagResult tagsFindNext (tagFile *const file, tagEntry *const entry)$/;" f +tagsFirst Sources/ctags/readtags.cpp /^extern tagResult tagsFirst (tagFile *const file, tagEntry *const entry)$/;" f +tagsNext Sources/ctags/readtags.cpp /^extern tagResult tagsNext (tagFile *const file, tagEntry *const entry)$/;" f +tagsOpen Sources/ctags/readtags.cpp /^extern tagFile *tagsOpen (const char *const filePath, tagFileInfo *const info)$/;" f +tagsSetSortType Sources/ctags/readtags.cpp /^extern tagResult tagsSetSortType (tagFile *const file, const sortType type)$/;" f +terminate Sources/ctags/readtags.cpp /^static void terminate (tagFile *const file)$/;" f file: +type Sources/tools/tinyXML/tinyxml.h /^ NodeType type;$/;" m class:TiXmlNode +uint16_t Sources/tools/debug/types_generique.h /^typedef unsigned short int uint16_t;$/;" t +uint32_t Sources/tools/debug/types_generique.h /^typedef unsigned long int uint32_t;$/;" t +uint64_t Sources/tools/debug/types_generique.h /^typedef unsigned long long int uint64_t;$/;" t +uint8_t Sources/tools/debug/types_generique.h /^typedef unsigned char uint8_t;$/;" t +unicodeToUtf8 Sources/tools/charset/charset.cpp /^static uint32_t unicodeToUtf8(uint32_t value)$/;" f file: +url Sources/ctags/readtags.cpp /^ char *url;$/;" m struct:sTagFile::__anon31 file: +url Sources/ctags/readtags.h /^ const char *url;$/;" m struct:__anon20::__anon23 +useMicrosoftBOM Sources/tools/tinyXML/tinyxml.h /^ bool useMicrosoftBOM; \/\/ the UTF-8 BOM were found when read. Note this, and try to write.$/;" m class:TiXmlDocument +userData Sources/tools/tinyXML/tinyxml.h /^ void* userData;$/;" m class:TiXmlBase +utf8ByteTable Sources/tools/tinyXML/tinyxml.h /^ static const int utf8ByteTable[256];$/;" m class:TiXmlBase +utf8ByteTable Sources/tools/tinyXML/tinyxmlparser.cpp /^const int TiXmlBase::utf8ByteTable[256] = $/;" m class:TiXmlBase file: +value Sources/ctags/readtags.h /^ const char *value;$/;" m struct:__anon24 +value Sources/tools/tinyXML/tinyxml.h /^ TIXML_STRING value;$/;" m class:TiXmlNode +value Sources/tools/tinyXML/tinyxml.h /^ TIXML_STRING value;$/;" m class:TiXmlAttribute +version Sources/ctags/readtags.cpp /^ char *version;$/;" m struct:sTagFile::__anon31 file: +version Sources/ctags/readtags.h /^ const char *version;$/;" m struct:__anon20::__anon23 +version Sources/tools/tinyXML/tinyxml.h /^ TIXML_STRING version;$/;" m class:TiXmlDeclaration +vstring Sources/ctags/readtags.cpp /^} vstring;$/;" t typeref:struct:__anon28 file: +x Sources/tools/debug/types_generique.h /^ int32_t x;$/;" m struct:__anon5 +y Sources/tools/debug/types_generique.h /^ int32_t y;$/;" m struct:__anon5 +zeroWidth Sources/tools/EdnBuf/EdnBuf.h /^ bool zeroWidth; \/\/!< Width 0 selections aren't "real" selections, but they can be useful when creating rectangular selections from the keyboard.$/;" m struct:__anon6 +~AccelKey Sources/tools/MsgBroadcast/AccelKey.cpp /^AccelKey::~AccelKey(void)$/;" f class:AccelKey +~Buffer Sources/Buffer/Buffer.cpp /^Buffer::~Buffer(void)$/;" f class:Buffer +~BufferEmpty Sources/Buffer/BufferEmpty.cpp /^BufferEmpty::~BufferEmpty(void)$/;" f class:BufferEmpty +~BufferManager Sources/Buffer/BufferManager.cpp /^BufferManager::~BufferManager(void)$/;" f class:BufferManager +~BufferText Sources/Buffer/BufferText.cpp /^BufferText::~BufferText(void)$/;" f class:BufferText +~BufferView Sources/CustumWidget/BufferView/BufferView.cpp /^BufferView::~BufferView(void)$/;" f class:BufferView +~CTagsManager Sources/ctags/CTagsManager.cpp /^CTagsManager::~CTagsManager(void)$/;" f class:CTagsManager +~CodeView Sources/CustumWidget/CodeView/CodeView.cpp /^CodeView::~CodeView(void)$/;" f class:CodeView +~Colorize Sources/Colorize/Colorize.cpp /^Colorize::~Colorize(void)$/;" f class:Colorize +~ColorizeManager Sources/Colorize/ColorizeManager.cpp /^ColorizeManager::~ColorizeManager(void)$/;" f class:ColorizeManager +~DrawerManager Sources/tools/Display/Display.cpp /^DrawerManager::~DrawerManager()$/;" f class:DrawerManager +~EdnBuf Sources/tools/EdnBuf/EdnBuf.cpp /^EdnBuf::~EdnBuf(void)$/;" f class:EdnBuf +~EdnBufHistory Sources/tools/EdnBuf/EdnBufHistory.cpp /^EdnBufHistory::~EdnBufHistory(void)$/;" f class:EdnBufHistory +~EdnRegExp Sources/tools/EdnRegExp/EdnRegExp.cpp /^EdnRegExp::~EdnRegExp(void)$/;" f class:EdnRegExp +~EdnTree Sources/tools/EdnTemplate/EdnTree.h /^ ~EdnTree(void)$/;" f class:EdnTree +~EdnTreeElement Sources/tools/EdnTemplate/EdnTree.h /^ ~EdnTreeElement(void)$/;" f class:EdnTreeElement +~EdnVector Sources/tools/EdnTemplate/EdnVector.h /^ ~EdnVector()$/;" f class:EdnVector +~EdnVectorBin Sources/tools/EdnTemplate/EdnVectorBin.h /^ ~EdnVectorBin()$/;" f class:EdnVectorBin +~EdnVectorBuf Sources/tools/EdnTemplate/EdnVectorBuf.cpp /^EdnVectorBuf::~EdnVectorBuf()$/;" f class:EdnVectorBuf +~File Sources/tools/NameSpaceEdn/File.cpp /^Edn::File::~File(void)$/;" f class:Edn::File +~Highlight Sources/Highlight/Highlight.cpp /^Highlight::~Highlight(void)$/;" f class:Highlight +~HighlightManager Sources/Highlight/HighlightManager.cpp /^HighlightManager::~HighlightManager(void)$/;" f class:HighlightManager +~HighlightPattern Sources/Highlight/HighlightPattern.cpp /^HighlightPattern::~HighlightPattern(void)$/;" f class:HighlightPattern +~Iterator Sources/tools/EdnTemplate/EdnVector.h /^ ~Iterator()$/;" f class:EdnVector::Iterator +~Iterator Sources/tools/EdnTemplate/EdnVectorBin.h /^ ~Iterator()$/;" f class:EdnVectorBin::Iterator +~Iterator Sources/tools/EdnTemplate/EdnVectorBuf.h /^ ~Iterator(void)$/;" f class:EdnVectorBuf::Iterator +~MainWindows Sources/GuiTools/MainWindows/MainWindows.cpp /^MainWindows::~MainWindows(void)$/;" f class:MainWindows +~MenuBar Sources/GuiTools/MainWindows/MenuBar.cpp /^MenuBar::~MenuBar(void)$/;" f class:MenuBar +~MenuBarMain Sources/GuiTools/MainWindows/MenuBar.cpp /^ ~MenuBarMain(void)$/;" f class:MenuBarMain +~MsgBroadcast Sources/tools/MsgBroadcast/MsgBroadcast.cpp /^MsgBroadcast::~MsgBroadcast(void)$/;" f class:MsgBroadcast +~MsgBroadcastCore Sources/tools/MsgBroadcast/MsgBroadcast.cpp /^MsgBroadcastCore::~MsgBroadcastCore(void)$/;" f class:MsgBroadcastCore +~RegExpNode Sources/tools/EdnRegExp/EdnRegExp.h /^ virtual ~RegExpNode(void) { };$/;" f class:RegExpNode +~RegExpNodeBracket Sources/tools/EdnRegExp/EdnRegExp.h /^ ~RegExpNodeBracket(void) { };$/;" f class:RegExpNodeBracket +~RegExpNodeDigit Sources/tools/EdnRegExp/EdnRegExp.h /^ ~RegExpNodeDigit(void) { };$/;" f class:RegExpNodeDigit +~RegExpNodeDigitNot Sources/tools/EdnRegExp/EdnRegExp.h /^ ~RegExpNodeDigitNot(void) { };$/;" f class:RegExpNodeDigitNot +~RegExpNodeDot Sources/tools/EdnRegExp/EdnRegExp.h /^ ~RegExpNodeDot(void) { };$/;" f class:RegExpNodeDot +~RegExpNodeEOL Sources/tools/EdnRegExp/EdnRegExp.h /^ ~RegExpNodeEOL(void) { };$/;" f class:RegExpNodeEOL +~RegExpNodeLetter Sources/tools/EdnRegExp/EdnRegExp.h /^ ~RegExpNodeLetter(void) { };$/;" f class:RegExpNodeLetter +~RegExpNodeLetterNot Sources/tools/EdnRegExp/EdnRegExp.h /^ ~RegExpNodeLetterNot(void) { };$/;" f class:RegExpNodeLetterNot +~RegExpNodePThese Sources/tools/EdnRegExp/EdnRegExp.cpp /^RegExpNodePThese::~RegExpNodePThese(void)$/;" f class:RegExpNodePThese +~RegExpNodePTheseElem Sources/tools/EdnRegExp/EdnRegExp.cpp /^RegExpNodePTheseElem::~RegExpNodePTheseElem(void)$/;" f class:RegExpNodePTheseElem +~RegExpNodeSOL Sources/tools/EdnRegExp/EdnRegExp.h /^ ~RegExpNodeSOL(void) { };$/;" f class:RegExpNodeSOL +~RegExpNodeValue Sources/tools/EdnRegExp/EdnRegExp.h /^ ~RegExpNodeValue(void) { };$/;" f class:RegExpNodeValue +~RegExpNodeWhiteSpace Sources/tools/EdnRegExp/EdnRegExp.h /^ ~RegExpNodeWhiteSpace(void) { };$/;" f class:RegExpNodeWhiteSpace +~RegExpNodeWhiteSpaceNot Sources/tools/EdnRegExp/EdnRegExp.h /^ ~RegExpNodeWhiteSpaceNot(void) { };$/;" f class:RegExpNodeWhiteSpaceNot +~RegExpNodeWordChar Sources/tools/EdnRegExp/EdnRegExp.h /^ ~RegExpNodeWordChar(void) { };$/;" f class:RegExpNodeWordChar +~RegExpNodeWordCharNot Sources/tools/EdnRegExp/EdnRegExp.h /^ ~RegExpNodeWordCharNot(void) { };$/;" f class:RegExpNodeWordCharNot +~Search Sources/GuiTools/Search/Search.cpp /^Search::~Search(void)$/;" f class:Search +~Singleton Sources/tools/EdnTemplate/Singleton.h /^ ~Singleton() { \/*std::cout << "destroying singleton." << std::endl;*\/ }$/;" f class:Singleton +~StatusBar Sources/GuiTools/MainWindows/StatusBar.cpp /^StatusBar::~StatusBar(void)$/;" f class:StatusBar +~String Sources/tools/NameSpaceEdn/String.cpp /^Edn::String::~String(void)$/;" f class:Edn::String +~TiXmlAttributeSet Sources/tools/tinyXML/tinyxml.cpp /^TiXmlAttributeSet::~TiXmlAttributeSet()$/;" f class:TiXmlAttributeSet +~TiXmlBase Sources/tools/tinyXML/tinyxml.h /^ virtual ~TiXmlBase() {}$/;" f class:TiXmlBase +~TiXmlComment Sources/tools/tinyXML/tinyxml.h /^ virtual ~TiXmlComment() {}$/;" f class:TiXmlComment +~TiXmlDeclaration Sources/tools/tinyXML/tinyxml.h /^ virtual ~TiXmlDeclaration() {}$/;" f class:TiXmlDeclaration +~TiXmlDocument Sources/tools/tinyXML/tinyxml.h /^ virtual ~TiXmlDocument() {}$/;" f class:TiXmlDocument +~TiXmlElement Sources/tools/tinyXML/tinyxml.cpp /^TiXmlElement::~TiXmlElement()$/;" f class:TiXmlElement +~TiXmlNode Sources/tools/tinyXML/tinyxml.cpp /^TiXmlNode::~TiXmlNode()$/;" f class:TiXmlNode +~TiXmlString Sources/tools/tinyXML/tinystr.h /^ ~TiXmlString ()$/;" f class:TiXmlString +~TiXmlText Sources/tools/tinyXML/tinyxml.h /^ virtual ~TiXmlText() {}$/;" f class:TiXmlText +~TiXmlUnknown Sources/tools/tinyXML/tinyxml.h /^ virtual ~TiXmlUnknown() {}$/;" f class:TiXmlUnknown +~TiXmlVisitor Sources/tools/tinyXML/tinyxml.h /^ virtual ~TiXmlVisitor() {}$/;" f class:TiXmlVisitor +~ToolBar Sources/GuiTools/MainWindows/ToolBar.cpp /^ToolBar::~ToolBar(void)$/;" f class:ToolBar +~WindowsManager Sources/GuiTools/WindowsManager/WindowsManager.cpp /^WindowsManager::~WindowsManager(void)$/;" f class:WindowsManager diff --git a/test2.c b/test2.c new file mode 100644 index 0000000..2b2ebc6 --- /dev/null +++ b/test2.c @@ -0,0 +1,1038 @@ +/** + ******************************************************************************* + * @file EdnBuf.cpp + * @brief Editeur De N'ours : Buffer for internal Data (Sources) + * @author Edouard DUPIN + * @date 23/03/2011 + * @par Project + * Edn + * + * @par Copyright + * Copyright 2010 Edouard DUPIN, all right reserved + * + * This software is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY. + * + * Licence summary : + * You can modify and redistribute the sources code and binaries. + * You can send me the bug-fix + * You can not earn money with this Software (if the source extract from Edn + * represent less than 50% of original Sources) + * Term of the licence in in the file licence.txt. + * + ******************************************************************************* + */ + +#include "tools_debug.h" +#include "tools_globals.h" +#include "EdnBuf.h" + + +#undef __class__ +#define __class__ "EdnBuf" + +static void addPadding(char *string, int32_t startIndent, int32_t toIndent, int32_t tabDist, int32_t useTabs, int32_t *charsAdded); +static int32_t textWidth(EdnVectorBin &text, int32_t tabDist); + + +/** + * @brief convertion table for non printable control caracters + */ +static const char *ControlCodeTable[32] = { + "NUL", "soh", "stx", "etx", "eot", "enq", "ack", "bel", "bs", "ht", "nl", "vt", "np", "cr", "so", "si", + "dle", "dc1", "dc2", "dc3", "dc4", "nak", "syn", "etb", "can", "em", "sub", "esc", "fs", "gs", "rs", "us"}; + + + +/** + * @brief Constructor of the Edn buffer Text : + * + * Create an empty text buffer of a pre-determined size + * + * @param[in] requestedSize use this to avoid unnecessary re-allocation if you know exactly how much the buffer will need to hold + * + */ +EdnBuf::EdnBuf(void) +{ + m_tabDist = 4; + m_useTabs = true; + + // Current selection + m_selectionList[SELECTION_PRIMARY].selected = false; + m_selectionList[SELECTION_PRIMARY].zeroWidth = false; + m_selectionList[SELECTION_PRIMARY].rectangular = false; + m_selectionList[SELECTION_PRIMARY].start = m_selectionList[SELECTION_PRIMARY].end = 0; + m_selectionList[SELECTION_SECONDARY].selected = false; + m_selectionList[SELECTION_SECONDARY].zeroWidth = false; + m_selectionList[SELECTION_SECONDARY].rectangular = false; + m_selectionList[SELECTION_SECONDARY].start = m_selectionList[SELECTION_SECONDARY].end = 0; + m_selectionList[SELECTION_HIGHTLIGHT].selected = false; + m_selectionList[SELECTION_HIGHTLIGHT].zeroWidth = false; + m_selectionList[SELECTION_HIGHTLIGHT].rectangular = false; + m_selectionList[SELECTION_HIGHTLIGHT].start = m_selectionList[SELECTION_HIGHTLIGHT].end = 0; + + // charset : + m_isUtf8 = false; + m_charsetType = EDN_CHARSET_ISO_8859_1; + + m_isUndoProcessing = false; + m_isRedoProcessing = false; + + // Load highlight system : + HighlightManager *myHighlightManager = HighlightManager::getInstance(); + EdnString plop = ".c"; + m_Highlight = myHighlightManager->Get(plop); + //m_Highlight = NULL; + m_nbLine = 1; + m_HLDataSequence = 0; +} + +/** + * @brief Destructor of the Edn buffer Text : + */ +EdnBuf::~EdnBuf(void) +{ + // TODO : Remove history and Future +} + +/** + * @brief Save in the current file open + * + * @param[in,out] myFile pointer on the file where data might be writed + * + * @return true if OK / false if an error occured + * + */ +bool EdnBuf::DumpIn(FILE *myFile) +{ + // write Data + return m_data.DumpIn(myFile); +} + + +/** + * @brief Load in the current file open + * + * @param[in,out] myFile pointer on the file where data might be read + * + * @return true if OK / false if an error occured + * + */ +bool EdnBuf::DumpFrom(FILE *myFile) +{ + if (true == m_data.DumpFrom(myFile) ) { + // set no selection + UpdateSelections(0, 0, m_data.Size() ); + // generate HighLight + CleanHighLight(); + GenerateHighLightAt(0, m_data.Size()); + CountNumberOfLines(); + return true; + } + return false; +} + + +void EdnBuf::GetAll(EdnVectorBin &text) +{ + // Clean output vector + text.Clear(); + // Set data on the vector + m_data.Get(0, m_data.Size(), text); +} + + +void EdnBuf::SetAll(EdnVectorBin &text) +{ + EdnVectorBin deletedText; + + // extract all data of the buffer : + GetAll(deletedText); + + // Remove all data in the buffer: + m_data.Clear(); + + // inset text data : + m_data.Insert(0, text); + + // Zero all of the existing selections + UpdateSelections(0, deletedText.Size(), 0); + + // Call the modification Event Manager + eventModification(0, m_data.Size(), deletedText); +} + +void EdnBuf::GetRange(int32_t start, int32_t end, EdnVectorBin &output) +{ + // Remove all data ... + output.Clear(); + // import data : + m_data.Get(start, end-start, output); + //EDN_DEBUG("request start=" << start << " end="<< end << " size="<< end-start << " result size=" << output.Size() ); +} + + +/** + * @brief Get an element at the selected position + * + * @param[in] pos Charecters Position, [0..n] + * + * @return The character at buffer position "pos" + * + */ +int8_t EdnBuf::operator[] (int32_t pos) +{ + int8_t res = m_data.Get(pos); + return res; +} + + +/** + * @brief Insert Data in the Buffer + * + * @param[in] pos Position in the Buffer + * @param[in] insertText Text to insert + * + * @return --- + * + */ +void EdnBuf::Insert(int32_t pos, EdnVectorBin &insertText) +{ + // if pos is not contiguous to existing text, make it + pos = edn_average(0, pos, m_data.Size() ); + // insert Data + insert(pos, insertText); + + // Call the redisplay ... + EdnVectorBin deletedText; + eventModification(pos, insertText.Size(), deletedText); +} + + +/** + * @brief Replace data in the buffer + * + * @param[in] start Position started in the buffer + * @param[in] end Position ended in the buffer + * @param[in] insertText Test to set in the range [start..end] + * + * @return --- + * + */ +void EdnBuf::Replace(int32_t start, int32_t end, EdnVectorBin &insertText) +{ + EdnVectorBin deletedText; + GetRange(start, end, deletedText); + m_data.Replace(start, end-start, insertText); + // update internal elements + eventModification(start, insertText.Size(), deletedText); +} + + +/** + * @brief Remove data between [start..end] + * + * @param[in] start Position started in the buffer + * @param[in] end Position ended in the buffer + * + * @return --- + * + */ +void EdnBuf::Remove(int32_t start, int32_t end) +{ + + EdnVectorBin deletedText; + // Make sure the arguments make sense + if (start > end) { + int32_t temp = start; + start = end; + end = temp; + } + start = edn_average(0 , start, m_data.Size()); + end = edn_average(0 , end, m_data.Size()); + + // Remove and redisplay + GetRange(start, end, deletedText); + m_data.Remove(start, end - start); + eventModification(start, 0, deletedText); +} + +/** + * @brief Get the current tabulation distance + * + * @param --- + * + * @return The current tabulation size + * + */ +int32_t EdnBuf::GetTabDistance(void) +{ + return m_tabDist; +} + + +/** + * @brief Set the current Tabulation size + * + * @param[in] tabDist The new tabulation size + * + * @return --- + * + */ +void EdnBuf::SetTabDistance(int32_t tabDist) +{ + // Change the tab setting + m_tabDist = tabDist; +} + + +/** + * @brief Get the data of a specific line + * + * @param[in] pos Position in a line that might be geted + * @param[out] text Data in the current line at pos + * + * @return --- + * + */ +void EdnBuf::GetLineText(int32_t pos, EdnVectorBin &text) +{ + GetRange( StartOfLine(pos), EndOfLine(pos), text); +} + + +/** + * @brief Find the position of the start of the current line + * + * @param[in] pos position inside the line whe we need to find the start + * + * @return position of the start of the line + * + */ +int32_t EdnBuf::StartOfLine(int32_t pos) +{ + int32_t startPos; + if (false == SearchBackward(pos, '\n', &startPos)) { + return 0; + } + return startPos + 1; +} + + +/** + * @brief Find the position of the end of the current line + * + * @param[in] pos position inside the line whe we need to find the end + * + * @return position of the end of the line + * + */ +int32_t EdnBuf::EndOfLine(int32_t pos) +{ + int32_t endPos; + if (false == SearchForward(pos, '\n', &endPos)) { + endPos = m_data.Size(); + } + return endPos; +} + + +/** + * @brief Transform the current caracter in the buffer in a common display char + * + * @param[in] c Char that might be converted + * @param[in] indent Curent indentation befor the curent char + * @param[out] outStr string of the displayed element + * + * @return --- + * + */ +int32_t EdnBuf::GetExpandedChar(int32_t pos, int32_t indent, char outUTF8[MAX_EXP_CHAR_LEN]) +{ + return ExpandCharacter( m_data.Get(pos), indent, outUTF8); +} + + +/** + * @brief generate the real display of character of the output (ex : \t ==> 4 spaces or less ...) + * + * @param[in] c Char that might be converted + * @param[in] indent Curent indentation befor the curent char + * @param[out] outStr string of the displayed element + * + * @return size of the display + * + */ +int32_t EdnBuf::ExpandCharacter(char c, int32_t indent, char outUTF8[MAX_EXP_CHAR_LEN]) +{ + int32_t i, nSpaces; + + /* Convert tabs to spaces */ + if (c == '\t') { + nSpaces = m_tabDist - (indent % m_tabDist); + for (i=0; i m_data.Size() ) { + return m_data.Size(); + } + EdnVectorBuf::Iterator myPosIt = m_data.Position(startPos); + int32_t lineCount = 0; + //EDN_INFO("startPos=" << startPos << " nLines=" << nLines); + while(myPosIt) + { + if ('\n' == *myPosIt) { + lineCount++; + if (lineCount == nLines) { + //EDN_INFO(" ==> (1) at position=" << myPosIt.Position()+1 ); + return myPosIt.Position()+1; + } + } + myPosIt++; + } + //EDN_INFO(" ==> (2) at position=" << myPosIt.Position() ); + return myPosIt.Position(); +} + + +/** + * @brief Find the first character of the line "nLines" backwards + * + * @param[in,out] startPos Start position to count (this caracter is not counted) + * @param[in,out] nLines number of line to count (if ==0 means find the beginning of the line) + * + * @return position of the starting the line + * + */ +int32_t EdnBuf::CountBackwardNLines(int32_t startPos, int32_t nLines) +{ + if (startPos <= 0) { + return 0; + } else if (startPos > m_data.Size() ) { + startPos = m_data.Size(); + } + //EDN_INFO("startPos=" << startPos << " nLines=" << nLines); + + EdnVectorBuf::Iterator myPosIt = m_data.Position(startPos-1); + int32_t lineCount = -1; + + while(myPosIt) { + if ('\n' == *myPosIt) { + lineCount++; + if (lineCount >= nLines) { + //EDN_INFO(" ==> (1) at position=" << myPosIt.Position()+1 ); + return myPosIt.Position()+1; + } + } + myPosIt--; + } + //EDN_INFO(" ==> (2) at position=0"); + return 0; +} + + +bool EdnBuf::charMatch(char first, char second, bool caseSensitive) +{ + if (false == caseSensitive) { + if ('A' <= first && 'Z' >= first) { + first = first - 'A' + 'a'; + } + if ('A' <= second && 'Z' >= second) { + second = second - 'A' + 'a'; + } + } + if(first == second) { + //EDN_DEBUG("charMatch(" << first << ", " << second << ", " << caseSensitive << ") ==> true"); + return true; + } else { + //EDN_DEBUG("charMatch(" << first << ", " << second << ", " << caseSensitive << ") ==> false"); + return false; + } +} +#dfgdfgdfg /*sdfsdf*/ +/** + * @brief Search forwards in buffer + * + * @param[in] startPos Position to start the search + * @param[in] searchVect String to search + * @param[out] foundPos Current position founded + * + * @return true ==> found data + * @return false ==> not found data + * + */ +bool EdnBuf::SearchForward(int32_t startPos, EdnVectorBin &searchVect, int32_t *foundPos, bool caseSensitive) +{ + int32_t position; + int32_t searchLen = searchVect.Size(); + int32_t dataLen = m_data.Size(); + char currentChar = '\0'; + //EDN_INFO(" startPos=" << startPos << " searchLen=" << searchLen); + for (position=startPos; position found data + * @return false ==> not found data + * + */ +bool EdnBuf::SearchBackward(int32_t startPos, EdnVectorBin &searchVect, int32_t *foundPos, bool caseSensitive) +{ + int32_t position; + int32_t searchLen = searchVect.Size(); + char currentChar = '\0'; + //EDN_INFO(" startPos=" << startPos << " searchLen=" << searchLen); + for (position=startPos; position>=searchLen-1; position--) { + currentChar = m_data[position]; + if (true == charMatch(currentChar, searchVect[searchLen-1], caseSensitive)) { + int32_t i; + bool found = true; + for (i=searchLen-1; i>=0; i--) { + currentChar = m_data[position - (searchLen-1) + i]; + if (false == charMatch(currentChar, searchVect[i], caseSensitive)) { + found = false; + break; + } + } + if (true == found) { + *foundPos = position - (searchLen-1); + return true; + } + } + } + *foundPos = m_data.Size(); + return false; +} + +static bool isChar(char value) +{ + if( ('a' <= value && 'z' >= value) + || ('A' <= value && 'Z' >= value) + || ('0' <= value && '9' >= value) + || '_' == value + || '~' == value) + { + //EDN_DEBUG(" is a char \"" << value << "\""); + return true; + } + //EDN_DEBUG(" is NOT a char \"" << value << "\""); + return false; +} + + +bool EdnBuf::SelectAround(int32_t startPos, int32_t &beginPos, int32_t &endPos) +{ + char currentChar = m_data[startPos]; + if( '\t' == currentChar + || ' ' == currentChar) + { + EDN_DEBUG("select spacer"); + // special case we are looking for separation + for (beginPos=startPos; beginPos>=0; beginPos--) { + currentChar = m_data[beginPos]; + if( '\t' != currentChar + && ' ' != currentChar) + { + beginPos++; + break; + } + } + // special case we are looking for separation + for (endPos=startPos; endPos=0; beginPos--) { + currentChar = m_data[beginPos]; + if( false == isChar(currentChar)) { + beginPos++; + break; + } + } + // Search forward + for (endPos=startPos; endPos=0; beginPos--) { + currentChar = m_data[beginPos]; + if(comparechar != currentChar) + { + beginPos++; + break; + } + } + // Search forward + for (endPos=startPos; endPos &insertText) +{ + // Insert data in buffer + m_data.Insert(pos, insertText); + // update the current selected area + UpdateSelections(pos, 0, insertText.Size() ); + // return the number of element inserted ... + return insertText.Size(); +} + + + + +/** + * @brief + * + * @param[in,out] --- + * + * @return --- + * + */ +// TODO : Reprog this ??? +static void addPadding(char *string, int32_t startIndent, int32_t toIndent, int32_t tabDist, int32_t useTabs, int32_t *charsAdded) +{ +/* + char *outPtr; + int32_t len, indent; + + indent = startIndent; + outPtr = string; + if (useTabs) { + while (indent < toIndent) { + len = CharWidth('\t', indent); + if( len > 1 + && indent + len <= toIndent) + { + *outPtr++ = '\t'; + indent += len; + } else { + *outPtr++ = ' '; + indent++; + } + } + } else { + while (indent < toIndent) { + *outPtr++ = ' '; + indent++; + } + } + *charsAdded = outPtr - string; +*/ +} + +/** + * @brief when modification appeare in the buffer we save it in the undo vector... + * + * @param[in] pos position of the add or remove + * @param[in] nInserted nb element inserted + * @param[in] deletedText Deleted elevent in a vector + * + * @return --- + * + */ +void EdnBuf::eventModification(int32_t pos, int32_t nInserted, EdnVectorBin &deletedText) +{ + if( 0 == deletedText.Size() + && 0 == nInserted) + { + // we do nothing ... + //EDN_INFO("EdnBuf::eventModification(pos="< not efficent methode ... + // ==> better methode : just update the number of line added and removed ... + //EDN_INFO(" add=" << CountLines(pos, pos+nInserted) << " lines | remove="<< CountLines(deletedText) << " lines"); + m_nbLine += CountLines(pos, pos+nInserted) - CountLines(deletedText); + // Update histories + if (false == m_isUndoProcessing) { + // normal or Redo processing + EdnBufHistory *exempleHistory = new EdnBufHistory(pos, nInserted, deletedText); + m_historyUndo.PushBack(exempleHistory); + if (false == m_isRedoProcessing) { + // remove all element in the redo system ... + int32_t i; + for (i=m_historyRedo.Size()-1; i>=0; i--) { + if (NULL != m_historyRedo[i]) { + delete(m_historyRedo[i]); + } + m_historyRedo.PopBack(); + } + } + } else { + // undo processing ==> add element in Redo vector ... + EdnBufHistory *exempleHistory = new EdnBufHistory(pos, nInserted, deletedText); + m_historyRedo.PushBack(exempleHistory); + } + // Regenerate the Highlight : + RegenerateHighLightAt(pos, deletedText.Size(), nInserted); + } +} + + + + + +/** + * @brief Search a character in the current buffer + * + * @param[in] startPos Position to start the search of the element + * @param[in] searchChar Character to search + * @param[out] foundPos Position where it was found + * + * @return true when find element + * + */ +bool EdnBuf::SearchForward(int32_t startPos, char searchChar, int32_t *foundPos) +{ + // Create iterator + EdnVectorBuf::Iterator myPosIt = m_data.Position(startPos); + // move in the string + while (myPosIt) { + if (*myPosIt == searchChar) { + *foundPos = myPosIt.Position(); + return true; + } + myPosIt++; + } + *foundPos = m_data.Size(); + return false; +} + + +/** + * @brief Search a character in the current buffer (backward + * + * @param[in] startPos Position to start the search of the element + * @param[in] searchChar Character to search + * @param[out] foundPos Position where it was found + * + * @return true when find element + * + */ +bool EdnBuf::SearchBackward(int32_t startPos, char searchChar, int32_t *foundPos) +{ + // Create iterator + EdnVectorBuf::Iterator myPosIt = m_data.Position(startPos-1); + // move in the string + while (myPosIt) { + if (*myPosIt == searchChar) { + *foundPos = myPosIt.Position(); + return true; + } + myPosIt--; + } + *foundPos = 0; + return false; +} + + +/** + * @brief Measure the width in the buffer input + * + * @param[in] text Buffer input + * @param[in] tabDist T bulation size + * + * @return maxWidth + * + */ +static int32_t textWidth(EdnVectorBin &text, int32_t tabDist) +{ +EDN_ERROR("REPROGRAM this fuction"); +/* + EdnVectorBin::Iterator myPosIt = text.Begin(); + int32_t width = 0, maxWidth = 0; + + while(myPosIt) { + if ('\n' == *myPosIt) { + if (width > maxWidth) { + maxWidth = width; + } + width = 0; + } else { + width += CharWidth(*myPosIt, width); + } + myPosIt++; + } + if (width > maxWidth) { + return width; + } + return maxWidth; +*/ +} + + diff --git a/tools/exampleCustumWidget/Makefile b/tools/exampleCustumWidget/Makefile new file mode 100644 index 0000000..cf4e87c --- /dev/null +++ b/tools/exampleCustumWidget/Makefile @@ -0,0 +1,168 @@ +################################################################################################################## +# # +# Fichier : Makefile # +# # +# Type : Makefile d'un programme complet # +# # +# Auteur : Heero Yui # +# # +# Evolutions : Date Auteur Raison # +# 2010-01-29 Heero Yui Mise en place d'un makefile ultra simple # +# # +# Concu Pour le projet edn # +# # +################################################################################################################## +export F_GRAS= +export F_INVERSER= +export F_SOUSLIGNER= +export F_NORMALE= +export F_NOIR= +export F_ROUGE= +export F_VERT= +export F_MARRON= +export F_BLUE= +export F_VIOLET= +export F_CYAN= +export F_GRIS= +export CADRE_HAUT_BAS=' $(F_INVERSER) $(F_NORMALE)' +export CADRE_COTERS=' $(F_INVERSER) $(F_NORMALE) $(F_INVERSER) $(F_NORMALE)' + + +############################################################################### +### Compilateur base system ### +############################################################################### +CXX=$(BIN_PREFIX)g++ +CC=$(BIN_PREFIX)gcc +AR=$(BIN_PREFIX)ar + +############################################################################### +### Compilation Define ### +############################################################################### +DEFINE= -DEDN_DEBUG_LEVEL=3 + + + + +############################################################################### +### Basic Cfags ### +############################################################################### + +# basic GTK librairy +CXXFLAGS= `pkg-config --cflags --libs gtk+-2.0` +#CXXFLAGS= `wx-config --libs --cppflags` +# Linux thread system +CXXFLAGS+= -lpthread +# Enable debug (cgdb edn) +CXXFLAGS+= -g -O0 +#CXXFLAGS+= -O2 +# display all flags +CXXFLAGS+= -Wall +# ... +CXXFLAGS+= -D_REENTRANT +# internal defines +CXXFLAGS+= $(DEFINE) + +CFLAGS= $(CXXFLAGS) -std=c99 + +# basic GTK librairy +LDFLAGS= `pkg-config --cflags --libs gtk+-2.0` +#LDFLAGS= `wx-config --libs --cppflags` +# Linux thread system +LDFLAGS+= -lpthread +# Dynamic connection of the CALLBACK of the GUI +LDFLAGS+= -Wl,--export-dynamic + +############################################################################### +### Project Name ### +############################################################################### +OUTPUT_NAME=example + +############################################################################### +### Basic Project description Files ### +############################################################################### +FILE_DIRECTORY=Sources +OBJECT_DIRECTORY=Object + +############################################################################### +### Generique dependency ### +############################################################################### +MAKE_DEPENDENCE=Makefile + +############################################################################### +### Liste of folder where .h can be ### +############################################################################### +LISTE_MODULES = . + + +INCLUDE_DIRECTORY = $(addprefix -I$(FILE_DIRECTORY)/, $(LISTE_MODULES)) + +############################################################################### +### Files Listes ### +############################################################################### + +CFILES= \ + main.c \ + cpu.c \ +############################################################################### +### Build Object Files List ### +############################################################################### +OBJ = $(addprefix $(OBJECT_DIRECTORY)/, $(CFILES:.c=.o)) + + + +############################################################################### +### Main Part of Makefile ### +############################################################################### +all: build + +-include $(OBJ:.o=.d) + +build: .encadrer $(OUTPUT_NAME) $(MAKE_DEPENDENCE) + +.encadrer: + @echo $(CADRE_HAUT_BAS) + @echo $(CADRE_COTERS) + @echo ' DEBUT DE COMPILATION DU PROGRAMME :'$(CADRE_COTERS) + @echo ' Repertoire Sources : $(FILE_DIRECTORY)/'$(CADRE_COTERS) + @echo ' Repertoire object : $(OBJECT_DIRECTORY)/'$(CADRE_COTERS) + @echo ' Binaire de sortie : $(F_VIOLET)$(OUTPUT_NAME) / $(OUTPUT_NAME)-stripped$(F_NORMALE)'$(CADRE_COTERS) + @echo $(CADRE_COTERS) + @echo $(CADRE_HAUT_BAS) + @mkdir -p $(OBJECT_DIRECTORY)/ + + + + +# build C +$(OBJECT_DIRECTORY)/%.o: $(FILE_DIRECTORY)/%.c $(MAKE_DEPENDENCE) + @echo $(F_VERT)" (.o) $<"$(F_NORMALE) + @#echo $(CXX) $< -c -o $@ $(INCLUDE_DIRECTORY) $(CXXFLAGS) -MMD + @$(CXX) $< -c -o $@ $(INCLUDE_DIRECTORY) $(CXXFLAGS) -MMD + +# build C++ +$(OBJECT_DIRECTORY)/%.o: $(FILE_DIRECTORY)/%.cpp $(MAKE_DEPENDENCE) + @echo $(F_VERT)" (.o) $<"$(F_NORMALE) + @#echo $(CXX) $< -c -o $@ $(INCLUDE_DIRECTORY) $(CXXFLAGS) -MMD + @$(CXX) $< -c -o $@ $(INCLUDE_DIRECTORY) $(CXXFLAGS) -MMD + +# build binary +$(OUTPUT_NAME): $(OBJ) + @echo $(F_ROUGE)" (bin) $@ & $@-stripped"$(F_NORMALE) + @$(CXX) $(OBJ) $(LDFLAGS) -o $@ + @cp $@ $@-stripped + @strip -s $@-stripped + + +clean: + @echo $(CADRE_HAUT_BAS) + @echo ' CLEANING : $(F_VIOLET)$(OUTPUT_NAME)$(F_NORMALE)'$(CADRE_COTERS) + @echo $(CADRE_HAUT_BAS) + @echo Remove Folder : $(OBJECT_DIRECTORY) + @rm -rf $(OBJECT_DIRECTORY) + @echo Remove File : $(OUTPUT_NAME) + @rm -f $(OUTPUT_NAME) + @echo Remove File : $(OUTPUT_NAME)-stripped + @rm -f $(OUTPUT_NAME)-stripped + + + diff --git a/tools/exampleCustumWidget/Sources/cpu.c b/tools/exampleCustumWidget/Sources/cpu.c new file mode 100644 index 0000000..33bbf37 --- /dev/null +++ b/tools/exampleCustumWidget/Sources/cpu.c @@ -0,0 +1,205 @@ +/* cpu.c */ + +#include "cpu.h" + + +static void gtk_cpu_class_init(GtkCpuClass *klass); +static void gtk_cpu_init(GtkCpu *cpu); +static void gtk_cpu_size_request(GtkWidget *widget, GtkRequisition *requisition); +static void gtk_cpu_size_allocate(GtkWidget *widget, GtkAllocation *allocation); +static void gtk_cpu_realize(GtkWidget *widget); +static gboolean gtk_cpu_expose(GtkWidget *widget, GdkEventExpose *event); +static void gtk_cpu_paint(GtkWidget *widget); +static void gtk_cpu_destroy(GtkObject *object); + + +GtkType gtk_cpu_get_type(void) +{ + static GtkType gtk_cpu_type = 0; + + if (!gtk_cpu_type) { + static const GtkTypeInfo gtk_cpu_info = { + "GtkCpu", + sizeof(GtkCpu), + sizeof(GtkCpuClass), + (GtkClassInitFunc) gtk_cpu_class_init, + (GtkObjectInitFunc) gtk_cpu_init, + NULL, + NULL, + (GtkClassInitFunc) NULL + }; + gtk_cpu_type = gtk_type_unique(GTK_TYPE_WIDGET, >k_cpu_info); + } + + + return gtk_cpu_type; +} + +void gtk_cpu_set_state(GtkCpu *cpu, gint num) +{ + cpu->sel = num; + gtk_cpu_paint(GTK_WIDGET(cpu)); +} + + +GtkWidget * gtk_cpu_new() +{ + return GTK_WIDGET(gtk_type_new(gtk_cpu_get_type())); +} + + +static void gtk_cpu_class_init(GtkCpuClass *klass) +{ + GtkWidgetClass *widget_class; + GtkObjectClass *object_class; + + + widget_class = (GtkWidgetClass *) klass; + object_class = (GtkObjectClass *) klass; + + widget_class->realize = gtk_cpu_realize; + widget_class->size_request = gtk_cpu_size_request; + widget_class->size_allocate = gtk_cpu_size_allocate; + widget_class->expose_event = gtk_cpu_expose; + + object_class->destroy = gtk_cpu_destroy; +} + + +static void gtk_cpu_init(GtkCpu *cpu) +{ + cpu->sel = 0; +} + + +static void gtk_cpu_size_request(GtkWidget *widget, + GtkRequisition *requisition) +{ + g_return_if_fail(widget != NULL); + g_return_if_fail(GTK_IS_CPU(widget)); + g_return_if_fail(requisition != NULL); + + requisition->width = 80; + requisition->height = 100; +} + + +static void gtk_cpu_size_allocate(GtkWidget *widget, + GtkAllocation *allocation) +{ + g_return_if_fail(widget != NULL); + g_return_if_fail(GTK_IS_CPU(widget)); + g_return_if_fail(allocation != NULL); + + widget->allocation = *allocation; + + if (GTK_WIDGET_REALIZED(widget)) { + gdk_window_move_resize( + widget->window, + allocation->x, allocation->y, + allocation->width, allocation->height + ); + } +} + + +static void gtk_cpu_realize(GtkWidget *widget) +{ + GdkWindowAttr attributes; + guint attributes_mask; + + g_return_if_fail(widget != NULL); + g_return_if_fail(GTK_IS_CPU(widget)); + + GTK_WIDGET_SET_FLAGS(widget, GTK_REALIZED); + + attributes.window_type = GDK_WINDOW_CHILD; + attributes.x = widget->allocation.x; + attributes.y = widget->allocation.y; + attributes.width = 80; + attributes.height = 100; + + attributes.wclass = GDK_INPUT_OUTPUT; + attributes.event_mask = gtk_widget_get_events(widget) | GDK_EXPOSURE_MASK; + + attributes_mask = GDK_WA_X | GDK_WA_Y; + + widget->window = gdk_window_new( + gtk_widget_get_parent_window (widget), + & attributes, attributes_mask + ); + + gdk_window_set_user_data(widget->window, widget); + + widget->style = gtk_style_attach(widget->style, widget->window); + gtk_style_set_background(widget->style, widget->window, GTK_STATE_NORMAL); +} + + +static gboolean gtk_cpu_expose(GtkWidget *widget, GdkEventExpose *event) +{ + g_return_val_if_fail(widget != NULL, FALSE); + g_return_val_if_fail(GTK_IS_CPU(widget), FALSE); + g_return_val_if_fail(event != NULL, FALSE); + + gtk_cpu_paint(widget); + + return FALSE; +} + + +static void gtk_cpu_paint(GtkWidget *widget) +{ + cairo_t *cr; + + cr = gdk_cairo_create(widget->window); + + cairo_translate(cr, 0, 7); + + cairo_set_source_rgb(cr, 0, 0, 0); + cairo_paint(cr); + + gint pos = GTK_CPU(widget)->sel; + gint rect = pos / 5; + + cairo_set_source_rgb(cr, 0.2, 0.4, 0); + + gint i; + for ( i = 1; i <= 20; i++) { + if (i > 20 - rect) { + cairo_set_source_rgb(cr, 0.6, 1.0, 0); + } else { + cairo_set_source_rgb(cr, 0.2, 0.4, 0); + } + cairo_rectangle(cr, 8, i*4, 30, 3); + cairo_fill(cr); + if (i > 20 - rect) { + cairo_set_source_rgb(cr, 0.9, 1.0, 0); + } else { + cairo_set_source_rgb(cr, 0.4, 0.4, 0); + } + cairo_rectangle(cr, 42, i*4, 30, 3); + cairo_fill(cr); + } + + cairo_destroy(cr); +} + + +static void gtk_cpu_destroy(GtkObject *object) +{ + GtkCpu *cpu; + GtkCpuClass *klass; + + g_return_if_fail(object != NULL); + g_return_if_fail(GTK_IS_CPU(object)); + + cpu = GTK_CPU(object); +/* + klass = gtk_type_class( gtk_widget_get_type() ); + + if (GTK_OBJECT_CLASS(klass)->destroy) { + (* GTK_OBJECT_CLASS(klass)->destroy) (object); + } +*/ +} diff --git a/tools/exampleCustumWidget/Sources/cpu.h b/tools/exampleCustumWidget/Sources/cpu.h new file mode 100644 index 0000000..9d7f6c9 --- /dev/null +++ b/tools/exampleCustumWidget/Sources/cpu.h @@ -0,0 +1,39 @@ +/* cpu.h */ + +#ifndef __CPU_H +#define __CPU_H + +#include +#include + +G_BEGIN_DECLS + + +#define GTK_CPU(obj) GTK_CHECK_CAST(obj, gtk_cpu_get_type (), GtkCpu) +#define GTK_CPU_CLASS(klass) GTK_CHECK_CLASS_CAST(klass, gtk_cpu_get_type(), GtkCpuClass) +#define GTK_IS_CPU(obj) GTK_CHECK_TYPE(obj, gtk_cpu_get_type()) + + +typedef struct _GtkCpu GtkCpu; +typedef struct _GtkCpuClass GtkCpuClass; + + +struct _GtkCpu { + GtkWidget widget; + + gint sel; +}; + +struct _GtkCpuClass { + GtkWidgetClass parent_class; +}; + + +GtkType gtk_cpu_get_type(void); +void gtk_cpu_set_sel(GtkCpu *cpu, gint sel); +GtkWidget * gtk_cpu_new(); + + +G_END_DECLS + +#endif /* __CPU_H */ diff --git a/tools/exampleCustumWidget/Sources/main.c b/tools/exampleCustumWidget/Sources/main.c new file mode 100644 index 0000000..3313162 --- /dev/null +++ b/tools/exampleCustumWidget/Sources/main.c @@ -0,0 +1,61 @@ +/* main.c */ + +#include "cpu.h" + + +static void set_value(GtkWidget * widget, gpointer data) +{ + GdkRegion *region; + + GtkRange *range = (GtkRange *) widget; + GtkWidget *cpu = (GtkWidget *) data; + GTK_CPU(cpu)->sel = gtk_range_get_value(range); + + region = gdk_drawable_get_clip_region(cpu->window); + gdk_window_invalidate_region(cpu->window, region, TRUE); + gdk_window_process_updates(cpu->window, TRUE); +} + + +int main (int argc, char ** argv) +{ + GtkWidget *window; + GtkWidget *cpu; + GtkWidget *fixed; + GtkWidget *scale; + + gtk_init(&argc, &argv); + + + window = gtk_window_new(GTK_WINDOW_TOPLEVEL); + gtk_window_set_title(GTK_WINDOW(window), "CPU widget"); + gtk_window_set_position(GTK_WINDOW(window), GTK_WIN_POS_CENTER); + gtk_window_set_default_size(GTK_WINDOW(window), 200, 180); + + + g_signal_connect(G_OBJECT(window), "destroy", + G_CALLBACK(gtk_main_quit), NULL); + + fixed = gtk_fixed_new(); + gtk_container_add(GTK_CONTAINER(window), fixed); + + cpu = gtk_cpu_new(); + gtk_fixed_put(GTK_FIXED(fixed), cpu, 30, 40); + + + scale = gtk_vscale_new_with_range(0.0, 100.0, 1.0); + gtk_range_set_inverted(GTK_RANGE(scale), TRUE); + gtk_scale_set_value_pos(GTK_SCALE(scale), GTK_POS_TOP); + gtk_widget_set_size_request(scale, 50, 120); + gtk_fixed_put(GTK_FIXED(fixed), scale, 130, 20); + + g_signal_connect(G_OBJECT(scale), "value_changed", + G_CALLBACK(set_value), (gpointer) cpu); + + gtk_widget_show(cpu); + gtk_widget_show(fixed); + gtk_widget_show_all(window); + gtk_main(); + + return 0; +} diff --git a/tools/pngToCpp/pngToCpp.c b/tools/pngToCpp/pngToCpp.c new file mode 100644 index 0000000..5fbb7cb --- /dev/null +++ b/tools/pngToCpp/pngToCpp.c @@ -0,0 +1,202 @@ +/** + ******************************************************************************* + * @file pngToCpp.cpp + * @brief convert a binary file into a C source vector + * @author Sandro Sigala + * @date 26/01/2011 + * @par Project + * --- + * + * @par Copyright + * Copyright 2010 Edouard DUPIN, all right reserved + * + * This software is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY. + * + * Licence summary : + * You can modify and redistribute the sources code and binaries. + * You can send me the bug-fix + * You can not earn money with this Software (if the source extract from Edn + * represent less than 50% of original Sources) + * Term of the licence in in the file licence.txt. + * + * @compilation g++ pngToCpp -o pngToCpp + * + ******************************************************************************* + */ + +#include +#include +#include +#include + +#ifndef PATH_MAX +#define PATH_MAX 1024 +#endif + +bool zeroTerminated = false; + +int myfgetc(FILE *f) +{ + int c = fgetc(f); + if (c == EOF && zeroTerminated) + { + zeroTerminated = 0; + return 0; + } + return c; +} + +void generateHeader(FILE *file) +{ + fprintf(file, "/**\n"); + fprintf(file, " ******************************************************************************* \n"); + fprintf(file, " * \n"); + fprintf(file, " * @par Project\n"); + fprintf(file, " * Edn\n"); + fprintf(file, " * \n"); + fprintf(file, " * Automatic generated file for Edn Software\n"); + fprintf(file, " * Please do not save this file on File configuration server\n"); + fprintf(file, " * \n"); + fprintf(file, " * @par Copyright\n"); + fprintf(file, " * \n"); + fprintf(file, " * Copyright 2010 Edouard DUPIN, all right reserved\n"); + fprintf(file, " * \n"); + fprintf(file, " * his software is distributed in the hope that it will be useful, but WITHOUT\n"); + fprintf(file, " * ANY WARRANTY.\n"); + fprintf(file, " * \n"); + fprintf(file, " * Licence summary : \n"); + fprintf(file, " * You can modify and redistribute the sources code and binaries.\n"); + fprintf(file, " * You can send me the bug-fix\n"); + fprintf(file, " * You can not earn money with this Software (if the source extract from Edn\n"); + fprintf(file, " * represent less than 50/100 of original Sources)\n"); + fprintf(file, " * Term of the licence in in the file licence.txt.\n"); + fprintf(file, " * \n"); + fprintf(file, " ******************************************************************************* \n"); + fprintf(file, " */\n\n"); +} + +FILE *ofile=NULL; +FILE *ofileH=NULL; + +void process(const char *ifname) +{ + FILE *ifile=NULL; + ifile = fopen(ifname, "rb"); + if (ifile == NULL) + { + fprintf(stderr, "cannot open %s for reading\n", ifname); + exit(1); + } + char buf[PATH_MAX], *p; + const char *cp; + if ((cp = strrchr(ifname, '/')) != NULL) + { + ++cp; + } else { + if ((cp = strrchr(ifname, '\\')) != NULL) + ++cp; + else + cp = ifname; + } + strcpy(buf, cp); + for (p = buf; *p != '\0'; ++p) + { + if (!isalnum(*p)) + *p = '_'; + } + fprintf(ofile, "unsigned char %s[] = {\n\t\t", buf); + int n = 0; + unsigned char c = 0; + while(fread(&c, 1, 1, ifile) == 1) + { + if(n%100 == 0) { + fprintf(ofile, "\n\t\t"); + } + fprintf(ofile, "0x%02x,", c); + n++; + } + fprintf(ofile, "\n};\n"); + fprintf(ofile, "unsigned long int %s_size = sizeof(%s);\n\n\n", buf, buf); + + fprintf(ofileH, "extern unsigned char %s[];\n", buf); + fprintf(ofileH, "extern unsigned long int %s_size;\n", buf); + + fclose(ifile); +} + +void usage(void) +{ + fprintf(stderr, "usage: pngToCpp .xxx \n"); + exit(1); +} + +int main(int argc, char **argv) +{ + //zeroTerminated = true; + if (argc < 3) { + usage(); + } + // dynamic output name : + char tmpOutput[PATH_MAX*2] = ""; + strcpy(tmpOutput, argv[1]); + int32_t sizeName = strlen(tmpOutput); + if (6>=sizeName) { + usage(); + } + if (tmpOutput[sizeName-1] == '.') { + tmpOutput[sizeName-1] = '\0'; + } else if (tmpOutput[sizeName-2] == '.') { + tmpOutput[sizeName-2] = '\0'; + } else if (tmpOutput[sizeName-3] == '.') { + tmpOutput[sizeName-3] = '\0'; + } else if (tmpOutput[sizeName-4] == '.') { + tmpOutput[sizeName-4] = '\0'; + } else if (tmpOutput[sizeName-5] == '.') { + tmpOutput[sizeName-5] = '\0'; + } else if (tmpOutput[sizeName-6] == '.') { + tmpOutput[sizeName-6] = '\0'; + } + //fprintf(stderr, "writing to %s\n", tmpOutput); + + char tmpOutputCPP[PATH_MAX*2] = ""; + char tmpOutputH[PATH_MAX*2] = ""; + // Generate the output filename + sprintf(tmpOutputCPP,"%s.cpp", tmpOutput); + sprintf(tmpOutputH,"%s.h", tmpOutput); + // open destination name : + ofile = fopen(tmpOutputCPP, "wb"); + if (ofile == NULL) + { + fprintf(stderr, "cannot open %s for writing\n", tmpOutputCPP); + exit(1); + } + generateHeader(ofile); + ofileH = fopen(tmpOutputH, "wb"); + if (ofileH == NULL) + { + fprintf(stderr, "cannot open %s for writing\n", tmpOutputH); + exit(1); + } + generateHeader(ofileH); + fprintf(ofileH, "#ifndef __INPUT_PNG_FILE_GENERATED_H__\n"); + fprintf(ofileH, "#define __INPUT_PNG_FILE_GENERATED_H__\n"); + //fprintf(ofileH, "#ifdef __cplusplus\nextern \"C\" {\n#endif\n"); + //fprintf(ofile, "#ifdef __cplusplus\nextern \"C\" {\n#endif\n"); + + // Generate the output + int32_t i; + for(i=2; i