[DEV] update the system interface
This commit is contained in:
@@ -68,17 +68,10 @@ void BufferView::RemoveAllElement(void)
|
||||
m_list.Clear();
|
||||
}
|
||||
|
||||
/**
|
||||
* @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 BufferView::OnReceiveMessage(ewol::EObject * CallerObject, const char * eventId, const etk::UString& data)
|
||||
void BufferView::OnReceiveMessage(const ewol::EMessage& _msg)
|
||||
{
|
||||
widget::List::OnReceiveMessage(CallerObject, eventId, data);
|
||||
if (eventId == ednMsgBufferListChange) {
|
||||
widget::List::OnReceiveMessage(_msg);
|
||||
if (_msg.GetMessage() == ednMsgBufferListChange) {
|
||||
// clean The list
|
||||
RemoveAllElement();
|
||||
// Get all the buffer name and properties:
|
||||
@@ -102,10 +95,10 @@ void BufferView::OnReceiveMessage(ewol::EObject * CallerObject, const char * eve
|
||||
SortElementList(m_list);
|
||||
}
|
||||
MarkToRedraw();
|
||||
}else if (eventId == ednMsgBufferId) {
|
||||
}else if (_msg.GetMessage() == ednMsgBufferId) {
|
||||
m_selectedIdRequested = BufferManager::GetSelected();
|
||||
MarkToRedraw();
|
||||
}else if (eventId == ednMsgBufferState) {
|
||||
}else if (_msg.GetMessage() == ednMsgBufferState) {
|
||||
// Update list of modify section ...
|
||||
for (int32_t iii=0; iii<m_list.Size(); iii++) {
|
||||
if (NULL!=m_list[iii]) {
|
||||
|
@@ -47,7 +47,7 @@ class BufferView : public widget::List
|
||||
// Derived function
|
||||
const char * const GetObjectType(void) { return "ApplBufferView"; };
|
||||
// Derived function
|
||||
virtual void OnReceiveMessage(ewol::EObject * CallerObject, const char * eventId, const etk::UString& data);
|
||||
virtual void OnReceiveMessage(const ewol::EMessage& _msg);
|
||||
protected:
|
||||
// function call to display the list :
|
||||
virtual draw::Color GetBasicBG(void);
|
||||
|
@@ -113,11 +113,11 @@ void CodeView::CalculateMaxSize(void)
|
||||
}
|
||||
|
||||
|
||||
void CodeView::OnDraw(ewol::DrawProperty& displayProp)
|
||||
void CodeView::OnDraw(void)
|
||||
{
|
||||
m_displayDrawing.Draw();
|
||||
m_displayText.Draw();
|
||||
WidgetScrooled::OnDraw(displayProp);
|
||||
WidgetScrooled::OnDraw();
|
||||
}
|
||||
|
||||
void CodeView::OnRegenerateDisplay(void)
|
||||
@@ -318,19 +318,19 @@ bool CodeView::OnEventInput(const ewol::EventInput& _event)
|
||||
return true;
|
||||
}
|
||||
|
||||
void CodeView::OnReceiveMessage(ewol::EObject * CallerObject, const char * eventId, const etk::UString& data)
|
||||
void CodeView::OnReceiveMessage(const ewol::EMessage& _msg)
|
||||
{
|
||||
widget::WidgetScrooled::OnReceiveMessage(CallerObject, eventId, data);
|
||||
APPL_DEBUG("Extern Event : " << CallerObject << " type : " << eventId << " data=\"" << data << "\"");
|
||||
widget::WidgetScrooled::OnReceiveMessage(_msg);
|
||||
APPL_DEBUG("Extern Event : " << _msg.GetCaller() << " type : " << _msg.GetMessage() << " data=\"" << _msg.GetData() << "\"");
|
||||
|
||||
if(eventId == ednMsgBufferId) {
|
||||
if(_msg.GetMessage() == ednMsgBufferId) {
|
||||
//keep the reference of the display offset :
|
||||
if( m_bufferID >=0
|
||||
&& m_bufferID < m_lineNumberList.Size()) {
|
||||
m_lineNumberList[m_bufferID] = m_originScrooled;
|
||||
}
|
||||
int32_t bufferID = 0;
|
||||
sscanf(data.c_str(), "%d", &bufferID);
|
||||
sscanf(_msg.GetData().c_str(), "%d", &bufferID);
|
||||
APPL_INFO("Select a new Buffer ... " << bufferID);
|
||||
// set the new buffer ID
|
||||
m_bufferID = bufferID;
|
||||
@@ -341,105 +341,105 @@ void CodeView::OnReceiveMessage(ewol::EObject * CallerObject, const char * event
|
||||
&& m_bufferID < m_lineNumberList.Size()) {
|
||||
m_originScrooled = m_lineNumberList[m_bufferID];
|
||||
}
|
||||
} else if (eventId == ednMsgGuiCopy) {
|
||||
} else if (_msg.GetMessage() == ednMsgGuiCopy) {
|
||||
BufferText* tmpBuffer = BufferManager::Get(m_bufferID);
|
||||
if (NULL!=tmpBuffer) {
|
||||
tmpBuffer->Copy(ewol::clipBoard::clipboardStd);
|
||||
}
|
||||
} else if (eventId == ednMsgGuiCut) {
|
||||
} else if (_msg.GetMessage() == ednMsgGuiCut) {
|
||||
BufferText* tmpBuffer = BufferManager::Get(m_bufferID);
|
||||
if (NULL!=tmpBuffer) {
|
||||
tmpBuffer->Cut(ewol::clipBoard::clipboardStd);
|
||||
}
|
||||
} else if (eventId == ednMsgGuiPaste) {
|
||||
} else if (_msg.GetMessage() == ednMsgGuiPaste) {
|
||||
ewol::clipBoard::Request(ewol::clipBoard::clipboardStd);
|
||||
} else if (eventId == ednMsgGuiUndo) {
|
||||
} else if (_msg.GetMessage() == ednMsgGuiUndo) {
|
||||
BufferText* tmpBuffer = BufferManager::Get(m_bufferID);
|
||||
if (NULL!=tmpBuffer) {
|
||||
tmpBuffer->Undo();
|
||||
}
|
||||
} else if (eventId == ednMsgGuiRedo) {
|
||||
} else if (_msg.GetMessage() == ednMsgGuiRedo) {
|
||||
BufferText* tmpBuffer = BufferManager::Get(m_bufferID);
|
||||
if (NULL!=tmpBuffer) {
|
||||
tmpBuffer->Redo();
|
||||
}
|
||||
} else if (eventId == ednMsgGuiRm) {
|
||||
} else if (_msg.GetMessage() == ednMsgGuiRm) {
|
||||
// data : "Word" "Line" "Paragraph"
|
||||
if (data == "Word") {
|
||||
APPL_WARNING(" on event " << eventId << " data=\"" << data << "\" ==> not coded" );
|
||||
} else if (data == "Line") {
|
||||
if (_msg.GetData() == "Word") {
|
||||
APPL_WARNING(" on event " << _msg.GetMessage() << " data=\"" << _msg.GetData() << "\" ==> not coded" );
|
||||
} else if (_msg.GetData() == "Line") {
|
||||
BufferText* tmpBuffer = BufferManager::Get(m_bufferID);
|
||||
if (NULL!=tmpBuffer) {
|
||||
tmpBuffer->RemoveLine();
|
||||
}
|
||||
} else if (data == "Paragraph") {
|
||||
APPL_WARNING(" on event " << eventId << " data=\"" << data << "\" ==> not coded" );
|
||||
} else if (_msg.GetData() == "Paragraph") {
|
||||
APPL_WARNING(" on event " << _msg.GetMessage() << " data=\"" << _msg.GetData() << "\" ==> not coded" );
|
||||
} else {
|
||||
APPL_ERROR(" on event " << eventId << " unknow data=\"" << data << "\"" );
|
||||
APPL_ERROR(" on event " << _msg.GetMessage() << " unknow data=\"" << _msg.GetData() << "\"" );
|
||||
}
|
||||
} else if (eventId == ednMsgGuiSelect) {
|
||||
} else if (_msg.GetMessage() == ednMsgGuiSelect) {
|
||||
// data : "ALL" "NONE"
|
||||
if (data == "ALL") {
|
||||
if (_msg.GetData() == "ALL") {
|
||||
BufferText* tmpBuffer = BufferManager::Get(m_bufferID);
|
||||
if (NULL!=tmpBuffer) {
|
||||
tmpBuffer->SelectAll();
|
||||
}
|
||||
} else if (data == "NONE") {
|
||||
} else if (_msg.GetData() == "NONE") {
|
||||
BufferText* tmpBuffer = BufferManager::Get(m_bufferID);
|
||||
if (NULL!=tmpBuffer) {
|
||||
tmpBuffer->SelectNone();
|
||||
}
|
||||
} else {
|
||||
APPL_ERROR(" on event " << eventId << " unknow data=\"" << data << "\"" );
|
||||
APPL_ERROR(" on event " << _msg.GetMessage() << " unknow data=\"" << _msg.GetData() << "\"" );
|
||||
}
|
||||
} else if (eventId == ednMsgGuiChangeCharset) {
|
||||
} else if (_msg.GetMessage() == ednMsgGuiChangeCharset) {
|
||||
// data : "UTF-8" "ISO-8859-1" "ISO-8859-15"
|
||||
if (data == "UTF-8") {
|
||||
if (_msg.GetData() == "UTF-8") {
|
||||
BufferText* tmpBuffer = BufferManager::Get(m_bufferID);
|
||||
if (NULL!=tmpBuffer) {
|
||||
tmpBuffer->SetCharset(unicode::EDN_CHARSET_UTF8);
|
||||
}
|
||||
} else if (data == "ISO-8859-1") {
|
||||
} else if (_msg.GetData() == "ISO-8859-1") {
|
||||
BufferText* tmpBuffer = BufferManager::Get(m_bufferID);
|
||||
if (NULL!=tmpBuffer) {
|
||||
tmpBuffer->SetCharset(unicode::EDN_CHARSET_ISO_8859_1);
|
||||
}
|
||||
} else if (data == "ISO-8859-15") {
|
||||
} else if (_msg.GetData() == "ISO-8859-15") {
|
||||
BufferText* tmpBuffer = BufferManager::Get(m_bufferID);
|
||||
if (NULL!=tmpBuffer) {
|
||||
tmpBuffer->SetCharset(unicode::EDN_CHARSET_ISO_8859_15);
|
||||
}
|
||||
} else {
|
||||
APPL_ERROR(" on event " << eventId << " unknow data=\"" << data << "\"" );
|
||||
APPL_ERROR(" on event " << _msg.GetMessage() << " unknow data=\"" << _msg.GetData() << "\"" );
|
||||
}
|
||||
} else if (eventId == ednMsgGuiFind) {
|
||||
} else if (_msg.GetMessage() == ednMsgGuiFind) {
|
||||
etk::UString myDataString;
|
||||
SearchData::GetSearch(myDataString);
|
||||
if (data == "Next") {
|
||||
if (_msg.GetData() == "Next") {
|
||||
BufferText* tmpBuffer = BufferManager::Get(m_bufferID);
|
||||
if (NULL!=tmpBuffer) {
|
||||
tmpBuffer->Search(myDataString, false, SearchData::GetCase(), SearchData::GetWrap(), SearchData::GetRegExp() );
|
||||
}
|
||||
} else if (data == "Previous") {
|
||||
} else if (_msg.GetData() == "Previous") {
|
||||
BufferText* tmpBuffer = BufferManager::Get(m_bufferID);
|
||||
if (NULL!=tmpBuffer) {
|
||||
tmpBuffer->Search(myDataString, true, SearchData::GetCase(), SearchData::GetWrap(), SearchData::GetRegExp() );
|
||||
}
|
||||
}
|
||||
} else if (eventId == ednMsgGuiReplace) {
|
||||
} else if (_msg.GetMessage() == ednMsgGuiReplace) {
|
||||
etk::UString myDataString;
|
||||
SearchData::GetReplace(myDataString);
|
||||
if (data == "Normal") {
|
||||
if (_msg.GetData() == "Normal") {
|
||||
BufferText* tmpBuffer = BufferManager::Get(m_bufferID);
|
||||
if (NULL!=tmpBuffer) {
|
||||
tmpBuffer->Replace(myDataString);
|
||||
}
|
||||
} else if (data == "All") {
|
||||
} else if (_msg.GetData() == "All") {
|
||||
|
||||
}
|
||||
} else if (eventId == ednMsgGuiGotoLine) {
|
||||
} else if (_msg.GetMessage() == ednMsgGuiGotoLine) {
|
||||
int32_t lineID = 0;
|
||||
sscanf(data.c_str(), "%d", &lineID);
|
||||
sscanf(_msg.GetData().c_str(), "%d", &lineID);
|
||||
APPL_INFO("Goto line : " << lineID);
|
||||
BufferText* tmpBuffer = BufferManager::Get(m_bufferID);
|
||||
if (NULL!=tmpBuffer) {
|
||||
|
@@ -25,36 +25,34 @@ class CodeView :public widget::WidgetScrooled
|
||||
CodeView(etk::UString fontName, int32_t fontSize);
|
||||
CodeView(void);
|
||||
virtual ~CodeView(void);
|
||||
// Derived function
|
||||
const char * const GetObjectType(void) { return "ApplCodeView"; };
|
||||
// Derived function
|
||||
virtual bool CalculateMinSize(void);
|
||||
private:
|
||||
etk::UString m_label;
|
||||
draw::Color m_textColorFg; //!< Text color
|
||||
draw::Color m_textColorBg; //!< Background color
|
||||
int32_t m_bufferID;
|
||||
bool m_buttunOneSelected;
|
||||
etk::Vector<vec2 > m_lineNumberList;
|
||||
etk::UString m_label;
|
||||
draw::Color m_textColorFg; //!< Text color
|
||||
draw::Color m_textColorBg; //!< Background color
|
||||
int32_t m_bufferID;
|
||||
bool m_buttunOneSelected;
|
||||
etk::Vector<vec2 > m_lineNumberList;
|
||||
void UpdateNumberOfLineReference(int32_t bufferID);
|
||||
// drawing elements :
|
||||
ewol::Text m_displayText;
|
||||
ewol::Drawing m_displayDrawing;
|
||||
public: // Derived function
|
||||
virtual void OnRegenerateDisplay(void);
|
||||
virtual void OnReceiveMessage(ewol::EObject * CallerObject, const char * eventId, const etk::UString& data);
|
||||
virtual bool OnEventInput(const ewol::EventInput& _event);
|
||||
virtual bool OnEventEntry(const ewol::EventEntry& _event);
|
||||
virtual void OnEventClipboard(ewol::clipBoard::clipboardListe_te clipboardID);
|
||||
virtual void OnGetFocus(void);
|
||||
virtual void OnLostFocus(void);
|
||||
ewol::Text m_displayText;
|
||||
ewol::Drawing m_displayDrawing;
|
||||
public:
|
||||
void SetFontSize(int32_t size);
|
||||
void SetFontName(etk::UString fontName);
|
||||
private:
|
||||
void CalculateMaxSize(void);
|
||||
protected:
|
||||
virtual void OnDraw(ewol::DrawProperty& displayProp);
|
||||
protected: // derived function
|
||||
virtual void OnDraw(void);
|
||||
public: // Derived function
|
||||
const char * const GetObjectType(void) { return "ApplCodeView"; };
|
||||
virtual bool CalculateMinSize(void);
|
||||
virtual void OnRegenerateDisplay(void);
|
||||
virtual void OnReceiveMessage(const ewol::EMessage& _msg);
|
||||
virtual bool OnEventInput(const ewol::EventInput& _event);
|
||||
virtual bool OnEventEntry(const ewol::EventEntry& _event);
|
||||
virtual void OnEventClipboard(ewol::clipBoard::clipboardListe_te clipboardID);
|
||||
virtual void OnGetFocus(void);
|
||||
virtual void OnLostFocus(void);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@@ -253,13 +253,13 @@ const char *const ednEventPopUpFileSelected = "edn-mainWindows-openSelected";
|
||||
const char *const ednEventPopUpFileSaveAs = "edn-mainWindows-saveAsSelected";
|
||||
|
||||
|
||||
void MainWindows::OnReceiveMessage(ewol::EObject * CallerObject, const char * eventId, const etk::UString& data)
|
||||
void MainWindows::OnReceiveMessage(const ewol::EMessage& _msg)
|
||||
{
|
||||
ewol::Windows::OnReceiveMessage(CallerObject, eventId, data);
|
||||
ewol::Windows::OnReceiveMessage(_msg);
|
||||
|
||||
//APPL_INFO("Receive Event from the main windows ... : \"" << eventId << "\" ==> data=\"" << data << "\"" );
|
||||
// Open file Section ...
|
||||
if (eventId == ednMsgGuiOpen) {
|
||||
if (_msg.GetMessage() == ednMsgGuiOpen) {
|
||||
widget::FileChooser* tmpWidget = new widget::FileChooser();
|
||||
tmpWidget->SetTitle("Open Files ...");
|
||||
tmpWidget->SetValidateLabel("Open");
|
||||
@@ -272,18 +272,18 @@ void MainWindows::OnReceiveMessage(ewol::EObject * CallerObject, const char * ev
|
||||
}
|
||||
PopUpWidgetPush(tmpWidget);
|
||||
tmpWidget->RegisterOnEvent(this, ewolEventFileChooserValidate, ednEventPopUpFileSelected);
|
||||
} else if (eventId == ednEventPopUpFileSelected) {
|
||||
APPL_DEBUG("Request opening the file : " << data);
|
||||
SendMultiCast(ednMsgOpenFile, data);
|
||||
} else if (eventId == ednMsgGuiSaveAs) {
|
||||
if (data == "") {
|
||||
} else if (_msg.GetMessage() == ednEventPopUpFileSelected) {
|
||||
APPL_DEBUG("Request opening the file : " << _msg.GetData());
|
||||
SendMultiCast(ednMsgOpenFile, _msg.GetData());
|
||||
} else if (_msg.GetMessage() == ednMsgGuiSaveAs) {
|
||||
if (_msg.GetData() == "") {
|
||||
APPL_ERROR("Null data for Save As file ... ");
|
||||
} else {
|
||||
m_currentSavingAsIdBuffer = -1;
|
||||
if (data == "current") {
|
||||
if (_msg.GetData() == "current") {
|
||||
m_currentSavingAsIdBuffer = BufferManager::GetSelected();
|
||||
} else {
|
||||
sscanf(data.c_str(), "%d", &m_currentSavingAsIdBuffer);
|
||||
sscanf(_msg.GetData().c_str(), "%d", &m_currentSavingAsIdBuffer);
|
||||
}
|
||||
|
||||
if (false == BufferManager::Exist(m_currentSavingAsIdBuffer)) {
|
||||
@@ -310,15 +310,15 @@ void MainWindows::OnReceiveMessage(ewol::EObject * CallerObject, const char * ev
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (eventId == ednEventPopUpFileSaveAs) {
|
||||
} else if (_msg.GetMessage() == ednEventPopUpFileSaveAs) {
|
||||
// get the filename :
|
||||
etk::UString tmpData = data;
|
||||
etk::UString tmpData = _msg.GetData();
|
||||
APPL_DEBUG("Request Saving As file : " << tmpData);
|
||||
|
||||
BufferManager::Get(m_currentSavingAsIdBuffer)->SetFileName(tmpData);
|
||||
SendMultiCast(ednMsgGuiSave, m_currentSavingAsIdBuffer);
|
||||
} else if( eventId == ednMsgBufferState
|
||||
|| eventId == ednMsgBufferId) {
|
||||
} else if( _msg.GetMessage() == ednMsgBufferState
|
||||
|| _msg.GetMessage() == ednMsgBufferId) {
|
||||
// the buffer change we need to update the widget string
|
||||
BufferText* tmpBuffer = BufferManager::Get(BufferManager::GetSelected());
|
||||
if (NULL != tmpBuffer) {
|
||||
@@ -341,7 +341,7 @@ void MainWindows::OnReceiveMessage(ewol::EObject * CallerObject, const char * ev
|
||||
}
|
||||
return;
|
||||
// TODO : Set the Title ....
|
||||
} else if (eventId == ednMsgProperties) {
|
||||
} else if (_msg.GetMessage() == ednMsgProperties) {
|
||||
// Request the parameter GUI
|
||||
widget::Parameter* tmpWidget = new widget::Parameter();
|
||||
if (NULL == tmpWidget) {
|
||||
@@ -359,7 +359,7 @@ void MainWindows::OnReceiveMessage(ewol::EObject * CallerObject, const char * ev
|
||||
tmpSubWidget = new ParameterAboutGui();
|
||||
tmpWidget->MenuAdd("About", "", tmpSubWidget);
|
||||
}
|
||||
} else if (eventId == ednMsgGuiReloadShader) {
|
||||
} else if (_msg.GetMessage() == ednMsgGuiReloadShader) {
|
||||
ewol::resource::ReLoadResources();
|
||||
ewol::ForceRedrawAll();
|
||||
}
|
||||
@@ -367,10 +367,10 @@ void MainWindows::OnReceiveMessage(ewol::EObject * CallerObject, const char * ev
|
||||
return;
|
||||
}
|
||||
|
||||
void MainWindows::OnObjectRemove(ewol::EObject * removeObject)
|
||||
void MainWindows::OnObjectRemove(ewol::EObject * _removeObject)
|
||||
{
|
||||
ewol::Windows::OnObjectRemove(removeObject);
|
||||
if (m_widgetLabelFileName == removeObject) {
|
||||
ewol::Windows::OnObjectRemove(_removeObject);
|
||||
if (m_widgetLabelFileName == _removeObject) {
|
||||
m_widgetLabelFileName = NULL;
|
||||
}
|
||||
}
|
||||
|
@@ -26,12 +26,10 @@ class MainWindows : public ewol::Windows
|
||||
// Constructeur
|
||||
MainWindows(void);
|
||||
~MainWindows(void);
|
||||
// Derived function
|
||||
const char * const GetObjectType(void) { return "MainWindows"; };
|
||||
// Derived function
|
||||
virtual void OnReceiveMessage(ewol::EObject * CallerObject, const char * eventId, const etk::UString& data);
|
||||
// Derived function
|
||||
virtual void OnObjectRemove(ewol::EObject * removeObject);
|
||||
public: // Derived function
|
||||
virtual const char * const GetObjectType(void) { return "MainWindows"; };
|
||||
virtual void OnReceiveMessage(const ewol::EMessage& _msg);
|
||||
virtual void OnObjectRemove(ewol::EObject * _removeObject);
|
||||
};
|
||||
|
||||
#define EDN_CAST_MAIN_WINDOWS(curentPointer) EWOL_CAST(TYPE_EOBJECT_EDN_MAIN_WINDOWS,MainWindows,curentPointer)
|
||||
|
@@ -191,63 +191,63 @@ Search::~Search(void)
|
||||
}
|
||||
|
||||
|
||||
void Search::OnReceiveMessage(ewol::EObject * CallerObject, const char * eventId, const etk::UString& data)
|
||||
void Search::OnReceiveMessage(const ewol::EMessage& _msg)
|
||||
{
|
||||
widget::Sizer::OnReceiveMessage(CallerObject, eventId, data);
|
||||
widget::Sizer::OnReceiveMessage(_msg);
|
||||
//APPL_INFO("Search receive message : \"" << eventId << "\" data=\"" << data << "\"");
|
||||
if ( eventId == l_eventSearchEntry) {
|
||||
SearchData::SetSearch(data);
|
||||
} else if ( eventId == l_eventSearchEntryEnter) {
|
||||
SearchData::SetSearch(data);
|
||||
if ( _msg.GetMessage() == l_eventSearchEntry) {
|
||||
SearchData::SetSearch(_msg.GetData());
|
||||
} else if ( _msg.GetMessage() == l_eventSearchEntryEnter) {
|
||||
SearchData::SetSearch(_msg.GetData());
|
||||
if (true==m_forward) {
|
||||
SendMultiCast(ednMsgGuiFind, "Previous");
|
||||
} else {
|
||||
SendMultiCast(ednMsgGuiFind, "Next");
|
||||
}
|
||||
} else if ( eventId == l_eventReplaceEntry) {
|
||||
SearchData::SetReplace(data);
|
||||
} else if ( eventId == l_eventReplaceEntryEnter) {
|
||||
SearchData::SetReplace(data);
|
||||
} else if ( _msg.GetMessage() == l_eventReplaceEntry) {
|
||||
SearchData::SetReplace(_msg.GetData());
|
||||
} else if ( _msg.GetMessage() == l_eventReplaceEntryEnter) {
|
||||
SearchData::SetReplace(_msg.GetData());
|
||||
SendMultiCast(ednMsgGuiReplace, "Normal");
|
||||
if (true==m_forward) {
|
||||
SendMultiCast(ednMsgGuiFind, "Previous");
|
||||
} else {
|
||||
SendMultiCast(ednMsgGuiFind, "Next");
|
||||
}
|
||||
} else if ( eventId == l_eventSearchBt) {
|
||||
} else if ( _msg.GetMessage() == l_eventSearchBt) {
|
||||
if (true==m_forward) {
|
||||
SendMultiCast(ednMsgGuiFind, "Previous");
|
||||
} else {
|
||||
SendMultiCast(ednMsgGuiFind, "Next");
|
||||
}
|
||||
} else if ( eventId == l_eventReplaceBt) {
|
||||
} else if ( _msg.GetMessage() == l_eventReplaceBt) {
|
||||
SendMultiCast(ednMsgGuiReplace, "Normal");
|
||||
if (true==m_forward) {
|
||||
SendMultiCast(ednMsgGuiFind, "Previous");
|
||||
} else {
|
||||
SendMultiCast(ednMsgGuiFind, "Next");
|
||||
}
|
||||
} else if ( eventId == l_eventCaseCb) {
|
||||
if (data == "1") {
|
||||
} else if ( _msg.GetMessage() == l_eventCaseCb) {
|
||||
if (_msg.GetData() == "1") {
|
||||
SearchData::SetCase(false);
|
||||
} else {
|
||||
SearchData::SetCase(true);
|
||||
}
|
||||
} else if ( eventId == l_eventWrapCb) {
|
||||
if (data == "1") {
|
||||
} else if ( _msg.GetMessage() == l_eventWrapCb) {
|
||||
if (_msg.GetData() == "1") {
|
||||
SearchData::SetWrap(false);
|
||||
} else {
|
||||
SearchData::SetWrap(true);
|
||||
}
|
||||
} else if ( eventId == l_eventForwardCb) {
|
||||
if (data == "1") {
|
||||
} else if ( _msg.GetMessage() == l_eventForwardCb) {
|
||||
if (_msg.GetData() == "1") {
|
||||
m_forward = false;
|
||||
} else {
|
||||
m_forward = true;
|
||||
}
|
||||
} else if ( eventId == l_eventHideBt) {
|
||||
} else if ( _msg.GetMessage() == l_eventHideBt) {
|
||||
Hide();
|
||||
} else if ( eventId == ednMsgGuiSearch) {
|
||||
} else if ( _msg.GetMessage() == ednMsgGuiSearch) {
|
||||
if (true == IsHide()) {
|
||||
Show();
|
||||
if (m_searchEntry!= NULL) {
|
||||
@@ -266,13 +266,13 @@ void Search::OnReceiveMessage(ewol::EObject * CallerObject, const char * eventId
|
||||
}
|
||||
}
|
||||
|
||||
void Search::OnObjectRemove(ewol::EObject * removeObject)
|
||||
void Search::OnObjectRemove(ewol::EObject * _removeObject)
|
||||
{
|
||||
widget::Sizer::OnObjectRemove(removeObject);
|
||||
if (removeObject == m_searchEntry) {
|
||||
widget::Sizer::OnObjectRemove(_removeObject);
|
||||
if (_removeObject == m_searchEntry) {
|
||||
m_searchEntry = NULL;
|
||||
}
|
||||
if (removeObject == m_replaceEntry) {
|
||||
if (_removeObject == m_replaceEntry) {
|
||||
m_replaceEntry = NULL;
|
||||
}
|
||||
}
|
||||
|
@@ -15,20 +15,18 @@
|
||||
|
||||
class Search : public widget::Sizer
|
||||
{
|
||||
public:
|
||||
// Constructeur
|
||||
Search(void);
|
||||
~Search(void);
|
||||
// herited function
|
||||
const char * const GetObjectType(void) { return "ApplSearch"; };
|
||||
// herited function
|
||||
virtual void OnReceiveMessage(ewol::EObject * CallerObject, const char * eventId, const etk::UString& data);
|
||||
// herited function
|
||||
virtual void OnObjectRemove(ewol::EObject * removeObject);
|
||||
private:
|
||||
bool m_forward;
|
||||
widget::Entry * m_searchEntry;
|
||||
widget::Entry * m_replaceEntry;
|
||||
public:
|
||||
// Constructeur
|
||||
Search(void);
|
||||
~Search(void);
|
||||
public: // derived function
|
||||
virtual const char * const GetObjectType(void) { return "ApplSearch"; };
|
||||
virtual void OnReceiveMessage(const ewol::EMessage& _msg);
|
||||
virtual void OnObjectRemove(ewol::EObject * _removeObject);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@@ -40,7 +40,7 @@ namespace appl {
|
||||
uint32_t GetNuberOfRaw(void);
|
||||
bool GetElement(int32_t colomn, int32_t raw, etk::UString &myTextToWrite, draw::Color &fg, draw::Color &bg);
|
||||
bool OnItemEvent(int32_t IdInput, ewol::keyEvent::status_te typeEvent, int32_t colomn, int32_t raw, float x, float y);
|
||||
// herited function
|
||||
// derived function
|
||||
const char * const GetObjectType(void) { return "TagFileList"; };
|
||||
public:
|
||||
/**
|
||||
|
@@ -129,25 +129,25 @@ appl::TagFileSelection::~TagFileSelection(void)
|
||||
|
||||
}
|
||||
|
||||
void appl::TagFileSelection::OnReceiveMessage(ewol::EObject * CallerObject, const char * eventId, const etk::UString& data)
|
||||
void appl::TagFileSelection::OnReceiveMessage(const ewol::EMessage& _msg)
|
||||
{
|
||||
EWOL_INFO("ctags LIST ... : \"" << eventId << "\" ==> data=\"" << data << "\"" );
|
||||
if (eventId == applEventctagsSelection) {
|
||||
EWOL_INFO("ctags LIST ... : \"" << _msg.GetMessage() << "\" ==> data=\"" << _msg.GetData() << "\"" );
|
||||
if (_msg.GetMessage() == applEventctagsSelection) {
|
||||
if (m_eventNamed!="") {
|
||||
GenerateEventId(applEventctagsSelection, m_eventNamed);
|
||||
//==> Auto remove ...
|
||||
AutoDestroy();
|
||||
}
|
||||
} else if (eventId == applEventCtagsListSelect) {
|
||||
m_eventNamed = data;
|
||||
} else if (_msg.GetMessage() == applEventCtagsListSelect) {
|
||||
m_eventNamed = _msg.GetData();
|
||||
|
||||
} else if (eventId == applEventCtagsListUnSelect) {
|
||||
} else if (_msg.GetMessage() == applEventCtagsListUnSelect) {
|
||||
m_eventNamed = "";
|
||||
} else if (eventId == applEventCtagsListValidate) {
|
||||
GenerateEventId(applEventctagsSelection, data);
|
||||
} else if (_msg.GetMessage() == applEventCtagsListValidate) {
|
||||
GenerateEventId(applEventctagsSelection, _msg.GetData());
|
||||
//==> Auto remove ...
|
||||
AutoDestroy();
|
||||
} else if (eventId == applEventctagsCancel) {
|
||||
} else if (_msg.GetMessage() == applEventctagsCancel) {
|
||||
GenerateEventId(applEventctagsCancel, "");
|
||||
//==> Auto remove ...
|
||||
AutoDestroy();
|
||||
@@ -168,12 +168,12 @@ void appl::TagFileSelection::AddCtagsNewItem(etk::UString file, int32_t line)
|
||||
}
|
||||
}
|
||||
|
||||
void appl::TagFileSelection::OnObjectRemove(ewol::EObject * removeObject)
|
||||
void appl::TagFileSelection::OnObjectRemove(ewol::EObject * _removeObject)
|
||||
{
|
||||
// First step call parrent :
|
||||
widget::PopUp::OnObjectRemove(m_listTag);
|
||||
widget::PopUp::OnObjectRemove(_removeObject);
|
||||
// second step find if in all the elements ...
|
||||
if(removeObject == m_listTag) {
|
||||
if(_removeObject == m_listTag) {
|
||||
m_listTag = NULL;
|
||||
}
|
||||
}
|
||||
|
@@ -25,19 +25,16 @@ namespace appl {
|
||||
public:
|
||||
TagFileSelection(void);
|
||||
virtual ~TagFileSelection(void);
|
||||
// herited function
|
||||
const char * const GetObjectType(void) { return "EwolFileChooser"; };
|
||||
// herited function
|
||||
void OnReceiveMessage(ewol::EObject * CallerObject, const char * eventId, const etk::UString& data);
|
||||
// herited function
|
||||
void OnObjectRemove(ewol::EObject * removeObject);
|
||||
/**
|
||||
* @brief Add a Ctags item on the curent list
|
||||
* @param[in] file Compleate file name
|
||||
* @param[in] jump line id
|
||||
*/
|
||||
void AddCtagsNewItem(etk::UString file, int32_t line);
|
||||
|
||||
public: // herited function
|
||||
const char * const GetObjectType(void) { return "EwolFileChooser"; };
|
||||
void OnReceiveMessage(const ewol::EMessage& _msg);
|
||||
void OnObjectRemove(ewol::EObject * _removeObject);
|
||||
};
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user