[DEV] update new esignal (not build)

This commit is contained in:
Edouard DUPIN 2016-02-19 23:33:00 +01:00
parent 1bbc8c08cc
commit b22014b3f6
33 changed files with 93 additions and 91 deletions

View File

@ -34,5 +34,5 @@ namespace etk {
} }
// declare for signal event // declare for signal event
template class esignal::Signal<ewol::event::Time>; template class esignal::ISignal<ewol::event::Time>;

View File

@ -17,7 +17,7 @@
ewol::object::Manager::Manager(ewol::Context& _context) : ewol::object::Manager::Manager(ewol::Context& _context) :
m_context(_context), m_context(_context),
periodicCall(*this, "periodic", "Call every time system render", true), periodicCall(*this, "periodic", "Call every time system render"),
m_applWakeUpTime(0), m_applWakeUpTime(0),
m_lastPeriodicCallTime(0) { m_lastPeriodicCallTime(0) {
EWOL_DEBUG(" == > init Object-Manager"); EWOL_DEBUG(" == > init Object-Manager");
@ -133,7 +133,7 @@ void ewol::object::Manager::workerRemove(const std::shared_ptr<ewol::Object>& _w
void ewol::object::Manager::timeCall(int64_t _localTime) { void ewol::object::Manager::timeCall(int64_t _localTime) {
int64_t previousTime = m_lastPeriodicCallTime; int64_t previousTime = m_lastPeriodicCallTime;
m_lastPeriodicCallTime = _localTime; m_lastPeriodicCallTime = _localTime;
if (periodicCall.getNumberConnected() <= 0) { if (periodicCall.size() <= 0) {
return; return;
} }
float deltaTime = (float)(_localTime - previousTime)/1000000.0; float deltaTime = (float)(_localTime - previousTime)/1000000.0;
@ -146,5 +146,5 @@ void ewol::object::Manager::timeCallResume(int64_t _localTime) {
} }
bool ewol::object::Manager::timeCallHave() { bool ewol::object::Manager::timeCallHave() {
return periodicCall.getNumberConnected() > 0; return periodicCall.size() > 0;
} }

View File

@ -9,7 +9,7 @@
#include <etk/types.h> #include <etk/types.h>
#include <ewol/object/Object.h> #include <ewol/object/Object.h>
#include <esignal/Signal.h> #include <esignal/ISignal.h>
#include <ewol/event/Time.h> #include <ewol/event/Time.h>
namespace ewol { namespace ewol {
@ -76,7 +76,7 @@ namespace ewol {
*/ */
void workerRemove(const std::shared_ptr<ewol::Object>& _worker); void workerRemove(const std::shared_ptr<ewol::Object>& _worker);
public: public:
esignal::Signal<ewol::event::Time> periodicCall; esignal::ISignal<ewol::event::Time> periodicCall;
private: private:
int64_t m_applWakeUpTime; //!< Time of the application initialize int64_t m_applWakeUpTime; //!< Time of the application initialize
int64_t m_lastPeriodicCallTime; //!< last call time ... int64_t m_lastPeriodicCallTime; //!< last call time ...

View File

@ -255,7 +255,7 @@ namespace ewol {
#define subBind(_type, _name, _event, _shared_ptr, _func, ...) do {\ #define subBind(_type, _name, _event, _shared_ptr, _func, ...) do {\
std::shared_ptr<_type> myObject = std::dynamic_pointer_cast<_type>(getSubObjectNamed(_name)); \ std::shared_ptr<_type> myObject = std::dynamic_pointer_cast<_type>(getSubObjectNamed(_name)); \
if (myObject != nullptr) { \ if (myObject != nullptr) { \
myObject->_event.bind(_shared_ptr, _func, ##__VA_ARGS__); \ myObject->_event.connect(_shared_ptr, _func, ##__VA_ARGS__); \
} else { \ } else { \
EWOL_ERROR("object named='" << _name << "' not exit or can not be cast in : " << #_type); \ EWOL_ERROR("object named='" << _name << "' not exit or can not be cast in : " << #_type); \
} \ } \
@ -264,10 +264,10 @@ namespace ewol {
template<class TYPE> void subBind(std::shared_ptr<ewol::Object> _obj, void (TYPE::*_func)()) { template<class TYPE> void subBind(std::shared_ptr<ewol::Object> _obj, void (TYPE::*_func)()) {
std::shared_ptr<TYPE> obj2 = std::dynamic_pointer_cast<TYPE>(_obj); std::shared_ptr<TYPE> obj2 = std::dynamic_pointer_cast<TYPE>(_obj);
if (obj2 == nullptr) { if (obj2 == nullptr) {
EWOL_ERROR("Can not bind signal ..."); EWOL_ERROR("Can not connect signal ...");
return; return;
} }
m_callerList.push_back(std::make_pair(std::weak_ptr<ewol::Object>(_obj), std::bind(_func, obj2.get()))); m_callerList.push_back(std::make_pair(std::weak_ptr<ewol::Object>(_obj), std::connect(_func, obj2.get())));
} }
*/ */
}; };
@ -280,7 +280,7 @@ namespace ewol {
#define globalBind(_type, _name, _event, _obj, _func, ...) do {\ #define globalBind(_type, _name, _event, _obj, _func, ...) do {\
std::shared_ptr<_type> myObject = std::dynamic_pointer_cast<_type>(ewol::getContext().getEObjectManager().getObjectNamed(_name)); \ std::shared_ptr<_type> myObject = std::dynamic_pointer_cast<_type>(ewol::getContext().getEObjectManager().getObjectNamed(_name)); \
if (myObject != nullptr) { \ if (myObject != nullptr) { \
myObject->_event.bind(_obj, _func, ##__VA_ARGS__); \ myObject->_event.connect(_obj, _func, ##__VA_ARGS__); \
} else { \ } else { \
EWOL_ERROR("object named='" << _name << "' not exit or can not be cast in : " << #_type); \ EWOL_ERROR("object named='" << _name << "' not exit or can not be cast in : " << #_type); \
} \ } \
@ -292,7 +292,7 @@ namespace ewol {
#define externSubBind(_object, _type, _name, _event, _obj, _func, ...) do {\ #define externSubBind(_object, _type, _name, _event, _obj, _func, ...) do {\
std::shared_ptr<_type> myObject = std::dynamic_pointer_cast<_type>(_object->getObjectNamed(_name)); \ std::shared_ptr<_type> myObject = std::dynamic_pointer_cast<_type>(_object->getObjectNamed(_name)); \
if (myObject != nullptr) { \ if (myObject != nullptr) { \
myObject->_event.bind(_obj, _func, ##__VA_ARGS__); \ myObject->_event.connect(_obj, _func, ##__VA_ARGS__); \
} else { \ } else { \
EWOL_ERROR("object named='" << _name << "' not exit or can not be cast in : " << #_type); \ EWOL_ERROR("object named='" << _name << "' not exit or can not be cast in : " << #_type); \
} \ } \

View File

@ -11,6 +11,7 @@
#include <gale/resource/Manager.h> #include <gale/resource/Manager.h>
#include <gale/renderer/openGL/openGL-include.h> #include <gale/renderer/openGL/openGL-include.h>
#include <esignal/details/Signal.hxx> #include <esignal/details/Signal.hxx>
#include <esignal/ISignal.h>
#undef __class__ #undef __class__
#define __class__ "resource::Colored3DObject" #define __class__ "resource::Colored3DObject"
@ -235,6 +236,6 @@ template<> std::string etk::to_string(ewol::resource::Colored3DObject const&) {
} }
// declare for signal event // declare for signal event
template class esignal::Signal<ewol::resource::Colored3DObject>; template class esignal::ISignal<ewol::resource::Colored3DObject>;
template class esignal::Signal<std::shared_ptr<ewol::resource::Colored3DObject>>; template class esignal::ISignal<std::shared_ptr<ewol::resource::Colored3DObject>>;

View File

@ -14,7 +14,7 @@
#include <ewol/compositing/Shaper.h> #include <ewol/compositing/Shaper.h>
#include <ewol/widget/Container2.h> #include <ewol/widget/Container2.h>
#include <ewol/widget/Manager.h> #include <ewol/widget/Manager.h>
#include <esignal/Signal.h> #include <esignal/ISignal.h>
@ -33,12 +33,12 @@ namespace ewol {
lockAccess, //!< all event are trashed == > acctivity of the button is disable lockAccess, //!< all event are trashed == > acctivity of the button is disable
}; };
public: // Event list public: // Event list
esignal::Signal<void> signalPressed; esignal::ISignal<> signalPressed;
esignal::Signal<void> signalDown; esignal::ISignal<> signalDown;
esignal::Signal<void> signalUp; esignal::ISignal<> signalUp;
esignal::Signal<void> signalEnter; esignal::ISignal<> signalEnter;
esignal::Signal<void> signalLeave; esignal::ISignal<> signalLeave;
esignal::Signal<bool> signalValue; esignal::ISignal<bool> signalValue;
public: // propertie list public: // propertie list
eproperty::Value<std::string> propertyShape; //!< shaper name property eproperty::Value<std::string> propertyShape; //!< shaper name property
eproperty::Value<bool> propertyValue; //!< Current state of the button. eproperty::Value<bool> propertyValue; //!< Current state of the button.

View File

@ -177,7 +177,7 @@ bool ewol::widget::ButtonColor::onEventInput(const ewol::event::Input& _event) {
myColorChooser->propertyValue.set(propertyValue.get()); myColorChooser->propertyValue.set(propertyValue.get());
// set it in the pop-up-system : // set it in the pop-up-system :
m_widgetContextMenu->setSubWidget(myColorChooser); m_widgetContextMenu->setSubWidget(myColorChooser);
myColorChooser->signalChange.bind(shared_from_this(), &ewol::widget::ButtonColor::onCallbackColorChange); myColorChooser->signalChange.connect(shared_from_this(), &ewol::widget::ButtonColor::onCallbackColorChange);
std::shared_ptr<ewol::widget::Windows> currentWindows = getWindows(); std::shared_ptr<ewol::widget::Windows> currentWindows = getWindows();
if (currentWindows == nullptr) { if (currentWindows == nullptr) {
EWOL_ERROR("Can not get the curent Windows..."); EWOL_ERROR("Can not get the curent Windows...");

View File

@ -15,13 +15,13 @@
#include <ewol/compositing/Shaper.h> #include <ewol/compositing/Shaper.h>
#include <ewol/widget/Widget.h> #include <ewol/widget/Widget.h>
#include <ewol/widget/Manager.h> #include <ewol/widget/Manager.h>
#include <esignal/Signal.h> #include <esignal/ISignal.h>
namespace ewol { namespace ewol {
namespace widget { namespace widget {
class ButtonColor : public ewol::Widget { class ButtonColor : public ewol::Widget {
public: // signals public: // signals
esignal::Signal<etk::Color<>> signalChange; esignal::ISignal<etk::Color<>> signalChange;
public: // properties public: // properties
eproperty::Value<etk::Color<>> propertyValue; //!< Current color. eproperty::Value<etk::Color<>> propertyValue; //!< Current color.
eproperty::Value<std::string> propertyShape; //!< Current color. eproperty::Value<std::string> propertyShape; //!< Current color.

View File

@ -12,18 +12,18 @@
#include <ewol/compositing/Shaper.h> #include <ewol/compositing/Shaper.h>
#include <ewol/widget/Container2.h> #include <ewol/widget/Container2.h>
#include <ewol/widget/Manager.h> #include <ewol/widget/Manager.h>
#include <esignal/Signal.h> #include <esignal/ISignal.h>
namespace ewol { namespace ewol {
namespace widget { namespace widget {
class CheckBox : public ewol::widget::Container2 { class CheckBox : public ewol::widget::Container2 {
public: // Event list public: // Event list
esignal::Signal<void> signalPressed; esignal::ISignal<> signalPressed;
esignal::Signal<void> signalDown; esignal::ISignal<> signalDown;
esignal::Signal<void> signalUp; esignal::ISignal<> signalUp;
esignal::Signal<void> signalEnter; esignal::ISignal<> signalEnter;
esignal::Signal<bool> signalValue; esignal::ISignal<bool> signalValue;
public: // propertie list public: // propertie list
eproperty::Value<bool> propertyValue; //!< Current state of the checkbox. eproperty::Value<bool> propertyValue; //!< Current state of the checkbox.
eproperty::Value<std::string> propertyShape; //!< shape of the widget eproperty::Value<std::string> propertyShape; //!< shape of the widget

View File

@ -12,14 +12,14 @@
#include <etk/Color.h> #include <etk/Color.h>
#include <ewol/widget/Widget.h> #include <ewol/widget/Widget.h>
#include <ewol/compositing/Drawing.h> #include <ewol/compositing/Drawing.h>
#include <esignal/Signal.h> #include <esignal/ISignal.h>
namespace ewol { namespace ewol {
namespace widget { namespace widget {
class ColorBar : public ewol::Widget { class ColorBar : public ewol::Widget {
public: // signals public: // signals
esignal::Signal<etk::Color<>> signalChange; esignal::ISignal<etk::Color<>> signalChange;
public: public:
eproperty::Value<etk::Color<>> propertyValue; eproperty::Value<etk::Color<>> propertyValue;
protected: protected:

View File

@ -57,7 +57,7 @@ void ewol::widget::Entry::init(const std::string& _newData, const std::string& _
shortCutAdd("ctrl+v", "paste"); shortCutAdd("ctrl+v", "paste");
shortCutAdd("ctrl+a", "select:all"); shortCutAdd("ctrl+a", "select:all");
shortCutAdd("ctrl+shift+a", "select:none"); shortCutAdd("ctrl+shift+a", "select:none");
signalShortcut.bind(shared_from_this(), &ewol::widget::Entry::onCallbackShortCut); signalShortcut.connect(shared_from_this(), &ewol::widget::Entry::onCallbackShortCut);
} }

View File

@ -16,7 +16,7 @@
#include <ewol/widget/Widget.h> #include <ewol/widget/Widget.h>
#include <etk/Color.h> #include <etk/Color.h>
#include <ewol/widget/Manager.h> #include <ewol/widget/Manager.h>
#include <esignal/Signal.h> #include <esignal/ISignal.h>
namespace ewol { namespace ewol {
namespace widget { namespace widget {
@ -32,9 +32,9 @@ namespace ewol {
*/ */
class Entry : public ewol::Widget { class Entry : public ewol::Widget {
public: // Event list public: // Event list
esignal::Signal<void> signalClick; //!< bang on click the entry box esignal::ISignal<> signalClick; //!< bang on click the entry box
esignal::Signal<std::string> signalEnter; //!< Enter key is pressed esignal::ISignal<std::string> signalEnter; //!< Enter key is pressed
esignal::Signal<std::string> signalModify; //!< data change esignal::ISignal<std::string> signalModify; //!< data change
public: // propertie list public: // propertie list
eproperty::Value<std::string> propertyShaper; eproperty::Value<std::string> propertyShaper;
eproperty::Value<std::string> propertyValue; //!< string that must be displayed eproperty::Value<std::string> propertyValue; //!< string that must be displayed

View File

@ -13,7 +13,7 @@
#include <ewol/compositing/Image.h> #include <ewol/compositing/Image.h>
#include <ewol/resource/ColorFile.h> #include <ewol/resource/ColorFile.h>
#include <ewol/widget/Manager.h> #include <ewol/widget/Manager.h>
#include <esignal/Signal.h> #include <esignal/ISignal.h>
namespace ewol { namespace ewol {
namespace widget { namespace widget {
@ -22,7 +22,7 @@ namespace ewol {
*/ */
class Image :public ewol::Widget { class Image :public ewol::Widget {
public: // signals public: // signals
esignal::Signal<void> signalPressed; esignal::ISignal<> signalPressed;
public: // properties public: // properties
eproperty::Value<std::string> propertySource; //!< file name of the image. eproperty::Value<std::string> propertySource; //!< file name of the image.
eproperty::Value<gale::Dimension> propertyBorder; //!< border to add at the image. eproperty::Value<gale::Dimension> propertyBorder; //!< border to add at the image.

View File

@ -11,7 +11,7 @@
#include <etk/Color.h> #include <etk/Color.h>
#include <ewol/debug.h> #include <ewol/debug.h>
#include <ewol/widget/Widget.h> #include <ewol/widget/Widget.h>
#include <esignal/Signal.h> #include <esignal/ISignal.h>
// TODO : Rework ==> use property and shaper ... // TODO : Rework ==> use property and shaper ...
@ -23,9 +23,9 @@ namespace ewol {
class Joystick :public ewol::Widget { class Joystick :public ewol::Widget {
public: public:
// Event list of properties // Event list of properties
esignal::Signal<void> signalEnable; esignal::ISignal<> signalEnable;
esignal::Signal<void> signalDisable; esignal::ISignal<> signalDisable;
esignal::Signal<vec2> signalMove; esignal::ISignal<vec2> signalMove;
public: public:
enum joystickMode { enum joystickMode {
modeNormal, modeNormal,

View File

@ -13,7 +13,7 @@
#include <ewol/widget/Widget.h> #include <ewol/widget/Widget.h>
#include <ewol/widget/Manager.h> #include <ewol/widget/Manager.h>
#include <ewol/resource/ColorFile.h> #include <ewol/resource/ColorFile.h>
#include <esignal/Signal.h> #include <esignal/ISignal.h>
namespace ewol { namespace ewol {
namespace widget { namespace widget {
@ -22,7 +22,7 @@ namespace ewol {
*/ */
class Label : public ewol::Widget { class Label : public ewol::Widget {
public: // signals public: // signals
esignal::Signal<void> signalPressed; esignal::ISignal<> signalPressed;
public: // properties public: // properties
eproperty::Value<std::string> propertyValue; //!< decorated text to display. eproperty::Value<std::string> propertyValue; //!< decorated text to display.
private: private:

View File

@ -10,7 +10,7 @@
#include <ewol/widget/List.h> #include <ewol/widget/List.h>
#include <etk/os/FSNode.h> #include <etk/os/FSNode.h>
#include <ewol/resource/ColorFile.h> #include <ewol/resource/ColorFile.h>
#include <esignal/Signal.h> #include <esignal/ISignal.h>
namespace ewol { namespace ewol {
namespace widget { namespace widget {
@ -19,10 +19,10 @@ namespace ewol {
*/ */
class ListFileSystem : public ewol::widget::List { class ListFileSystem : public ewol::widget::List {
public: // signals public: // signals
esignal::Signal<std::string> signalFileSelect; //!< @event "file-select" Generated when a file is selected. esignal::ISignal<std::string> signalFileSelect; //!< @event "file-select" Generated when a file is selected.
esignal::Signal<std::string> signalFileValidate; //!< @event "file-validate" Generate when the user validate (return) or double click on the element esignal::ISignal<std::string> signalFileValidate; //!< @event "file-validate" Generate when the user validate (return) or double click on the element
esignal::Signal<std::string> signalFolderSelect; esignal::ISignal<std::string> signalFolderSelect;
esignal::Signal<std::string> signalFolderValidate; esignal::ISignal<std::string> signalFolderValidate;
public: // properties public: // properties
eproperty::Value<std::string> propertyPath; //!< Current folder that display point on. eproperty::Value<std::string> propertyPath; //!< Current folder that display point on.
eproperty::Value<std::string> propertyFile; //!< current selected file eproperty::Value<std::string> propertyFile; //!< current selected file

View File

@ -108,7 +108,7 @@ int32_t ewol::widget::Menu::add(int32_t _parent,
// add it in the widget list // add it in the widget list
ewol::widget::Sizer::subWidgetAdd(myButton); ewol::widget::Sizer::subWidgetAdd(myButton);
// keep the specific event ... // keep the specific event ...
myButton->signalPressed.bind(shared_from_this(), &ewol::widget::Menu::onButtonPressed, std::weak_ptr<ewol::widget::Button>(myButton)); myButton->signalPressed.connect(shared_from_this(), &ewol::widget::Menu::onButtonPressed, std::weak_ptr<ewol::widget::Button>(myButton));
tmpObject.m_widgetPointer = myButton; tmpObject.m_widgetPointer = myButton;
} }
m_listElement.push_back(tmpObject); m_listElement.push_back(tmpObject);
@ -206,7 +206,7 @@ void ewol::widget::Menu::onButtonPressed(std::weak_ptr<ewol::widget::Button> _bu
myButton->propertyExpand.set(bvec2(true,true)); myButton->propertyExpand.set(bvec2(true,true));
myButton->propertyFill.set(bvec2(true,true)); myButton->propertyFill.set(bvec2(true,true));
// set callback // set callback
myButton->signalPressed.bind(shared_from_this(), &ewol::widget::Menu::onButtonPressed, std::weak_ptr<ewol::widget::Button>(myButton)); myButton->signalPressed.connect(shared_from_this(), &ewol::widget::Menu::onButtonPressed, std::weak_ptr<ewol::widget::Button>(myButton));
// add it in the widget list // add it in the widget list
mySizer->subWidgetAdd(myButton); mySizer->subWidgetAdd(myButton);
if (it2->m_image.size() != 0) { if (it2->m_image.size() != 0) {

View File

@ -32,7 +32,7 @@ namespace ewol {
*/ */
class Menu :public ewol::widget::Sizer { class Menu :public ewol::widget::Sizer {
public: public:
esignal::Signal<std::string> signalSelect; // event on a menu button or ... esignal::ISignal<std::string> signalSelect; // event on a menu button or ...
protected: protected:
Menu(); Menu();
void init(); void init();

View File

@ -151,7 +151,7 @@ void ewol::widget::Select::updateGui() {
} }
if (m_widgetButtonUp != nullptr) { if (m_widgetButtonUp != nullptr) {
m_widgetButtonUp->signalUnBindAll(shared_from_this()); m_widgetButtonUp->signalUnBindAll(shared_from_this());
m_widgetButtonUp->signalPressed.bind(shared_from_this(), &ewol::widget::Select::onCallbackOpenMenu); m_widgetButtonUp->signalPressed.connect(shared_from_this(), &ewol::widget::Select::onCallbackOpenMenu);
} }
} }
@ -194,8 +194,8 @@ void ewol::widget::Select::onCallbackOpenMenu() {
myLabel->propertyExpand.set(bvec2(true,true)); myLabel->propertyExpand.set(bvec2(true,true));
myLabel->propertyFill.set(bvec2(true,true)); myLabel->propertyFill.set(bvec2(true,true));
// set callback // set callback
myLabel->signalPressed.bind(shared_from_this(), &ewol::widget::Select::onCallbackLabelPressed, it.m_value); myLabel->signalPressed.connect(shared_from_this(), &ewol::widget::Select::onCallbackLabelPressed, it.m_value);
myLabel->signalPressed.bind(tmpContext, &ewol::widget::ContextMenu::destroy); myLabel->signalPressed.connect(tmpContext, &ewol::widget::ContextMenu::destroy);
// add it in the widget list // add it in the widget list
mySizer->subWidgetAddStart(myLabel); mySizer->subWidgetAddStart(myLabel);
} }

View File

@ -19,7 +19,7 @@ namespace ewol {
*/ */
class Select : public ewol::widget::SpinBase { class Select : public ewol::widget::SpinBase {
public: // signals public: // signals
esignal::Signal<int32_t> signalValue; esignal::ISignal<int32_t> signalValue;
public: // properties public: // properties
eproperty::Value<int32_t> propertyValue; //!< Current state of the Select. eproperty::Value<int32_t> propertyValue; //!< Current state of the Select.
protected: protected:

View File

@ -12,7 +12,7 @@
#include <ewol/debug.h> #include <ewol/debug.h>
#include <ewol/widget/Widget.h> #include <ewol/widget/Widget.h>
#include <ewol/compositing/Drawing.h> #include <ewol/compositing/Drawing.h>
#include <esignal/Signal.h> #include <esignal/ISignal.h>
namespace ewol { namespace ewol {
namespace widget { namespace widget {
@ -21,7 +21,7 @@ namespace ewol {
*/ */
class Slider : public ewol::Widget { class Slider : public ewol::Widget {
public: // signals public: // signals
esignal::Signal<float> signalChange; esignal::ISignal<float> signalChange;
public: public:
//eproperty::Value<std::string> propertyShape; //!< name of the shape used //eproperty::Value<std::string> propertyShape; //!< name of the shape used
eproperty::Value<float> propertyValue; //!< current value of the Slider eproperty::Value<float> propertyValue; //!< current value of the Slider

View File

@ -67,11 +67,11 @@ void ewol::widget::Spin::updateGui() {
} }
if (m_widgetButtonUp != nullptr) { if (m_widgetButtonUp != nullptr) {
m_widgetButtonUp->signalUnBindAll(shared_from_this()); m_widgetButtonUp->signalUnBindAll(shared_from_this());
m_widgetButtonUp->signalPressed.bind(shared_from_this(), &ewol::widget::Spin::onCallbackUp); m_widgetButtonUp->signalPressed.connect(shared_from_this(), &ewol::widget::Spin::onCallbackUp);
} }
if (m_widgetButtonDown != nullptr) { if (m_widgetButtonDown != nullptr) {
m_widgetButtonDown->signalUnBindAll(shared_from_this()); m_widgetButtonDown->signalUnBindAll(shared_from_this());
m_widgetButtonDown->signalPressed.bind(shared_from_this(), &ewol::widget::Spin::onCallbackDown); m_widgetButtonDown->signalPressed.connect(shared_from_this(), &ewol::widget::Spin::onCallbackDown);
} }
EWOL_WARNING("updateGui [STOP]"); EWOL_WARNING("updateGui [STOP]");

View File

@ -20,8 +20,8 @@ namespace ewol {
class Spin : public ewol::widget::SpinBase { class Spin : public ewol::widget::SpinBase {
public: public:
// Event list of properties // Event list of properties
esignal::Signal<int64_t> signalValue; esignal::ISignal<int64_t> signalValue;
esignal::Signal<double> signalValueDouble; esignal::ISignal<double> signalValueDouble;
public: public:
eproperty::Value<int64_t> propertyValue; //!< Current value of the Spin. eproperty::Value<int64_t> propertyValue; //!< Current value of the Spin.
eproperty::Value<int64_t> propertyMin; //!< Minimum value eproperty::Value<int64_t> propertyMin; //!< Minimum value

View File

@ -11,7 +11,7 @@
#include <ewol/debug.h> #include <ewol/debug.h>
#include <ewol/widget/ContainerN.h> #include <ewol/widget/ContainerN.h>
#include <ewol/widget/Manager.h> #include <ewol/widget/Manager.h>
#include <esignal/Signal.h> #include <esignal/ISignal.h>
namespace ewol { namespace ewol {
namespace widget { namespace widget {
@ -26,8 +26,8 @@ namespace ewol {
sladingTransition_count, sladingTransition_count,
}; };
public: // signals: public: // signals:
esignal::Signal<void> signalStartSlide; esignal::ISignal<> signalStartSlide;
esignal::Signal<void> signalStopSlide; esignal::ISignal<> signalStopSlide;
public: // properties: public: // properties:
eproperty::Range<float> propertyTransitionSpeed; //!< speed of the transition (default 1 == > 1s) eproperty::Range<float> propertyTransitionSpeed; //!< speed of the transition (default 1 == > 1s)
eproperty::List<enum sladingMode> propertyTransitionMode; //!< mode to slide the widgets eproperty::List<enum sladingMode> propertyTransitionMode; //!< mode to slide the widgets

View File

@ -239,17 +239,17 @@ void ewol::Widget::systemDraw(const ewol::DrawProperty& _displayProp) {
void ewol::Widget::periodicCallDisable() { void ewol::Widget::periodicCallDisable() {
EWOL_VERBOSE("Perodic call disable " << propertyName); EWOL_VERBOSE("Perodic call disable " << propertyName);
getObjectManager().periodicCall.release(shared_from_this()); m_periodicCallHandle.disconnect();
} }
void ewol::Widget::periodicCallEnable() { void ewol::Widget::periodicCallEnable() {
if (getObjectManager().periodicCall.isRegistered(shared_from_this()) == true) { if (m_periodicCallHandle.isConnected() == true) {
EWOL_VERBOSE("Perodic call enable " << propertyName << " ==> rejected"); EWOL_VERBOSE("Perodic call enable " << propertyName << " ==> rejected");
return; return;
} else { } else {
EWOL_VERBOSE("Perodic call enable " << propertyName); EWOL_VERBOSE("Perodic call enable " << propertyName);
} }
getObjectManager().periodicCall.bind(shared_from_this(), &ewol::Widget::periodicCall); m_periodicCallHandle = getObjectManager().periodicCall.connect(this, &ewol::Widget::periodicCall);
} }
void ewol::Widget::markToRedraw() { void ewol::Widget::markToRedraw() {

View File

@ -30,7 +30,7 @@ namespace ewol {
#include <ewol/event/Entry.h> #include <ewol/event/Entry.h>
#include <ewol/event/Time.h> #include <ewol/event/Time.h>
#include <ewol/translate.h> #include <ewol/translate.h>
#include <esignal/Signal.h> #include <esignal/ISignal.h>
#include <ewol/DrawProperty.h> #include <ewol/DrawProperty.h>
#include <ewol/gravity.h> #include <ewol/gravity.h>
@ -324,6 +324,7 @@ namespace ewol {
// ---------------------------------------------------------------------------------------------------------------- // ----------------------------------------------------------------------------------------------------------------
protected: protected:
// TODO : Remove this API ==> deprecated since 28/10/2014 // TODO : Remove this API ==> deprecated since 28/10/2014
esignal::Connection m_periodicCallHandle;
/** /**
* @brief disable the periodic call. * @brief disable the periodic call.
*/ */
@ -408,7 +409,7 @@ namespace ewol {
// -- Shortcut : management of the shortcut // -- Shortcut : management of the shortcut
// ---------------------------------------------------------------------------------------------------------------- // ----------------------------------------------------------------------------------------------------------------
public: public:
esignal::Signal<std::string> signalShortcut; //!< signal handle of the message esignal::ISignal<std::string> signalShortcut; //!< signal handle of the message
private: private:
std::vector<EventShortCut*> m_localShortcut; //!< list of all shortcut in the widget std::vector<EventShortCut*> m_localShortcut; //!< list of all shortcut in the widget
protected: protected:
@ -534,9 +535,9 @@ namespace ewol {
*/ */
public: public:
// event generated : // event generated :
esignal::Signal<void> signalAnnimationStart; //!< event when start annimation esignal::ISignal<> signalAnnimationStart; //!< event when start annimation
esignal::Signal<float> signalAnnimationRatio; //!< event when % of annimation change (integer) esignal::ISignal<float> signalAnnimationRatio; //!< event when % of annimation change (integer)
esignal::Signal<void> signalAnnimationStop; //!< event when stop annimation esignal::ISignal<> signalAnnimationStop; //!< event when stop annimation
protected: protected:
enum annimationMode { enum annimationMode {
annimationModeEnableAdd, annimationModeEnableAdd,

View File

@ -35,7 +35,7 @@ void ewol::widget::ColorChooser::init() {
ewol::widget::Sizer::init(ewol::widget::Sizer::modeVert); ewol::widget::Sizer::init(ewol::widget::Sizer::modeVert);
propertyLockExpand.set(bvec2(true,true)); propertyLockExpand.set(bvec2(true,true));
m_widgetColorBar = ewol::widget::ColorBar::create(); m_widgetColorBar = ewol::widget::ColorBar::create();
m_widgetColorBar->signalChange.bind(shared_from_this(), &ewol::widget::ColorChooser::onCallbackColorChange); m_widgetColorBar->signalChange.connect(shared_from_this(), &ewol::widget::ColorChooser::onCallbackColorChange);
m_widgetColorBar->propertyFill.set(bvec2(true,true)); m_widgetColorBar->propertyFill.set(bvec2(true,true));
subWidgetAdd(m_widgetColorBar); subWidgetAdd(m_widgetColorBar);
@ -43,7 +43,7 @@ void ewol::widget::ColorChooser::init() {
sliderColor = etk::color::black; sliderColor = etk::color::black;
m_widgetRed = ewol::widget::Slider::create(); m_widgetRed = ewol::widget::Slider::create();
m_widgetRed->signalChange.bind(shared_from_this(), &ewol::widget::ColorChooser::onCallbackColorChangeRed); m_widgetRed->signalChange.connect(shared_from_this(), &ewol::widget::ColorChooser::onCallbackColorChangeRed);
m_widgetRed->propertyExpand.set(bvec2(true,false)); m_widgetRed->propertyExpand.set(bvec2(true,false));
m_widgetRed->propertyFill.set(bvec2(true,false)); m_widgetRed->propertyFill.set(bvec2(true,false));
m_widgetRed->propertyMinimum.set(0); m_widgetRed->propertyMinimum.set(0);
@ -52,7 +52,7 @@ void ewol::widget::ColorChooser::init() {
m_widgetRed->setColor(sliderColor); m_widgetRed->setColor(sliderColor);
subWidgetAdd(m_widgetRed); subWidgetAdd(m_widgetRed);
m_widgetGreen = ewol::widget::Slider::create(); m_widgetGreen = ewol::widget::Slider::create();
m_widgetGreen->signalChange.bind(shared_from_this(), &ewol::widget::ColorChooser::onCallbackColorChangeGreen); m_widgetGreen->signalChange.connect(shared_from_this(), &ewol::widget::ColorChooser::onCallbackColorChangeGreen);
m_widgetGreen->propertyExpand.set(bvec2(true,false)); m_widgetGreen->propertyExpand.set(bvec2(true,false));
m_widgetGreen->propertyFill.set(bvec2(true,false)); m_widgetGreen->propertyFill.set(bvec2(true,false));
m_widgetGreen->propertyMinimum.set(0); m_widgetGreen->propertyMinimum.set(0);
@ -61,7 +61,7 @@ void ewol::widget::ColorChooser::init() {
m_widgetGreen->setColor(sliderColor); m_widgetGreen->setColor(sliderColor);
subWidgetAdd(m_widgetGreen); subWidgetAdd(m_widgetGreen);
m_widgetBlue = ewol::widget::Slider::create(); m_widgetBlue = ewol::widget::Slider::create();
m_widgetBlue->signalChange.bind(shared_from_this(), &ewol::widget::ColorChooser::onCallbackColorChangeBlue); m_widgetBlue->signalChange.connect(shared_from_this(), &ewol::widget::ColorChooser::onCallbackColorChangeBlue);
m_widgetBlue->propertyExpand.set(bvec2(true,false)); m_widgetBlue->propertyExpand.set(bvec2(true,false));
m_widgetBlue->propertyFill.set(bvec2(true,false)); m_widgetBlue->propertyFill.set(bvec2(true,false));
m_widgetBlue->propertyMinimum.set(0); m_widgetBlue->propertyMinimum.set(0);
@ -70,7 +70,7 @@ void ewol::widget::ColorChooser::init() {
m_widgetBlue->setColor(sliderColor); m_widgetBlue->setColor(sliderColor);
subWidgetAdd(m_widgetBlue); subWidgetAdd(m_widgetBlue);
m_widgetAlpha = ewol::widget::Slider::create(); m_widgetAlpha = ewol::widget::Slider::create();
m_widgetAlpha->signalChange.bind(shared_from_this(), &ewol::widget::ColorChooser::onCallbackColorChangeAlpha); m_widgetAlpha->signalChange.connect(shared_from_this(), &ewol::widget::ColorChooser::onCallbackColorChangeAlpha);
m_widgetAlpha->propertyExpand.set(bvec2(true,false)); m_widgetAlpha->propertyExpand.set(bvec2(true,false));
m_widgetAlpha->propertyFill.set(bvec2(true,false)); m_widgetAlpha->propertyFill.set(bvec2(true,false));
m_widgetAlpha->propertyMinimum.set(0); m_widgetAlpha->propertyMinimum.set(0);

View File

@ -16,7 +16,7 @@
#include <ewol/widget/Sizer.h> #include <ewol/widget/Sizer.h>
#include <ewol/widget/ColorBar.h> #include <ewol/widget/ColorBar.h>
#include <ewol/widget/Slider.h> #include <ewol/widget/Slider.h>
#include <esignal/Signal.h> #include <esignal/ISignal.h>
namespace ewol { namespace ewol {
namespace widget { namespace widget {
@ -25,7 +25,7 @@ namespace ewol {
*/ */
class ColorChooser : public ewol::widget::Sizer { class ColorChooser : public ewol::widget::Sizer {
public: // signals public: // signals
esignal::Signal<etk::Color<>> signalChange; esignal::ISignal<etk::Color<>> signalChange;
public: public:
eproperty::Value<etk::Color<>> propertyValue; eproperty::Value<etk::Color<>> propertyValue;
protected: protected:

View File

@ -10,7 +10,7 @@
#include <etk/types.h> #include <etk/types.h>
#include <ewol/debug.h> #include <ewol/debug.h>
#include <ewol/widget/Composer.h> #include <ewol/widget/Composer.h>
#include <esignal/Signal.h> #include <esignal/ISignal.h>
namespace ewol { namespace ewol {
namespace widget { namespace widget {
@ -32,9 +32,9 @@ namespace ewol {
* return -1; * return -1;
* } * }
* // register on the Validate event: * // register on the Validate event:
* tmpWidget->signalValidate.bind(shared_from_this(), &****::onCallbackOpenFile); * tmpWidget->signalValidate.connect(shared_from_this(), &****::onCallbackOpenFile);
* // no need of this event watching ... * // no need of this event watching ...
* tmpWidget->signalCancel.bind(shared_from_this(), &****::onCallbackClosePopUp); * tmpWidget->signalCancel.connect(shared_from_this(), &****::onCallbackClosePopUp);
* // set the title: * // set the title:
* tmpWidget->setTitle("Open files ..."); * tmpWidget->setTitle("Open files ...");
* // Set the validate Label: * // Set the validate Label:
@ -64,8 +64,8 @@ namespace ewol {
*/ */
class FileChooser : public ewol::widget::Composer { class FileChooser : public ewol::widget::Composer {
public: // signals public: // signals
esignal::Signal<void> signalCancel; esignal::ISignal<> signalCancel;
esignal::Signal<std::string> signalValidate; esignal::ISignal<std::string> signalValidate;
public: // properties public: // properties
eproperty::Value<std::string> propertyPath; eproperty::Value<std::string> propertyPath;
eproperty::Value<std::string> propertyFile; eproperty::Value<std::string> propertyFile;

View File

@ -77,7 +77,7 @@ void ewol::widget::Parameter::init() {
" <label>Save</label>\n" " <label>Save</label>\n"
" </sizer>\n" " </sizer>\n"
"</composer>\n")); "</composer>\n"));
tmpButton->signalPressed.bind(shared_from_this(), &ewol::widget::Parameter::onCallbackParameterSave); tmpButton->signalPressed.connect(shared_from_this(), &ewol::widget::Parameter::onCallbackParameterSave);
mySizerHori->subWidgetAdd(tmpButton); mySizerHori->subWidgetAdd(tmpButton);
} }
@ -101,7 +101,7 @@ void ewol::widget::Parameter::init() {
" <label>Close</label>\n" " <label>Close</label>\n"
" </sizer>\n" " </sizer>\n"
"</composer>\n")); "</composer>\n"));
tmpButton->signalPressed.bind(shared_from_this(), &ewol::widget::Parameter::onCallbackMenuclosed); tmpButton->signalPressed.connect(shared_from_this(), &ewol::widget::Parameter::onCallbackMenuclosed);
mySizerHori->subWidgetAdd(tmpButton); mySizerHori->subWidgetAdd(tmpButton);
} }
} }
@ -117,7 +117,7 @@ void ewol::widget::Parameter::init() {
EWOL_ERROR("Can not allocate widget == > display might be in error"); EWOL_ERROR("Can not allocate widget == > display might be in error");
} else { } else {
m_paramList->signalSelect.bind(shared_from_this(), &ewol::widget::Parameter::onCallbackMenuSelected); m_paramList->signalSelect.connect(shared_from_this(), &ewol::widget::Parameter::onCallbackMenuSelected);
m_paramList->propertyFill.set(bvec2(false,true)); m_paramList->propertyFill.set(bvec2(false,true));
m_paramList->propertyExpand.set(bvec2(false,true)); m_paramList->propertyExpand.set(bvec2(false,true));
mySizerHori->subWidgetAdd(m_paramList); mySizerHori->subWidgetAdd(m_paramList);

View File

@ -26,7 +26,7 @@ namespace ewol {
*/ */
class Parameter : public ewol::widget::PopUp { class Parameter : public ewol::widget::PopUp {
public: // signals public: // signals
esignal::Signal<void> signalClose; esignal::ISignal<> signalClose;
public: // properties public: // properties
eproperty::Value<std::string> propertyLabelTitle; eproperty::Value<std::string> propertyLabelTitle;
protected: protected:

View File

@ -37,7 +37,7 @@ namespace ewol {
*/ */
class ParameterList :public ewol::widget::WidgetScrolled { class ParameterList :public ewol::widget::WidgetScrolled {
public: //signals public: //signals
esignal::Signal<int32_t> signalSelect; esignal::ISignal<int32_t> signalSelect;
public: // properties public: // properties
private: private:

View File

@ -105,7 +105,7 @@ std::shared_ptr<ewol::widget::Button> ewol::widget::StdPopUp::addButton(const st
} }
myButton->setSubWidget(ewol::widget::Label::create(_text)); myButton->setSubWidget(ewol::widget::Label::create(_text));
if(_autoExit == true) { if(_autoExit == true) {
myButton->signalPressed.bind(shared_from_this(), &ewol::widget::StdPopUp::onCallBackButtonExit); myButton->signalPressed.connect(shared_from_this(), &ewol::widget::StdPopUp::onCallBackButtonExit);
} }
m_subBar->subWidgetAdd(myButton); m_subBar->subWidgetAdd(myButton);
markToRedraw(); markToRedraw();