[DEV] update to new binding
This commit is contained in:
parent
69e1259b27
commit
e1e95e46e0
@ -12,6 +12,7 @@
|
|||||||
#include <ewol/widget/Label.h>
|
#include <ewol/widget/Label.h>
|
||||||
#include <etk/tool.h>
|
#include <etk/tool.h>
|
||||||
#include <eaudiofx/eaudiofx.h>
|
#include <eaudiofx/eaudiofx.h>
|
||||||
|
#include <ewol/widget/Button.h>
|
||||||
|
|
||||||
#include <eaudiofx/base/GeneratorFile.h>
|
#include <eaudiofx/base/GeneratorFile.h>
|
||||||
#include <eaudiofx/core/BlockDecoder.h>
|
#include <eaudiofx/core/BlockDecoder.h>
|
||||||
@ -29,6 +30,7 @@ appl::Windows::Windows() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void appl::Windows::init() {
|
void appl::Windows::init() {
|
||||||
|
ewol::widget::Windows::init();
|
||||||
setTitle("example 001_HelloWord");
|
setTitle("example 001_HelloWord");
|
||||||
std::string composition = std::string("");
|
std::string composition = std::string("");
|
||||||
composition += "<sizer mode='vert'>\n";
|
composition += "<sizer mode='vert'>\n";
|
||||||
@ -53,14 +55,13 @@ void appl::Windows::init() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
setSubWidget(m_composer);
|
setSubWidget(m_composer);
|
||||||
m_composer->registerOnEventNameWidget(shared_from_this(), "bt-play1", "pressed", g_eventPlay1);
|
composerBind(ewol::widget::Button, "bt-play1", signalPressed, shared_from_this(), &appl::Windows::onCallbackPlay);
|
||||||
m_composer->registerOnEventNameWidget(shared_from_this(), "bt-play2", "pressed", g_eventPlay2);
|
composerBind(ewol::widget::Button, "bt-play2", signalPressed, shared_from_this(), &appl::Windows::onCallbackStop);
|
||||||
}
|
}
|
||||||
|
|
||||||
eaudiofx::Processing* process = NULL;
|
eaudiofx::Processing* process = NULL;
|
||||||
|
|
||||||
void appl::Windows::onReceiveMessage(const ewol::object::Message& _msg) {
|
void appl::Windows::onCallbackPlay() {
|
||||||
if (_msg.getMessage() == g_eventPlay1) {
|
|
||||||
#if 0
|
#if 0
|
||||||
APPL_INFO("Play Requested ...");
|
APPL_INFO("Play Requested ...");
|
||||||
process = new eaudiofx::Processing();
|
process = new eaudiofx::Processing();
|
||||||
@ -129,12 +130,11 @@ void appl::Windows::onReceiveMessage(const ewol::object::Message& _msg) {
|
|||||||
process->start();
|
process->start();
|
||||||
return;
|
return;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
if (_msg.getMessage() == g_eventPlay2) {
|
|
||||||
|
void appl::Windows::onCallbackStop() {
|
||||||
if (process != NULL) {
|
if (process != NULL) {
|
||||||
process->stop();
|
process->stop();
|
||||||
}
|
}
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,8 +21,10 @@ namespace appl {
|
|||||||
void init();
|
void init();
|
||||||
public:
|
public:
|
||||||
DECLARE_FACTORY(Windows);
|
DECLARE_FACTORY(Windows);
|
||||||
public: // herited functions
|
public: // callback functions
|
||||||
virtual void onReceiveMessage(const ewol::object::Message& _msg);
|
void onCallbackPlay();
|
||||||
|
void onCallbackStop();
|
||||||
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user