[DEV] adapte to the EWOL modification of Sizer and const string callback
This commit is contained in:
parent
4139e88a6c
commit
e1d2c2a3c7
@ -39,7 +39,7 @@ class classBufferManager: public ewol::EObject
|
|||||||
* @param[in] data Data registered by this class
|
* @param[in] data Data registered by this class
|
||||||
* @return ---
|
* @return ---
|
||||||
*/
|
*/
|
||||||
virtual void OnReceiveMessage(ewol::EObject * CallerObject, const char * eventId, etk::UString data);
|
virtual void OnReceiveMessage(ewol::EObject * CallerObject, const char * eventId, const etk::UString& data);
|
||||||
private:
|
private:
|
||||||
// return the ID of the buffer allocated
|
// return the ID of the buffer allocated
|
||||||
// create a buffer with no element
|
// create a buffer with no element
|
||||||
@ -115,7 +115,7 @@ classBufferManager::~classBufferManager(void)
|
|||||||
* @param[in] data Data registered by this class
|
* @param[in] data Data registered by this class
|
||||||
* @return ---
|
* @return ---
|
||||||
*/
|
*/
|
||||||
void classBufferManager::OnReceiveMessage(ewol::EObject * CallerObject, const char * eventId, etk::UString data)
|
void classBufferManager::OnReceiveMessage(ewol::EObject * CallerObject, const char * eventId, const etk::UString& data)
|
||||||
{
|
{
|
||||||
ewol::EObject::OnReceiveMessage(CallerObject, eventId, data);
|
ewol::EObject::OnReceiveMessage(CallerObject, eventId, data);
|
||||||
|
|
||||||
|
@ -240,7 +240,8 @@ int32_t EdnBuf::Replace(int32_t start, int32_t end, etk::UString &insertText)
|
|||||||
GetRange(start, end, deletedText);
|
GetRange(start, end, deletedText);
|
||||||
etk::Vector<int8_t> tmpInsertText;
|
etk::Vector<int8_t> tmpInsertText;
|
||||||
if (true == m_isUtf8) {
|
if (true == m_isUtf8) {
|
||||||
char * tmpPointer = insertText.c_str();
|
etk::Char tmpChar = insertText.c_str();
|
||||||
|
const char * tmpPointer = tmpChar;
|
||||||
while (*tmpPointer != '\0') {
|
while (*tmpPointer != '\0') {
|
||||||
tmpInsertText.PushBack(*tmpPointer++);
|
tmpInsertText.PushBack(*tmpPointer++);
|
||||||
}
|
}
|
||||||
@ -932,7 +933,8 @@ bool EdnBuf::SearchForward(int32_t startPos, etk::UString &search, int32_t *foun
|
|||||||
{
|
{
|
||||||
etk::Vector<int8_t> searchVect;
|
etk::Vector<int8_t> searchVect;
|
||||||
if (true == m_isUtf8) {
|
if (true == m_isUtf8) {
|
||||||
char * tmpPointer = search.c_str();
|
etk::Char tmpChar = search.c_str();
|
||||||
|
const char * tmpPointer = tmpChar;
|
||||||
while (*tmpPointer != '\0') {
|
while (*tmpPointer != '\0') {
|
||||||
searchVect.PushBack(*tmpPointer++);
|
searchVect.PushBack(*tmpPointer++);
|
||||||
}
|
}
|
||||||
@ -987,7 +989,8 @@ bool EdnBuf::SearchBackward(int32_t startPos, etk::UString &search, int32_t *fou
|
|||||||
{
|
{
|
||||||
etk::Vector<int8_t> searchVect;
|
etk::Vector<int8_t> searchVect;
|
||||||
if (true == m_isUtf8) {
|
if (true == m_isUtf8) {
|
||||||
char * tmpPointer = search.c_str();
|
etk::Char tmpChar = search.c_str();
|
||||||
|
const char * tmpPointer = tmpChar;
|
||||||
while (*tmpPointer != '\0') {
|
while (*tmpPointer != '\0') {
|
||||||
searchVect.PushBack(*tmpPointer++);
|
searchVect.PushBack(*tmpPointer++);
|
||||||
}
|
}
|
||||||
@ -1137,7 +1140,8 @@ int32_t EdnBuf::LocalInsert(int32_t pos, etk::UString &insertText)
|
|||||||
{
|
{
|
||||||
etk::Vector<int8_t> tmpInsertText;
|
etk::Vector<int8_t> tmpInsertText;
|
||||||
if (true == m_isUtf8) {
|
if (true == m_isUtf8) {
|
||||||
char * tmpPointer = insertText.c_str();
|
etk::Char tmpChar = insertText.c_str();
|
||||||
|
const char * tmpPointer = tmpChar;
|
||||||
while (*tmpPointer != '\0') {
|
while (*tmpPointer != '\0') {
|
||||||
tmpInsertText.PushBack(*tmpPointer++);
|
tmpInsertText.PushBack(*tmpPointer++);
|
||||||
}
|
}
|
||||||
|
@ -40,7 +40,7 @@ class classColorManager: public ewol::EObject
|
|||||||
* @param[in] data Data registered by this class
|
* @param[in] data Data registered by this class
|
||||||
* @return ---
|
* @return ---
|
||||||
*/
|
*/
|
||||||
virtual void OnReceiveMessage(ewol::EObject * CallerObject, const char * eventId, etk::UString data);
|
virtual void OnReceiveMessage(ewol::EObject * CallerObject, const char * eventId, const etk::UString& data);
|
||||||
public:
|
public:
|
||||||
void LoadFile(etk::UString &xmlFilename);
|
void LoadFile(etk::UString &xmlFilename);
|
||||||
void LoadFile(const char * xmlFilename);
|
void LoadFile(const char * xmlFilename);
|
||||||
@ -80,7 +80,7 @@ classColorManager::~classColorManager(void)
|
|||||||
listMyColor.Clear();
|
listMyColor.Clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
void classColorManager::OnReceiveMessage(ewol::EObject * CallerObject, const char * eventId, etk::UString data)
|
void classColorManager::OnReceiveMessage(ewol::EObject * CallerObject, const char * eventId, const etk::UString& data)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
switch (id)
|
switch (id)
|
||||||
|
@ -75,7 +75,7 @@ void BufferView::RemoveAllElement(void)
|
|||||||
* @param[in] data Data registered by this class
|
* @param[in] data Data registered by this class
|
||||||
* @return ---
|
* @return ---
|
||||||
*/
|
*/
|
||||||
void BufferView::OnReceiveMessage(ewol::EObject * CallerObject, const char * eventId, etk::UString data)
|
void BufferView::OnReceiveMessage(ewol::EObject * CallerObject, const char * eventId, const etk::UString& data)
|
||||||
{
|
{
|
||||||
widget::List::OnReceiveMessage(CallerObject, eventId, data);
|
widget::List::OnReceiveMessage(CallerObject, eventId, data);
|
||||||
if (eventId == ednMsgBufferListChange) {
|
if (eventId == ednMsgBufferListChange) {
|
||||||
|
@ -47,7 +47,7 @@ class BufferView : public widget::List
|
|||||||
// Derived function
|
// Derived function
|
||||||
const char * const GetObjectType(void) { return "ApplBufferView"; };
|
const char * const GetObjectType(void) { return "ApplBufferView"; };
|
||||||
// Derived function
|
// Derived function
|
||||||
virtual void OnReceiveMessage(ewol::EObject * CallerObject, const char * eventId, etk::UString data);
|
virtual void OnReceiveMessage(ewol::EObject * CallerObject, const char * eventId, const etk::UString& data);
|
||||||
protected:
|
protected:
|
||||||
// function call to display the list :
|
// function call to display the list :
|
||||||
virtual draw::Color GetBasicBG(void);
|
virtual draw::Color GetBasicBG(void);
|
||||||
|
@ -343,7 +343,7 @@ bool CodeView::OnEventInput(ewol::keyEvent::type_te type, int32_t IdInput, ewol:
|
|||||||
* @param[in] data Data registered by this class
|
* @param[in] data Data registered by this class
|
||||||
* @return ---
|
* @return ---
|
||||||
*/
|
*/
|
||||||
void CodeView::OnReceiveMessage(ewol::EObject * CallerObject, const char * eventId, etk::UString data)
|
void CodeView::OnReceiveMessage(ewol::EObject * CallerObject, const char * eventId, const etk::UString& data)
|
||||||
{
|
{
|
||||||
widget::WidgetScrooled::OnReceiveMessage(CallerObject, eventId, data);
|
widget::WidgetScrooled::OnReceiveMessage(CallerObject, eventId, data);
|
||||||
APPL_DEBUG("Extern Event : " << CallerObject << " type : " << eventId << " data=\"" << data << "\"");
|
APPL_DEBUG("Extern Event : " << CallerObject << " type : " << eventId << " data=\"" << data << "\"");
|
||||||
|
@ -44,7 +44,7 @@ class CodeView :public widget::WidgetScrooled
|
|||||||
// Derived function
|
// Derived function
|
||||||
virtual void OnRegenerateDisplay(void);
|
virtual void OnRegenerateDisplay(void);
|
||||||
// Derived function
|
// Derived function
|
||||||
virtual void OnReceiveMessage(ewol::EObject * CallerObject, const char * eventId, etk::UString data);
|
virtual void OnReceiveMessage(ewol::EObject * CallerObject, const char * eventId, const etk::UString& data);
|
||||||
public:
|
public:
|
||||||
// Derived function
|
// Derived function
|
||||||
virtual bool OnEventInput(ewol::keyEvent::type_te type, int32_t IdInput, ewol::keyEvent::status_te typeEvent, vec2 pos);
|
virtual bool OnEventInput(ewol::keyEvent::type_te type, int32_t IdInput, ewol::keyEvent::status_te typeEvent, vec2 pos);
|
||||||
|
@ -16,8 +16,7 @@
|
|||||||
|
|
||||||
#include <ewol/widget/Button.h>
|
#include <ewol/widget/Button.h>
|
||||||
#include <ewol/widget/CheckBox.h>
|
#include <ewol/widget/CheckBox.h>
|
||||||
#include <ewol/widget/SizerHori.h>
|
#include <ewol/widget/Sizer.h>
|
||||||
#include <ewol/widget/SizerVert.h>
|
|
||||||
#include <ewol/widget/Label.h>
|
#include <ewol/widget/Label.h>
|
||||||
#include <ewol/widget/Entry.h>
|
#include <ewol/widget/Entry.h>
|
||||||
#include <ewol/widget/List.h>
|
#include <ewol/widget/List.h>
|
||||||
@ -40,10 +39,11 @@
|
|||||||
#include <ewol/widget/Label.h>
|
#include <ewol/widget/Label.h>
|
||||||
#include <ewol/widget/Spacer.h>
|
#include <ewol/widget/Spacer.h>
|
||||||
|
|
||||||
class ParameterAboutGui : public widget::SizerVert
|
class ParameterAboutGui : public widget::Sizer
|
||||||
{
|
{
|
||||||
public :
|
public :
|
||||||
ParameterAboutGui(void)
|
ParameterAboutGui(void) :
|
||||||
|
widget::Sizer(widget::Sizer::modeVert)
|
||||||
{
|
{
|
||||||
widget::Spacer* mySpacer = NULL;
|
widget::Spacer* mySpacer = NULL;
|
||||||
|
|
||||||
@ -93,18 +93,18 @@ const char * l_smoothMax = "tmpEvent_maxChange";
|
|||||||
MainWindows::MainWindows(void)
|
MainWindows::MainWindows(void)
|
||||||
{
|
{
|
||||||
APPL_DEBUG("CREATE WINDOWS ... ");
|
APPL_DEBUG("CREATE WINDOWS ... ");
|
||||||
widget::SizerVert * mySizerVert = NULL;
|
widget::Sizer * mySizerVert = NULL;
|
||||||
widget::SizerVert * mySizerVert2 = NULL;
|
widget::Sizer * mySizerVert2 = NULL;
|
||||||
widget::SizerHori * mySizerHori = NULL;
|
widget::Sizer * mySizerHori = NULL;
|
||||||
//ewol::Button * myButton = NULL;
|
//ewol::Button * myButton = NULL;
|
||||||
CodeView * myCodeView = NULL;
|
CodeView * myCodeView = NULL;
|
||||||
BufferView * myBufferView = NULL;
|
BufferView * myBufferView = NULL;
|
||||||
widget::Menu * myMenu = NULL;
|
widget::Menu * myMenu = NULL;
|
||||||
|
|
||||||
mySizerVert = new widget::SizerVert();
|
mySizerVert = new widget::Sizer(widget::Sizer::modeVert);
|
||||||
SetSubWidget(mySizerVert);
|
SetSubWidget(mySizerVert);
|
||||||
|
|
||||||
mySizerHori = new widget::SizerHori();
|
mySizerHori = new widget::Sizer(widget::Sizer::modeHori);
|
||||||
mySizerVert->SubWidgetAdd(mySizerHori);
|
mySizerVert->SubWidgetAdd(mySizerHori);
|
||||||
myBufferView = new BufferView();
|
myBufferView = new BufferView();
|
||||||
myBufferView->SetExpendX(false);
|
myBufferView->SetExpendX(false);
|
||||||
@ -113,7 +113,7 @@ MainWindows::MainWindows(void)
|
|||||||
myBufferView->SetFillY(true);
|
myBufferView->SetFillY(true);
|
||||||
mySizerHori->SubWidgetAdd(myBufferView);
|
mySizerHori->SubWidgetAdd(myBufferView);
|
||||||
|
|
||||||
mySizerVert2 = new widget::SizerVert();
|
mySizerVert2 = new widget::Sizer(widget::Sizer::modeVert);
|
||||||
mySizerHori->SubWidgetAdd(mySizerVert2);
|
mySizerHori->SubWidgetAdd(mySizerVert2);
|
||||||
|
|
||||||
// main buffer Area :
|
// main buffer Area :
|
||||||
@ -129,7 +129,7 @@ MainWindows::MainWindows(void)
|
|||||||
mySizerVert2->SubWidgetAdd(mySearch);
|
mySizerVert2->SubWidgetAdd(mySearch);
|
||||||
#ifdef APPL_BUFFER_FONT_DISTANCE_FIELD
|
#ifdef APPL_BUFFER_FONT_DISTANCE_FIELD
|
||||||
{
|
{
|
||||||
widget::SizerHori * mySizerHori2 = new widget::SizerHori();
|
widget::Sizer * mySizerHori2 = new widget::Sizer(widget::Sizer::modeHori);
|
||||||
mySizerVert2->SubWidgetAdd(mySizerHori2);
|
mySizerVert2->SubWidgetAdd(mySizerHori2);
|
||||||
|
|
||||||
widget::CheckBox* tmpCheck = new widget::CheckBox("smooth");
|
widget::CheckBox* tmpCheck = new widget::CheckBox("smooth");
|
||||||
@ -156,7 +156,7 @@ MainWindows::MainWindows(void)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
mySizerHori = new widget::SizerHori();
|
mySizerHori = new widget::Sizer(widget::Sizer::modeHori);
|
||||||
mySizerVert->SubWidgetAdd(mySizerHori);
|
mySizerVert->SubWidgetAdd(mySizerHori);
|
||||||
|
|
||||||
myMenu = new widget::Menu();
|
myMenu = new widget::Menu();
|
||||||
@ -257,14 +257,8 @@ MainWindows::~MainWindows(void)
|
|||||||
const char *const ednEventPopUpFileSelected = "edn-mainWindows-openSelected";
|
const char *const ednEventPopUpFileSelected = "edn-mainWindows-openSelected";
|
||||||
const char *const ednEventPopUpFileSaveAs = "edn-mainWindows-saveAsSelected";
|
const char *const ednEventPopUpFileSaveAs = "edn-mainWindows-saveAsSelected";
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Receive a message from an other EObject with a specific eventId and data
|
void MainWindows::OnReceiveMessage(ewol::EObject * CallerObject, const char * eventId, const etk::UString& data)
|
||||||
* @param[in] CallerObject Pointer on the EObject that information came from
|
|
||||||
* @param[in] eventId Message registered by this class
|
|
||||||
* @param[in] data Data registered by this class
|
|
||||||
* @return ---
|
|
||||||
*/
|
|
||||||
void MainWindows::OnReceiveMessage(ewol::EObject * CallerObject, const char * eventId, etk::UString data)
|
|
||||||
{
|
{
|
||||||
ewol::Windows::OnReceiveMessage(CallerObject, eventId, data);
|
ewol::Windows::OnReceiveMessage(CallerObject, eventId, data);
|
||||||
|
|
||||||
@ -378,13 +372,6 @@ void MainWindows::OnReceiveMessage(ewol::EObject * CallerObject, const char * ev
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Inform object that an other object is removed ...
|
|
||||||
* @param[in] removeObject Pointer on the EObject remeved ==> the user must remove all reference on this EObject
|
|
||||||
* @note : Sub classes must call this class
|
|
||||||
* @return ---
|
|
||||||
*/
|
|
||||||
void MainWindows::OnObjectRemove(ewol::EObject * removeObject)
|
void MainWindows::OnObjectRemove(ewol::EObject * removeObject)
|
||||||
{
|
{
|
||||||
ewol::Windows::OnObjectRemove(removeObject);
|
ewol::Windows::OnObjectRemove(removeObject);
|
||||||
|
@ -29,7 +29,7 @@ class MainWindows : public ewol::Windows
|
|||||||
// Derived function
|
// Derived function
|
||||||
const char * const GetObjectType(void) { return "MainWindows"; };
|
const char * const GetObjectType(void) { return "MainWindows"; };
|
||||||
// Derived function
|
// Derived function
|
||||||
virtual void OnReceiveMessage(ewol::EObject * CallerObject, const char * eventId, etk::UString data);
|
virtual void OnReceiveMessage(ewol::EObject * CallerObject, const char * eventId, const etk::UString& data);
|
||||||
// Derived function
|
// Derived function
|
||||||
virtual void OnObjectRemove(ewol::EObject * removeObject);
|
virtual void OnObjectRemove(ewol::EObject * removeObject);
|
||||||
};
|
};
|
||||||
|
@ -31,6 +31,7 @@ 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(void) :
|
Search::Search(void) :
|
||||||
|
widget::Sizer(widget::Sizer::modeHori),
|
||||||
m_searchEntry(NULL),
|
m_searchEntry(NULL),
|
||||||
m_replaceEntry(NULL)
|
m_replaceEntry(NULL)
|
||||||
{
|
{
|
||||||
@ -139,16 +140,9 @@ Search::~Search(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
void Search::OnReceiveMessage(ewol::EObject * CallerObject, const char * eventId, const etk::UString& data)
|
||||||
* @brief Receive a message from an other EObject with a specific eventId and data
|
|
||||||
* @param[in] CallerObject Pointer on the EObject that information came from
|
|
||||||
* @param[in] eventId Message registered by this class
|
|
||||||
* @param[in] data Data registered by this class
|
|
||||||
* @return ---
|
|
||||||
*/
|
|
||||||
void Search::OnReceiveMessage(ewol::EObject * CallerObject, const char * eventId, etk::UString data)
|
|
||||||
{
|
{
|
||||||
widget::SizerHori::OnReceiveMessage(CallerObject, eventId, data);
|
widget::Sizer::OnReceiveMessage(CallerObject, eventId, data);
|
||||||
//APPL_INFO("Search receive message : \"" << eventId << "\" data=\"" << data << "\"");
|
//APPL_INFO("Search receive message : \"" << eventId << "\" data=\"" << data << "\"");
|
||||||
if ( eventId == l_eventSearchEntry) {
|
if ( eventId == l_eventSearchEntry) {
|
||||||
SearchData::SetSearch(data);
|
SearchData::SetSearch(data);
|
||||||
@ -221,15 +215,9 @@ void Search::OnReceiveMessage(ewol::EObject * CallerObject, const char * eventId
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Inform object that an other object is removed ...
|
|
||||||
* @param[in] removeObject Pointer on the EObject remeved ==> the user must remove all reference on this EObject
|
|
||||||
* @note : Sub classes must call this class
|
|
||||||
* @return ---
|
|
||||||
*/
|
|
||||||
void Search::OnObjectRemove(ewol::EObject * removeObject)
|
void Search::OnObjectRemove(ewol::EObject * removeObject)
|
||||||
{
|
{
|
||||||
widget::SizerHori::OnObjectRemove(removeObject);
|
widget::Sizer::OnObjectRemove(removeObject);
|
||||||
if (removeObject == m_searchEntry) {
|
if (removeObject == m_searchEntry) {
|
||||||
m_searchEntry = NULL;
|
m_searchEntry = NULL;
|
||||||
}
|
}
|
||||||
|
@ -10,36 +10,20 @@
|
|||||||
#define __SEARCH_H__
|
#define __SEARCH_H__
|
||||||
|
|
||||||
#include <appl/Debug.h>
|
#include <appl/Debug.h>
|
||||||
#include <ewol/widget/SizerHori.h>
|
#include <ewol/widget/Sizer.h>
|
||||||
#include <ewol/widget/Entry.h>
|
#include <ewol/widget/Entry.h>
|
||||||
|
|
||||||
class Search : public widget::SizerHori
|
class Search : public widget::Sizer
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
// Constructeur
|
// Constructeur
|
||||||
Search(void);
|
Search(void);
|
||||||
~Search(void);
|
~Search(void);
|
||||||
/**
|
// herited function
|
||||||
* @brief Get the current Object type of the EObject
|
|
||||||
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
|
|
||||||
* @param[in] objectType type description
|
|
||||||
* @return true if the object is compatible, otherwise false
|
|
||||||
*/
|
|
||||||
const char * const GetObjectType(void) { return "ApplSearch"; };
|
const char * const GetObjectType(void) { return "ApplSearch"; };
|
||||||
/**
|
// herited function
|
||||||
* @brief Receive a message from an other EObject with a specific eventId and data
|
virtual void OnReceiveMessage(ewol::EObject * CallerObject, const char * eventId, const etk::UString& data);
|
||||||
* @param[in] CallerObject Pointer on the EObject that information came from
|
// herited function
|
||||||
* @param[in] eventId Message registered by this class
|
|
||||||
* @param[in] data Data registered by this class
|
|
||||||
* @return ---
|
|
||||||
*/
|
|
||||||
virtual void OnReceiveMessage(ewol::EObject * CallerObject, const char * eventId, etk::UString data);
|
|
||||||
/**
|
|
||||||
* @brief Inform object that an other object is removed ...
|
|
||||||
* @param[in] removeObject Pointer on the EObject remeved ==> the user must remove all reference on this EObject
|
|
||||||
* @note : Sub classes must call this class
|
|
||||||
* @return ---
|
|
||||||
*/
|
|
||||||
virtual void OnObjectRemove(ewol::EObject * removeObject);
|
virtual void OnObjectRemove(ewol::EObject * removeObject);
|
||||||
private:
|
private:
|
||||||
bool m_forward;
|
bool m_forward;
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
static etk::UString m_findRequest = "";
|
static etk::UString m_findRequest = "";
|
||||||
|
|
||||||
void SearchData::SetSearch(etk::UString &myData)
|
void SearchData::SetSearch(const etk::UString &myData)
|
||||||
{
|
{
|
||||||
m_findRequest = myData;
|
m_findRequest = myData;
|
||||||
}
|
}
|
||||||
@ -33,7 +33,7 @@ bool SearchData::IsSearchEmpty(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static etk::UString m_replaceRequest = "";
|
static etk::UString m_replaceRequest = "";
|
||||||
void SearchData::SetReplace(etk::UString &myData)
|
void SearchData::SetReplace(const etk::UString &myData)
|
||||||
{
|
{
|
||||||
m_replaceRequest = myData;
|
m_replaceRequest = myData;
|
||||||
}
|
}
|
||||||
|
@ -14,10 +14,10 @@
|
|||||||
|
|
||||||
namespace SearchData
|
namespace SearchData
|
||||||
{
|
{
|
||||||
void SetSearch(etk::UString &myData);
|
void SetSearch(const etk::UString &myData);
|
||||||
void GetSearch(etk::UString &myData);
|
void GetSearch(etk::UString &myData);
|
||||||
bool IsSearchEmpty(void);
|
bool IsSearchEmpty(void);
|
||||||
void SetReplace(etk::UString &myData);
|
void SetReplace(const etk::UString &myData);
|
||||||
void GetReplace(etk::UString &myData);
|
void GetReplace(etk::UString &myData);
|
||||||
bool IsReplaceEmpty(void);
|
bool IsReplaceEmpty(void);
|
||||||
void SetCase(bool value);
|
void SetCase(bool value);
|
||||||
|
@ -7,8 +7,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <appl/Gui/TagFileSelection.h>
|
#include <appl/Gui/TagFileSelection.h>
|
||||||
#include <ewol/widget/SizerHori.h>
|
#include <ewol/widget/Sizer.h>
|
||||||
#include <ewol/widget/SizerVert.h>
|
|
||||||
#include <ewol/widget/List.h>
|
#include <ewol/widget/List.h>
|
||||||
#include <ewol/widget/Spacer.h>
|
#include <ewol/widget/Spacer.h>
|
||||||
#include <ewol/widget/Image.h>
|
#include <ewol/widget/Image.h>
|
||||||
@ -39,8 +38,8 @@ appl::TagFileSelection::TagFileSelection(void)
|
|||||||
widget::Button* myWidgetValidate = NULL;
|
widget::Button* myWidgetValidate = NULL;
|
||||||
widget::Button* myWidgetCancel = NULL;
|
widget::Button* myWidgetCancel = NULL;
|
||||||
|
|
||||||
widget::SizerVert * mySizerVert = NULL;
|
widget::Sizer * mySizerVert = NULL;
|
||||||
widget::SizerHori * mySizerHori = NULL;
|
widget::Sizer * mySizerHori = NULL;
|
||||||
widget::Spacer * mySpacer = NULL;
|
widget::Spacer * mySpacer = NULL;
|
||||||
#if defined(__TARGET_OS__Android)
|
#if defined(__TARGET_OS__Android)
|
||||||
SetDisplayRatio(0.90);
|
SetDisplayRatio(0.90);
|
||||||
@ -50,7 +49,7 @@ appl::TagFileSelection::TagFileSelection(void)
|
|||||||
SetDisplayRatio(0.80);
|
SetDisplayRatio(0.80);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
mySizerVert = new widget::SizerVert();
|
mySizerVert = new widget::Sizer(widget::Sizer::modeVert);
|
||||||
if (NULL == mySizerVert) {
|
if (NULL == mySizerVert) {
|
||||||
EWOL_ERROR("Can not allocate widget ==> display might be in error");
|
EWOL_ERROR("Can not allocate widget ==> display might be in error");
|
||||||
} else {
|
} else {
|
||||||
@ -58,7 +57,7 @@ appl::TagFileSelection::TagFileSelection(void)
|
|||||||
// set it in the pop-up-system :
|
// set it in the pop-up-system :
|
||||||
SubWidgetSet(mySizerVert);
|
SubWidgetSet(mySizerVert);
|
||||||
|
|
||||||
mySizerHori = new widget::SizerHori();
|
mySizerHori = new widget::Sizer(widget::Sizer::modeHori);
|
||||||
if (NULL == mySizerHori) {
|
if (NULL == mySizerHori) {
|
||||||
EWOL_ERROR("Can not allocate widget ==> display might be in error");
|
EWOL_ERROR("Can not allocate widget ==> display might be in error");
|
||||||
} else {
|
} else {
|
||||||
@ -116,15 +115,7 @@ appl::TagFileSelection::~TagFileSelection(void)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void appl::TagFileSelection::OnReceiveMessage(ewol::EObject * CallerObject, const char * eventId, const etk::UString& data)
|
||||||
/**
|
|
||||||
* @brief Receive a message from an other EObject with a specific eventId and data
|
|
||||||
* @param[in] CallerObject Pointer on the EObject that information came from
|
|
||||||
* @param[in] eventId Message registered by this class
|
|
||||||
* @param[in] data Data registered by this class
|
|
||||||
* @return ---
|
|
||||||
*/
|
|
||||||
void appl::TagFileSelection::OnReceiveMessage(ewol::EObject * CallerObject, const char * eventId, etk::UString data)
|
|
||||||
{
|
{
|
||||||
EWOL_INFO("ctags LIST ... : \"" << eventId << "\" ==> data=\"" << data << "\"" );
|
EWOL_INFO("ctags LIST ... : \"" << eventId << "\" ==> data=\"" << data << "\"" );
|
||||||
if (eventId == applEventctagsSelection) {
|
if (eventId == applEventctagsSelection) {
|
||||||
@ -155,7 +146,6 @@ void appl::TagFileSelection::OnReceiveMessage(ewol::EObject * CallerObject, cons
|
|||||||
* @brief Add a Ctags item on the curent list
|
* @brief Add a Ctags item on the curent list
|
||||||
* @param[in] file Compleate file name
|
* @param[in] file Compleate file name
|
||||||
* @param[in] jump line id
|
* @param[in] jump line id
|
||||||
* @return ---
|
|
||||||
*/
|
*/
|
||||||
void appl::TagFileSelection::AddCtagsNewItem(etk::UString file, int32_t line)
|
void appl::TagFileSelection::AddCtagsNewItem(etk::UString file, int32_t line)
|
||||||
{
|
{
|
||||||
@ -164,13 +154,6 @@ void appl::TagFileSelection::AddCtagsNewItem(etk::UString file, int32_t line)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Inform object that an other object is removed ...
|
|
||||||
* @param[in] removeObject Pointer on the EObject remeved ==> the user must remove all reference on this EObject
|
|
||||||
* @note : Sub classes must call this class
|
|
||||||
* @return ---
|
|
||||||
*/
|
|
||||||
void appl::TagFileSelection::OnObjectRemove(ewol::EObject * removeObject)
|
void appl::TagFileSelection::OnObjectRemove(ewol::EObject * removeObject)
|
||||||
{
|
{
|
||||||
// First step call parrent :
|
// First step call parrent :
|
||||||
|
@ -25,33 +25,16 @@ namespace appl {
|
|||||||
public:
|
public:
|
||||||
TagFileSelection(void);
|
TagFileSelection(void);
|
||||||
virtual ~TagFileSelection(void);
|
virtual ~TagFileSelection(void);
|
||||||
/**
|
// herited function
|
||||||
* @brief Get the current Object type of the EObject
|
|
||||||
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
|
|
||||||
* @param[in] objectType type description
|
|
||||||
* @return true if the object is compatible, otherwise false
|
|
||||||
*/
|
|
||||||
const char * const GetObjectType(void) { return "EwolFileChooser"; };
|
const char * const GetObjectType(void) { return "EwolFileChooser"; };
|
||||||
/**
|
// herited function
|
||||||
* @brief Receive a message from an other EObject with a specific eventId and data
|
void OnReceiveMessage(ewol::EObject * CallerObject, const char * eventId, const etk::UString& data);
|
||||||
* @param[in] CallerObject Pointer on the EObject that information came from
|
// herited function
|
||||||
* @param[in] eventId Message registered by this class
|
|
||||||
* @param[in] data Data registered by this class
|
|
||||||
* @return ---
|
|
||||||
*/
|
|
||||||
void OnReceiveMessage(ewol::EObject * CallerObject, const char * eventId, etk::UString data);
|
|
||||||
/**
|
|
||||||
* @brief Inform object that an other object is removed ...
|
|
||||||
* @param[in] removeObject Pointer on the EObject remeved ==> the user must remove all reference on this EObject
|
|
||||||
* @note : Sub classes must call this class
|
|
||||||
* @return ---
|
|
||||||
*/
|
|
||||||
void OnObjectRemove(ewol::EObject * removeObject);
|
void OnObjectRemove(ewol::EObject * removeObject);
|
||||||
/**
|
/**
|
||||||
* @brief Add a Ctags item on the curent list
|
* @brief Add a Ctags item on the curent list
|
||||||
* @param[in] file Compleate file name
|
* @param[in] file Compleate file name
|
||||||
* @param[in] jump line id
|
* @param[in] jump line id
|
||||||
* @return ---
|
|
||||||
*/
|
*/
|
||||||
void AddCtagsNewItem(etk::UString file, int32_t line);
|
void AddCtagsNewItem(etk::UString file, int32_t line);
|
||||||
|
|
||||||
|
@ -37,25 +37,14 @@ class localClassHighlightManager: public ewol::EObject
|
|||||||
listHighlight.Clear();
|
listHighlight.Clear();
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
// herited function
|
||||||
* @brief Get the current Object type of the EObject
|
|
||||||
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
|
|
||||||
* @param[in] objectType type description
|
|
||||||
* @return true if the object is compatible, otherwise false
|
|
||||||
*/
|
|
||||||
const char * const GetObjectType(void)
|
const char * const GetObjectType(void)
|
||||||
{
|
{
|
||||||
return "ApplHighlightManager";
|
return "ApplHighlightManager";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
// herited function
|
||||||
* @brief Receive a message from an other EObject with a specific eventId and data
|
virtual void OnReceiveMessage(ewol::EObject * CallerObject, const char * eventId, const etk::UString& data)
|
||||||
* @param[in] CallerObject Pointer on the EObject that information came from
|
|
||||||
* @param[in] eventId Message registered by this class
|
|
||||||
* @param[in] data Data registered by this class
|
|
||||||
* @return ---
|
|
||||||
*/
|
|
||||||
virtual void OnReceiveMessage(ewol::EObject * CallerObject, const char * eventId, etk::UString data)
|
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
switch (id)
|
switch (id)
|
||||||
@ -147,8 +136,6 @@ class localClassHighlightManager: public ewol::EObject
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#define EDN_CAST_HIGHLIGHT_MANAGER(curentPointer) EWOL_CAST(TYPE_EOBJECT_EDN_HIGHLIGHT_MANAGER,localClassHighlightManager,curentPointer)
|
|
||||||
|
|
||||||
static localClassHighlightManager * localManager = NULL;
|
static localClassHighlightManager * localManager = NULL;
|
||||||
|
|
||||||
|
|
||||||
|
@ -43,7 +43,7 @@ class CTagsManager: public ewol::EObject
|
|||||||
* @param[in] data Data registered by this class
|
* @param[in] data Data registered by this class
|
||||||
* @return ---
|
* @return ---
|
||||||
*/
|
*/
|
||||||
void OnReceiveMessage(ewol::EObject * CallerObject, const char * eventId, etk::UString data);
|
void OnReceiveMessage(ewol::EObject * CallerObject, const char * eventId, const etk::UString& data);
|
||||||
|
|
||||||
int32_t m_currentSelectedID;
|
int32_t m_currentSelectedID;
|
||||||
void LoadTagFile(void);
|
void LoadTagFile(void);
|
||||||
@ -125,7 +125,7 @@ CTagsManager::~CTagsManager(void)
|
|||||||
|
|
||||||
const char * ednEventPopUpCtagsLoadFile = "edn-event-load-ctags";
|
const char * ednEventPopUpCtagsLoadFile = "edn-event-load-ctags";
|
||||||
|
|
||||||
void CTagsManager::OnReceiveMessage(ewol::EObject * CallerObject, const char * eventId, etk::UString data)
|
void CTagsManager::OnReceiveMessage(ewol::EObject * CallerObject, const char * eventId, const etk::UString& data)
|
||||||
{
|
{
|
||||||
//EWOL_INFO("ctags manager event ... : \"" << eventId << "\" ==> data=\"" << data << "\"" );
|
//EWOL_INFO("ctags manager event ... : \"" << eventId << "\" ==> data=\"" << data << "\"" );
|
||||||
if (eventId == ednMsgBufferId) {
|
if (eventId == ednMsgBufferId) {
|
||||||
|
@ -113,7 +113,8 @@ static const char * const l_changeTabulation = "edn-event-change-tabulation";
|
|||||||
static const char * const l_changeEndOfLine = "edn-event-change-endOfLine";
|
static const char * const l_changeEndOfLine = "edn-event-change-endOfLine";
|
||||||
static const char * const l_changeRounded = "edn-event-change-rounded";
|
static const char * const l_changeRounded = "edn-event-change-rounded";
|
||||||
|
|
||||||
globals::ParameterGlobalsGui::ParameterGlobalsGui(void)
|
globals::ParameterGlobalsGui::ParameterGlobalsGui(void) :
|
||||||
|
widget::Sizer(widget::Sizer::modeVert)
|
||||||
{
|
{
|
||||||
widget::CheckBox* myCheckbox = NULL;
|
widget::CheckBox* myCheckbox = NULL;
|
||||||
widget::Spacer* mySpacer = NULL;
|
widget::Spacer* mySpacer = NULL;
|
||||||
@ -179,16 +180,9 @@ globals::ParameterGlobalsGui::~ParameterGlobalsGui(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
void globals::ParameterGlobalsGui::OnReceiveMessage(ewol::EObject * CallerObject, const char * eventId, const etk::UString& data)
|
||||||
* @brief Receive a message from an other EObject with a specific eventId and data
|
|
||||||
* @param[in] CallerObject Pointer on the EObject that information came from
|
|
||||||
* @param[in] eventId Message registered by this class
|
|
||||||
* @param[in] data Data registered by this class
|
|
||||||
* @return ---
|
|
||||||
*/
|
|
||||||
void globals::ParameterGlobalsGui::OnReceiveMessage(ewol::EObject * CallerObject, const char * eventId, etk::UString data)
|
|
||||||
{
|
{
|
||||||
widget::SizerVert::OnReceiveMessage(CallerObject, eventId, data);
|
widget::Sizer::OnReceiveMessage(CallerObject, eventId, data);
|
||||||
|
|
||||||
if (eventId == l_changeEndOfLine) {
|
if (eventId == l_changeEndOfLine) {
|
||||||
if (data == "true") {
|
if (data == "true") {
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
#define __TOOLS_GLOBALS_H__
|
#define __TOOLS_GLOBALS_H__
|
||||||
|
|
||||||
#include <appl/Debug.h>
|
#include <appl/Debug.h>
|
||||||
#include <ewol/widget/SizerVert.h>
|
#include <ewol/widget/Sizer.h>
|
||||||
|
|
||||||
|
|
||||||
namespace globals
|
namespace globals
|
||||||
@ -35,19 +35,13 @@ namespace globals
|
|||||||
|
|
||||||
bool OrderTheBufferList(void);
|
bool OrderTheBufferList(void);
|
||||||
|
|
||||||
class ParameterGlobalsGui : public widget::SizerVert
|
class ParameterGlobalsGui : public widget::Sizer
|
||||||
{
|
{
|
||||||
public :
|
public :
|
||||||
ParameterGlobalsGui(void);
|
ParameterGlobalsGui(void);
|
||||||
~ParameterGlobalsGui(void);
|
~ParameterGlobalsGui(void);
|
||||||
/**
|
// herited function
|
||||||
* @brief Receive a message from an other EObject with a specific eventId and data
|
virtual void OnReceiveMessage(ewol::EObject * CallerObject, const char * eventId, const etk::UString& data);
|
||||||
* @param[in] CallerObject Pointer on the EObject that information came from
|
|
||||||
* @param[in] eventId Message registered by this class
|
|
||||||
* @param[in] data Data registered by this class
|
|
||||||
* @return ---
|
|
||||||
*/
|
|
||||||
virtual void OnReceiveMessage(ewol::EObject * CallerObject, const char * eventId, etk::UString data);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user