[DEV] work corectly with refcounting object (and remove some memory leek at close)
This commit is contained in:
parent
9b21e5c769
commit
3ec3fa00d9
@ -68,7 +68,7 @@ namespace appl {
|
|||||||
/**
|
/**
|
||||||
* @brief Basic destructor
|
* @brief Basic destructor
|
||||||
*/
|
*/
|
||||||
~Iterator() {
|
virtual ~Iterator() {
|
||||||
m_current = 0;
|
m_current = 0;
|
||||||
m_data = NULL;
|
m_data = NULL;
|
||||||
m_value = u32char::Null;
|
m_value = u32char::Null;
|
||||||
@ -294,7 +294,7 @@ namespace appl {
|
|||||||
static const char* const eventChangeName;
|
static const char* const eventChangeName;
|
||||||
public:
|
public:
|
||||||
Buffer();
|
Buffer();
|
||||||
~Buffer();
|
virtual ~Buffer();
|
||||||
private:
|
private:
|
||||||
bool m_hasFileName; //!< when new file, the buffer has no name ==> but it might be reference with a single name ...
|
bool m_hasFileName; //!< when new file, the buffer has no name ==> but it might be reference with a single name ...
|
||||||
std::string m_fileName; //!< name of the file (with his path)
|
std::string m_fileName; //!< name of the file (with his path)
|
||||||
|
@ -20,7 +20,7 @@ namespace appl {
|
|||||||
protected:
|
protected:
|
||||||
BufferManager();
|
BufferManager();
|
||||||
public:
|
public:
|
||||||
~BufferManager();
|
virtual ~BufferManager();
|
||||||
private:
|
private:
|
||||||
std::list<ewol::object::Owner<appl::Buffer>> m_list; // list of all buffer curently open
|
std::list<ewol::object::Owner<appl::Buffer>> m_list; // list of all buffer curently open
|
||||||
public:
|
public:
|
||||||
|
@ -17,7 +17,7 @@ namespace appl {
|
|||||||
public:
|
public:
|
||||||
// Constructeur
|
// Constructeur
|
||||||
GlyphDecoration(const std::string& _newColorName = "no_name");
|
GlyphDecoration(const std::string& _newColorName = "no_name");
|
||||||
~GlyphDecoration() {
|
virtual ~GlyphDecoration() {
|
||||||
// nothing to do ...
|
// nothing to do ...
|
||||||
};
|
};
|
||||||
private:
|
private:
|
||||||
|
@ -25,7 +25,7 @@ namespace appl {
|
|||||||
m_buffer(_buffer) {
|
m_buffer(_buffer) {
|
||||||
|
|
||||||
};
|
};
|
||||||
~dataBufferStruct() { };
|
virtual ~dataBufferStruct() { };
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -51,7 +51,7 @@ class BufferView : public ewol::widget::List {
|
|||||||
public:
|
public:
|
||||||
// Constructeur
|
// Constructeur
|
||||||
BufferView();
|
BufferView();
|
||||||
~BufferView();
|
virtual ~BufferView();
|
||||||
// Derived function
|
// Derived function
|
||||||
virtual void onReceiveMessage(const ewol::object::Message& _msg);
|
virtual void onReceiveMessage(const ewol::object::Message& _msg);
|
||||||
virtual void onObjectRemove(const ewol::object::Shared<ewol::Object>& _object);
|
virtual void onObjectRemove(const ewol::object::Shared<ewol::Object>& _object);
|
||||||
|
@ -165,7 +165,7 @@ MainWindows::MainWindows() {
|
|||||||
mySizerVert2->subWidgetAdd(myTextView);
|
mySizerVert2->subWidgetAdd(myTextView);
|
||||||
*/
|
*/
|
||||||
// search area :
|
// search area :
|
||||||
ewol::object::Shared<Search> mySearch = ewol::object::makeShared(new Search());
|
ewol::object::Shared<appl::widget::Search> mySearch = ewol::object::makeShared(new appl::widget::Search());
|
||||||
mySizerVert2->subWidgetAdd(mySearch);
|
mySizerVert2->subWidgetAdd(mySearch);
|
||||||
|
|
||||||
mySizerHori = ewol::object::makeShared(new ewol::widget::Sizer(ewol::widget::Sizer::modeHori));
|
mySizerHori = ewol::object::makeShared(new ewol::widget::Sizer(ewol::widget::Sizer::modeHori));
|
||||||
|
@ -23,7 +23,7 @@ class MainWindows : public ewol::widget::Windows {
|
|||||||
public:
|
public:
|
||||||
// Constructeur
|
// Constructeur
|
||||||
MainWindows();
|
MainWindows();
|
||||||
~MainWindows();
|
virtual ~MainWindows();
|
||||||
private:
|
private:
|
||||||
ewol::object::Shared<appl::BufferManager> m_bufferManager; //!< handle on the buffer manager
|
ewol::object::Shared<appl::BufferManager> m_bufferManager; //!< handle on the buffer manager
|
||||||
/**
|
/**
|
||||||
|
@ -28,7 +28,7 @@ const char* const l_eventWrapCb = "appl-wrap-CheckBox";
|
|||||||
const char* const l_eventForwardCb = "appl-forward-CheckBox";
|
const char* const l_eventForwardCb = "appl-forward-CheckBox";
|
||||||
const char* const l_eventHideBt = "appl-hide-button";
|
const char* const l_eventHideBt = "appl-hide-button";
|
||||||
|
|
||||||
Search::Search() :
|
appl::widget::Search::Search() :
|
||||||
ewol::widget::Composer(ewol::widget::Composer::file, "DATA:GUI-Search.xml"),
|
ewol::widget::Composer(ewol::widget::Composer::file, "DATA:GUI-Search.xml"),
|
||||||
m_viewerManager(NULL),
|
m_viewerManager(NULL),
|
||||||
m_forward(true),
|
m_forward(true),
|
||||||
@ -36,8 +36,8 @@ Search::Search() :
|
|||||||
m_wrap(true),
|
m_wrap(true),
|
||||||
m_searchEntry(NULL),
|
m_searchEntry(NULL),
|
||||||
m_replaceEntry(NULL) {
|
m_replaceEntry(NULL) {
|
||||||
addObjectType("appl::Search");
|
addObjectType("appl::widget::Search");
|
||||||
// load buffer manager:
|
// load buffer manager:onObjectRemove
|
||||||
m_viewerManager = appl::ViewerManager::keep();
|
m_viewerManager = appl::ViewerManager::keep();
|
||||||
// link event
|
// link event
|
||||||
registerOnEventNameWidget(this, "SEARCH:close", "pressed", l_eventHideBt);
|
registerOnEventNameWidget(this, "SEARCH:close", "pressed", l_eventHideBt);
|
||||||
@ -63,11 +63,11 @@ Search::Search() :
|
|||||||
hide();
|
hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
Search::~Search() {
|
appl::widget::Search::~Search() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Search::find() {
|
void appl::widget::Search::find() {
|
||||||
if (m_viewerManager == NULL) {
|
if (m_viewerManager == NULL) {
|
||||||
APPL_WARNING("No viewer manager selected!!!");
|
APPL_WARNING("No viewer manager selected!!!");
|
||||||
return;
|
return;
|
||||||
@ -103,7 +103,7 @@ void Search::find() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Search::replace() {
|
void appl::widget::Search::replace() {
|
||||||
if (m_viewerManager == NULL) {
|
if (m_viewerManager == NULL) {
|
||||||
APPL_WARNING("No viewer manager selected!!!");
|
APPL_WARNING("No viewer manager selected!!!");
|
||||||
return;
|
return;
|
||||||
@ -121,7 +121,7 @@ void Search::replace() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Search::onReceiveMessage(const ewol::object::Message& _msg) {
|
void appl::widget::Search::onReceiveMessage(const ewol::object::Message& _msg) {
|
||||||
ewol::widget::Composer::onReceiveMessage(_msg);
|
ewol::widget::Composer::onReceiveMessage(_msg);
|
||||||
APPL_INFO("Search receive message : " << _msg);
|
APPL_INFO("Search receive message : " << _msg);
|
||||||
if ( _msg.getMessage() == l_eventSearchEntry) {
|
if ( _msg.getMessage() == l_eventSearchEntry) {
|
||||||
@ -162,7 +162,7 @@ void Search::onReceiveMessage(const ewol::object::Message& _msg) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Search::onObjectRemove(const ewol::object::Shared<ewol::Object> _object) {
|
void appl::widget::Search::onObjectRemove(const ewol::object::Shared<ewol::Object>& _object) {
|
||||||
ewol::widget::Composer::onObjectRemove(_object);
|
ewol::widget::Composer::onObjectRemove(_object);
|
||||||
if (_object == m_searchEntry) {
|
if (_object == m_searchEntry) {
|
||||||
m_searchEntry.reset();
|
m_searchEntry.reset();
|
||||||
|
@ -14,35 +14,37 @@
|
|||||||
#include <ewol/widget/Entry.h>
|
#include <ewol/widget/Entry.h>
|
||||||
#include <appl/Buffer.h>
|
#include <appl/Buffer.h>
|
||||||
#include <appl/Gui/ViewerManager.h>
|
#include <appl/Gui/ViewerManager.h>
|
||||||
|
namespace appl {
|
||||||
class Search : public ewol::widget::Composer {
|
namespace widget {
|
||||||
private:
|
class Search : public ewol::widget::Composer {
|
||||||
ewol::object::Shared<appl::ViewerManager> m_viewerManager; //!< handle on the buffer manager
|
private:
|
||||||
bool m_forward;
|
ewol::object::Shared<appl::ViewerManager> m_viewerManager; //!< handle on the buffer manager
|
||||||
bool m_caseSensitive;
|
bool m_forward;
|
||||||
bool m_wrap;
|
bool m_caseSensitive;
|
||||||
ewol::object::Shared<ewol::widget::Entry> m_searchEntry;
|
bool m_wrap;
|
||||||
ewol::object::Shared<ewol::widget::Entry> m_replaceEntry;
|
ewol::object::Shared<ewol::widget::Entry> m_searchEntry;
|
||||||
std::u32string m_searchData;
|
ewol::object::Shared<ewol::widget::Entry> m_replaceEntry;
|
||||||
std::u32string m_replaceData;
|
std::u32string m_searchData;
|
||||||
public:
|
std::u32string m_replaceData;
|
||||||
// Constructeur
|
public:
|
||||||
Search();
|
// Constructeur
|
||||||
~Search();
|
Search();
|
||||||
private:
|
virtual ~Search();
|
||||||
/**
|
private:
|
||||||
* @brief Find the next element that corespond at the search
|
/**
|
||||||
*/
|
* @brief Find the next element that corespond at the search
|
||||||
void find();
|
*/
|
||||||
/**
|
void find();
|
||||||
* @brief Replace the current selected text.
|
/**
|
||||||
*/
|
* @brief Replace the current selected text.
|
||||||
void replace();
|
*/
|
||||||
public: // derived function
|
void replace();
|
||||||
virtual void onReceiveMessage(const ewol::object::Message& _msg);
|
public: // derived function
|
||||||
virtual void onObjectRemove(const ewol::object::Shared<ewol::Object> _removeObject);
|
virtual void onReceiveMessage(const ewol::object::Message& _msg);
|
||||||
|
virtual void onObjectRemove(const ewol::object::Shared<ewol::Object>& _object);
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@ namespace appl {
|
|||||||
fileLine(_line) {
|
fileLine(_line) {
|
||||||
|
|
||||||
};
|
};
|
||||||
~TagListElement() {
|
virtual ~TagListElement() {
|
||||||
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@ -44,7 +44,7 @@ namespace appl {
|
|||||||
int32_t m_colorIdBackgroundSelected; //!< Color of line selected.
|
int32_t m_colorIdBackgroundSelected; //!< Color of line selected.
|
||||||
public:
|
public:
|
||||||
TagFileList();
|
TagFileList();
|
||||||
~TagFileList();
|
virtual ~TagFileList();
|
||||||
// display API :
|
// display API :
|
||||||
virtual etk::Color<> getBasicBG();
|
virtual etk::Color<> getBasicBG();
|
||||||
uint32_t getNuberOfColomn();
|
uint32_t getNuberOfColomn();
|
||||||
|
@ -623,7 +623,7 @@ void appl::TextViewer::onReceiveMessage(const ewol::object::Message& _msg) {
|
|||||||
ewol::widget::WidgetScrolled::onReceiveMessage(_msg);
|
ewol::widget::WidgetScrolled::onReceiveMessage(_msg);
|
||||||
APPL_VERBOSE("receive msg: " << _msg);
|
APPL_VERBOSE("receive msg: " << _msg);
|
||||||
// First call plugin
|
// First call plugin
|
||||||
if (appl::textPluginManager::onReceiveMessage(*this, _msg) == true) {
|
if (appl::textPluginManager::onReceiveMessageViewer(*this, _msg) == true) {
|
||||||
markToRedraw();
|
markToRedraw();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -21,7 +21,7 @@ namespace appl {
|
|||||||
protected:
|
protected:
|
||||||
ViewerManager();
|
ViewerManager();
|
||||||
public:
|
public:
|
||||||
~ViewerManager();
|
virtual ~ViewerManager();
|
||||||
private:
|
private:
|
||||||
ewol::object::Shared<appl::BufferManager> m_bufferManager; //!< handle on the buffer manager
|
ewol::object::Shared<appl::BufferManager> m_bufferManager; //!< handle on the buffer manager
|
||||||
ewol::object::Shared<appl::TextViewer> m_viewer;
|
ewol::object::Shared<appl::TextViewer> m_viewer;
|
||||||
|
@ -25,14 +25,14 @@
|
|||||||
#define HL2_DEBUG APPL_VERBOSE
|
#define HL2_DEBUG APPL_VERBOSE
|
||||||
|
|
||||||
void appl::Highlight::parseRules(exml::Element* _child,
|
void appl::Highlight::parseRules(exml::Element* _child,
|
||||||
std::vector<HighlightPattern*>& _mListPatern,
|
std::vector<std::unique_ptr<HighlightPattern>>& _mListPatern,
|
||||||
int32_t _level) {
|
int32_t _level) {
|
||||||
// Create the patern ...
|
// Create the patern ...
|
||||||
HighlightPattern *myPattern = new HighlightPattern(m_paintingProperties);
|
HighlightPattern *myPattern = new HighlightPattern(m_paintingProperties);
|
||||||
// parse under Element
|
// parse under Element
|
||||||
myPattern->parseRules(_child, _level);
|
myPattern->parseRules(_child, _level);
|
||||||
// add element in the list
|
// add element in the list
|
||||||
_mListPatern.push_back(myPattern);
|
_mListPatern.push_back(std::unique_ptr<HighlightPattern>(myPattern));
|
||||||
}
|
}
|
||||||
|
|
||||||
appl::Highlight::Highlight(const std::string& _xmlFilename, const std::string& _colorFile) :
|
appl::Highlight::Highlight(const std::string& _xmlFilename, const std::string& _colorFile) :
|
||||||
@ -101,16 +101,11 @@ appl::Highlight::Highlight(const std::string& _xmlFilename, const std::string& _
|
|||||||
}
|
}
|
||||||
|
|
||||||
appl::Highlight::~Highlight() {
|
appl::Highlight::~Highlight() {
|
||||||
// clean all Element
|
|
||||||
for (int32_t iii = 0; iii < m_listHighlightPass1.size(); ++iii) {
|
|
||||||
if (m_listHighlightPass1[iii] != NULL) {
|
|
||||||
delete(m_listHighlightPass1[iii]);
|
|
||||||
m_listHighlightPass1[iii] = NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// clear the compleate list
|
// clear the compleate list
|
||||||
m_listHighlightPass1.clear();
|
m_listHighlightPass1.clear();
|
||||||
// clear the compleate list
|
// clear the compleate list
|
||||||
|
m_listHighlightPass2.clear();
|
||||||
|
// clear the compleate list
|
||||||
m_listExtentions.clear();
|
m_listExtentions.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -25,6 +25,7 @@ namespace appl {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
#include <etk/os/FSNode.h>
|
#include <etk/os/FSNode.h>
|
||||||
#include <appl/HighlightPattern.h>
|
#include <appl/HighlightPattern.h>
|
||||||
#include <appl/GlyphPainting.h>
|
#include <appl/GlyphPainting.h>
|
||||||
@ -39,7 +40,7 @@ namespace appl {
|
|||||||
// Constructeur
|
// Constructeur
|
||||||
Highlight(const std::string& _xmlFilename, const std::string& _colorFile);
|
Highlight(const std::string& _xmlFilename, const std::string& _colorFile);
|
||||||
public:
|
public:
|
||||||
~Highlight();
|
virtual ~Highlight();
|
||||||
private:
|
private:
|
||||||
std::string m_typeName; //!< descriptive string type like "C/C++"
|
std::string m_typeName; //!< descriptive string type like "C/C++"
|
||||||
public:
|
public:
|
||||||
@ -61,12 +62,12 @@ namespace appl {
|
|||||||
etk::Buffer &_buffer);
|
etk::Buffer &_buffer);
|
||||||
private:
|
private:
|
||||||
void parseRules(exml::Element* _child,
|
void parseRules(exml::Element* _child,
|
||||||
std::vector<HighlightPattern*> &_mListPatern,
|
std::vector<std::unique_ptr<HighlightPattern>> &_mListPatern,
|
||||||
int32_t _level);
|
int32_t _level);
|
||||||
std::string m_styleName; //!< curent style name (like "c++" or "c" or "script Bash")
|
std::string m_styleName; //!< curent style name (like "c++" or "c" or "script Bash")
|
||||||
std::vector<std::string> m_listExtentions; //!< List of possible extention for this high-light, like : ".c", ".cpp", ".h"
|
std::vector<std::string> m_listExtentions; //!< List of possible extention for this high-light, like : ".c", ".cpp", ".h"
|
||||||
std::vector<HighlightPattern*> m_listHighlightPass1; //!< List of ALL hightlight modules (pass 1 == > when we load and wride data on the buffer)
|
std::vector<std::unique_ptr<HighlightPattern>> m_listHighlightPass1; //!< List of ALL hightlight modules (pass 1 == > when we load and wride data on the buffer)
|
||||||
std::vector<HighlightPattern*> m_listHighlightPass2; //!< List of ALL hightlight modules (pass 2 == > When we display the buffer( only the display area (100 lines)) )
|
std::vector<std::unique_ptr<HighlightPattern>> m_listHighlightPass2; //!< List of ALL hightlight modules (pass 2 == > When we display the buffer( only the display area (100 lines)) )
|
||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
* @brief keep the resource pointer.
|
* @brief keep the resource pointer.
|
||||||
|
@ -16,24 +16,17 @@
|
|||||||
appl::HighlightPattern::HighlightPattern(const ewol::object::Shared<appl::GlyphPainting>& _glyphPainting) :
|
appl::HighlightPattern::HighlightPattern(const ewol::object::Shared<appl::GlyphPainting>& _glyphPainting) :
|
||||||
m_glyphPainting(_glyphPainting),
|
m_glyphPainting(_glyphPainting),
|
||||||
m_paternName(""),
|
m_paternName(""),
|
||||||
m_regExpStart(NULL),
|
m_regExpStart(nullptr),
|
||||||
m_regExpStop(NULL),
|
m_regExpStop(nullptr),
|
||||||
m_colorName(""),
|
m_colorName(""),
|
||||||
m_escapeChar(u32char::Null),
|
m_escapeChar(u32char::Null),
|
||||||
m_multiline(false),
|
m_multiline(false),
|
||||||
m_level(0) {
|
m_level(0) {
|
||||||
m_regExpStart = new etk::RegExp<etk::Buffer>();
|
m_regExpStart = std::unique_ptr<etk::RegExp<etk::Buffer>>(new etk::RegExp<etk::Buffer>());
|
||||||
}
|
}
|
||||||
|
|
||||||
appl::HighlightPattern::~HighlightPattern() {
|
appl::HighlightPattern::~HighlightPattern() {
|
||||||
if (m_regExpStart != NULL) {
|
|
||||||
delete(m_regExpStart);
|
|
||||||
m_regExpStart = NULL;
|
|
||||||
}
|
|
||||||
if (m_regExpStop != NULL) {
|
|
||||||
delete(m_regExpStop);
|
|
||||||
m_regExpStop = NULL;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void appl::HighlightPattern::setPaternStart(std::string& _regExp) {
|
void appl::HighlightPattern::setPaternStart(std::string& _regExp) {
|
||||||
@ -44,12 +37,9 @@ void appl::HighlightPattern::setPaternStart(std::string& _regExp) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void appl::HighlightPattern::setPaternStop(std::string& _regExp) {
|
void appl::HighlightPattern::setPaternStop(std::string& _regExp) {
|
||||||
if (m_regExpStop != NULL) {
|
m_regExpStop.reset();
|
||||||
delete(m_regExpStop);
|
|
||||||
m_regExpStop = NULL;
|
|
||||||
}
|
|
||||||
if (_regExp.size() != 0) {
|
if (_regExp.size() != 0) {
|
||||||
m_regExpStop = new etk::RegExp<etk::Buffer>();
|
m_regExpStop = std::unique_ptr<etk::RegExp<etk::Buffer>>(new etk::RegExp<etk::Buffer>());
|
||||||
if (m_regExpStop != NULL) {
|
if (m_regExpStop != NULL) {
|
||||||
m_regExpStop->compile(_regExp);
|
m_regExpStop->compile(_regExp);
|
||||||
} else {
|
} else {
|
||||||
|
@ -33,7 +33,7 @@ namespace appl {
|
|||||||
public:
|
public:
|
||||||
// Constructeur
|
// Constructeur
|
||||||
HighlightPattern(const ewol::object::Shared<appl::GlyphPainting>& _glyphPainting);
|
HighlightPattern(const ewol::object::Shared<appl::GlyphPainting>& _glyphPainting);
|
||||||
~HighlightPattern();
|
virtual ~HighlightPattern();
|
||||||
private:
|
private:
|
||||||
std::string m_paternName; //!< Current style name (like "c++" or "c" or "script Bash")
|
std::string m_paternName; //!< Current style name (like "c++" or "c" or "script Bash")
|
||||||
public:
|
public:
|
||||||
@ -44,11 +44,11 @@ namespace appl {
|
|||||||
return m_paternName;
|
return m_paternName;
|
||||||
};
|
};
|
||||||
private:
|
private:
|
||||||
etk::RegExp<etk::Buffer>* m_regExpStart; //!< Start of Regular expression
|
std::unique_ptr<etk::RegExp<etk::Buffer>> m_regExpStart; //!< Start of Regular expression
|
||||||
public:
|
public:
|
||||||
void setPaternStart(std::string& _regExp);
|
void setPaternStart(std::string& _regExp);
|
||||||
private:
|
private:
|
||||||
etk::RegExp<etk::Buffer>* m_regExpStop; //!< Stop of Regular Expression
|
std::unique_ptr<etk::RegExp<etk::Buffer>> m_regExpStop; //!< Stop of Regular Expression
|
||||||
public:
|
public:
|
||||||
void setPaternStop(std::string& _regExp);
|
void setPaternStop(std::string& _regExp);
|
||||||
private:
|
private:
|
||||||
|
@ -186,8 +186,8 @@ namespace appl {
|
|||||||
* @param[in] _msg Generic message.
|
* @param[in] _msg Generic message.
|
||||||
* @return true if the event might not propagate anymore
|
* @return true if the event might not propagate anymore
|
||||||
*/
|
*/
|
||||||
virtual bool onReceiveMessage(appl::TextViewer& _textDrawer,
|
virtual bool onReceiveMessageViewer(appl::TextViewer& _textDrawer,
|
||||||
const ewol::object::Message& _msg) {
|
const ewol::object::Message& _msg) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
protected:
|
protected:
|
||||||
|
@ -19,7 +19,7 @@ namespace appl {
|
|||||||
class TextPluginAutoIndent : public appl::TextViewerPlugin {
|
class TextPluginAutoIndent : public appl::TextViewerPlugin {
|
||||||
public:
|
public:
|
||||||
TextPluginAutoIndent();
|
TextPluginAutoIndent();
|
||||||
~TextPluginAutoIndent() {
|
virtual ~TextPluginAutoIndent() {
|
||||||
// nothing to do ...
|
// nothing to do ...
|
||||||
};
|
};
|
||||||
public:
|
public:
|
||||||
|
@ -34,8 +34,8 @@ void appl::TextPluginCopy::onPluginDisable(appl::TextViewer& _textDrawer) {
|
|||||||
// TODO : unknow function ...
|
// TODO : unknow function ...
|
||||||
}
|
}
|
||||||
|
|
||||||
bool appl::TextPluginCopy::onReceiveMessage(appl::TextViewer& _textDrawer,
|
bool appl::TextPluginCopy::onReceiveMessageViewer(appl::TextViewer& _textDrawer,
|
||||||
const ewol::object::Message& _msg) {
|
const ewol::object::Message& _msg) {
|
||||||
if (isEnable() == false) {
|
if (isEnable() == false) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -19,13 +19,13 @@ namespace appl {
|
|||||||
class TextPluginCopy : public appl::TextViewerPlugin {
|
class TextPluginCopy : public appl::TextViewerPlugin {
|
||||||
public:
|
public:
|
||||||
TextPluginCopy();
|
TextPluginCopy();
|
||||||
~TextPluginCopy() {
|
virtual ~TextPluginCopy() {
|
||||||
// nothing to do ...
|
// nothing to do ...
|
||||||
};
|
};
|
||||||
public:
|
public:
|
||||||
virtual void onPluginEnable(appl::TextViewer& _textDrawer);
|
virtual void onPluginEnable(appl::TextViewer& _textDrawer);
|
||||||
virtual void onPluginDisable(appl::TextViewer& _textDrawer);
|
virtual void onPluginDisable(appl::TextViewer& _textDrawer);
|
||||||
virtual bool onReceiveMessage(appl::TextViewer& _textDrawer, const ewol::object::Message& _msg);
|
virtual bool onReceiveMessageViewer(appl::TextViewer& _textDrawer, const ewol::object::Message& _msg);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -168,8 +168,8 @@ void appl::TextPluginCtags::onReceiveMessage(const ewol::object::Message& _msg)
|
|||||||
jumpFile(tmp, lineID - 1);
|
jumpFile(tmp, lineID - 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
bool appl::TextPluginCtags::onReceiveMessage(appl::TextViewer& _textDrawer,
|
bool appl::TextPluginCtags::onReceiveMessageViewer(appl::TextViewer& _textDrawer,
|
||||||
const ewol::object::Message& _msg) {
|
const ewol::object::Message& _msg) {
|
||||||
if (isEnable() == false) {
|
if (isEnable() == false) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -36,12 +36,12 @@ namespace appl {
|
|||||||
ewol::object::Shared<appl::BufferManager> m_bufferManager; //!< handle on the buffer manager
|
ewol::object::Shared<appl::BufferManager> m_bufferManager; //!< handle on the buffer manager
|
||||||
public:
|
public:
|
||||||
TextPluginCtags();
|
TextPluginCtags();
|
||||||
~TextPluginCtags();
|
virtual ~TextPluginCtags();
|
||||||
public:
|
public:
|
||||||
virtual void onPluginEnable(appl::TextViewer& _textDrawer);
|
virtual void onPluginEnable(appl::TextViewer& _textDrawer);
|
||||||
virtual void onPluginDisable(appl::TextViewer& _textDrawer);
|
virtual void onPluginDisable(appl::TextViewer& _textDrawer);
|
||||||
virtual bool onReceiveMessage(appl::TextViewer& _textDrawer,
|
virtual bool onReceiveMessageViewer(appl::TextViewer& _textDrawer,
|
||||||
const ewol::object::Message& _msg);
|
const ewol::object::Message& _msg);
|
||||||
// internal message :
|
// internal message :
|
||||||
virtual void onReceiveMessage(const ewol::object::Message& _msg);
|
virtual void onReceiveMessage(const ewol::object::Message& _msg);
|
||||||
};
|
};
|
||||||
|
@ -50,13 +50,13 @@ namespace appl {
|
|||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
protected: // Wrap all element with their internal data: (do not use theses function)
|
protected: // Wrap all element with their internal data: (do not use theses function)
|
||||||
bool onReceiveMessage(appl::TextViewer& _textDrawer,
|
bool onReceiveMessageViewer(appl::TextViewer& _textDrawer,
|
||||||
const ewol::object::Message& _msg) {
|
const ewol::object::Message& _msg) {
|
||||||
TYPE* data = getDataRef(_textDrawer);
|
TYPE* data = getDataRef(_textDrawer);
|
||||||
if (data == NULL) {
|
if (data == NULL) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return onReceiveMessage(_textDrawer, _msg, *data);
|
return onReceiveMessageViewer(_textDrawer, _msg, *data);
|
||||||
}
|
}
|
||||||
bool onWrite(appl::TextViewer& _textDrawer,
|
bool onWrite(appl::TextViewer& _textDrawer,
|
||||||
const appl::Buffer::Iterator& _pos,
|
const appl::Buffer::Iterator& _pos,
|
||||||
@ -88,9 +88,9 @@ namespace appl {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
virtual bool onReceiveMessage(appl::TextViewer& _textDrawer,
|
virtual bool onReceiveMessageViewer(appl::TextViewer& _textDrawer,
|
||||||
const ewol::object::Message& _msg,
|
const ewol::object::Message& _msg,
|
||||||
TYPE& _data) {
|
TYPE& _data) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
virtual bool onWrite(appl::TextViewer& _textDrawer,
|
virtual bool onWrite(appl::TextViewer& _textDrawer,
|
||||||
|
@ -35,9 +35,9 @@ void appl::TextPluginHistory::onPluginDisable(appl::TextViewer& _textDrawer) {
|
|||||||
// TODO : unknow function ...
|
// TODO : unknow function ...
|
||||||
}
|
}
|
||||||
|
|
||||||
bool appl::TextPluginHistory::onReceiveMessage(appl::TextViewer& _textDrawer,
|
bool appl::TextPluginHistory::onReceiveMessageViewer(appl::TextViewer& _textDrawer,
|
||||||
const ewol::object::Message& _msg,
|
const ewol::object::Message& _msg,
|
||||||
appl::PluginHistoryData& _data) {
|
appl::PluginHistoryData& _data) {
|
||||||
if (isEnable() == false) {
|
if (isEnable() == false) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -43,9 +43,9 @@ namespace appl {
|
|||||||
public:
|
public:
|
||||||
virtual void onPluginEnable(appl::TextViewer& _textDrawer);
|
virtual void onPluginEnable(appl::TextViewer& _textDrawer);
|
||||||
virtual void onPluginDisable(appl::TextViewer& _textDrawer);
|
virtual void onPluginDisable(appl::TextViewer& _textDrawer);
|
||||||
virtual bool onReceiveMessage(appl::TextViewer& _textDrawer,
|
virtual bool onReceiveMessageViewer(appl::TextViewer& _textDrawer,
|
||||||
const ewol::object::Message& _msg,
|
const ewol::object::Message& _msg,
|
||||||
appl::PluginHistoryData& _data);
|
appl::PluginHistoryData& _data);
|
||||||
virtual bool onWrite(appl::TextViewer& _textDrawer,
|
virtual bool onWrite(appl::TextViewer& _textDrawer,
|
||||||
const appl::Buffer::Iterator& _pos,
|
const appl::Buffer::Iterator& _pos,
|
||||||
const std::string& _strData,
|
const std::string& _strData,
|
||||||
|
@ -43,7 +43,7 @@ static std::vector<ewol::object::Shared<appl::TextViewerPlugin>>& getListOnRemov
|
|||||||
static std::vector<ewol::object::Shared<appl::TextViewerPlugin>> s_list;
|
static std::vector<ewol::object::Shared<appl::TextViewerPlugin>> s_list;
|
||||||
return s_list;
|
return s_list;
|
||||||
}
|
}
|
||||||
static std::vector<ewol::object::Shared<appl::TextViewerPlugin>>& getListOnReceiveMessage() {
|
static std::vector<ewol::object::Shared<appl::TextViewerPlugin>>& getListonReceiveMessageViewer() {
|
||||||
static std::vector<ewol::object::Shared<appl::TextViewerPlugin>> s_list;
|
static std::vector<ewol::object::Shared<appl::TextViewerPlugin>> s_list;
|
||||||
return s_list;
|
return s_list;
|
||||||
}
|
}
|
||||||
@ -63,7 +63,7 @@ void appl::textPluginManager::unInit() {
|
|||||||
getListOnWrite().clear();
|
getListOnWrite().clear();
|
||||||
getListOnReplace().clear();
|
getListOnReplace().clear();
|
||||||
getListOnRemove().clear();
|
getListOnRemove().clear();
|
||||||
getListOnReceiveMessage().clear();
|
getListonReceiveMessageViewer().clear();
|
||||||
getListOnCursorMove().clear();
|
getListOnCursorMove().clear();
|
||||||
getList().clear();
|
getList().clear();
|
||||||
}
|
}
|
||||||
@ -99,7 +99,7 @@ void appl::textPluginManager::addPlugin(const ewol::object::Shared<appl::TextVie
|
|||||||
getListOnRemove().push_back(_plugin);
|
getListOnRemove().push_back(_plugin);
|
||||||
}
|
}
|
||||||
if (_plugin->isAvaillableOnReceiveMessage() == true) {
|
if (_plugin->isAvaillableOnReceiveMessage() == true) {
|
||||||
getListOnReceiveMessage().push_back(_plugin);
|
getListonReceiveMessageViewer().push_back(_plugin);
|
||||||
}
|
}
|
||||||
if (_plugin->isAvaillableOnCursorMove() == true) {
|
if (_plugin->isAvaillableOnCursorMove() == true) {
|
||||||
getListOnCursorMove().push_back(_plugin);
|
getListOnCursorMove().push_back(_plugin);
|
||||||
@ -193,13 +193,13 @@ bool appl::textPluginManager::onRemove(appl::TextViewer& _textDrawer,
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool appl::textPluginManager::onReceiveMessage(appl::TextViewer& _textDrawer,
|
bool appl::textPluginManager::onReceiveMessageViewer(appl::TextViewer& _textDrawer,
|
||||||
const ewol::object::Message& _msg) {
|
const ewol::object::Message& _msg) {
|
||||||
for (auto &it : getListOnReceiveMessage()) {
|
for (auto &it : getListonReceiveMessageViewer()) {
|
||||||
if (it == NULL) {
|
if (it == NULL) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (it->onReceiveMessage(_textDrawer, _msg) == true ) {
|
if (it->onReceiveMessageViewer(_textDrawer, _msg) == true ) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -98,8 +98,8 @@ namespace appl {
|
|||||||
* @param[in] _msg Generic message.
|
* @param[in] _msg Generic message.
|
||||||
* @return true if the event might not propagate anymore
|
* @return true if the event might not propagate anymore
|
||||||
*/
|
*/
|
||||||
bool onReceiveMessage(appl::TextViewer& _textDrawer,
|
bool onReceiveMessageViewer(appl::TextViewer& _textDrawer,
|
||||||
const ewol::object::Message& _msg);
|
const ewol::object::Message& _msg);
|
||||||
/**
|
/**
|
||||||
* @brief Called when Cursor move of position.
|
* @brief Called when Cursor move of position.
|
||||||
* @param[in] _widget Reference on the widget caller.
|
* @param[in] _widget Reference on the widget caller.
|
||||||
|
@ -19,7 +19,7 @@ namespace appl {
|
|||||||
class TextPluginMultiLineTab : public appl::TextViewerPlugin {
|
class TextPluginMultiLineTab : public appl::TextViewerPlugin {
|
||||||
public:
|
public:
|
||||||
TextPluginMultiLineTab();
|
TextPluginMultiLineTab();
|
||||||
~TextPluginMultiLineTab() {
|
virtual ~TextPluginMultiLineTab() {
|
||||||
// nothing to do ...
|
// nothing to do ...
|
||||||
};
|
};
|
||||||
public:
|
public:
|
||||||
|
@ -30,8 +30,8 @@ void appl::TextPluginRmLine::onPluginDisable(appl::TextViewer& _textDrawer) {
|
|||||||
// TODO : unknow function ...
|
// TODO : unknow function ...
|
||||||
}
|
}
|
||||||
|
|
||||||
bool appl::TextPluginRmLine::onReceiveMessage(appl::TextViewer& _textDrawer,
|
bool appl::TextPluginRmLine::onReceiveMessageViewer(appl::TextViewer& _textDrawer,
|
||||||
const ewol::object::Message& _msg) {
|
const ewol::object::Message& _msg) {
|
||||||
if (isEnable() == false) {
|
if (isEnable() == false) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -19,13 +19,13 @@ namespace appl {
|
|||||||
class TextPluginRmLine : public appl::TextViewerPlugin {
|
class TextPluginRmLine : public appl::TextViewerPlugin {
|
||||||
public:
|
public:
|
||||||
TextPluginRmLine();
|
TextPluginRmLine();
|
||||||
~TextPluginRmLine() {
|
virtual ~TextPluginRmLine() {
|
||||||
// nothing to do ...
|
// nothing to do ...
|
||||||
};
|
};
|
||||||
public:
|
public:
|
||||||
virtual void onPluginEnable(appl::TextViewer& _textDrawer);
|
virtual void onPluginEnable(appl::TextViewer& _textDrawer);
|
||||||
virtual void onPluginDisable(appl::TextViewer& _textDrawer);
|
virtual void onPluginDisable(appl::TextViewer& _textDrawer);
|
||||||
virtual bool onReceiveMessage(appl::TextViewer& _textDrawer, const ewol::object::Message& _msg);
|
virtual bool onReceiveMessageViewer(appl::TextViewer& _textDrawer, const ewol::object::Message& _msg);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -32,8 +32,8 @@ void appl::TextPluginSelectAll::onPluginDisable(appl::TextViewer& _textDrawer) {
|
|||||||
// TODO : unknow function ...
|
// TODO : unknow function ...
|
||||||
}
|
}
|
||||||
|
|
||||||
bool appl::TextPluginSelectAll::onReceiveMessage(appl::TextViewer& _textDrawer,
|
bool appl::TextPluginSelectAll::onReceiveMessageViewer(appl::TextViewer& _textDrawer,
|
||||||
const ewol::object::Message& _msg) {
|
const ewol::object::Message& _msg) {
|
||||||
if (isEnable() == false) {
|
if (isEnable() == false) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -19,13 +19,13 @@ namespace appl {
|
|||||||
class TextPluginSelectAll : public appl::TextViewerPlugin {
|
class TextPluginSelectAll : public appl::TextViewerPlugin {
|
||||||
public:
|
public:
|
||||||
TextPluginSelectAll();
|
TextPluginSelectAll();
|
||||||
~TextPluginSelectAll() {
|
virtual ~TextPluginSelectAll() {
|
||||||
// nothing to do ...
|
// nothing to do ...
|
||||||
};
|
};
|
||||||
public:
|
public:
|
||||||
virtual void onPluginEnable(appl::TextViewer& _textDrawer);
|
virtual void onPluginEnable(appl::TextViewer& _textDrawer);
|
||||||
virtual void onPluginDisable(appl::TextViewer& _textDrawer);
|
virtual void onPluginDisable(appl::TextViewer& _textDrawer);
|
||||||
virtual bool onReceiveMessage(appl::TextViewer& _textDrawer, const ewol::object::Message& _msg);
|
virtual bool onReceiveMessageViewer(appl::TextViewer& _textDrawer, const ewol::object::Message& _msg);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ namespace globals
|
|||||||
class ParameterGlobalsGui : public ewol::widget::Sizer {
|
class ParameterGlobalsGui : public ewol::widget::Sizer {
|
||||||
public :
|
public :
|
||||||
ParameterGlobalsGui();
|
ParameterGlobalsGui();
|
||||||
~ParameterGlobalsGui();
|
virtual ~ParameterGlobalsGui();
|
||||||
// herited function
|
// herited function
|
||||||
virtual void onReceiveMessage(const ewol::object::Message& _msg);
|
virtual void onReceiveMessage(const ewol::object::Message& _msg);
|
||||||
};
|
};
|
||||||
|
@ -12,6 +12,7 @@ def create(target):
|
|||||||
# module name is 'edn' and type binary.
|
# module name is 'edn' and type binary.
|
||||||
myModule = module.Module(__file__, 'edn', 'PACKAGE')
|
myModule = module.Module(__file__, 'edn', 'PACKAGE')
|
||||||
|
|
||||||
|
myModule.add_extra_compile_flags()
|
||||||
# add the file to compile:
|
# add the file to compile:
|
||||||
myModule.add_src_file([
|
myModule.add_src_file([
|
||||||
'appl/ctags/readtags.cpp'])
|
'appl/ctags/readtags.cpp'])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user