[DEV] update new esignal (not build)
This commit is contained in:
parent
1bbc8c08cc
commit
b22014b3f6
@ -34,5 +34,5 @@ namespace etk {
|
||||
}
|
||||
|
||||
// declare for signal event
|
||||
template class esignal::Signal<ewol::event::Time>;
|
||||
template class esignal::ISignal<ewol::event::Time>;
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
ewol::object::Manager::Manager(ewol::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_lastPeriodicCallTime(0) {
|
||||
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) {
|
||||
int64_t previousTime = m_lastPeriodicCallTime;
|
||||
m_lastPeriodicCallTime = _localTime;
|
||||
if (periodicCall.getNumberConnected() <= 0) {
|
||||
if (periodicCall.size() <= 0) {
|
||||
return;
|
||||
}
|
||||
float deltaTime = (float)(_localTime - previousTime)/1000000.0;
|
||||
@ -146,5 +146,5 @@ void ewol::object::Manager::timeCallResume(int64_t _localTime) {
|
||||
}
|
||||
|
||||
bool ewol::object::Manager::timeCallHave() {
|
||||
return periodicCall.getNumberConnected() > 0;
|
||||
return periodicCall.size() > 0;
|
||||
}
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
#include <etk/types.h>
|
||||
#include <ewol/object/Object.h>
|
||||
#include <esignal/Signal.h>
|
||||
#include <esignal/ISignal.h>
|
||||
#include <ewol/event/Time.h>
|
||||
|
||||
namespace ewol {
|
||||
@ -76,7 +76,7 @@ namespace ewol {
|
||||
*/
|
||||
void workerRemove(const std::shared_ptr<ewol::Object>& _worker);
|
||||
public:
|
||||
esignal::Signal<ewol::event::Time> periodicCall;
|
||||
esignal::ISignal<ewol::event::Time> periodicCall;
|
||||
private:
|
||||
int64_t m_applWakeUpTime; //!< Time of the application initialize
|
||||
int64_t m_lastPeriodicCallTime; //!< last call time ...
|
||||
|
@ -255,7 +255,7 @@ namespace ewol {
|
||||
#define subBind(_type, _name, _event, _shared_ptr, _func, ...) do {\
|
||||
std::shared_ptr<_type> myObject = std::dynamic_pointer_cast<_type>(getSubObjectNamed(_name)); \
|
||||
if (myObject != nullptr) { \
|
||||
myObject->_event.bind(_shared_ptr, _func, ##__VA_ARGS__); \
|
||||
myObject->_event.connect(_shared_ptr, _func, ##__VA_ARGS__); \
|
||||
} else { \
|
||||
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)()) {
|
||||
std::shared_ptr<TYPE> obj2 = std::dynamic_pointer_cast<TYPE>(_obj);
|
||||
if (obj2 == nullptr) {
|
||||
EWOL_ERROR("Can not bind signal ...");
|
||||
EWOL_ERROR("Can not connect signal ...");
|
||||
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 {\
|
||||
std::shared_ptr<_type> myObject = std::dynamic_pointer_cast<_type>(ewol::getContext().getEObjectManager().getObjectNamed(_name)); \
|
||||
if (myObject != nullptr) { \
|
||||
myObject->_event.bind(_obj, _func, ##__VA_ARGS__); \
|
||||
myObject->_event.connect(_obj, _func, ##__VA_ARGS__); \
|
||||
} else { \
|
||||
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 {\
|
||||
std::shared_ptr<_type> myObject = std::dynamic_pointer_cast<_type>(_object->getObjectNamed(_name)); \
|
||||
if (myObject != nullptr) { \
|
||||
myObject->_event.bind(_obj, _func, ##__VA_ARGS__); \
|
||||
myObject->_event.connect(_obj, _func, ##__VA_ARGS__); \
|
||||
} else { \
|
||||
EWOL_ERROR("object named='" << _name << "' not exit or can not be cast in : " << #_type); \
|
||||
} \
|
||||
|
@ -11,6 +11,7 @@
|
||||
#include <gale/resource/Manager.h>
|
||||
#include <gale/renderer/openGL/openGL-include.h>
|
||||
#include <esignal/details/Signal.hxx>
|
||||
#include <esignal/ISignal.h>
|
||||
|
||||
#undef __class__
|
||||
#define __class__ "resource::Colored3DObject"
|
||||
@ -235,6 +236,6 @@ template<> std::string etk::to_string(ewol::resource::Colored3DObject const&) {
|
||||
}
|
||||
|
||||
// declare for signal event
|
||||
template class esignal::Signal<ewol::resource::Colored3DObject>;
|
||||
template class esignal::Signal<std::shared_ptr<ewol::resource::Colored3DObject>>;
|
||||
template class esignal::ISignal<ewol::resource::Colored3DObject>;
|
||||
template class esignal::ISignal<std::shared_ptr<ewol::resource::Colored3DObject>>;
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
#include <ewol/compositing/Shaper.h>
|
||||
#include <ewol/widget/Container2.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
|
||||
};
|
||||
public: // Event list
|
||||
esignal::Signal<void> signalPressed;
|
||||
esignal::Signal<void> signalDown;
|
||||
esignal::Signal<void> signalUp;
|
||||
esignal::Signal<void> signalEnter;
|
||||
esignal::Signal<void> signalLeave;
|
||||
esignal::Signal<bool> signalValue;
|
||||
esignal::ISignal<> signalPressed;
|
||||
esignal::ISignal<> signalDown;
|
||||
esignal::ISignal<> signalUp;
|
||||
esignal::ISignal<> signalEnter;
|
||||
esignal::ISignal<> signalLeave;
|
||||
esignal::ISignal<bool> signalValue;
|
||||
public: // propertie list
|
||||
eproperty::Value<std::string> propertyShape; //!< shaper name property
|
||||
eproperty::Value<bool> propertyValue; //!< Current state of the button.
|
||||
|
@ -177,7 +177,7 @@ bool ewol::widget::ButtonColor::onEventInput(const ewol::event::Input& _event) {
|
||||
myColorChooser->propertyValue.set(propertyValue.get());
|
||||
// set it in the pop-up-system :
|
||||
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();
|
||||
if (currentWindows == nullptr) {
|
||||
EWOL_ERROR("Can not get the curent Windows...");
|
||||
|
@ -15,13 +15,13 @@
|
||||
#include <ewol/compositing/Shaper.h>
|
||||
#include <ewol/widget/Widget.h>
|
||||
#include <ewol/widget/Manager.h>
|
||||
#include <esignal/Signal.h>
|
||||
#include <esignal/ISignal.h>
|
||||
|
||||
namespace ewol {
|
||||
namespace widget {
|
||||
class ButtonColor : public ewol::Widget {
|
||||
public: // signals
|
||||
esignal::Signal<etk::Color<>> signalChange;
|
||||
esignal::ISignal<etk::Color<>> signalChange;
|
||||
public: // properties
|
||||
eproperty::Value<etk::Color<>> propertyValue; //!< Current color.
|
||||
eproperty::Value<std::string> propertyShape; //!< Current color.
|
||||
|
@ -12,18 +12,18 @@
|
||||
#include <ewol/compositing/Shaper.h>
|
||||
#include <ewol/widget/Container2.h>
|
||||
#include <ewol/widget/Manager.h>
|
||||
#include <esignal/Signal.h>
|
||||
#include <esignal/ISignal.h>
|
||||
|
||||
|
||||
namespace ewol {
|
||||
namespace widget {
|
||||
class CheckBox : public ewol::widget::Container2 {
|
||||
public: // Event list
|
||||
esignal::Signal<void> signalPressed;
|
||||
esignal::Signal<void> signalDown;
|
||||
esignal::Signal<void> signalUp;
|
||||
esignal::Signal<void> signalEnter;
|
||||
esignal::Signal<bool> signalValue;
|
||||
esignal::ISignal<> signalPressed;
|
||||
esignal::ISignal<> signalDown;
|
||||
esignal::ISignal<> signalUp;
|
||||
esignal::ISignal<> signalEnter;
|
||||
esignal::ISignal<bool> signalValue;
|
||||
public: // propertie list
|
||||
eproperty::Value<bool> propertyValue; //!< Current state of the checkbox.
|
||||
eproperty::Value<std::string> propertyShape; //!< shape of the widget
|
||||
|
@ -12,14 +12,14 @@
|
||||
#include <etk/Color.h>
|
||||
#include <ewol/widget/Widget.h>
|
||||
#include <ewol/compositing/Drawing.h>
|
||||
#include <esignal/Signal.h>
|
||||
#include <esignal/ISignal.h>
|
||||
|
||||
|
||||
namespace ewol {
|
||||
namespace widget {
|
||||
class ColorBar : public ewol::Widget {
|
||||
public: // signals
|
||||
esignal::Signal<etk::Color<>> signalChange;
|
||||
esignal::ISignal<etk::Color<>> signalChange;
|
||||
public:
|
||||
eproperty::Value<etk::Color<>> propertyValue;
|
||||
protected:
|
||||
|
@ -57,7 +57,7 @@ void ewol::widget::Entry::init(const std::string& _newData, const std::string& _
|
||||
shortCutAdd("ctrl+v", "paste");
|
||||
shortCutAdd("ctrl+a", "select:all");
|
||||
shortCutAdd("ctrl+shift+a", "select:none");
|
||||
signalShortcut.bind(shared_from_this(), &ewol::widget::Entry::onCallbackShortCut);
|
||||
signalShortcut.connect(shared_from_this(), &ewol::widget::Entry::onCallbackShortCut);
|
||||
}
|
||||
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
#include <ewol/widget/Widget.h>
|
||||
#include <etk/Color.h>
|
||||
#include <ewol/widget/Manager.h>
|
||||
#include <esignal/Signal.h>
|
||||
#include <esignal/ISignal.h>
|
||||
|
||||
namespace ewol {
|
||||
namespace widget {
|
||||
@ -32,9 +32,9 @@ namespace ewol {
|
||||
*/
|
||||
class Entry : public ewol::Widget {
|
||||
public: // Event list
|
||||
esignal::Signal<void> signalClick; //!< bang on click the entry box
|
||||
esignal::Signal<std::string> signalEnter; //!< Enter key is pressed
|
||||
esignal::Signal<std::string> signalModify; //!< data change
|
||||
esignal::ISignal<> signalClick; //!< bang on click the entry box
|
||||
esignal::ISignal<std::string> signalEnter; //!< Enter key is pressed
|
||||
esignal::ISignal<std::string> signalModify; //!< data change
|
||||
public: // propertie list
|
||||
eproperty::Value<std::string> propertyShaper;
|
||||
eproperty::Value<std::string> propertyValue; //!< string that must be displayed
|
||||
|
@ -13,7 +13,7 @@
|
||||
#include <ewol/compositing/Image.h>
|
||||
#include <ewol/resource/ColorFile.h>
|
||||
#include <ewol/widget/Manager.h>
|
||||
#include <esignal/Signal.h>
|
||||
#include <esignal/ISignal.h>
|
||||
|
||||
namespace ewol {
|
||||
namespace widget {
|
||||
@ -22,7 +22,7 @@ namespace ewol {
|
||||
*/
|
||||
class Image :public ewol::Widget {
|
||||
public: // signals
|
||||
esignal::Signal<void> signalPressed;
|
||||
esignal::ISignal<> signalPressed;
|
||||
public: // properties
|
||||
eproperty::Value<std::string> propertySource; //!< file name of the image.
|
||||
eproperty::Value<gale::Dimension> propertyBorder; //!< border to add at the image.
|
||||
|
@ -11,7 +11,7 @@
|
||||
#include <etk/Color.h>
|
||||
#include <ewol/debug.h>
|
||||
#include <ewol/widget/Widget.h>
|
||||
#include <esignal/Signal.h>
|
||||
#include <esignal/ISignal.h>
|
||||
|
||||
// TODO : Rework ==> use property and shaper ...
|
||||
|
||||
@ -23,9 +23,9 @@ namespace ewol {
|
||||
class Joystick :public ewol::Widget {
|
||||
public:
|
||||
// Event list of properties
|
||||
esignal::Signal<void> signalEnable;
|
||||
esignal::Signal<void> signalDisable;
|
||||
esignal::Signal<vec2> signalMove;
|
||||
esignal::ISignal<> signalEnable;
|
||||
esignal::ISignal<> signalDisable;
|
||||
esignal::ISignal<vec2> signalMove;
|
||||
public:
|
||||
enum joystickMode {
|
||||
modeNormal,
|
||||
|
@ -13,7 +13,7 @@
|
||||
#include <ewol/widget/Widget.h>
|
||||
#include <ewol/widget/Manager.h>
|
||||
#include <ewol/resource/ColorFile.h>
|
||||
#include <esignal/Signal.h>
|
||||
#include <esignal/ISignal.h>
|
||||
|
||||
namespace ewol {
|
||||
namespace widget {
|
||||
@ -22,7 +22,7 @@ namespace ewol {
|
||||
*/
|
||||
class Label : public ewol::Widget {
|
||||
public: // signals
|
||||
esignal::Signal<void> signalPressed;
|
||||
esignal::ISignal<> signalPressed;
|
||||
public: // properties
|
||||
eproperty::Value<std::string> propertyValue; //!< decorated text to display.
|
||||
private:
|
||||
|
@ -10,7 +10,7 @@
|
||||
#include <ewol/widget/List.h>
|
||||
#include <etk/os/FSNode.h>
|
||||
#include <ewol/resource/ColorFile.h>
|
||||
#include <esignal/Signal.h>
|
||||
#include <esignal/ISignal.h>
|
||||
|
||||
namespace ewol {
|
||||
namespace widget {
|
||||
@ -19,10 +19,10 @@ namespace ewol {
|
||||
*/
|
||||
class ListFileSystem : public ewol::widget::List {
|
||||
public: // signals
|
||||
esignal::Signal<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::Signal<std::string> signalFolderSelect;
|
||||
esignal::Signal<std::string> signalFolderValidate;
|
||||
esignal::ISignal<std::string> signalFileSelect; //!< @event "file-select" Generated when a file is selected.
|
||||
esignal::ISignal<std::string> signalFileValidate; //!< @event "file-validate" Generate when the user validate (return) or double click on the element
|
||||
esignal::ISignal<std::string> signalFolderSelect;
|
||||
esignal::ISignal<std::string> signalFolderValidate;
|
||||
public: // properties
|
||||
eproperty::Value<std::string> propertyPath; //!< Current folder that display point on.
|
||||
eproperty::Value<std::string> propertyFile; //!< current selected file
|
||||
|
@ -108,7 +108,7 @@ int32_t ewol::widget::Menu::add(int32_t _parent,
|
||||
// add it in the widget list
|
||||
ewol::widget::Sizer::subWidgetAdd(myButton);
|
||||
// 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;
|
||||
}
|
||||
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->propertyFill.set(bvec2(true,true));
|
||||
// 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
|
||||
mySizer->subWidgetAdd(myButton);
|
||||
if (it2->m_image.size() != 0) {
|
||||
|
@ -32,7 +32,7 @@ namespace ewol {
|
||||
*/
|
||||
class Menu :public ewol::widget::Sizer {
|
||||
public:
|
||||
esignal::Signal<std::string> signalSelect; // event on a menu button or ...
|
||||
esignal::ISignal<std::string> signalSelect; // event on a menu button or ...
|
||||
protected:
|
||||
Menu();
|
||||
void init();
|
||||
|
@ -151,7 +151,7 @@ void ewol::widget::Select::updateGui() {
|
||||
}
|
||||
if (m_widgetButtonUp != nullptr) {
|
||||
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->propertyFill.set(bvec2(true,true));
|
||||
// set callback
|
||||
myLabel->signalPressed.bind(shared_from_this(), &ewol::widget::Select::onCallbackLabelPressed, it.m_value);
|
||||
myLabel->signalPressed.bind(tmpContext, &ewol::widget::ContextMenu::destroy);
|
||||
myLabel->signalPressed.connect(shared_from_this(), &ewol::widget::Select::onCallbackLabelPressed, it.m_value);
|
||||
myLabel->signalPressed.connect(tmpContext, &ewol::widget::ContextMenu::destroy);
|
||||
// add it in the widget list
|
||||
mySizer->subWidgetAddStart(myLabel);
|
||||
}
|
||||
|
@ -19,7 +19,7 @@ namespace ewol {
|
||||
*/
|
||||
class Select : public ewol::widget::SpinBase {
|
||||
public: // signals
|
||||
esignal::Signal<int32_t> signalValue;
|
||||
esignal::ISignal<int32_t> signalValue;
|
||||
public: // properties
|
||||
eproperty::Value<int32_t> propertyValue; //!< Current state of the Select.
|
||||
protected:
|
||||
|
@ -12,7 +12,7 @@
|
||||
#include <ewol/debug.h>
|
||||
#include <ewol/widget/Widget.h>
|
||||
#include <ewol/compositing/Drawing.h>
|
||||
#include <esignal/Signal.h>
|
||||
#include <esignal/ISignal.h>
|
||||
|
||||
namespace ewol {
|
||||
namespace widget {
|
||||
@ -21,7 +21,7 @@ namespace ewol {
|
||||
*/
|
||||
class Slider : public ewol::Widget {
|
||||
public: // signals
|
||||
esignal::Signal<float> signalChange;
|
||||
esignal::ISignal<float> signalChange;
|
||||
public:
|
||||
//eproperty::Value<std::string> propertyShape; //!< name of the shape used
|
||||
eproperty::Value<float> propertyValue; //!< current value of the Slider
|
||||
|
@ -67,11 +67,11 @@ void ewol::widget::Spin::updateGui() {
|
||||
}
|
||||
if (m_widgetButtonUp != nullptr) {
|
||||
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) {
|
||||
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]");
|
||||
|
||||
|
@ -20,8 +20,8 @@ namespace ewol {
|
||||
class Spin : public ewol::widget::SpinBase {
|
||||
public:
|
||||
// Event list of properties
|
||||
esignal::Signal<int64_t> signalValue;
|
||||
esignal::Signal<double> signalValueDouble;
|
||||
esignal::ISignal<int64_t> signalValue;
|
||||
esignal::ISignal<double> signalValueDouble;
|
||||
public:
|
||||
eproperty::Value<int64_t> propertyValue; //!< Current value of the Spin.
|
||||
eproperty::Value<int64_t> propertyMin; //!< Minimum value
|
||||
|
@ -11,7 +11,7 @@
|
||||
#include <ewol/debug.h>
|
||||
#include <ewol/widget/ContainerN.h>
|
||||
#include <ewol/widget/Manager.h>
|
||||
#include <esignal/Signal.h>
|
||||
#include <esignal/ISignal.h>
|
||||
|
||||
namespace ewol {
|
||||
namespace widget {
|
||||
@ -26,8 +26,8 @@ namespace ewol {
|
||||
sladingTransition_count,
|
||||
};
|
||||
public: // signals:
|
||||
esignal::Signal<void> signalStartSlide;
|
||||
esignal::Signal<void> signalStopSlide;
|
||||
esignal::ISignal<> signalStartSlide;
|
||||
esignal::ISignal<> signalStopSlide;
|
||||
public: // properties:
|
||||
eproperty::Range<float> propertyTransitionSpeed; //!< speed of the transition (default 1 == > 1s)
|
||||
eproperty::List<enum sladingMode> propertyTransitionMode; //!< mode to slide the widgets
|
||||
|
@ -239,17 +239,17 @@ void ewol::Widget::systemDraw(const ewol::DrawProperty& _displayProp) {
|
||||
|
||||
void ewol::Widget::periodicCallDisable() {
|
||||
EWOL_VERBOSE("Perodic call disable " << propertyName);
|
||||
getObjectManager().periodicCall.release(shared_from_this());
|
||||
m_periodicCallHandle.disconnect();
|
||||
}
|
||||
|
||||
void ewol::Widget::periodicCallEnable() {
|
||||
if (getObjectManager().periodicCall.isRegistered(shared_from_this()) == true) {
|
||||
if (m_periodicCallHandle.isConnected() == true) {
|
||||
EWOL_VERBOSE("Perodic call enable " << propertyName << " ==> rejected");
|
||||
return;
|
||||
} else {
|
||||
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() {
|
||||
|
@ -30,7 +30,7 @@ namespace ewol {
|
||||
#include <ewol/event/Entry.h>
|
||||
#include <ewol/event/Time.h>
|
||||
#include <ewol/translate.h>
|
||||
#include <esignal/Signal.h>
|
||||
#include <esignal/ISignal.h>
|
||||
#include <ewol/DrawProperty.h>
|
||||
#include <ewol/gravity.h>
|
||||
|
||||
@ -324,6 +324,7 @@ namespace ewol {
|
||||
// ----------------------------------------------------------------------------------------------------------------
|
||||
protected:
|
||||
// TODO : Remove this API ==> deprecated since 28/10/2014
|
||||
esignal::Connection m_periodicCallHandle;
|
||||
/**
|
||||
* @brief disable the periodic call.
|
||||
*/
|
||||
@ -408,7 +409,7 @@ namespace ewol {
|
||||
// -- Shortcut : management of the shortcut
|
||||
// ----------------------------------------------------------------------------------------------------------------
|
||||
public:
|
||||
esignal::Signal<std::string> signalShortcut; //!< signal handle of the message
|
||||
esignal::ISignal<std::string> signalShortcut; //!< signal handle of the message
|
||||
private:
|
||||
std::vector<EventShortCut*> m_localShortcut; //!< list of all shortcut in the widget
|
||||
protected:
|
||||
@ -534,9 +535,9 @@ namespace ewol {
|
||||
*/
|
||||
public:
|
||||
// event generated :
|
||||
esignal::Signal<void> signalAnnimationStart; //!< event when start annimation
|
||||
esignal::Signal<float> signalAnnimationRatio; //!< event when % of annimation change (integer)
|
||||
esignal::Signal<void> signalAnnimationStop; //!< event when stop annimation
|
||||
esignal::ISignal<> signalAnnimationStart; //!< event when start annimation
|
||||
esignal::ISignal<float> signalAnnimationRatio; //!< event when % of annimation change (integer)
|
||||
esignal::ISignal<> signalAnnimationStop; //!< event when stop annimation
|
||||
protected:
|
||||
enum annimationMode {
|
||||
annimationModeEnableAdd,
|
||||
|
@ -35,7 +35,7 @@ void ewol::widget::ColorChooser::init() {
|
||||
ewol::widget::Sizer::init(ewol::widget::Sizer::modeVert);
|
||||
propertyLockExpand.set(bvec2(true,true));
|
||||
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));
|
||||
subWidgetAdd(m_widgetColorBar);
|
||||
|
||||
@ -43,7 +43,7 @@ void ewol::widget::ColorChooser::init() {
|
||||
sliderColor = etk::color::black;
|
||||
|
||||
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->propertyFill.set(bvec2(true,false));
|
||||
m_widgetRed->propertyMinimum.set(0);
|
||||
@ -52,7 +52,7 @@ void ewol::widget::ColorChooser::init() {
|
||||
m_widgetRed->setColor(sliderColor);
|
||||
subWidgetAdd(m_widgetRed);
|
||||
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->propertyFill.set(bvec2(true,false));
|
||||
m_widgetGreen->propertyMinimum.set(0);
|
||||
@ -61,7 +61,7 @@ void ewol::widget::ColorChooser::init() {
|
||||
m_widgetGreen->setColor(sliderColor);
|
||||
subWidgetAdd(m_widgetGreen);
|
||||
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->propertyFill.set(bvec2(true,false));
|
||||
m_widgetBlue->propertyMinimum.set(0);
|
||||
@ -70,7 +70,7 @@ void ewol::widget::ColorChooser::init() {
|
||||
m_widgetBlue->setColor(sliderColor);
|
||||
subWidgetAdd(m_widgetBlue);
|
||||
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->propertyFill.set(bvec2(true,false));
|
||||
m_widgetAlpha->propertyMinimum.set(0);
|
||||
|
@ -16,7 +16,7 @@
|
||||
#include <ewol/widget/Sizer.h>
|
||||
#include <ewol/widget/ColorBar.h>
|
||||
#include <ewol/widget/Slider.h>
|
||||
#include <esignal/Signal.h>
|
||||
#include <esignal/ISignal.h>
|
||||
|
||||
namespace ewol {
|
||||
namespace widget {
|
||||
@ -25,7 +25,7 @@ namespace ewol {
|
||||
*/
|
||||
class ColorChooser : public ewol::widget::Sizer {
|
||||
public: // signals
|
||||
esignal::Signal<etk::Color<>> signalChange;
|
||||
esignal::ISignal<etk::Color<>> signalChange;
|
||||
public:
|
||||
eproperty::Value<etk::Color<>> propertyValue;
|
||||
protected:
|
||||
|
@ -10,7 +10,7 @@
|
||||
#include <etk/types.h>
|
||||
#include <ewol/debug.h>
|
||||
#include <ewol/widget/Composer.h>
|
||||
#include <esignal/Signal.h>
|
||||
#include <esignal/ISignal.h>
|
||||
|
||||
namespace ewol {
|
||||
namespace widget {
|
||||
@ -32,9 +32,9 @@ namespace ewol {
|
||||
* return -1;
|
||||
* }
|
||||
* // 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 ...
|
||||
* tmpWidget->signalCancel.bind(shared_from_this(), &****::onCallbackClosePopUp);
|
||||
* tmpWidget->signalCancel.connect(shared_from_this(), &****::onCallbackClosePopUp);
|
||||
* // set the title:
|
||||
* tmpWidget->setTitle("Open files ...");
|
||||
* // Set the validate Label:
|
||||
@ -64,8 +64,8 @@ namespace ewol {
|
||||
*/
|
||||
class FileChooser : public ewol::widget::Composer {
|
||||
public: // signals
|
||||
esignal::Signal<void> signalCancel;
|
||||
esignal::Signal<std::string> signalValidate;
|
||||
esignal::ISignal<> signalCancel;
|
||||
esignal::ISignal<std::string> signalValidate;
|
||||
public: // properties
|
||||
eproperty::Value<std::string> propertyPath;
|
||||
eproperty::Value<std::string> propertyFile;
|
||||
|
@ -77,7 +77,7 @@ void ewol::widget::Parameter::init() {
|
||||
" <label>Save</label>\n"
|
||||
" </sizer>\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);
|
||||
}
|
||||
|
||||
@ -101,7 +101,7 @@ void ewol::widget::Parameter::init() {
|
||||
" <label>Close</label>\n"
|
||||
" </sizer>\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);
|
||||
}
|
||||
}
|
||||
@ -117,7 +117,7 @@ void ewol::widget::Parameter::init() {
|
||||
EWOL_ERROR("Can not allocate widget == > display might be in error");
|
||||
} 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->propertyExpand.set(bvec2(false,true));
|
||||
mySizerHori->subWidgetAdd(m_paramList);
|
||||
|
@ -26,7 +26,7 @@ namespace ewol {
|
||||
*/
|
||||
class Parameter : public ewol::widget::PopUp {
|
||||
public: // signals
|
||||
esignal::Signal<void> signalClose;
|
||||
esignal::ISignal<> signalClose;
|
||||
public: // properties
|
||||
eproperty::Value<std::string> propertyLabelTitle;
|
||||
protected:
|
||||
|
@ -37,7 +37,7 @@ namespace ewol {
|
||||
*/
|
||||
class ParameterList :public ewol::widget::WidgetScrolled {
|
||||
public: //signals
|
||||
esignal::Signal<int32_t> signalSelect;
|
||||
esignal::ISignal<int32_t> signalSelect;
|
||||
public: // properties
|
||||
|
||||
private:
|
||||
|
@ -105,7 +105,7 @@ std::shared_ptr<ewol::widget::Button> ewol::widget::StdPopUp::addButton(const st
|
||||
}
|
||||
myButton->setSubWidget(ewol::widget::Label::create(_text));
|
||||
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);
|
||||
markToRedraw();
|
||||
|
Loading…
x
Reference in New Issue
Block a user