[DEV] update on EWOL 0.8.1
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
#include <appl/BufferManager.h>
|
||||
//#include <ColorizeManager.h>
|
||||
#include <appl/Gui/MainWindows.h>
|
||||
#include <ewol/renderer/EObject.h>
|
||||
#include <ewol/object/Object.h>
|
||||
|
||||
#undef __class__
|
||||
#define __class__ "BufferView"
|
||||
@@ -107,8 +107,8 @@ void BufferView::insertAlphabetic(appl::dataBufferStruct* _dataStruct, bool _sel
|
||||
}
|
||||
|
||||
|
||||
void BufferView::onReceiveMessage(const ewol::EMessage& _msg) {
|
||||
widget::List::onReceiveMessage(_msg);
|
||||
void BufferView::onReceiveMessage(const ewol::object::Message& _msg) {
|
||||
ewol::widget::List::onReceiveMessage(_msg);
|
||||
if (_msg.getMessage() == appl::MsgSelectNewFile) {
|
||||
appl::Buffer* buffer = m_bufferManager->get(_msg.getData());
|
||||
if (buffer == NULL) {
|
||||
@@ -221,8 +221,8 @@ void BufferView::onReceiveMessage(const ewol::EMessage& _msg) {
|
||||
}
|
||||
}
|
||||
|
||||
void BufferView::onObjectRemove(ewol::EObject* _removeObject) {
|
||||
widget::List::onObjectRemove(_removeObject);
|
||||
void BufferView::onObjectRemove(ewol::Object* _removeObject) {
|
||||
ewol::widget::List::onObjectRemove(_removeObject);
|
||||
for (int32_t iii=0; iii<m_list.size(); iii++) {
|
||||
if (m_list[iii] == NULL) {
|
||||
continue;
|
||||
@@ -281,9 +281,9 @@ bool BufferView::getElement(int32_t _colomn, int32_t _raw, std::string& _myTextT
|
||||
return true;
|
||||
}
|
||||
|
||||
bool BufferView::onItemEvent(int32_t _IdInput, enum ewol::keyEvent::status _typeEvent, int32_t _colomn, int32_t _raw, float _x, float _y)
|
||||
bool BufferView::onItemEvent(int32_t _IdInput, enum ewol::key::status _typeEvent, int32_t _colomn, int32_t _raw, float _x, float _y)
|
||||
{
|
||||
if (1 == _IdInput && _typeEvent == ewol::keyEvent::statusSingle) {
|
||||
if (1 == _IdInput && _typeEvent == ewol::key::statusSingle) {
|
||||
APPL_INFO("Event on List : IdInput=" << _IdInput << " colomn=" << _colomn << " raw=" << _raw );
|
||||
if( _raw >= 0
|
||||
&& _raw<m_list.size()
|
||||
|
@@ -31,7 +31,7 @@ namespace appl
|
||||
};
|
||||
};
|
||||
|
||||
class BufferView : public widget::List
|
||||
class BufferView : public ewol::widget::List
|
||||
{
|
||||
private:
|
||||
appl::BufferManager* m_bufferManager; //!< handle on the buffer manager
|
||||
@@ -56,8 +56,8 @@ class BufferView : public widget::List
|
||||
BufferView(void);
|
||||
~BufferView(void);
|
||||
// Derived function
|
||||
virtual void onReceiveMessage(const ewol::EMessage& _msg);
|
||||
virtual void onObjectRemove(ewol::EObject* _removeObject);
|
||||
virtual void onReceiveMessage(const ewol::object::Message& _msg);
|
||||
virtual void onObjectRemove(ewol::Object* _removeObject);
|
||||
private:
|
||||
bool m_openOrderMode; //!< true if the order is the opening order mode, otherwise, Alphabetic order
|
||||
protected:
|
||||
@@ -69,7 +69,7 @@ class BufferView : public widget::List
|
||||
virtual bool getTitle(int32_t _colomn, std::string& _myTitle, etk::Color<>& _fg, etk::Color<>& _bg);
|
||||
virtual uint32_t getNuberOfRaw(void);
|
||||
virtual bool getElement(int32_t _colomn, int32_t _raw, std::string& _myTextToWrite, etk::Color<>& _fg, etk::Color<>& _bg);
|
||||
virtual bool onItemEvent(int32_t _IdInput, enum ewol::keyEvent::status _typeEvent, int32_t _colomn, int32_t _raw, float _x, float _y);
|
||||
virtual bool onItemEvent(int32_t _IdInput, enum ewol::key::status _typeEvent, int32_t _colomn, int32_t _raw, float _x, float _y);
|
||||
};
|
||||
|
||||
|
||||
|
@@ -27,9 +27,9 @@
|
||||
#include <ewol/widget/Menu.h>
|
||||
#include <ewol/widget/meta/FileChooser.h>
|
||||
#include <ewol/widget/meta/Parameter.h>
|
||||
#include <ewol/widget/WidgetManager.h>
|
||||
#include <ewol/renderer/EObject.h>
|
||||
#include <ewol/renderer/eContext.h>
|
||||
#include <ewol/widget/Manager.h>
|
||||
#include <ewol/object/Object.h>
|
||||
#include <ewol/context/Context.h>
|
||||
#include <date/date.h>
|
||||
#include <ewol/widget/meta/StdPopUp.h>
|
||||
#include <appl/Gui/WorkerSaveFile.h>
|
||||
@@ -57,13 +57,13 @@ namespace appl {
|
||||
#include <ewol/widget/Label.h>
|
||||
#include <ewol/widget/Spacer.h>
|
||||
|
||||
class ParameterAboutGui : public widget::Sizer {
|
||||
class ParameterAboutGui : public ewol::widget::Sizer {
|
||||
public :
|
||||
ParameterAboutGui(void) :
|
||||
widget::Sizer(widget::Sizer::modeVert) {
|
||||
widget::Spacer* mySpacer = NULL;
|
||||
ewol::widget::Sizer(ewol::widget::Sizer::modeVert) {
|
||||
ewol::widget::Spacer* mySpacer = NULL;
|
||||
|
||||
mySpacer = new widget::Spacer();
|
||||
mySpacer = new ewol::widget::Spacer();
|
||||
if (NULL == mySpacer) {
|
||||
APPL_ERROR("Can not allocate widget == > display might be in error");
|
||||
} else {
|
||||
@@ -93,7 +93,7 @@ class ParameterAboutGui : public widget::Sizer {
|
||||
tmpLabel += " libPng, ogg-tremor, portaudio, libZip<br/>";
|
||||
tmpLabel += " tinyXml, freetype, agg2.4, etk<br/>";
|
||||
tmpLabel += "</left>";
|
||||
widget::Label* myLabel = new widget::Label(tmpLabel);
|
||||
ewol::widget::Label* myLabel = new ewol::widget::Label(tmpLabel);
|
||||
if (NULL == myLabel) {
|
||||
APPL_ERROR("Can not allocate widget == > display might be in error");
|
||||
} else {
|
||||
@@ -121,28 +121,28 @@ const char* l_smoothMax = "tmpEvent_maxChange";
|
||||
MainWindows::MainWindows(void) {
|
||||
addObjectType("appl::MainWindows");
|
||||
APPL_DEBUG("CREATE WINDOWS ... ");
|
||||
widget::Sizer * mySizerVert = NULL;
|
||||
widget::Sizer * mySizerVert2 = NULL;
|
||||
widget::Sizer * mySizerHori = NULL;
|
||||
ewol::widget::Sizer * mySizerVert = NULL;
|
||||
ewol::widget::Sizer * mySizerVert2 = NULL;
|
||||
ewol::widget::Sizer * mySizerHori = NULL;
|
||||
//ewol::Button * myButton = NULL;
|
||||
appl::TextViewer * myTextView = NULL;
|
||||
BufferView * myBufferView = NULL;
|
||||
widget::Menu * myMenu = NULL;
|
||||
ewol::widget::Menu * myMenu = NULL;
|
||||
|
||||
// load buffer manager:
|
||||
m_bufferManager = appl::BufferManager::keep();
|
||||
|
||||
mySizerVert = new widget::Sizer(widget::Sizer::modeVert);
|
||||
mySizerVert = new ewol::widget::Sizer(ewol::widget::Sizer::modeVert);
|
||||
setSubWidget(mySizerVert);
|
||||
|
||||
mySizerHori = new widget::Sizer(widget::Sizer::modeHori);
|
||||
mySizerHori = new ewol::widget::Sizer(ewol::widget::Sizer::modeHori);
|
||||
mySizerVert->subWidgetAdd(mySizerHori);
|
||||
myBufferView = new BufferView();
|
||||
myBufferView->setExpand(bvec2(false,true));
|
||||
myBufferView->setFill(bvec2(true,true));
|
||||
mySizerHori->subWidgetAdd(myBufferView);
|
||||
|
||||
mySizerVert2 = new widget::Sizer(widget::Sizer::modeVert);
|
||||
mySizerVert2 = new ewol::widget::Sizer(ewol::widget::Sizer::modeVert);
|
||||
mySizerHori->subWidgetAdd(mySizerVert2);
|
||||
|
||||
// main buffer Area :
|
||||
@@ -161,14 +161,14 @@ MainWindows::MainWindows(void) {
|
||||
mySizerVert2->subWidgetAdd(mySearch);
|
||||
#ifdef APPL_BUFFER_FONT_DISTANCE_FIELD
|
||||
{
|
||||
widget::Sizer * mySizerHori2 = new widget::Sizer(widget::Sizer::modeHori);
|
||||
ewol::widget::Sizer * mySizerHori2 = new widget::Sizer(ewol::widget::Sizer::modeHori);
|
||||
mySizerVert2->subWidgetAdd(mySizerHori2);
|
||||
|
||||
widget::CheckBox* tmpCheck = new widget::CheckBox("smooth");
|
||||
ewol::widget::CheckBox* tmpCheck = new widget::CheckBox("smooth");
|
||||
mySizerHori2->subWidgetAdd(tmpCheck);
|
||||
tmpCheck->registerOnEvent(this, ewolEventCheckBoxClicked, l_smoothChick);
|
||||
|
||||
widget::Slider* tmpSlider = new widget::Slider();
|
||||
ewol::widget::Slider* tmpSlider = new widget::Slider();
|
||||
mySizerHori2->subWidgetAdd(tmpSlider);
|
||||
tmpSlider->registerOnEvent(this, ewolEventSliderChange, l_smoothMin);
|
||||
tmpSlider->setExpand(bvec2(true,false));
|
||||
@@ -177,7 +177,7 @@ MainWindows::MainWindows(void) {
|
||||
tmpSlider->setValue(0450);
|
||||
tmpSliderMin = tmpSlider;
|
||||
|
||||
tmpSlider = new widget::Slider();
|
||||
tmpSlider = new ewol::widget::Slider();
|
||||
mySizerHori2->subWidgetAdd(tmpSlider);
|
||||
tmpSlider->registerOnEvent(this, ewolEventSliderChange, l_smoothMax);
|
||||
tmpSlider->setExpand(bvec2(true,false));
|
||||
@@ -188,10 +188,10 @@ MainWindows::MainWindows(void) {
|
||||
}
|
||||
#endif
|
||||
|
||||
mySizerHori = new widget::Sizer(widget::Sizer::modeHori);
|
||||
mySizerHori = new ewol::widget::Sizer(ewol::widget::Sizer::modeHori);
|
||||
mySizerVert->subWidgetAdd(mySizerHori);
|
||||
|
||||
myMenu = new widget::Menu();
|
||||
myMenu = new ewol::widget::Menu();
|
||||
mySizerHori->subWidgetAdd(myMenu);
|
||||
int32_t idMenuFile = myMenu->addTitle("File");
|
||||
(void)myMenu->add(idMenuFile, "New", "", ednMsgGuiNew);
|
||||
@@ -238,7 +238,7 @@ MainWindows::MainWindows(void) {
|
||||
(void)myMenu->addSpacer();
|
||||
(void)myMenu->add(idMenugDisplay, "Reload openGl Shader", "", ednMsgGuiReloadShader);
|
||||
|
||||
m_widgetLabelFileName = new widget::Label("FileName");
|
||||
m_widgetLabelFileName = new ewol::widget::Label("FileName");
|
||||
m_widgetLabelFileName->setExpand(bvec2(true,false));
|
||||
m_widgetLabelFileName->setFill(bvec2(true,false));;
|
||||
mySizerHori->subWidgetAdd(m_widgetLabelFileName);
|
||||
@@ -292,13 +292,13 @@ const char *const ednEventPopUpFileSelected = "edn-mainWindows-openSelected";
|
||||
const char *const ednEventPopUpFileSaveAs = "edn-mainWindows-saveAsSelected";
|
||||
|
||||
|
||||
void MainWindows::onReceiveMessage(const ewol::EMessage& _msg) {
|
||||
ewol::Windows::onReceiveMessage(_msg);
|
||||
void MainWindows::onReceiveMessage(const ewol::object::Message& _msg) {
|
||||
ewol::widget::Windows::onReceiveMessage(_msg);
|
||||
|
||||
APPL_VERBOSE("Receive Event from the main windows: " << _msg );
|
||||
// open file Section ...
|
||||
if (_msg.getMessage() == ednMsgGuiOpen) {
|
||||
widget::FileChooser* tmpWidget = new widget::FileChooser();
|
||||
ewol::widget::FileChooser* tmpWidget = new ewol::widget::FileChooser();
|
||||
if (tmpWidget == NULL) {
|
||||
APPL_ERROR("Can not open File chooser !!! ");
|
||||
return;
|
||||
@@ -317,10 +317,10 @@ void MainWindows::onReceiveMessage(const ewol::EMessage& _msg) {
|
||||
}
|
||||
// apply widget pop-up ...
|
||||
popUpWidgetPush(tmpWidget);
|
||||
tmpWidget->registerOnEvent(this, widget::FileChooser::eventValidate, ednEventPopUpFileSelected);
|
||||
tmpWidget->registerOnEvent(this, ewol::widget::FileChooser::eventValidate, ednEventPopUpFileSelected);
|
||||
} else if (_msg.getMessage() == ednMsgProperties) {
|
||||
// Request the parameter GUI
|
||||
widget::Parameter* tmpWidget = new widget::Parameter();
|
||||
ewol::widget::Parameter* tmpWidget = new ewol::widget::Parameter();
|
||||
if (NULL == tmpWidget) {
|
||||
APPL_ERROR("Can not allocate widget == > display might be in error");
|
||||
} else {
|
||||
@@ -459,7 +459,7 @@ void MainWindows::closeNotSavedFile(appl::Buffer* _buffer) {
|
||||
APPL_ERROR("Call With NULL input...");
|
||||
return;
|
||||
}
|
||||
widget::StdPopUp* tmpPopUp = new widget::StdPopUp();
|
||||
ewol::widget::StdPopUp* tmpPopUp = new ewol::widget::StdPopUp();
|
||||
if (tmpPopUp == NULL) {
|
||||
APPL_ERROR("Can not create a simple pop-up");
|
||||
return;
|
||||
@@ -471,27 +471,27 @@ void MainWindows::closeNotSavedFile(appl::Buffer* _buffer) {
|
||||
bt = tmpPopUp->addButton("Save", true);
|
||||
if (bt != NULL) {
|
||||
// TODO : The element is removed before beeing pressed
|
||||
bt->registerOnEvent(this, widget::Button::eventPressed, mainWindowsRequestSaveFile, _buffer->getFileName());
|
||||
bt->registerOnEvent(this, widget::Button::eventPressed, mainWindowsRequestcloseFileNoCheck, _buffer->getFileName());
|
||||
bt->registerOnEvent(this, ewol::widget::Button::eventPressed, mainWindowsRequestSaveFile, _buffer->getFileName());
|
||||
bt->registerOnEvent(this, ewol::widget::Button::eventPressed, mainWindowsRequestcloseFileNoCheck, _buffer->getFileName());
|
||||
}
|
||||
}
|
||||
bt = tmpPopUp->addButton("Save As", true);
|
||||
if (bt != NULL) {
|
||||
bt->registerOnEvent(this, widget::Button::eventPressed, mainWindowsRequestSaveFileAs, _buffer->getFileName());
|
||||
//bt->registerOnEvent(this, widget::Button::eventPressed, mainWindowsRequestcloseFileNoCheck, _buffer->getFileName());
|
||||
bt->registerOnEvent(this, ewol::widget::Button::eventPressed, mainWindowsRequestSaveFileAs, _buffer->getFileName());
|
||||
//bt->registerOnEvent(this, ewol::widget::Button::eventPressed, mainWindowsRequestcloseFileNoCheck, _buffer->getFileName());
|
||||
// TODO : Request the close when saved ...
|
||||
}
|
||||
bt = tmpPopUp->addButton("Close", true);
|
||||
if (bt != NULL) {
|
||||
bt->registerOnEvent(this, widget::Button::eventPressed, mainWindowsRequestcloseFileNoCheck, _buffer->getFileName());
|
||||
bt->registerOnEvent(this, ewol::widget::Button::eventPressed, mainWindowsRequestcloseFileNoCheck, _buffer->getFileName());
|
||||
}
|
||||
tmpPopUp->addButton("Cancel", true);
|
||||
tmpPopUp->setRemoveOnExternClick(true);
|
||||
popUpWidgetPush(tmpPopUp);
|
||||
}
|
||||
|
||||
void MainWindows::onObjectRemove(ewol::EObject* _removeObject) {
|
||||
ewol::Windows::onObjectRemove(_removeObject);
|
||||
void MainWindows::onObjectRemove(ewol::Object* _removeObject) {
|
||||
ewol::widget::Windows::onObjectRemove(_removeObject);
|
||||
if (m_widgetLabelFileName == _removeObject) {
|
||||
m_widgetLabelFileName = NULL;
|
||||
}
|
||||
|
@@ -17,10 +17,10 @@
|
||||
#include <ewol/widget/Label.h>
|
||||
#include <appl/BufferManager.h>
|
||||
|
||||
class MainWindows : public ewol::Windows {
|
||||
class MainWindows : public ewol::widget::Windows {
|
||||
private:
|
||||
int32_t m_currentSavingAsIdBuffer;
|
||||
widget::Label* m_widgetLabelFileName;
|
||||
ewol::widget::Label* m_widgetLabelFileName;
|
||||
public:
|
||||
// Constructeur
|
||||
MainWindows(void);
|
||||
@@ -38,8 +38,8 @@ class MainWindows : public ewol::Windows {
|
||||
*/
|
||||
void closeNotSavedFile(appl::Buffer* _buffer);
|
||||
public: // Derived function
|
||||
virtual void onReceiveMessage(const ewol::EMessage& _msg);
|
||||
virtual void onObjectRemove(ewol::EObject * _removeObject);
|
||||
virtual void onReceiveMessage(const ewol::object::Message& _msg);
|
||||
virtual void onObjectRemove(ewol::Object * _removeObject);
|
||||
};
|
||||
|
||||
|
||||
|
@@ -29,7 +29,7 @@ const char* const l_eventForwardCb = "appl-forward-CheckBox";
|
||||
const char* const l_eventHideBt = "appl-hide-button";
|
||||
|
||||
Search::Search(void) :
|
||||
widget::Composer(widget::Composer::file, "DATA:GUI-Search.xml"),
|
||||
ewol::widget::Composer(ewol::widget::Composer::file, "DATA:GUI-Search.xml"),
|
||||
m_viewerManager(NULL),
|
||||
m_forward(true),
|
||||
m_caseSensitive(false),
|
||||
@@ -55,8 +55,8 @@ Search::Search(void) :
|
||||
setConfigNamed("SEARCH:wrap", "value", std::to_string(m_wrap));
|
||||
setConfigNamed("SEARCH:up-down", "value", std::to_string(m_forward));
|
||||
// get widget
|
||||
m_searchEntry = dynamic_cast<widget::Entry*>(getWidgetNamed("SEARCH:search-entry"));
|
||||
m_replaceEntry = dynamic_cast<widget::Entry*>(getWidgetNamed("SEARCH:replace-entry"));
|
||||
m_searchEntry = dynamic_cast<ewol::widget::Entry*>(getWidgetNamed("SEARCH:search-entry"));
|
||||
m_replaceEntry = dynamic_cast<ewol::widget::Entry*>(getWidgetNamed("SEARCH:replace-entry"));
|
||||
// Display and hide event:
|
||||
registerMultiCast(ednMsgGuiSearch);
|
||||
// basicly hiden ...
|
||||
@@ -121,8 +121,8 @@ void Search::replace(void) {
|
||||
}
|
||||
|
||||
|
||||
void Search::onReceiveMessage(const ewol::EMessage& _msg) {
|
||||
widget::Composer::onReceiveMessage(_msg);
|
||||
void Search::onReceiveMessage(const ewol::object::Message& _msg) {
|
||||
ewol::widget::Composer::onReceiveMessage(_msg);
|
||||
APPL_INFO("Search receive message : " << _msg);
|
||||
if ( _msg.getMessage() == l_eventSearchEntry) {
|
||||
m_searchData = to_u32string(_msg.getData());
|
||||
@@ -162,8 +162,8 @@ void Search::onReceiveMessage(const ewol::EMessage& _msg) {
|
||||
}
|
||||
}
|
||||
|
||||
void Search::onObjectRemove(ewol::EObject * _removeObject) {
|
||||
widget::Composer::onObjectRemove(_removeObject);
|
||||
void Search::onObjectRemove(ewol::Object * _removeObject) {
|
||||
ewol::widget::Composer::onObjectRemove(_removeObject);
|
||||
if (_removeObject == m_searchEntry) {
|
||||
m_searchEntry = NULL;
|
||||
}
|
||||
|
@@ -15,14 +15,14 @@
|
||||
#include <appl/Buffer.h>
|
||||
#include <appl/Gui/ViewerManager.h>
|
||||
|
||||
class Search : public widget::Composer {
|
||||
class Search : public ewol::widget::Composer {
|
||||
private:
|
||||
appl::ViewerManager* m_viewerManager; //!< handle on the buffer manager
|
||||
bool m_forward;
|
||||
bool m_caseSensitive;
|
||||
bool m_wrap;
|
||||
widget::Entry* m_searchEntry;
|
||||
widget::Entry* m_replaceEntry;
|
||||
ewol::widget::Entry* m_searchEntry;
|
||||
ewol::widget::Entry* m_replaceEntry;
|
||||
std::u32string m_searchData;
|
||||
std::u32string m_replaceData;
|
||||
public:
|
||||
@@ -39,8 +39,8 @@ class Search : public widget::Composer {
|
||||
*/
|
||||
void replace(void);
|
||||
public: // derived function
|
||||
virtual void onReceiveMessage(const ewol::EMessage& _msg);
|
||||
virtual void onObjectRemove(ewol::EObject * _removeObject);
|
||||
virtual void onReceiveMessage(const ewol::object::Message& _msg);
|
||||
virtual void onObjectRemove(ewol::Object * _removeObject);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@@ -86,8 +86,8 @@ bool appl::TagFileList::getElement(int32_t _colomn, int32_t _raw, std::string& _
|
||||
};
|
||||
|
||||
|
||||
bool appl::TagFileList::onItemEvent(int32_t _IdInput, enum ewol::keyEvent::status _typeEvent, int32_t _colomn, int32_t _raw, float _x, float _y) {
|
||||
if (_typeEvent == ewol::keyEvent::statusSingle) {
|
||||
bool appl::TagFileList::onItemEvent(int32_t _IdInput, enum ewol::key::status _typeEvent, int32_t _colomn, int32_t _raw, float _x, float _y) {
|
||||
if (_typeEvent == ewol::key::statusSingle) {
|
||||
EWOL_INFO("Event on List : IdInput=" << _IdInput << " colomn=" << _colomn << " raw=" << _raw );
|
||||
if (_IdInput == 1) {
|
||||
int32_t previousRaw = m_selectedLine;
|
||||
|
@@ -31,7 +31,7 @@ namespace appl {
|
||||
|
||||
};
|
||||
};
|
||||
class TagFileList : public widget::List {
|
||||
class TagFileList : public ewol::widget::List {
|
||||
private:
|
||||
int32_t m_selectedLine;
|
||||
std::vector<appl::TagListElement*> m_list;
|
||||
@@ -44,7 +44,7 @@ namespace appl {
|
||||
bool getTitle(int32_t _colomn, std::string& _myTitle, etk::Color<>& _fg, etk::Color<>& _bg);
|
||||
uint32_t getNuberOfRaw(void);
|
||||
bool getElement(int32_t _colomn, int32_t _raw, std::string& _myTextToWrite, etk::Color<>& _fg, etk::Color<>& _bg);
|
||||
bool onItemEvent(int32_t _IdInput, enum ewol::keyEvent::status _typeEvent, int32_t _colomn, int32_t _raw, float _x, float _y);
|
||||
bool onItemEvent(int32_t _IdInput, enum ewol::key::status _typeEvent, int32_t _colomn, int32_t _raw, float _x, float _y);
|
||||
public:
|
||||
/**
|
||||
* @brief add a Ctags item on the curent list
|
||||
|
@@ -11,7 +11,7 @@
|
||||
#include <ewol/widget/List.h>
|
||||
#include <ewol/widget/Spacer.h>
|
||||
#include <ewol/widget/Image.h>
|
||||
#include <ewol/widget/WidgetManager.h>
|
||||
#include <ewol/widget/Manager.h>
|
||||
#include <vector>
|
||||
#include <etk/tool.h>
|
||||
#include <ewol/widget/Button.h>
|
||||
@@ -35,13 +35,13 @@ appl::TagFileSelection::TagFileSelection(void) {
|
||||
addEventId(applEventctagsSelection);
|
||||
addEventId(applEventctagsCancel);
|
||||
|
||||
widget::Label* myWidgetTitle = NULL;
|
||||
widget::Button* myWidgetValidate = NULL;
|
||||
widget::Button* myWidgetCancel = NULL;
|
||||
ewol::widget::Label* myWidgetTitle = NULL;
|
||||
ewol::widget::Button* myWidgetValidate = NULL;
|
||||
ewol::widget::Button* myWidgetCancel = NULL;
|
||||
|
||||
widget::Sizer * mySizerVert = NULL;
|
||||
widget::Sizer * mySizerHori = NULL;
|
||||
widget::Spacer * mySpacer = NULL;
|
||||
ewol::widget::Sizer * mySizerVert = NULL;
|
||||
ewol::widget::Sizer * mySizerHori = NULL;
|
||||
ewol::widget::Spacer * mySpacer = NULL;
|
||||
#if defined(__TARGET_OS__Android)
|
||||
setMinSize(ewol::Dimension(vec2(90,90),ewol::Dimension::Pourcent));
|
||||
#elif defined(__TARGET_OS__Windows)
|
||||
@@ -50,7 +50,7 @@ appl::TagFileSelection::TagFileSelection(void) {
|
||||
setMinSize(ewol::Dimension(vec2(80,80),ewol::Dimension::Pourcent));
|
||||
#endif
|
||||
|
||||
mySizerVert = new widget::Sizer(widget::Sizer::modeVert);
|
||||
mySizerVert = new ewol::widget::Sizer(ewol::widget::Sizer::modeVert);
|
||||
if (NULL == mySizerVert) {
|
||||
EWOL_ERROR("Can not allocate widget == > display might be in error");
|
||||
} else {
|
||||
@@ -58,7 +58,7 @@ appl::TagFileSelection::TagFileSelection(void) {
|
||||
mySizerVert->setExpand(bvec2(true,true));
|
||||
// set it in the pop-up-system :
|
||||
setSubWidget(mySizerVert);
|
||||
widget::Composer* compose = new widget::Composer(widget::Composer::String,
|
||||
ewol::widget::Composer* compose = new ewol::widget::Composer(ewol::widget::Composer::String,
|
||||
"<sizer mode=\"hori\" expand=\"true,false\" lock=\"false,true\">\n"
|
||||
" <spacer expand=\"true,false\"/>\n"
|
||||
" <button name=\"PLUGIN-CTAGS-jump\" expand=\"false\" fill=\"true\">"
|
||||
@@ -92,7 +92,7 @@ appl::TagFileSelection::TagFileSelection(void) {
|
||||
mySizerVert->subWidgetAdd(m_listTag);
|
||||
}
|
||||
|
||||
myWidgetTitle = new widget::Label("Ctags Jump Selection ...");
|
||||
myWidgetTitle = new ewol::widget::Label("Ctags Jump Selection ...");
|
||||
if (NULL == myWidgetTitle) {
|
||||
EWOL_ERROR("Can not allocate widget == > display might be in error");
|
||||
} else {
|
||||
@@ -106,7 +106,7 @@ appl::TagFileSelection::~TagFileSelection(void) {
|
||||
|
||||
}
|
||||
|
||||
void appl::TagFileSelection::onReceiveMessage(const ewol::EMessage& _msg) {
|
||||
void appl::TagFileSelection::onReceiveMessage(const ewol::object::Message& _msg) {
|
||||
EWOL_INFO("ctags LIST ... : " << _msg );
|
||||
if (_msg.getMessage() == applEventctagsSelection) {
|
||||
if (m_eventNamed!="") {
|
||||
@@ -143,9 +143,9 @@ void appl::TagFileSelection::addCtagsNewItem(std::string _file, int32_t _line) {
|
||||
}
|
||||
}
|
||||
|
||||
void appl::TagFileSelection::onObjectRemove(ewol::EObject * _removeObject) {
|
||||
void appl::TagFileSelection::onObjectRemove(ewol::Object * _removeObject) {
|
||||
// First step call parrent :
|
||||
widget::PopUp::onObjectRemove(_removeObject);
|
||||
ewol::widget::PopUp::onObjectRemove(_removeObject);
|
||||
// second step find if in all the elements ...
|
||||
if(_removeObject == m_listTag) {
|
||||
m_listTag = NULL;
|
||||
|
@@ -17,7 +17,7 @@ extern const char * const applEventctagsSelection;
|
||||
extern const char * const applEventctagsCancel;
|
||||
|
||||
namespace appl {
|
||||
class TagFileSelection : public widget::PopUp {
|
||||
class TagFileSelection : public ewol::widget::PopUp {
|
||||
private:
|
||||
appl::TagFileList* m_listTag;
|
||||
std::string m_eventNamed;
|
||||
@@ -31,8 +31,8 @@ namespace appl {
|
||||
*/
|
||||
void addCtagsNewItem(std::string file, int32_t line);
|
||||
public: // herited function
|
||||
void onReceiveMessage(const ewol::EMessage& _msg);
|
||||
void onObjectRemove(ewol::EObject * _removeObject);
|
||||
void onReceiveMessage(const ewol::object::Message& _msg);
|
||||
void onObjectRemove(ewol::Object * _removeObject);
|
||||
};
|
||||
};
|
||||
|
||||
|
@@ -10,11 +10,11 @@
|
||||
#include <appl/global.h>
|
||||
#include <appl/Gui/TextViewer.h>
|
||||
#include <appl/BufferManager.h>
|
||||
#include <ewol/clipBoard.h>
|
||||
#include <ewol/context/clipBoard.h>
|
||||
|
||||
#include <ewol/widget/WidgetManager.h>
|
||||
#include <ewol/widget/Manager.h>
|
||||
#include <appl/Gui/ViewerManager.h>
|
||||
#include <ewol/renderer/EObject.h>
|
||||
#include <ewol/object/Object.h>
|
||||
#include <appl/TextPluginManager.h>
|
||||
|
||||
#undef __class__
|
||||
@@ -98,7 +98,7 @@ void appl::TextViewer::onRegenerateDisplay(void) {
|
||||
if (m_buffer == NULL) {
|
||||
m_maxSize.setX(256);
|
||||
m_maxSize.setY(256);
|
||||
m_displayText.setTextAlignement(10, m_size.x()-20, ewol::Text::alignLeft);
|
||||
m_displayText.setTextAlignement(10, m_size.x()-20, ewol::compositing::Text::alignLeft);
|
||||
m_displayText.setRelPos(vec3(10, 0, 0));
|
||||
std::string tmpString("<br/>\n"
|
||||
"<font color=\"red\">\n"
|
||||
@@ -213,7 +213,7 @@ void appl::TextViewer::onRegenerateDisplay(void) {
|
||||
// Display the end line position only if we have the focus ...
|
||||
if (DisplayCursorAndSelection == true) {
|
||||
if (it >= selectPosStart && it < selectPosStop) {
|
||||
ewol::Drawing& draw = m_displayText.getDrawing();
|
||||
ewol::compositing::Drawing& draw = m_displayText.getDrawing();
|
||||
draw.setColor(etk::Color<>(0xFF0000FF));
|
||||
draw.setPos(m_displayText.getPos() + tmpLetterSize/4.0f);
|
||||
draw.rectangle(m_displayText.getPos() + tmpLetterSize*3.0f/4.0f);
|
||||
@@ -301,7 +301,7 @@ void appl::TextViewer::onRegenerateDisplay(void) {
|
||||
WidgetScrooled::onRegenerateDisplay();
|
||||
}
|
||||
|
||||
bool appl::TextViewer::onEventEntry(const ewol::EventEntry& _event) {
|
||||
bool appl::TextViewer::onEventEntry(const ewol::event::Entry& _event) {
|
||||
if (m_buffer == NULL) {
|
||||
return false;
|
||||
}
|
||||
@@ -311,14 +311,14 @@ bool appl::TextViewer::onEventEntry(const ewol::EventEntry& _event) {
|
||||
return true;
|
||||
}
|
||||
// just forward event == > manage directly in the buffer
|
||||
if (_event.getType() == ewol::keyEvent::keyboardChar) {
|
||||
if (_event.getType() == ewol::key::keyboardChar) {
|
||||
//APPL_DEBUG("KB EVENT : \"" << UTF8_data << "\" size=" << strlen(UTF8_data) << "type=" << (int32_t)typeEvent);
|
||||
if (_event.getStatus() != ewol::keyEvent::statusDown) {
|
||||
if (_event.getStatus() != ewol::key::statusDown) {
|
||||
return false;
|
||||
}
|
||||
char32_t localValue = _event.getChar();
|
||||
if (localValue == etk::UChar::Return) {
|
||||
if (true == _event.getSpecialKey().isSetShift()) {
|
||||
if (true == _event.getSpecialKey().getShift()) {
|
||||
localValue = etk::UChar::CarrierReturn;
|
||||
}
|
||||
} else if (localValue == etk::UChar::Suppress ) {
|
||||
@@ -349,7 +349,7 @@ bool appl::TextViewer::onEventEntry(const ewol::EventEntry& _event) {
|
||||
char output[5];
|
||||
int32_t nbElement = etk::getUtf8(localValue, output);
|
||||
if ( m_buffer->hasTextSelected() == false
|
||||
&& _event.getSpecialKey().isSetInsert() == true) {
|
||||
&& _event.getSpecialKey().getInsert() == true) {
|
||||
appl::Buffer::Iterator pos = m_buffer->cursor();
|
||||
appl::Buffer::Iterator posEnd = pos;
|
||||
++posEnd;
|
||||
@@ -362,45 +362,45 @@ bool appl::TextViewer::onEventEntry(const ewol::EventEntry& _event) {
|
||||
return true;
|
||||
}
|
||||
// move events ...
|
||||
if (_event.getStatus() == ewol::keyEvent::statusDown) {
|
||||
if (_event.getStatus() == ewol::key::statusDown) {
|
||||
bool needUpdatePosition = true;
|
||||
// selection when shift is set:
|
||||
m_buffer->setSelectMode(_event.getSpecialKey().isSetShift());
|
||||
m_buffer->setSelectMode(_event.getSpecialKey().getShift());
|
||||
// check selection event ...
|
||||
switch(_event.getType()) {
|
||||
case ewol::keyEvent::keyboardInsert:
|
||||
case ewol::key::keyboardInsert:
|
||||
m_insertMode = m_insertMode==true?false:true;
|
||||
markToRedraw();
|
||||
break;
|
||||
case ewol::keyEvent::keyboardLeft:
|
||||
case ewol::key::keyboardLeft:
|
||||
//APPL_INFO("keyEvent : <LEFT>");
|
||||
moveCursorLeft();
|
||||
break;
|
||||
case ewol::keyEvent::keyboardRight:
|
||||
case ewol::key::keyboardRight:
|
||||
//APPL_INFO("keyEvent : <RIGHT>");
|
||||
moveCursorRight();
|
||||
break;
|
||||
case ewol::keyEvent::keyboardUp:
|
||||
case ewol::key::keyboardUp:
|
||||
//APPL_INFO("keyEvent : <UP>");
|
||||
moveCursorUp(1);
|
||||
break;
|
||||
case ewol::keyEvent::keyboardDown:
|
||||
case ewol::key::keyboardDown:
|
||||
//APPL_INFO("keyEvent : <DOWN>");
|
||||
moveCursorDown(1);
|
||||
break;
|
||||
case ewol::keyEvent::keyboardPageUp:
|
||||
case ewol::key::keyboardPageUp:
|
||||
//APPL_INFO("keyEvent : <PAGE-UP>");
|
||||
moveCursorUp(15); // TODO : Set the real number of line ...
|
||||
break;
|
||||
case ewol::keyEvent::keyboardPageDown:
|
||||
case ewol::key::keyboardPageDown:
|
||||
//APPL_INFO("keyEvent : <PAGE-DOWN>");
|
||||
moveCursorDown(15); // TODO : Set the real number of line ...
|
||||
break;
|
||||
case ewol::keyEvent::keyboardStart:
|
||||
case ewol::key::keyboardStart:
|
||||
//APPL_INFO("keyEvent : <Start of line>");
|
||||
moveCursorLeft(moveEnd);
|
||||
break;
|
||||
case ewol::keyEvent::keyboardEnd:
|
||||
case ewol::key::keyboardEnd:
|
||||
//APPL_INFO("keyEvent : <End of line>");
|
||||
moveCursorRight(moveEnd);
|
||||
break;
|
||||
@@ -412,7 +412,7 @@ bool appl::TextViewer::onEventEntry(const ewol::EventEntry& _event) {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool appl::TextViewer::onEventInput(const ewol::EventInput& _event) {
|
||||
bool appl::TextViewer::onEventInput(const ewol::event::Input& _event) {
|
||||
if (_event.getId() != 0) {
|
||||
keepFocus();
|
||||
}
|
||||
@@ -441,7 +441,7 @@ bool appl::TextViewer::onEventInput(const ewol::EventInput& _event) {
|
||||
relativePos.setX(0);
|
||||
}
|
||||
if ( _event.getId() == 12
|
||||
&& _event.getStatus() == ewol::keyEvent::statusSingle) {
|
||||
&& _event.getStatus() == ewol::key::statusSingle) {
|
||||
APPL_DEBUG("kjhkjhkjh");
|
||||
// Rat5 save event
|
||||
sendMultiCast(ednMsgGuiSave, "current");
|
||||
@@ -450,8 +450,8 @@ bool appl::TextViewer::onEventInput(const ewol::EventInput& _event) {
|
||||
// just forward event == > manage directly in the buffer
|
||||
if (_event.getId() == 1) {
|
||||
// mouse selection :
|
||||
if (_event.getType() == ewol::keyEvent::typeMouse) {
|
||||
if (_event.getStatus() == ewol::keyEvent::statusDown) {
|
||||
if (_event.getType() == ewol::key::typeMouse) {
|
||||
if (_event.getStatus() == ewol::key::statusDown) {
|
||||
//if (_event.getSpecialKey().isSetShift() == false) {
|
||||
appl::Buffer::Iterator newPos = getMousePosition(relativePos);
|
||||
moveCursor(newPos);
|
||||
@@ -459,7 +459,7 @@ bool appl::TextViewer::onEventInput(const ewol::EventInput& _event) {
|
||||
markToRedraw();
|
||||
return true;
|
||||
//}
|
||||
} else if (_event.getStatus() == ewol::keyEvent::statusUp) {
|
||||
} else if (_event.getStatus() == ewol::key::statusUp) {
|
||||
appl::Buffer::Iterator newPos = getMousePosition(relativePos);
|
||||
moveCursor(newPos);
|
||||
m_buffer->setSelectMode(false);
|
||||
@@ -467,40 +467,40 @@ bool appl::TextViewer::onEventInput(const ewol::EventInput& _event) {
|
||||
std::string value;
|
||||
m_buffer->copy(value);
|
||||
if (value.size() != 0) {
|
||||
ewol::clipBoard::set(ewol::clipBoard::clipboardSelection, value);
|
||||
ewol::context::clipBoard::set(ewol::context::clipBoard::clipboardSelection, value);
|
||||
}
|
||||
markToRedraw();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if (_event.getStatus() == ewol::keyEvent::statusSingle) {
|
||||
if (_event.getType() == ewol::keyEvent::typeMouse) {
|
||||
if (_event.getStatus() == ewol::key::statusSingle) {
|
||||
if (_event.getType() == ewol::key::typeMouse) {
|
||||
appl::Buffer::Iterator newPos = getMousePosition(relativePos);
|
||||
moveCursor(newPos);
|
||||
markToRedraw();
|
||||
return true;
|
||||
}
|
||||
} else if (_event.getStatus() == ewol::keyEvent::statusDouble) {
|
||||
} else if (_event.getStatus() == ewol::key::statusDouble) {
|
||||
mouseEventDouble();
|
||||
// Copy selection :
|
||||
std::string value;
|
||||
m_buffer->copy(value);
|
||||
if (value.size() != 0) {
|
||||
ewol::clipBoard::set(ewol::clipBoard::clipboardSelection, value);
|
||||
ewol::context::clipBoard::set(ewol::context::clipBoard::clipboardSelection, value);
|
||||
}
|
||||
markToRedraw();
|
||||
return true;
|
||||
} else if (_event.getStatus() == ewol::keyEvent::statusTriple) {
|
||||
} else if (_event.getStatus() == ewol::key::statusTriple) {
|
||||
mouseEventTriple();
|
||||
// Copy selection :
|
||||
std::string value;
|
||||
m_buffer->copy(value);
|
||||
if (value.size() != 0) {
|
||||
ewol::clipBoard::set(ewol::clipBoard::clipboardSelection, value);
|
||||
ewol::context::clipBoard::set(ewol::context::clipBoard::clipboardSelection, value);
|
||||
}
|
||||
markToRedraw();
|
||||
return true;
|
||||
} else if (_event.getStatus() == ewol::keyEvent::statusMove) {
|
||||
} else if (_event.getStatus() == ewol::key::statusMove) {
|
||||
if (m_buffer->getSelectMode() == true) {
|
||||
//int64_t timeStart = ewol::getTime();
|
||||
appl::Buffer::Iterator newPos = getMousePosition(relativePos);
|
||||
@@ -518,10 +518,10 @@ bool appl::TextViewer::onEventInput(const ewol::EventInput& _event) {
|
||||
}
|
||||
}
|
||||
} else if (2 == _event.getId()) {
|
||||
if (ewol::keyEvent::statusSingle == _event.getStatus()) {
|
||||
if (ewol::key::statusSingle == _event.getStatus()) {
|
||||
appl::Buffer::Iterator newPos = getMousePosition(relativePos);
|
||||
moveCursor(newPos);
|
||||
ewol::clipBoard::request(ewol::clipBoard::clipboardSelection);
|
||||
ewol::context::clipBoard::request(ewol::context::clipBoard::clipboardSelection);
|
||||
markToRedraw();
|
||||
return true;
|
||||
}
|
||||
@@ -596,16 +596,16 @@ appl::Buffer::Iterator appl::TextViewer::getMousePosition(const vec2& _relativeP
|
||||
return m_buffer->end();
|
||||
}
|
||||
|
||||
void appl::TextViewer::onEventClipboard(enum ewol::clipBoard::clipboardListe _clipboardID) {
|
||||
void appl::TextViewer::onEventClipboard(enum ewol::context::clipBoard::clipboardListe _clipboardID) {
|
||||
if (m_buffer != NULL) {
|
||||
std::string data = ewol::clipBoard::get(_clipboardID);
|
||||
std::string data = ewol::context::clipBoard::get(_clipboardID);
|
||||
write(data);
|
||||
}
|
||||
markToRedraw();
|
||||
}
|
||||
|
||||
void appl::TextViewer::onReceiveMessage(const ewol::EMessage& _msg) {
|
||||
widget::WidgetScrooled::onReceiveMessage(_msg);
|
||||
void appl::TextViewer::onReceiveMessage(const ewol::object::Message& _msg) {
|
||||
ewol::widget::WidgetScrooled::onReceiveMessage(_msg);
|
||||
APPL_VERBOSE("receive msg: " << _msg);
|
||||
// First call plugin
|
||||
if (appl::textPluginManager::onReceiveMessage(*this, _msg) == true) {
|
||||
@@ -683,8 +683,8 @@ void appl::TextViewer::onReceiveMessage(const ewol::EMessage& _msg) {
|
||||
}
|
||||
}
|
||||
|
||||
void appl::TextViewer::onObjectRemove(ewol::EObject* _removeObject) {
|
||||
widget::WidgetScrooled::onObjectRemove(_removeObject);
|
||||
void appl::TextViewer::onObjectRemove(ewol::Object* _removeObject) {
|
||||
ewol::widget::WidgetScrooled::onObjectRemove(_removeObject);
|
||||
if (m_buffer == _removeObject) {
|
||||
m_buffer = NULL;
|
||||
markToRedraw();
|
||||
|
@@ -21,7 +21,7 @@
|
||||
#include <utility>
|
||||
|
||||
namespace appl {
|
||||
class TextViewer : public widget::WidgetScrooled {
|
||||
class TextViewer : public ewol::widget::WidgetScrooled {
|
||||
private:
|
||||
appl::GlyphPainting* m_paintingProperties; //!< element painting property
|
||||
int32_t m_colorBackground;
|
||||
@@ -48,8 +48,8 @@ namespace appl {
|
||||
return m_buffer;
|
||||
}
|
||||
private:
|
||||
ewol::Text m_displayText; //!< Text display properties.
|
||||
ewol::Drawing m_displayDrawing; //!< Other diaplay requested.
|
||||
ewol::compositing::Text m_displayText; //!< Text display properties.
|
||||
ewol::compositing::Drawing m_displayDrawing; //!< Other diaplay requested.
|
||||
std::vector<std::pair<appl::Buffer*, vec2>> m_drawingRemenber;
|
||||
public:
|
||||
void setFontSize(int32_t _size);
|
||||
@@ -59,11 +59,11 @@ namespace appl {
|
||||
public: // Derived function
|
||||
virtual bool calculateMinSize(void);
|
||||
virtual void onRegenerateDisplay(void);
|
||||
virtual void onReceiveMessage(const ewol::EMessage& _msg);
|
||||
virtual void onObjectRemove(ewol::EObject* _removeObject);
|
||||
virtual bool onEventInput(const ewol::EventInput& _event);
|
||||
virtual bool onEventEntry(const ewol::EventEntry& _event);
|
||||
virtual void onEventClipboard(enum ewol::clipBoard::clipboardListe _clipboardID);
|
||||
virtual void onReceiveMessage(const ewol::object::Message& _msg);
|
||||
virtual void onObjectRemove(ewol::Object* _removeObject);
|
||||
virtual bool onEventInput(const ewol::event::Input& _event);
|
||||
virtual bool onEventEntry(const ewol::event::Entry& _event);
|
||||
virtual void onEventClipboard(enum ewol::context::clipBoard::clipboardListe _clipboardID);
|
||||
virtual void onGetFocus(void);
|
||||
virtual void onLostFocus(void);
|
||||
private:
|
||||
|
@@ -10,8 +10,9 @@
|
||||
#include <appl/global.h>
|
||||
#include <appl/Gui/ViewerManager.h>
|
||||
#include <appl/Gui/TextViewer.h>
|
||||
#include <ewol/renderer/EObject.h>
|
||||
#include <ewol/renderer/EObjectManager.h>
|
||||
#include <ewol/object/Object.h>
|
||||
#include <ewol/object/Manager.h>
|
||||
#include <ewol/resource/Manager.h>
|
||||
|
||||
#undef __class__
|
||||
#define __class__ "ViewerManager"
|
||||
@@ -38,11 +39,11 @@ void appl::ViewerManager::setViewerSelected(appl::TextViewer* _viewer, appl::Buf
|
||||
}
|
||||
}
|
||||
|
||||
void appl::ViewerManager::onReceiveMessage(const ewol::EMessage& _msg) {
|
||||
void appl::ViewerManager::onReceiveMessage(const ewol::object::Message& _msg) {
|
||||
APPL_DEBUG("receive message !!! " << _msg);
|
||||
}
|
||||
|
||||
void appl::ViewerManager::onObjectRemove(ewol::EObject* _removeObject) {
|
||||
void appl::ViewerManager::onObjectRemove(ewol::Object* _removeObject) {
|
||||
ewol::Resource:: onObjectRemove(_removeObject);
|
||||
if (_removeObject == m_viewer) {
|
||||
m_viewer = NULL;
|
||||
|
@@ -12,7 +12,7 @@
|
||||
#include <appl/Buffer.h>
|
||||
#include <appl/globalMsg.h>
|
||||
#include <ewol/widget/Widget.h>
|
||||
#include <ewol/resources/Resource.h>
|
||||
#include <ewol/resource/Resource.h>
|
||||
#include <appl/BufferManager.h>
|
||||
|
||||
namespace appl {
|
||||
@@ -46,8 +46,8 @@ namespace appl {
|
||||
return m_viewer == _viewer;
|
||||
};
|
||||
public: // herited function
|
||||
void onReceiveMessage(const ewol::EMessage& _msg);
|
||||
void onObjectRemove(ewol::EObject* _removeObject);
|
||||
void onReceiveMessage(const ewol::object::Message& _msg);
|
||||
void onObjectRemove(ewol::Object* _removeObject);
|
||||
public: // resource manager
|
||||
/**
|
||||
* @brief keep the resource pointer.
|
||||
|
@@ -6,7 +6,7 @@
|
||||
* @license GPL v3 (see license file)
|
||||
*/
|
||||
|
||||
#include <ewol/renderer/eContext.h>
|
||||
#include <ewol/context/Context.h>
|
||||
#include <appl/debug.h>
|
||||
#include <appl/Gui/WorkerCloseAllFile.h>
|
||||
|
||||
@@ -59,7 +59,7 @@ appl::WorkerCloseAllFile::~WorkerCloseAllFile(void) {
|
||||
appl::BufferManager::release(m_bufferManager);
|
||||
}
|
||||
|
||||
void appl::WorkerCloseAllFile::onReceiveMessage(const ewol::EMessage& _msg) {
|
||||
void appl::WorkerCloseAllFile::onReceiveMessage(const ewol::object::Message& _msg) {
|
||||
if (m_bufferManager == NULL) {
|
||||
// nothing to do in this case ==> can do nothing ...
|
||||
return;
|
||||
@@ -81,7 +81,7 @@ void appl::WorkerCloseAllFile::onReceiveMessage(const ewol::EMessage& _msg) {
|
||||
}
|
||||
}
|
||||
|
||||
void appl::WorkerCloseAllFile::onObjectRemove(ewol::EObject* _removeObject) {
|
||||
void appl::WorkerCloseAllFile::onObjectRemove(ewol::Object* _removeObject) {
|
||||
if (_removeObject == m_worker) {
|
||||
m_worker = NULL;
|
||||
APPL_VERBOSE("AutoRemove After saving sub widget ...");
|
||||
|
@@ -13,7 +13,7 @@
|
||||
#include <appl/Gui/WorkerCloseFile.h>
|
||||
|
||||
namespace appl {
|
||||
class WorkerCloseAllFile : public ewol::EObject {
|
||||
class WorkerCloseAllFile : public ewol::Object {
|
||||
public:
|
||||
WorkerCloseAllFile(void);
|
||||
virtual ~WorkerCloseAllFile(void);
|
||||
@@ -22,8 +22,8 @@ namespace appl {
|
||||
appl::WorkerCloseFile* m_worker; //! pop-up element that is open...
|
||||
appl::BufferManager* m_bufferManager; //!< handle on the buffer manager
|
||||
public: // derived function
|
||||
virtual void onReceiveMessage(const ewol::EMessage& _msg);
|
||||
virtual void onObjectRemove(ewol::EObject * _removeObject);
|
||||
virtual void onReceiveMessage(const ewol::object::Message& _msg);
|
||||
virtual void onObjectRemove(ewol::Object * _removeObject);
|
||||
};
|
||||
};
|
||||
|
||||
|
@@ -6,7 +6,7 @@
|
||||
* @license GPL v3 (see license file)
|
||||
*/
|
||||
|
||||
#include <ewol/renderer/eContext.h>
|
||||
#include <ewol/context/Context.h>
|
||||
#include <appl/debug.h>
|
||||
#include <appl/Gui/WorkerCloseFile.h>
|
||||
#include <ewol/widget/meta/StdPopUp.h>
|
||||
@@ -63,7 +63,7 @@ appl::WorkerCloseFile::WorkerCloseFile(const std::string& _bufferName) :
|
||||
return;
|
||||
}
|
||||
|
||||
widget::StdPopUp* tmpPopUp = new widget::StdPopUp();
|
||||
ewol::widget::StdPopUp* tmpPopUp = new ewol::widget::StdPopUp();
|
||||
if (tmpPopUp == NULL) {
|
||||
APPL_ERROR("Can not create a simple pop-up");
|
||||
return;
|
||||
@@ -74,20 +74,20 @@ appl::WorkerCloseFile::WorkerCloseFile(const std::string& _bufferName) :
|
||||
if (m_buffer->hasFileName() == true) {
|
||||
bt = tmpPopUp->addButton("Save", true);
|
||||
if (bt != NULL) {
|
||||
bt->registerOnEvent(this, widget::Button::eventPressed, s_saveValidate);
|
||||
bt->registerOnEvent(this, ewol::widget::Button::eventPressed, s_saveValidate);
|
||||
}
|
||||
}
|
||||
bt = tmpPopUp->addButton("Save As", true);
|
||||
if (bt != NULL) {
|
||||
bt->registerOnEvent(this, widget::Button::eventPressed, s_saveAsValidate);
|
||||
bt->registerOnEvent(this, ewol::widget::Button::eventPressed, s_saveAsValidate);
|
||||
}
|
||||
bt = tmpPopUp->addButton("Close", true);
|
||||
if (bt != NULL) {
|
||||
bt->registerOnEvent(this, widget::Button::eventPressed, s_closeValidate);
|
||||
bt->registerOnEvent(this, ewol::widget::Button::eventPressed, s_closeValidate);
|
||||
}
|
||||
tmpPopUp->addButton("Cancel", true);
|
||||
tmpPopUp->setRemoveOnExternClick(true);
|
||||
ewol::Windows* tmpWindows = ewol::getContext().getWindows();
|
||||
ewol::widget::Windows* tmpWindows = ewol::getContext().getWindows();
|
||||
if (tmpWindows == NULL) {
|
||||
APPL_ERROR("Error to get the windows.");
|
||||
autoDestroy();
|
||||
@@ -100,7 +100,7 @@ appl::WorkerCloseFile::~WorkerCloseFile(void) {
|
||||
appl::BufferManager::release(m_bufferManager);
|
||||
}
|
||||
|
||||
void appl::WorkerCloseFile::onReceiveMessage(const ewol::EMessage& _msg) {
|
||||
void appl::WorkerCloseFile::onReceiveMessage(const ewol::object::Message& _msg) {
|
||||
if (m_bufferManager == NULL) {
|
||||
// nothing to do in this case ==> can do nothing ...
|
||||
return;
|
||||
@@ -118,7 +118,7 @@ void appl::WorkerCloseFile::onReceiveMessage(const ewol::EMessage& _msg) {
|
||||
return;
|
||||
}
|
||||
if (m_buffer->storeFile() == false) {
|
||||
ewol::Windows* tmpWindows = ewol::getContext().getWindows();
|
||||
ewol::widget::Windows* tmpWindows = ewol::getContext().getWindows();
|
||||
if (tmpWindows == NULL) {
|
||||
return;
|
||||
}
|
||||
@@ -138,7 +138,7 @@ void appl::WorkerCloseFile::onReceiveMessage(const ewol::EMessage& _msg) {
|
||||
}
|
||||
}
|
||||
|
||||
void appl::WorkerCloseFile::onObjectRemove(ewol::EObject* _removeObject) {
|
||||
void appl::WorkerCloseFile::onObjectRemove(ewol::Object* _removeObject) {
|
||||
if (_removeObject == m_worker) {
|
||||
m_worker = NULL;
|
||||
APPL_VERBOSE("AutoRemove After closing sub widget ...");
|
||||
|
@@ -14,7 +14,7 @@
|
||||
#include <appl/Gui/WorkerSaveFile.h>
|
||||
|
||||
namespace appl {
|
||||
class WorkerCloseFile : public ewol::EObject {
|
||||
class WorkerCloseFile : public ewol::Object {
|
||||
public:
|
||||
static const char* eventCloseDone;
|
||||
public:
|
||||
@@ -27,8 +27,8 @@ namespace appl {
|
||||
appl::WorkerSaveFile* m_worker; //! sub-worker element...
|
||||
appl::BufferManager* m_bufferManager; //!< handle on the buffer manager
|
||||
public: // derived function
|
||||
virtual void onReceiveMessage(const ewol::EMessage& _msg);
|
||||
virtual void onObjectRemove(ewol::EObject * _removeObject);
|
||||
virtual void onReceiveMessage(const ewol::object::Message& _msg);
|
||||
virtual void onObjectRemove(ewol::Object * _removeObject);
|
||||
};
|
||||
};
|
||||
|
||||
|
@@ -6,7 +6,7 @@
|
||||
* @license GPL v3 (see license file)
|
||||
*/
|
||||
|
||||
#include <ewol/renderer/eContext.h>
|
||||
#include <ewol/context/Context.h>
|
||||
#include <appl/debug.h>
|
||||
#include <appl/Gui/WorkerSaveAllFile.h>
|
||||
|
||||
@@ -62,7 +62,7 @@ appl::WorkerSaveAllFile::~WorkerSaveAllFile(void) {
|
||||
appl::BufferManager::release(m_bufferManager);
|
||||
}
|
||||
|
||||
void appl::WorkerSaveAllFile::onReceiveMessage(const ewol::EMessage& _msg) {
|
||||
void appl::WorkerSaveAllFile::onReceiveMessage(const ewol::object::Message& _msg) {
|
||||
if (m_bufferManager == NULL) {
|
||||
// nothing to do in this case ==> can do nothing ...
|
||||
return;
|
||||
@@ -84,7 +84,7 @@ void appl::WorkerSaveAllFile::onReceiveMessage(const ewol::EMessage& _msg) {
|
||||
}
|
||||
}
|
||||
|
||||
void appl::WorkerSaveAllFile::onObjectRemove(ewol::EObject* _removeObject) {
|
||||
void appl::WorkerSaveAllFile::onObjectRemove(ewol::Object* _removeObject) {
|
||||
if (_removeObject == m_worker) {
|
||||
m_worker = NULL;
|
||||
APPL_VERBOSE("AutoRemove After saving sub widget ...");
|
||||
|
@@ -13,7 +13,7 @@
|
||||
#include <appl/Gui/WorkerSaveFile.h>
|
||||
|
||||
namespace appl {
|
||||
class WorkerSaveAllFile : public ewol::EObject {
|
||||
class WorkerSaveAllFile : public ewol::Object {
|
||||
public:
|
||||
WorkerSaveAllFile(void);
|
||||
virtual ~WorkerSaveAllFile(void);
|
||||
@@ -22,8 +22,8 @@ namespace appl {
|
||||
appl::WorkerSaveFile* m_worker; //! pop-up element that is open...
|
||||
appl::BufferManager* m_bufferManager; //!< handle on the buffer manager
|
||||
public: // derived function
|
||||
virtual void onReceiveMessage(const ewol::EMessage& _msg);
|
||||
virtual void onObjectRemove(ewol::EObject * _removeObject);
|
||||
virtual void onReceiveMessage(const ewol::object::Message& _msg);
|
||||
virtual void onObjectRemove(ewol::Object * _removeObject);
|
||||
};
|
||||
};
|
||||
|
||||
|
@@ -6,7 +6,7 @@
|
||||
* @license GPL v3 (see license file)
|
||||
*/
|
||||
|
||||
#include <ewol/renderer/eContext.h>
|
||||
#include <ewol/context/Context.h>
|
||||
#include <appl/debug.h>
|
||||
#include <appl/Gui/WorkerSaveFile.h>
|
||||
|
||||
@@ -60,7 +60,7 @@ appl::WorkerSaveFile::WorkerSaveFile(const std::string& _bufferName, bool _force
|
||||
return;
|
||||
}
|
||||
}
|
||||
m_chooser = new widget::FileChooser();
|
||||
m_chooser = new ewol::widget::FileChooser();
|
||||
if (NULL == m_chooser) {
|
||||
APPL_ERROR("Can not allocate widget == > display might be in error");
|
||||
autoDestroy();
|
||||
@@ -71,21 +71,21 @@ appl::WorkerSaveFile::WorkerSaveFile(const std::string& _bufferName, bool _force
|
||||
etk::FSNode tmpName(m_bufferName);
|
||||
m_chooser->setFolder(tmpName.getNameFolder());
|
||||
m_chooser->setFileName(tmpName.getNameFile());
|
||||
ewol::Windows* tmpWindows = ewol::getContext().getWindows();
|
||||
ewol::widget::Windows* tmpWindows = ewol::getContext().getWindows();
|
||||
if (tmpWindows == NULL) {
|
||||
APPL_ERROR("Error to get the windows.");
|
||||
autoDestroy();
|
||||
return;
|
||||
}
|
||||
tmpWindows->popUpWidgetPush(m_chooser);
|
||||
m_chooser->registerOnEvent(this, widget::FileChooser::eventValidate, s_saveAsValidate);
|
||||
m_chooser->registerOnEvent(this, ewol::widget::FileChooser::eventValidate, s_saveAsValidate);
|
||||
}
|
||||
|
||||
appl::WorkerSaveFile::~WorkerSaveFile(void) {
|
||||
appl::BufferManager::release(m_bufferManager);
|
||||
}
|
||||
|
||||
void appl::WorkerSaveFile::onReceiveMessage(const ewol::EMessage& _msg) {
|
||||
void appl::WorkerSaveFile::onReceiveMessage(const ewol::object::Message& _msg) {
|
||||
if (m_bufferManager == NULL) {
|
||||
// nothing to do in this case ==> can do nothing ...
|
||||
return;
|
||||
@@ -106,7 +106,7 @@ void appl::WorkerSaveFile::onReceiveMessage(const ewol::EMessage& _msg) {
|
||||
}
|
||||
tmpBuffer->setFileName(_msg.getData());
|
||||
if (tmpBuffer->storeFile() == false) {
|
||||
ewol::Windows* tmpWindows = ewol::getContext().getWindows();
|
||||
ewol::widget::Windows* tmpWindows = ewol::getContext().getWindows();
|
||||
if (tmpWindows == NULL) {
|
||||
return;
|
||||
}
|
||||
@@ -117,7 +117,7 @@ void appl::WorkerSaveFile::onReceiveMessage(const ewol::EMessage& _msg) {
|
||||
}
|
||||
}
|
||||
|
||||
void appl::WorkerSaveFile::onObjectRemove(ewol::EObject* _removeObject) {
|
||||
void appl::WorkerSaveFile::onObjectRemove(ewol::Object* _removeObject) {
|
||||
if (_removeObject == m_chooser) {
|
||||
m_chooser = NULL;
|
||||
APPL_VERBOSE("AutoRemove After closing sub widget ...");
|
||||
|
@@ -13,7 +13,7 @@
|
||||
#include <appl/BufferManager.h>
|
||||
|
||||
namespace appl {
|
||||
class WorkerSaveFile : public ewol::EObject {
|
||||
class WorkerSaveFile : public ewol::Object {
|
||||
public:
|
||||
static const char* eventSaveDone;
|
||||
public:
|
||||
@@ -21,11 +21,11 @@ namespace appl {
|
||||
virtual ~WorkerSaveFile(void);
|
||||
private:
|
||||
std::string m_bufferName;
|
||||
widget::FileChooser* m_chooser; //! pop-up element that is open...
|
||||
ewol::widget::FileChooser* m_chooser; //! pop-up element that is open...
|
||||
appl::BufferManager* m_bufferManager; //!< handle on the buffer manager
|
||||
public: // derived function
|
||||
virtual void onReceiveMessage(const ewol::EMessage& _msg);
|
||||
virtual void onObjectRemove(ewol::EObject * _removeObject);
|
||||
virtual void onReceiveMessage(const ewol::object::Message& _msg);
|
||||
virtual void onObjectRemove(ewol::Object * _removeObject);
|
||||
};
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user