[DEV] set Parameter agnostic from Object

This commit is contained in:
Edouard DUPIN 2014-10-29 22:34:06 +01:00
parent 656fe783d4
commit 61afe48646
44 changed files with 205 additions and 213 deletions

2
external/ege vendored

@ -1 +1 @@
Subproject commit e9483bd0caaa64a7c9d72a5807d05f8663bc3e17 Subproject commit 343021de91b1662da5dafe9ae9b6a089bb5edcfc

View File

@ -15,6 +15,13 @@
#include <mutex> #include <mutex>
#include <memory> #include <memory>
#include <ewol/debug.h>
#include <ewol/parameter/Interface.h>
#include <ewol/parameter/Value.h>
#include <ewol/parameter/Range.h>
#include <ewol/parameter/List.h>
#include <ewol/signal/List.h>
namespace ewol { namespace ewol {
// some class need to define element befor other ... // some class need to define element befor other ...
class Object; class Object;
@ -24,13 +31,6 @@ namespace ewol {
class Context; class Context;
}; };
#include <ewol/debug.h>
#include <ewol/object/ParameterList.h>
#include <ewol/object/Param.h>
#include <ewol/object/ParamRange.h>
#include <ewol/object/ParamList.h>
#include <ewol/signal/List.h>
#define DECLARE_FACTORY(className) \ #define DECLARE_FACTORY(className) \
template<typename ... T> static std::shared_ptr<className> create( T&& ... all ) { \ template<typename ... T> static std::shared_ptr<className> create( T&& ... all ) { \
std::shared_ptr<className> object(new className()); \ std::shared_ptr<className> object(new className()); \
@ -51,7 +51,7 @@ namespace ewol {
* this class mermit at every Object to communicate between them. * this class mermit at every Object to communicate between them.
*/ */
class Object : public std::enable_shared_from_this<Object>, class Object : public std::enable_shared_from_this<Object>,
public ewol::object::ParameterList, public ewol::parameter::Interface,
public ewol::signal::List { public ewol::signal::List {
private: private:
static size_t m_valUID; //!< Static used for the unique ID definition static size_t m_valUID; //!< Static used for the unique ID definition
@ -145,7 +145,7 @@ namespace ewol {
// TODO : Rework the position on this function ... This is a convignent function ... // TODO : Rework the position on this function ... This is a convignent function ...
bool parameterSetOnWidgetNamed(const std::string& _objectName, const std::string& _config, const std::string& _value); bool parameterSetOnWidgetNamed(const std::string& _objectName, const std::string& _config, const std::string& _value);
protected: protected:
ewol::object::Param<std::string> m_name; //!< name of the element ... ewol::parameter::Value<std::string> m_name; //!< name of the element ...
public: public:
/** /**
* @brief get the Object name * @brief get the Object name

View File

@ -1,10 +0,0 @@
/**
* @author Edouard DUPIN
*
* @copyright 2011, Edouard DUPIN, all right reserved
*
* @license APACHE v2.0 (see license file)
*/
#include <ewol/debug.h>
#include <ewol/object/ParamList.h>

View File

@ -1,30 +0,0 @@
/**
* @author Edouard DUPIN
*
* @copyright 2011, Edouard DUPIN, all right reserved
*
* @license APACHE v2.0 (see license file)
*/
#include <ewol/debug.h>
#include <ewol/object/ParameterList.h>
#include <ewol/object/Parameter.h>
ewol::object::Parameter::Parameter(ewol::object::ParameterList& _objectLink, const std::string& _name) :
m_objectLink(_objectLink),
m_name(_name) {
// add a reference on the current parameter ...
_objectLink.parameterAdd(this);
}
void ewol::object::Parameter::notifyChange() const {
m_objectLink.onParameterChangeValue(ewol::object::ParameterRef(this));
}
bool ewol::object::operator==(const ParameterRef& _obj, const Parameter& _obj2) noexcept {
return &_obj2 == _obj.m_ref;
}
bool ewol::object::operator==(const Parameter& _obj2, const ParameterRef& _obj) noexcept {
return &_obj2 == _obj.m_ref;
}

View File

@ -7,19 +7,19 @@
*/ */
#include <ewol/debug.h> #include <ewol/debug.h>
#include <ewol/object/ParameterList.h> #include <ewol/parameter/List.h>
#include <ewol/object/Parameter.h> #include <ewol/parameter/Parameter.h>
ewol::object::ParameterList::ParameterList() { ewol::parameter::Interface::Interface() {
} }
ewol::object::ParameterList::~ParameterList() { ewol::parameter::Interface::~Interface() {
parameterClean(); parameterClean();
} }
// note this pointer is not allocated and not free at the end of the class // note this pointer is not allocated and not free at the end of the class
void ewol::object::ParameterList::parameterAdd(Parameter* _pointerOnParameter) { void ewol::parameter::Interface::parameterAdd(ewol::parameter::Parameter* _pointerOnParameter) {
if (_pointerOnParameter == nullptr) { if (_pointerOnParameter == nullptr) {
EWOL_ERROR("Try to link a nullptr parameters"); EWOL_ERROR("Try to link a nullptr parameters");
return; return;
@ -27,14 +27,14 @@ void ewol::object::ParameterList::parameterAdd(Parameter* _pointerOnParameter) {
m_list.push_back(_pointerOnParameter); m_list.push_back(_pointerOnParameter);
} }
void ewol::object::ParameterList::parameterClean() { void ewol::parameter::Interface::parameterClean() {
// remove all pointer on these parameters // remove all pointer on these parameters
m_list.clear(); m_list.clear();
} }
// Note no lock is needed at this level, because the lock is done is the upper elements ... // Note no lock is needed at this level, because the lock is done is the upper elements ...
// the parameter set might be done with a pool of parameter, allone, the overhed is bigger ... // the parameter set might be done with a pool of parameter, allone, the overhed is bigger ...
bool ewol::object::ParameterList::parameterSet(const std::string& _parameter, const std::string& _value) { bool ewol::parameter::Interface::parameterSet(const std::string& _parameter, const std::string& _value) {
for (auto &it : m_list) { for (auto &it : m_list) {
if( it != nullptr if( it != nullptr
&& it->getName() == _parameter) { && it->getName() == _parameter) {
@ -46,7 +46,7 @@ bool ewol::object::ParameterList::parameterSet(const std::string& _parameter, co
return false; return false;
} }
std::string ewol::object::ParameterList::parameterGet(const std::string& _parameter) const { std::string ewol::parameter::Interface::parameterGet(const std::string& _parameter) const {
for (auto &it : m_list) { for (auto &it : m_list) {
if( it != nullptr if( it != nullptr
&& it->getName() == _parameter) { && it->getName() == _parameter) {
@ -56,7 +56,7 @@ std::string ewol::object::ParameterList::parameterGet(const std::string& _parame
return "???"; return "???";
} }
void ewol::object::ParameterList::parameterDisplay(bool _changeOnly) const { void ewol::parameter::Interface::parameterDisplay(bool _changeOnly) const {
EWOL_INFO(" Object parameters:"); EWOL_INFO(" Object parameters:");
for (auto &it : m_list) { for (auto &it : m_list) {
if(it != nullptr) { if(it != nullptr) {
@ -73,7 +73,7 @@ void ewol::object::ParameterList::parameterDisplay(bool _changeOnly) const {
} }
} }
std::map<std::string, std::string> ewol::object::ParameterList::parameterGetAll(bool _notIfDefault) const { std::map<std::string, std::string> ewol::parameter::Interface::parameterGetAll(bool _notIfDefault) const {
std::map<std::string, std::string> out; std::map<std::string, std::string> out;
for (auto &it : m_list) { for (auto &it : m_list) {
if(it != nullptr) { if(it != nullptr) {

View File

@ -7,29 +7,29 @@
*/ */
#ifndef __EWOL_PARAMETER_LIST_H__ #ifndef __EWOL_PARAMETER_INTERFACE_H__
#define __EWOL_PARAMETER_LIST_H__ #define __EWOL_PARAMETER_INTERFACE_H__
#include <vector> #include <vector>
#include <map> #include <map>
namespace ewol { namespace ewol {
namespace object { namespace parameter {
class Parameter; class Parameter;
class ParameterRef; class Ref;
class ParameterList { class Interface {
friend class ewol::object::Parameter; // to register parameter in the list. friend class ewol::parameter::Parameter; // to register parameter in the list.
private: private:
std::vector<ewol::object::Parameter*> m_list; //!< list of availlable Parameters std::vector<ewol::parameter::Parameter*> m_list; //!< list of availlable Parameters (no need to free)
public: public:
/** /**
* @brief Constructor. * @brief Constructor.
*/ */
ParameterList(); Interface();
/** /**
* @brief Destructor. * @brief Destructor.
*/ */
virtual ~ParameterList(); virtual ~Interface();
/** /**
* @brief Register a parameter class pointer in the List of parameters * @brief Register a parameter class pointer in the List of parameters
* @note This class does not destroy the parameter pointer!!! * @note This class does not destroy the parameter pointer!!!
@ -64,7 +64,7 @@ namespace ewol {
* @brief Called when a parameter change value. * @brief Called when a parameter change value.
* @param[in] _paramPointer Pointer on the parameter (to know which parameter have change); * @param[in] _paramPointer Pointer on the parameter (to know which parameter have change);
*/ */
virtual void onParameterChangeValue(const ewol::object::ParameterRef& _paramPointer) { }; virtual void onParameterChangeValue(const ewol::parameter::Ref& _paramPointer) { };
/** /**
* @brief Get All the parameter configuration: * @brief Get All the parameter configuration:
* @return map on the parameters * @return map on the parameters

View File

@ -6,17 +6,17 @@
* @license APACHE v2.0 (see license file) * @license APACHE v2.0 (see license file)
*/ */
#ifndef __EWOL_PARAM_LIST_H__ #ifndef __EWOL_PARAMETER_LIST_H__
#define __EWOL_PARAM_LIST_H__ #define __EWOL_PARAMETER_LIST_H__
#include <ewol/object/ParameterList.h> #include <ewol/parameter/Interface.h>
#include <ewol/object/Parameter.h> #include <ewol/parameter/Parameter.h>
#include <map> #include <map>
#include <typeinfo> #include <typeinfo>
namespace ewol { namespace ewol {
namespace object { namespace parameter {
template<typename MY_TYPE, bool isEventReceiving=false> class ParamList : public Parameter { template<typename MY_TYPE, bool isEventReceiving=false> class List : public Parameter {
private: private:
MY_TYPE m_value; //!< Element value ==> can be directly used. MY_TYPE m_value; //!< Element value ==> can be directly used.
MY_TYPE m_default; //!< Default value. MY_TYPE m_default; //!< Default value.
@ -28,11 +28,11 @@ namespace ewol {
* @param[in] _name Static name of the parameter. * @param[in] _name Static name of the parameter.
* @param[in] _description description of the parameter. * @param[in] _description description of the parameter.
*/ */
ParamList(ewol::object::ParameterList& _objectLink, List(ewol::parameter::Interface& _paramInterfaceLink,
const std::string& _name, const std::string& _name,
const MY_TYPE& _defaultValue, const MY_TYPE& _defaultValue,
const std::string& _description="") : const std::string& _description="") :
Parameter(_objectLink, _name), Parameter(_paramInterfaceLink, _name),
m_value(_defaultValue), m_value(_defaultValue),
m_default(_defaultValue) { m_default(_defaultValue) {
@ -40,7 +40,7 @@ namespace ewol {
/** /**
* @brief Destructor. * @brief Destructor.
*/ */
virtual ~ParamList() { virtual ~List() {
}; };
void add(const MY_TYPE& _value, const std::string& _name, const std::string& _description = "") { void add(const MY_TYPE& _value, const std::string& _name, const std::string& _description = "") {
@ -143,7 +143,7 @@ namespace ewol {
* @brief assignement operator. * @brief assignement operator.
* @param[in] newVal The new value of the parameter. * @param[in] newVal The new value of the parameter.
*/ */
const ParamList& operator= (MY_TYPE _newVal) { const List& operator= (MY_TYPE _newVal) {
set(_newVal); set(_newVal);
return *this; return *this;
} }
@ -160,7 +160,7 @@ namespace ewol {
return &m_value; return &m_value;
} }
}; };
template<typename MY_TYPE> std::ostream& operator <<(std::ostream& _os, const ewol::object::ParamList<MY_TYPE>& _obj) { template<typename MY_TYPE> std::ostream& operator <<(std::ostream& _os, const ewol::parameter::List<MY_TYPE>& _obj) {
_os << _obj.get(); _os << _obj.get();
return _os; return _os;
} }

View File

@ -0,0 +1,30 @@
/**
* @author Edouard DUPIN
*
* @copyright 2011, Edouard DUPIN, all right reserved
*
* @license APACHE v2.0 (see license file)
*/
#include <ewol/debug.h>
#include <ewol/parameter/Interface.h>
#include <ewol/parameter/Parameter.h>
ewol::parameter::Parameter::Parameter(ewol::parameter::Interface& _paramInterfaceLink, const std::string& _name) :
m_interfaceLink(_paramInterfaceLink),
m_name(_name) {
// add a reference on the current parameter ...
m_interfaceLink.parameterAdd(this);
}
void ewol::parameter::Parameter::notifyChange() const {
m_interfaceLink.onParameterChangeValue(ewol::parameter::Ref(this));
}
bool ewol::parameter::operator==(const Ref& _obj, const Parameter& _obj2) noexcept {
return &_obj2 == _obj.m_ref;
}
bool ewol::parameter::operator==(const Parameter& _obj2, const Ref& _obj) noexcept {
return &_obj2 == _obj.m_ref;
}

View File

@ -6,7 +6,7 @@
* @license APACHE v2.0 (see license file) * @license APACHE v2.0 (see license file)
*/ */
#include <ewol/object/ParameterList.h> #include <ewol/parameter/Interface.h>
#ifndef __EWOL_PARAMETER_H__ #ifndef __EWOL_PARAMETER_H__
#define __EWOL_PARAMETER_H__ #define __EWOL_PARAMETER_H__
@ -15,14 +15,14 @@
#include <typeinfo> #include <typeinfo>
namespace ewol { namespace ewol {
namespace object { namespace parameter {
class ParameterRef; class Ref;
class Parameter { class Parameter {
private: private:
ewol::object::ParameterList& m_objectLink; ewol::parameter::Interface& m_interfaceLink;
std::string m_name; std::string m_name;
public: public:
Parameter(ewol::object::ParameterList& _objectLink, const std::string& _name); Parameter(ewol::parameter::Interface& _paramInterfaceLink, const std::string& _name);
virtual ~Parameter() { }; virtual ~Parameter() { };
/** /**
* @brief call main class that parameterChange * @brief call main class that parameterChange
@ -70,16 +70,16 @@ namespace ewol {
*/ */
virtual void setDefault() = 0; virtual void setDefault() = 0;
}; };
class ParameterRef { class Ref {
public: public:
const Parameter* m_ref; const Parameter* m_ref;
ParameterRef(const Parameter* _ref) : Ref(const Parameter* _ref) :
m_ref(_ref) { m_ref(_ref) {
// nothing to do ... // nothing to do ...
} }
}; };
bool operator==(const ParameterRef& _obj, const Parameter& _obj2) noexcept; bool operator==(const Ref& _obj, const Parameter& _obj2) noexcept;
bool operator==(const Parameter& _obj2, const ParameterRef& _obj) noexcept; bool operator==(const Parameter& _obj2, const Ref& _obj) noexcept;
}; };
}; };

View File

@ -6,17 +6,17 @@
* @license APACHE v2.0 (see license file) * @license APACHE v2.0 (see license file)
*/ */
#ifndef __EWOL_PARAM_RANGE_H__ #ifndef __EWOL_PARAMETER_RANGE_H__
#define __EWOL_PARAM_RANGE_H__ #define __EWOL_PARAMETER_RANGE_H__
#include <ewol/object/ParameterList.h> #include <ewol/parameter/Interface.h>
#include <ewol/object/Parameter.h> #include <ewol/parameter/Parameter.h>
#include <etk/math/Vector2D.h> #include <etk/math/Vector2D.h>
#include <typeinfo> #include <typeinfo>
namespace ewol { namespace ewol {
namespace object { namespace parameter {
template<typename MY_TYPE, bool isEventReceiving=false> class ParamRange : public Parameter { template<typename MY_TYPE, bool isEventReceiving=false> class Range : public Parameter {
private: private:
MY_TYPE m_value; //!< Current value. MY_TYPE m_value; //!< Current value.
MY_TYPE m_min; //!< Minimum value. MY_TYPE m_min; //!< Minimum value.
@ -32,13 +32,13 @@ namespace ewol {
* @param[in] _max Maximum value. * @param[in] _max Maximum value.
* @param[in] _description description of the parameter. * @param[in] _description description of the parameter.
*/ */
ParamRange(ewol::object::ParameterList& _objectLink, Range(ewol::parameter::Interface& _paramInterfaceLink,
const std::string& _name, const std::string& _name,
const MY_TYPE& _defaultValue, const MY_TYPE& _defaultValue,
const MY_TYPE& _min, const MY_TYPE& _min,
const MY_TYPE& _max, const MY_TYPE& _max,
const std::string& _description = "") : const std::string& _description = "") :
Parameter(_objectLink, _name), Parameter(_paramInterfaceLink, _name),
m_value(_defaultValue), m_value(_defaultValue),
m_min(_min), m_min(_min),
m_max(_max), m_max(_max),
@ -48,7 +48,7 @@ namespace ewol {
/** /**
* @brief Destructor. * @brief Destructor.
*/ */
virtual ~ParamRange() { }; virtual ~Range() { };
// herited methode // herited methode
virtual std::string getType() const { virtual std::string getType() const {
return typeid(MY_TYPE).name(); return typeid(MY_TYPE).name();
@ -123,7 +123,7 @@ namespace ewol {
* @brief assignement operator. * @brief assignement operator.
* @param[in] newVal The new value of the parameter. * @param[in] newVal The new value of the parameter.
*/ */
const Param<MY_TYPE>& operator= (const MY_TYPE& _newVal) { const Range<MY_TYPE>& operator= (const MY_TYPE& _newVal) {
set(_newVal); set(_newVal);
return *this; return *this;
}; };
@ -141,7 +141,7 @@ namespace ewol {
} }
}; };
template<typename MY_TYPE> std::ostream& operator <<(std::ostream& _os, const ewol::object::ParamRange<MY_TYPE>& _obj) { template<typename MY_TYPE> std::ostream& operator <<(std::ostream& _os, const ewol::parameter::Range<MY_TYPE>& _obj) {
_os << _obj.get(); _os << _obj.get();
return _os; return _os;
} }

View File

@ -6,17 +6,17 @@
* @license APACHE v2.0 (see license file) * @license APACHE v2.0 (see license file)
*/ */
#ifndef __EWOL_PARAM_H__ #ifndef __EWOL_PARAMETER_VALUE_H__
#define __EWOL_PARAM_H__ #define __EWOL_PARAMETER_VALUE_H__
#include <ewol/object/ParameterList.h> #include <ewol/parameter/Interface.h>
#include <ewol/object/Parameter.h> #include <ewol/parameter/Parameter.h>
#include <etk/math/Vector2D.h> #include <etk/math/Vector2D.h>
namespace ewol { namespace ewol {
namespace object { namespace parameter {
template<typename MY_TYPE, bool isEventReceiving=false> class Param : public Parameter { template<typename MY_TYPE, bool isEventReceiving=false> class Value : public Parameter {
private: private:
MY_TYPE m_value; //!< Current value. MY_TYPE m_value; //!< Current value.
MY_TYPE m_default; //!< Default value. MY_TYPE m_default; //!< Default value.
@ -30,19 +30,19 @@ namespace ewol {
* @param[in] _max Maximum value. * @param[in] _max Maximum value.
* @param[in] _description description of the parameter. * @param[in] _description description of the parameter.
*/ */
Param(ewol::object::ParameterList& _objectLink, Value(ewol::parameter::Interface& _paramInterfaceLink,
const std::string& _name, const std::string& _name,
const MY_TYPE& _defaultValue, const MY_TYPE& _defaultValue,
const std::string& _description = "") : const std::string& _description = "") :
Parameter(_objectLink, _name), Parameter(_paramInterfaceLink, _name),
m_value(_defaultValue), m_value(_defaultValue),
m_default(_defaultValue) { m_default(_defaultValue) {
}; };
Param(ewol::object::ParameterList& _objectLink, Value(ewol::parameter::Interface& _paramListLink,
const std::string& _name, const std::string& _name,
const std::string& _description = "") : const std::string& _description = "") :
Parameter(_objectLink, _name), Parameter(_paramListLink, _name),
m_value(), m_value(),
m_default() { m_default() {
@ -50,7 +50,7 @@ namespace ewol {
/** /**
* @brief Destructor. * @brief Destructor.
*/ */
virtual ~Param() { }; virtual ~Value() { };
// herited methode // herited methode
virtual std::string getType() const { virtual std::string getType() const {
return typeid(MY_TYPE).name(); return typeid(MY_TYPE).name();
@ -117,7 +117,7 @@ namespace ewol {
* @brief assignement operator. * @brief assignement operator.
* @param[in] newVal The new value of the parameter. * @param[in] newVal The new value of the parameter.
*/ */
const Param<MY_TYPE>& operator= (const MY_TYPE& _newVal) { const Value<MY_TYPE>& operator= (const MY_TYPE& _newVal) {
set(_newVal); set(_newVal);
return *this; return *this;
}; };
@ -135,7 +135,7 @@ namespace ewol {
} }
}; };
template<typename MY_TYPE, bool isEventReceiving=false> std::ostream& operator <<(std::ostream& _os, const ewol::object::Param<MY_TYPE, isEventReceiving>& _obj) { template<typename MY_TYPE, bool isEventReceiving=false> std::ostream& operator <<(std::ostream& _os, const ewol::parameter::Value<MY_TYPE, isEventReceiving>& _obj) {
_os << _obj.get(); _os << _obj.get();
return _os; return _os;
} }

View File

@ -211,7 +211,7 @@ void ewol::widget::Button::periodicCall(const ewol::event::Time& _event) {
markToRedraw(); markToRedraw();
} }
void ewol::widget::Button::onParameterChangeValue(const ewol::object::ParameterRef& _paramPointer) { void ewol::widget::Button::onParameterChangeValue(const ewol::parameter::Ref& _paramPointer) {
ewol::widget::Container2::onParameterChangeValue(_paramPointer); ewol::widget::Container2::onParameterChangeValue(_paramPointer);
if (_paramPointer == m_shaper) { if (_paramPointer == m_shaper) {
markToRedraw(); markToRedraw();

View File

@ -43,7 +43,7 @@ namespace ewol {
lockAccess, //!< all event are trashed == > acctivity of the button is disable lockAccess, //!< all event are trashed == > acctivity of the button is disable
}; };
private: private:
ewol::object::Param<ewol::compositing::Shaper> m_shaper; //!< Compositing theme. ewol::parameter::Value<ewol::compositing::Shaper> m_shaper; //!< Compositing theme.
protected: protected:
/** /**
* @brief Constructor * @brief Constructor
@ -65,7 +65,7 @@ namespace ewol {
m_shaper.setString(_shaperName); m_shaper.setString(_shaperName);
} }
protected: protected:
ewol::object::Param<bool> m_value; //!< Current state of the button. ewol::parameter::Value<bool> m_value; //!< Current state of the button.
public: public:
/** /**
* @brief set the currentValue of the Button (pressed or not) * @brief set the currentValue of the Button (pressed or not)
@ -84,7 +84,7 @@ namespace ewol {
return m_value; return m_value;
}; };
protected: protected:
ewol::object::ParamList<enum buttonLock> m_lock; //!< Current lock state of the button. ewol::parameter::List<enum buttonLock> m_lock; //!< Current lock state of the button.
public: public:
/** /**
* @brief set the button lock state. * @brief set the button lock state.
@ -101,7 +101,7 @@ namespace ewol {
return m_lock; return m_lock;
}; };
protected: protected:
ewol::object::Param<bool> m_toggleMode; //!< The button is able to toggle. ewol::parameter::Value<bool> m_toggleMode; //!< The button is able to toggle.
public: public:
/** /**
* @brief change the toggle mode. * @brief change the toggle mode.
@ -118,7 +118,7 @@ namespace ewol {
return m_toggleMode; return m_toggleMode;
}; };
protected: protected:
ewol::object::Param<bool> m_enableSingle; //!< When a single subwidget is set display all time it. ewol::parameter::Value<bool> m_enableSingle; //!< When a single subwidget is set display all time it.
public: public:
/** /**
* @brief Chane the display single widget mode availlable. * @brief Chane the display single widget mode availlable.
@ -152,7 +152,7 @@ namespace ewol {
void CheckStatus(); void CheckStatus();
protected: // Derived function protected: // Derived function
virtual void onDraw(); virtual void onDraw();
virtual void onParameterChangeValue(const ewol::object::ParameterRef& _paramPointer); virtual void onParameterChangeValue(const ewol::parameter::Ref& _paramPointer);
public: // Derived function public: // Derived function
virtual void calculateMinMaxSize(); virtual void calculateMinMaxSize();
virtual void calculateSize(const vec2& _availlable); virtual void calculateSize(const vec2& _availlable);

View File

@ -228,7 +228,7 @@ void ewol::widget::ButtonColor::periodicCall(const ewol::event::Time& _event) {
} }
void ewol::widget::ButtonColor::onParameterChangeValue(const ewol::object::ParameterRef& _paramPointer) { void ewol::widget::ButtonColor::onParameterChangeValue(const ewol::parameter::Ref& _paramPointer) {
ewol::Widget::onParameterChangeValue(_paramPointer); ewol::Widget::onParameterChangeValue(_paramPointer);
if (_paramPointer == m_textColorFg) { if (_paramPointer == m_textColorFg) {
signalChange.emit(m_textColorFg); signalChange.emit(m_textColorFg);

View File

@ -54,7 +54,7 @@ namespace ewol {
*/ */
void setShaperName(std::string _shaperName); void setShaperName(std::string _shaperName);
protected: protected:
ewol::object::Param<etk::Color<>> m_textColorFg; //!< Current color. ewol::parameter::Value<etk::Color<>> m_textColorFg; //!< Current color.
public: public:
/** /**
* @brief get the current color of the color selection widget * @brief get the current color of the color selection widget
@ -76,7 +76,7 @@ namespace ewol {
virtual void calculateMinMaxSize(); virtual void calculateMinMaxSize();
virtual void onRegenerateDisplay(); virtual void onRegenerateDisplay();
virtual bool onEventInput(const ewol::event::Input& _event); virtual bool onEventInput(const ewol::event::Input& _event);
virtual void onParameterChangeValue(const ewol::object::ParameterRef& _paramPointer); virtual void onParameterChangeValue(const ewol::parameter::Ref& _paramPointer);
private: private:
/** /**
* @brief internal system to change the property of the current status * @brief internal system to change the property of the current status

View File

@ -195,7 +195,7 @@ void ewol::widget::CheckBox::periodicCall(const ewol::event::Time& _event) {
markToRedraw(); markToRedraw();
} }
void ewol::widget::CheckBox::onParameterChangeValue(const ewol::object::ParameterRef& _paramPointer) { void ewol::widget::CheckBox::onParameterChangeValue(const ewol::parameter::Ref& _paramPointer) {
ewol::widget::Container2::onParameterChangeValue(_paramPointer); ewol::widget::Container2::onParameterChangeValue(_paramPointer);
if (_paramPointer == m_shaper) { if (_paramPointer == m_shaper) {
markToRedraw(); markToRedraw();

View File

@ -28,7 +28,7 @@ namespace ewol {
ewol::Signal<void> signalEnter; ewol::Signal<void> signalEnter;
ewol::Signal<bool> signalValue; ewol::Signal<bool> signalValue;
private: private:
ewol::object::Param<ewol::compositing::Shaper> m_shaper; //!< Compositing theme. ewol::parameter::Value<ewol::compositing::Shaper> m_shaper; //!< Compositing theme.
bool m_mouseHover; //!< Flag to know where the mouse is (inside the displayed widget (if not fill)). bool m_mouseHover; //!< Flag to know where the mouse is (inside the displayed widget (if not fill)).
bool m_buttonPressed; //!< Flag to know if the button is curently pressed. bool m_buttonPressed; //!< Flag to know if the button is curently pressed.
// hover area : // hover area :
@ -58,7 +58,7 @@ namespace ewol {
m_shaper.set(_shaperName); m_shaper.set(_shaperName);
} }
protected: protected:
ewol::object::Param<bool> m_value; //!< Current state of the checkbox. ewol::parameter::Value<bool> m_value; //!< Current state of the checkbox.
public: public:
/** /**
* @brief set the current value of the checkbox (check or not) * @brief set the current value of the checkbox (check or not)
@ -87,7 +87,7 @@ namespace ewol {
void CheckStatus(); void CheckStatus();
protected: // Derived function protected: // Derived function
virtual void onDraw(); virtual void onDraw();
virtual void onParameterChangeValue(const ewol::object::ParameterRef& _paramPointer); virtual void onParameterChangeValue(const ewol::parameter::Ref& _paramPointer);
public: // Derived function public: // Derived function
virtual void calculateMinMaxSize(); virtual void calculateMinMaxSize();
virtual void calculateSize(const vec2& _availlable); virtual void calculateSize(const vec2& _availlable);

View File

@ -226,7 +226,7 @@ std::shared_ptr<ewol::Widget> ewol::widget::ContextMenu::getWidgetAtPos(const ve
return std::dynamic_pointer_cast<ewol::Widget>(shared_from_this()); return std::dynamic_pointer_cast<ewol::Widget>(shared_from_this());
} }
void ewol::widget::ContextMenu::onParameterChangeValue(const ewol::object::ParameterRef& _paramPointer) { void ewol::widget::ContextMenu::onParameterChangeValue(const ewol::parameter::Ref& _paramPointer) {
ewol::widget::Container::onParameterChangeValue(_paramPointer); ewol::widget::Container::onParameterChangeValue(_paramPointer);
if (_paramPointer == m_shaper) { if (_paramPointer == m_shaper) {
markToRedraw(); markToRedraw();

View File

@ -38,7 +38,7 @@ namespace ewol {
DECLARE_WIDGET_FACTORY(ContextMenu, "ContextMenu"); DECLARE_WIDGET_FACTORY(ContextMenu, "ContextMenu");
virtual ~ContextMenu(); virtual ~ContextMenu();
private: private:
ewol::object::Param<ewol::compositing::Shaper> m_shaper; //!< Compositing theme. ewol::parameter::Value<ewol::compositing::Shaper> m_shaper; //!< Compositing theme.
public: public:
/** /**
* @brief set the shaper name (use the contructer one this permit to not noad unused shaper) * @brief set the shaper name (use the contructer one this permit to not noad unused shaper)
@ -54,8 +54,8 @@ namespace ewol {
etk::Color<> m_colorBorder; etk::Color<> m_colorBorder;
float m_offset; float m_offset;
private: private:
ewol::object::Param<vec2> m_arrowPos; ewol::parameter::Value<vec2> m_arrowPos;
ewol::object::ParamList<enum markPosition> m_arrawBorder; ewol::parameter::List<enum markPosition> m_arrawBorder;
public: public:
void setPositionMark(enum markPosition _position, const vec2& _arrowPos) { void setPositionMark(enum markPosition _position, const vec2& _arrowPos) {
m_arrawBorder.set(_position); m_arrawBorder.set(_position);
@ -63,7 +63,7 @@ namespace ewol {
} }
protected: // Derived function protected: // Derived function
virtual void onDraw(); virtual void onDraw();
virtual void onParameterChangeValue(const ewol::object::ParameterRef& _paramPointer); virtual void onParameterChangeValue(const ewol::parameter::Ref& _paramPointer);
public: // Derived function public: // Derived function
virtual void onRegenerateDisplay(); virtual void onRegenerateDisplay();
virtual bool onEventInput(const ewol::event::Input& _event); virtual bool onEventInput(const ewol::event::Input& _event);

View File

@ -559,7 +559,7 @@ void ewol::widget::Entry::periodicCall(const ewol::event::Time& _event) {
markToRedraw(); markToRedraw();
} }
void ewol::widget::Entry::onParameterChangeValue(const ewol::object::ParameterRef& _paramPointer) { void ewol::widget::Entry::onParameterChangeValue(const ewol::parameter::Ref& _paramPointer) {
ewol::Widget::onParameterChangeValue(_paramPointer); ewol::Widget::onParameterChangeValue(_paramPointer);
if (_paramPointer == m_shaper) { if (_paramPointer == m_shaper) {
m_colorIdTextFg = m_shaper->requestColor("text-foreground"); m_colorIdTextFg = m_shaper->requestColor("text-foreground");

View File

@ -38,7 +38,7 @@ namespace ewol {
ewol::Signal<std::string> signalEnter; //!< Enter key is pressed ewol::Signal<std::string> signalEnter; //!< Enter key is pressed
ewol::Signal<std::string> signalModify; //!< data change ewol::Signal<std::string> signalModify; //!< data change
private: private:
ewol::object::Param<ewol::compositing::Shaper> m_shaper; ewol::parameter::Value<ewol::compositing::Shaper> m_shaper;
int32_t m_colorIdTextFg; //!< color property of the text foreground int32_t m_colorIdTextFg; //!< color property of the text foreground
int32_t m_colorIdTextBg; //!< color property of the text background int32_t m_colorIdTextBg; //!< color property of the text background
int32_t m_colorIdCursor; //!< color property of the text cursor int32_t m_colorIdCursor; //!< color property of the text cursor
@ -58,7 +58,7 @@ namespace ewol {
*/ */
virtual ~Entry(); virtual ~Entry();
private: private:
ewol::object::Param<std::string> m_data; //!< sting that must be displayed ewol::parameter::Value<std::string> m_data; //!< sting that must be displayed
protected: protected:
/** /**
* @brief internal check the value with RegExp checking * @brief internal check the value with RegExp checking
@ -79,7 +79,7 @@ namespace ewol {
return m_data; return m_data;
}; };
private: private:
ewol::object::ParamRange<int32_t> m_maxCharacter; //!< number max of xharacter in the list ewol::parameter::Range<int32_t> m_maxCharacter; //!< number max of xharacter in the list
public: public:
/** /**
* @brief Limit the number of Unicode character in the entry * @brief Limit the number of Unicode character in the entry
@ -96,7 +96,7 @@ namespace ewol {
return m_maxCharacter; return m_maxCharacter;
}; };
private: private:
ewol::object::Param<std::string> m_regexValue; //!< regular expression value ewol::parameter::Value<std::string> m_regexValue; //!< regular expression value
std::regex m_regex; //!< regular expression to check content std::regex m_regex; //!< regular expression to check content
public: public:
/** /**
@ -147,7 +147,7 @@ namespace ewol {
*/ */
virtual void removeSelected(); virtual void removeSelected();
private: private:
ewol::object::Param<std::string> m_textWhenNothing; //!< Text to display when nothing in in the entry (decorated text...) ewol::parameter::Value<std::string> m_textWhenNothing; //!< Text to display when nothing in in the entry (decorated text...)
public: public:
/** /**
* @brief set The text displayed when nothing is in the entry. * @brief set The text displayed when nothing is in the entry.
@ -175,7 +175,7 @@ namespace ewol {
virtual void onLostFocus(); virtual void onLostFocus();
virtual void changeStatusIn(int32_t _newStatusId); virtual void changeStatusIn(int32_t _newStatusId);
virtual void periodicCall(const ewol::event::Time& _event); virtual void periodicCall(const ewol::event::Time& _event);
virtual void onParameterChangeValue(const ewol::object::ParameterRef& _paramPointer); virtual void onParameterChangeValue(const ewol::parameter::Ref& _paramPointer);
private: // callback functions private: // callback functions
void onCallbackShortCut(const std::string& _value); void onCallbackShortCut(const std::string& _value);
void onCallbackEntryClean(); void onCallbackEntryClean();

View File

@ -179,7 +179,7 @@ bool ewol::widget::Image::loadXML(exml::Element* _node) {
return true; return true;
} }
void ewol::widget::Image::onParameterChangeValue(const ewol::object::ParameterRef& _paramPointer) { void ewol::widget::Image::onParameterChangeValue(const ewol::parameter::Ref& _paramPointer) {
ewol::Widget::onParameterChangeValue(_paramPointer); ewol::Widget::onParameterChangeValue(_paramPointer);
if ( _paramPointer == m_fileName if ( _paramPointer == m_fileName
|| _paramPointer == m_imageSize) { || _paramPointer == m_imageSize) {

View File

@ -51,7 +51,7 @@ namespace ewol {
*/ */
void set(const std::string& _file, const ewol::Dimension& _border); void set(const std::string& _file, const ewol::Dimension& _border);
protected: protected:
ewol::object::Param<std::string> m_fileName; //!< file name of the image. ewol::parameter::Value<std::string> m_fileName; //!< file name of the image.
public: public:
/** /**
* @brief set the new filename * @brief set the new filename
@ -68,7 +68,7 @@ namespace ewol {
return m_fileName; return m_fileName;
}; };
protected: protected:
ewol::object::Param<ewol::Dimension> m_border; //!< border to add at the image. ewol::parameter::Value<ewol::Dimension> m_border; //!< border to add at the image.
public: public:
/** /**
* @brief set tge Border size around the image * @brief set tge Border size around the image
@ -83,7 +83,7 @@ namespace ewol {
return m_border; return m_border;
}; };
protected: protected:
ewol::object::Param<ewol::Dimension> m_imageSize; //!< border to add at the image. ewol::parameter::Value<ewol::Dimension> m_imageSize; //!< border to add at the image.
public: public:
/** /**
* @brief set tge Border size around the image * @brief set tge Border size around the image
@ -98,7 +98,7 @@ namespace ewol {
return m_imageSize; return m_imageSize;
}; };
protected: protected:
ewol::object::Param<bool> m_keepRatio; //!< keep the image ratio between width and hight ewol::parameter::Value<bool> m_keepRatio; //!< keep the image ratio between width and hight
public: public:
/** /**
* @brief set the current status of keeping ratio. * @brief set the current status of keeping ratio.
@ -113,7 +113,7 @@ namespace ewol {
return m_keepRatio; return m_keepRatio;
}; };
protected: protected:
ewol::object::ParamRange<vec2> m_posStart; //!< position in the image to start the sisplay (when we want not to display all the image) ewol::parameter::Range<vec2> m_posStart; //!< position in the image to start the sisplay (when we want not to display all the image)
public: public:
/** /**
* @brief set the current 'start' position in the image to display. * @brief set the current 'start' position in the image to display.
@ -128,7 +128,7 @@ namespace ewol {
return m_posStart; return m_posStart;
}; };
protected: protected:
ewol::object::ParamRange<vec2> m_posStop; //!< position in the image to start the sisplay (when we want not to display all the image) ewol::parameter::Range<vec2> m_posStop; //!< position in the image to start the sisplay (when we want not to display all the image)
public: public:
/** /**
* @brief set the current 'stop' position in the image to display. * @brief set the current 'stop' position in the image to display.
@ -143,7 +143,7 @@ namespace ewol {
return m_posStop; return m_posStop;
}; };
public: public:
ewol::object::Param<bool> m_distanceFieldMode; //!< to have a parameter ewol::parameter::Value<bool> m_distanceFieldMode; //!< to have a parameter
public: public:
/** /**
* @brief Set distance field rendering mode * @brief Set distance field rendering mode
@ -161,7 +161,7 @@ namespace ewol {
} }
protected: // Derived function protected: // Derived function
virtual void onDraw(); virtual void onDraw();
virtual void onParameterChangeValue(const ewol::object::ParameterRef& _paramPointer); virtual void onParameterChangeValue(const ewol::parameter::Ref& _paramPointer);
public: // Derived function public: // Derived function
virtual void calculateMinMaxSize(); virtual void calculateMinMaxSize();
virtual void onRegenerateDisplay(); virtual void onRegenerateDisplay();

View File

@ -142,7 +142,7 @@ bool ewol::widget::Label::loadXML(exml::Element* _node) {
return true; return true;
} }
void ewol::widget::Label::onParameterChangeValue(const ewol::object::ParameterRef& _paramPointer) { void ewol::widget::Label::onParameterChangeValue(const ewol::parameter::Ref& _paramPointer) {
ewol::Widget::onParameterChangeValue(_paramPointer); ewol::Widget::onParameterChangeValue(_paramPointer);
if (_paramPointer == m_label) { if (_paramPointer == m_label) {
markToRedraw(); markToRedraw();

View File

@ -28,7 +28,7 @@ namespace ewol {
ewol::Signal<void> signalPressed; ewol::Signal<void> signalPressed;
private: private:
ewol::compositing::Text m_text; //!< Compositing text element. ewol::compositing::Text m_text; //!< Compositing text element.
ewol::object::Param<std::u32string> m_label; //!< decorated text to display. ewol::parameter::Value<std::u32string> m_label; //!< decorated text to display.
std::shared_ptr<ewol::resource::ColorFile> m_colorProperty; //!< theme color property std::shared_ptr<ewol::resource::ColorFile> m_colorProperty; //!< theme color property
int32_t m_colorDefaultFgText; //!< Default color of the text int32_t m_colorDefaultFgText; //!< Default color of the text
int32_t m_colorDefaultBgText; //!< Default Background color of the text int32_t m_colorDefaultBgText; //!< Default Background color of the text
@ -69,7 +69,7 @@ namespace ewol {
}; };
protected: // Derived function protected: // Derived function
virtual void onDraw(); virtual void onDraw();
virtual void onParameterChangeValue(const ewol::object::ParameterRef& _paramPointer); virtual void onParameterChangeValue(const ewol::parameter::Ref& _paramPointer);
public: // Derived function public: // Derived function
virtual void calculateMinMaxSize(); virtual void calculateMinMaxSize();
virtual void onRegenerateDisplay(); virtual void onRegenerateDisplay();

View File

@ -239,7 +239,7 @@ bool ewol::widget::ListFileSystem::onItemEvent(int32_t _IdInput,
return false; return false;
} }
void ewol::widget::ListFileSystem::onParameterChangeValue(const ewol::object::ParameterRef& _paramPointer) { void ewol::widget::ListFileSystem::onParameterChangeValue(const ewol::parameter::Ref& _paramPointer) {
ewol::widget::List::onParameterChangeValue(_paramPointer); ewol::widget::List::onParameterChangeValue(_paramPointer);
if (_paramPointer == m_folder) { if (_paramPointer == m_folder) {
regenerateView(); regenerateView();

View File

@ -69,8 +69,8 @@ namespace ewol {
*/ */
std::string getSelect() const ; std::string getSelect() const ;
protected: protected:
ewol::object::Param<std::string> m_folder; //!< Current folder that display point on. ewol::parameter::Value<std::string> m_folder; //!< Current folder that display point on.
ewol::object::Param<std::string, true> m_selectFile; //!< current selected file ewol::parameter::Value<std::string, true> m_selectFile; //!< current selected file
public: public:
/** /**
* @brief Set a folder to display (might be a valid folder !!!) * @brief Set a folder to display (might be a valid folder !!!)
@ -87,7 +87,7 @@ namespace ewol {
return m_folder; return m_folder;
}; };
protected: protected:
ewol::object::Param<bool> m_showFile; //!< Show files elements ewol::parameter::Value<bool> m_showFile; //!< Show files elements
public: public:
/** /**
* @brief Set the status of the displaying files or Not. * @brief Set the status of the displaying files or Not.
@ -104,7 +104,7 @@ namespace ewol {
return m_showFile; return m_showFile;
}; };
protected: protected:
ewol::object::Param<bool> m_showFolder; //!< Display the folders elements ewol::parameter::Value<bool> m_showFolder; //!< Display the folders elements
public: public:
/** /**
* @brief Set the status of the displaying fodlers or Not. * @brief Set the status of the displaying fodlers or Not.
@ -121,7 +121,7 @@ namespace ewol {
return m_showFile; return m_showFile;
}; };
protected: protected:
ewol::object::Param<bool> m_showHidden; //!< Display hidden elements ewol::parameter::Value<bool> m_showHidden; //!< Display hidden elements
public: public:
/** /**
* @brief Set the status of the displaying hidden files or folder or Not. * @brief Set the status of the displaying hidden files or folder or Not.
@ -138,7 +138,7 @@ namespace ewol {
return m_showFile; return m_showFile;
}; };
protected: protected:
ewol::object::Param<bool> m_showTemporaryFile; //!< show the temporary files elements (XXX~, XXX.bck, XXX.pyc ...) ewol::parameter::Value<bool> m_showTemporaryFile; //!< show the temporary files elements (XXX~, XXX.bck, XXX.pyc ...)
public: public:
/** /**
* @brief Set the status of the displaying temporary file (xxx~, xxx.bck, xxx.pyc) or Not. * @brief Set the status of the displaying temporary file (xxx~, xxx.bck, xxx.pyc) or Not.
@ -155,7 +155,7 @@ namespace ewol {
return m_showFile; return m_showFile;
}; };
public: // glocal derived functions public: // glocal derived functions
virtual void onParameterChangeValue(const ewol::object::ParameterRef& _paramPointer); virtual void onParameterChangeValue(const ewol::parameter::Ref& _paramPointer);
}; };
}; };
}; };

View File

@ -134,7 +134,7 @@ std::shared_ptr<ewol::Widget> ewol::widget::PopUp::getWidgetAtPos(const vec2& _p
return std::dynamic_pointer_cast<ewol::Widget>(shared_from_this()); return std::dynamic_pointer_cast<ewol::Widget>(shared_from_this());
} }
void ewol::widget::PopUp::onParameterChangeValue(const ewol::object::ParameterRef& _paramPointer) { void ewol::widget::PopUp::onParameterChangeValue(const ewol::parameter::Ref& _paramPointer) {
ewol::widget::Container::onParameterChangeValue(_paramPointer); ewol::widget::Container::onParameterChangeValue(_paramPointer);
if (_paramPointer == m_shaper) { if (_paramPointer == m_shaper) {
markToRedraw(); markToRedraw();

View File

@ -24,7 +24,7 @@ namespace ewol {
*/ */
class PopUp : public ewol::widget::Container { class PopUp : public ewol::widget::Container {
protected: protected:
ewol::object::Param<ewol::compositing::Shaper> m_shaper; //!< Compositing theme. ewol::parameter::Value<ewol::compositing::Shaper> m_shaper; //!< Compositing theme.
protected: protected:
/** /**
* @brief Constructor * @brief Constructor
@ -44,7 +44,7 @@ namespace ewol {
*/ */
void setShaperName(const std::string& _shaperName); void setShaperName(const std::string& _shaperName);
protected: protected:
ewol::object::Param<bvec2> m_lockExpand; //!< Lock the expend of the sub widget to this one == > this permit to limit bigger subWidget ewol::parameter::Value<bvec2> m_lockExpand; //!< Lock the expend of the sub widget to this one == > this permit to limit bigger subWidget
public: public:
/** /**
* @brief Limit the expend properties to the current widget (no contamination) * @brief Limit the expend properties to the current widget (no contamination)
@ -54,7 +54,7 @@ namespace ewol {
m_lockExpand.set(_lockExpand); m_lockExpand.set(_lockExpand);
} }
private: private:
ewol::object::Param<bool> m_closeOutEvent; //!< ratio progression of a sliding ewol::parameter::Value<bool> m_closeOutEvent; //!< ratio progression of a sliding
public: public:
/** /**
* @brief Request the Auto-remove when the event input is set outside the widget * @brief Request the Auto-remove when the event input is set outside the widget
@ -72,7 +72,7 @@ namespace ewol {
}; };
protected: // Derived function protected: // Derived function
virtual void onDraw(); virtual void onDraw();
virtual void onParameterChangeValue(const ewol::object::ParameterRef& _paramPointer); virtual void onParameterChangeValue(const ewol::parameter::Ref& _paramPointer);
public: // Derived function public: // Derived function
virtual void periodicCall(const ewol::event::Time& _event); virtual void periodicCall(const ewol::event::Time& _event);
virtual void systemDraw(const ewol::DrawProperty& _displayProp); virtual void systemDraw(const ewol::DrawProperty& _displayProp);

View File

@ -73,7 +73,7 @@ void ewol::widget::ProgressBar::onRegenerateDisplay() {
} }
} }
void ewol::widget::ProgressBar::onParameterChangeValue(const ewol::object::ParameterRef& _paramPointer) { void ewol::widget::ProgressBar::onParameterChangeValue(const ewol::parameter::Ref& _paramPointer) {
ewol::Widget::onParameterChangeValue(_paramPointer); ewol::Widget::onParameterChangeValue(_paramPointer);
if (_paramPointer == m_value) { if (_paramPointer == m_value) {
markToRedraw(); markToRedraw();

View File

@ -38,13 +38,13 @@ namespace ewol {
m_textColorFg = _newColor; m_textColorFg = _newColor;
}; };
private: private:
ewol::object::Param<float> m_value; //!< % used ewol::parameter::Value<float> m_value; //!< % used
ewol::object::Param<etk::Color<>> m_textColorFg; //!< forder bar color ewol::parameter::Value<etk::Color<>> m_textColorFg; //!< forder bar color
ewol::object::Param<etk::Color<>> m_textColorBgOn; //!< bar color enable ewol::parameter::Value<etk::Color<>> m_textColorBgOn; //!< bar color enable
ewol::object::Param<etk::Color<>> m_textColorBgOff; //!< bar color disable ewol::parameter::Value<etk::Color<>> m_textColorBgOff; //!< bar color disable
protected: // Derived function protected: // Derived function
virtual void onDraw(); virtual void onDraw();
virtual void onParameterChangeValue(const ewol::object::ParameterRef& _paramPointer); virtual void onParameterChangeValue(const ewol::parameter::Ref& _paramPointer);
public: // Derived function public: // Derived function
virtual void onRegenerateDisplay(); virtual void onRegenerateDisplay();
virtual void calculateMinMaxSize(); virtual void calculateMinMaxSize();

View File

@ -350,7 +350,7 @@ std::shared_ptr<ewol::Widget> ewol::widget::Scroll::getWidgetAtPos(const vec2& _
} }
return std::dynamic_pointer_cast<ewol::Widget>(shared_from_this());; return std::dynamic_pointer_cast<ewol::Widget>(shared_from_this());;
} }
void ewol::widget::Scroll::onParameterChangeValue(const ewol::object::ParameterRef& _paramPointer) { void ewol::widget::Scroll::onParameterChangeValue(const ewol::parameter::Ref& _paramPointer) {
ewol::widget::Container::onParameterChangeValue(_paramPointer); ewol::widget::Container::onParameterChangeValue(_paramPointer);
if (_paramPointer == m_limit) { if (_paramPointer == m_limit) {

View File

@ -32,7 +32,7 @@ namespace ewol {
ewol::compositing::Shaper m_shaperH; //!< Compositing theme Horizontal. ewol::compositing::Shaper m_shaperH; //!< Compositing theme Horizontal.
ewol::compositing::Shaper m_shaperV; //!< Compositing theme Vertical. ewol::compositing::Shaper m_shaperV; //!< Compositing theme Vertical.
protected: protected:
ewol::object::ParamRange<vec2> m_limit; ewol::parameter::Range<vec2> m_limit;
private: private:
float m_pixelScrolling; float m_pixelScrolling;
vec2 m_highSpeedStartPos; vec2 m_highSpeedStartPos;
@ -67,7 +67,7 @@ namespace ewol {
virtual std::shared_ptr<ewol::Widget> getWidgetAtPos(const vec2& _pos); virtual std::shared_ptr<ewol::Widget> getWidgetAtPos(const vec2& _pos);
protected: // Derived function protected: // Derived function
virtual void onDraw(); virtual void onDraw();
virtual void onParameterChangeValue(const ewol::object::ParameterRef& _paramPointer); virtual void onParameterChangeValue(const ewol::parameter::Ref& _paramPointer);
}; };
}; };
}; };

View File

@ -178,7 +178,7 @@ void ewol::widget::Sizer::subWidgetUnLink(std::shared_ptr<ewol::Widget> _newWidg
ewol::widget::ContainerN::subWidgetUnLink(_newWidget); ewol::widget::ContainerN::subWidgetUnLink(_newWidget);
} }
void ewol::widget::Sizer::onParameterChangeValue(const ewol::object::ParameterRef& _paramPointer) { void ewol::widget::Sizer::onParameterChangeValue(const ewol::parameter::Ref& _paramPointer) {
ewol::widget::ContainerN::onParameterChangeValue(_paramPointer); ewol::widget::ContainerN::onParameterChangeValue(_paramPointer);
if (_paramPointer == m_mode) { if (_paramPointer == m_mode) {
markToRedraw(); markToRedraw();

View File

@ -31,7 +31,7 @@ namespace ewol {
modeHori, //!< Horizontal mode modeHori, //!< Horizontal mode
}; };
private: private:
ewol::object::ParamList<enum displayMode> m_mode; //!< Methode to display the widget list (vert/hory ...) ewol::parameter::List<enum displayMode> m_mode; //!< Methode to display the widget list (vert/hory ...)
protected: protected:
/** /**
* @brief Constructor * @brief Constructor
@ -60,7 +60,7 @@ namespace ewol {
return m_mode; return m_mode;
} }
private: private:
ewol::object::Param<ewol::Dimension> m_borderSize; //!< Border size needed for all the display ewol::parameter::Value<ewol::Dimension> m_borderSize; //!< Border size needed for all the display
public: public:
/** /**
* @brief set the current border size of the current element: * @brief set the current border size of the current element:
@ -127,7 +127,7 @@ namespace ewol {
virtual int32_t subWidgetAddStart(std::shared_ptr<ewol::Widget> _newWidget); virtual int32_t subWidgetAddStart(std::shared_ptr<ewol::Widget> _newWidget);
virtual void subWidgetRemove(std::shared_ptr<ewol::Widget> _newWidget); virtual void subWidgetRemove(std::shared_ptr<ewol::Widget> _newWidget);
virtual void subWidgetUnLink(std::shared_ptr<ewol::Widget> _newWidget); virtual void subWidgetUnLink(std::shared_ptr<ewol::Widget> _newWidget);
virtual void onParameterChangeValue(const ewol::object::ParameterRef& _paramPointer); virtual void onParameterChangeValue(const ewol::parameter::Ref& _paramPointer);
}; };
}; };
}; };

View File

@ -105,7 +105,7 @@ void ewol::widget::Slider::updateValue(float _newValue) {
} }
// TODO : Review this really bad things ... // TODO : Review this really bad things ...
void ewol::widget::Slider::onParameterChangeValue(const ewol::object::ParameterRef& _paramPointer) { void ewol::widget::Slider::onParameterChangeValue(const ewol::parameter::Ref& _paramPointer) {
ewol::Widget::onParameterChangeValue(_paramPointer); ewol::Widget::onParameterChangeValue(_paramPointer);
if (_paramPointer == m_value) { if (_paramPointer == m_value) {
updateValue(m_value.get()); updateValue(m_value.get());

View File

@ -32,7 +32,7 @@ namespace ewol {
DECLARE_WIDGET_FACTORY(Slider, "Slider"); DECLARE_WIDGET_FACTORY(Slider, "Slider");
virtual ~Slider(); virtual ~Slider();
protected: protected:
ewol::object::Param<float> m_value; //!< current value of the Slider ewol::parameter::Value<float> m_value; //!< current value of the Slider
public: public:
/** /**
* @brief Set the value of the slider. * @brief Set the value of the slider.
@ -49,7 +49,7 @@ namespace ewol {
return m_value; return m_value;
} }
protected: protected:
ewol::object::Param<float> m_min; //!< minimum value of the slider ewol::parameter::Value<float> m_min; //!< minimum value of the slider
public: public:
/** /**
* @brief Set the minumum value of the slider. * @brief Set the minumum value of the slider.
@ -66,7 +66,7 @@ namespace ewol {
return m_min; return m_min;
} }
protected: protected:
ewol::object::Param<float> m_max; //!< maximum value of the slider ewol::parameter::Value<float> m_max; //!< maximum value of the slider
public: public:
/** /**
* @brief Set the maximum value of the slider. * @brief Set the maximum value of the slider.
@ -83,7 +83,7 @@ namespace ewol {
return m_max; return m_max;
} }
protected: protected:
ewol::object::Param<float> m_step; ewol::parameter::Value<float> m_step;
public: public:
/** /**
* @brief Set the step value of the slider. * @brief Set the step value of the slider.
@ -114,7 +114,7 @@ namespace ewol {
virtual void calculateMinMaxSize(); virtual void calculateMinMaxSize();
virtual void onRegenerateDisplay(); virtual void onRegenerateDisplay();
virtual bool onEventInput(const ewol::event::Input& _event); virtual bool onEventInput(const ewol::event::Input& _event);
virtual void onParameterChangeValue(const ewol::object::ParameterRef& _paramPointer); virtual void onParameterChangeValue(const ewol::parameter::Ref& _paramPointer);
}; };
}; };
}; };

View File

@ -48,7 +48,7 @@ void ewol::widget::Spacer::onRegenerateDisplay() {
m_draw.rectangleWidth(vec3(m_size.x(), m_size.y(),0) ); m_draw.rectangleWidth(vec3(m_size.x(), m_size.y(),0) );
} }
void ewol::widget::Spacer::onParameterChangeValue(const ewol::object::ParameterRef& _paramPointer) { void ewol::widget::Spacer::onParameterChangeValue(const ewol::parameter::Ref& _paramPointer) {
ewol::Widget::onParameterChangeValue(_paramPointer); ewol::Widget::onParameterChangeValue(_paramPointer);
if (_paramPointer == m_color) { if (_paramPointer == m_color) {
markToRedraw(); markToRedraw();

View File

@ -37,7 +37,7 @@ namespace ewol {
*/ */
virtual ~Spacer(); virtual ~Spacer();
protected: protected:
ewol::object::Param<etk::Color<>> m_color; //!< Background color ewol::parameter::Value<etk::Color<>> m_color; //!< Background color
public: public:
/** /**
* @brief Spziby the background color (basicly transparent) * @brief Spziby the background color (basicly transparent)
@ -51,7 +51,7 @@ namespace ewol {
virtual std::shared_ptr<ewol::Widget> getWidgetAtPos(const vec2& _pos) { return nullptr; }; virtual std::shared_ptr<ewol::Widget> getWidgetAtPos(const vec2& _pos) { return nullptr; };
virtual void onRegenerateDisplay(); virtual void onRegenerateDisplay();
virtual void onDraw(); virtual void onDraw();
virtual void onParameterChangeValue(const ewol::object::ParameterRef& _paramPointer); virtual void onParameterChangeValue(const ewol::parameter::Ref& _paramPointer);
}; };
}; };
}; };

View File

@ -270,7 +270,7 @@ void ewol::widget::WSlider::onRegenerateDisplay() {
} }
} }
} }
void ewol::widget::WSlider::onParameterChangeValue(const ewol::object::ParameterRef& _paramPointer) { void ewol::widget::WSlider::onParameterChangeValue(const ewol::parameter::Ref& _paramPointer) {
ewol::widget::ContainerN::onParameterChangeValue(_paramPointer); ewol::widget::ContainerN::onParameterChangeValue(_paramPointer);
if (_paramPointer == m_selectNewWidget) { if (_paramPointer == m_selectNewWidget) {
if (m_selectNewWidget.get() != "") { if (m_selectNewWidget.get() != "") {

View File

@ -43,7 +43,7 @@ namespace ewol {
int32_t m_windowsDestination; //!< widget destinated viewed int32_t m_windowsDestination; //!< widget destinated viewed
int32_t m_windowsRequested; //!< widget destination requested when change in modification in progress int32_t m_windowsRequested; //!< widget destination requested when change in modification in progress
float m_slidingProgress; //!< ratio progression of a sliding float m_slidingProgress; //!< ratio progression of a sliding
ewol::object::Param<std::string, true> m_selectNewWidget; // input config requesting ewol::parameter::Value<std::string, true> m_selectNewWidget; // input config requesting
protected: protected:
/** /**
* @brief Generate the move on the specific vector ID (This is not a public acces, because the vector can have some null pointer inside ...) * @brief Generate the move on the specific vector ID (This is not a public acces, because the vector can have some null pointer inside ...)
@ -67,7 +67,7 @@ namespace ewol {
*/ */
void subWidgetSelectSet(const std::string& _widgetName); void subWidgetSelectSet(const std::string& _widgetName);
private: private:
ewol::object::ParamRange<float> m_transitionSpeed; //!< speed of the transition (default 1 == > 1s) ewol::parameter::Range<float> m_transitionSpeed; //!< speed of the transition (default 1 == > 1s)
public: public:
/** /**
* @brief set transition speed element. * @brief set transition speed element.
@ -84,7 +84,7 @@ namespace ewol {
return m_transitionSpeed; return m_transitionSpeed;
}; };
private: private:
ewol::object::ParamList<enum sladingMode> m_transitionSlide; //!< mode to slide the widgets ewol::parameter::List<enum sladingMode> m_transitionSlide; //!< mode to slide the widgets
public: public:
/** /**
* @brief set a new mode of sliding element * @brief set a new mode of sliding element
@ -106,7 +106,7 @@ namespace ewol {
virtual void onRegenerateDisplay(); virtual void onRegenerateDisplay();
virtual std::shared_ptr<ewol::Widget> getWidgetAtPos(const vec2& _pos); virtual std::shared_ptr<ewol::Widget> getWidgetAtPos(const vec2& _pos);
virtual void periodicCall(const ewol::event::Time& _event); virtual void periodicCall(const ewol::event::Time& _event);
virtual void onParameterChangeValue(const ewol::object::ParameterRef& _paramPointer); virtual void onParameterChangeValue(const ewol::parameter::Ref& _paramPointer);
}; };
}; };
std::ostream& operator <<(std::ostream& _os, const enum ewol::widget::WSlider::sladingMode _obj); std::ostream& operator <<(std::ostream& _os, const enum ewol::widget::WSlider::sladingMode _obj);

View File

@ -613,7 +613,7 @@ bool ewol::Widget::systemEventInput(ewol::event::InputSystem& _event) {
return onEventInput(_event.m_event); return onEventInput(_event.m_event);
} }
void ewol::Widget::onParameterChangeValue(const ewol::object::ParameterRef& _paramPointer) { void ewol::Widget::onParameterChangeValue(const ewol::parameter::Ref& _paramPointer) {
ewol::Object::onParameterChangeValue(_paramPointer); ewol::Object::onParameterChangeValue(_paramPointer);
if (_paramPointer == m_canFocus) { if (_paramPointer == m_canFocus) {
if (m_hasFocus == true) { if (m_hasFocus == true) {

View File

@ -228,7 +228,7 @@ namespace ewol {
*/ */
virtual vec2 getOrigin(); virtual vec2 getOrigin();
protected: protected:
ewol::object::Param<ewol::Dimension> m_userMinSize; //!< user define the minimum size of the widget ewol::parameter::Value<ewol::Dimension> m_userMinSize; //!< user define the minimum size of the widget
public: public:
/** /**
* @brief User set the minimum size he want to set the display * @brief User set the minimum size he want to set the display
@ -255,7 +255,7 @@ namespace ewol {
*/ */
virtual void checkMinSize(); virtual void checkMinSize();
protected: protected:
ewol::object::Param<ewol::Dimension> m_userMaxSize; //!< user define the maximum size of the widget ewol::parameter::Value<ewol::Dimension> m_userMaxSize; //!< user define the maximum size of the widget
public: public:
/** /**
* @brief User set the maximum size he want to set the display * @brief User set the maximum size he want to set the display
@ -282,7 +282,7 @@ namespace ewol {
*/ */
virtual void checkMaxSize(); virtual void checkMaxSize();
protected: protected:
ewol::object::Param<bvec2> m_userExpand; ewol::parameter::Value<bvec2> m_userExpand;
public: public:
/** /**
* @brief set the expend capabilities (x&y) * @brief set the expend capabilities (x&y)
@ -305,7 +305,7 @@ namespace ewol {
*/ */
virtual bvec2 canExpand(); virtual bvec2 canExpand();
protected: protected:
ewol::object::Param<bvec2> m_userFill; ewol::parameter::Value<bvec2> m_userFill;
public: public:
/** /**
* @brief set the x&y filling capacity * @brief set the x&y filling capacity
@ -328,7 +328,7 @@ namespace ewol {
*/ */
const bvec2& canFill(); const bvec2& canFill();
protected: protected:
ewol::object::Param<bool> m_hide; //!< hide a widget on the display ewol::parameter::Value<bool> m_hide; //!< hide a widget on the display
public: public:
/** /**
* @brief set the widget hidden * @brief set the widget hidden
@ -351,7 +351,7 @@ namespace ewol {
}; };
protected: protected:
ewol::object::ParamList<enum ewol::gravity> m_gravity; //!< Gravity of the widget ewol::parameter::List<enum ewol::gravity> m_gravity; //!< Gravity of the widget
public: public:
/** /**
* @brief set the widget gravity * @brief set the widget gravity
@ -372,7 +372,7 @@ namespace ewol {
// ---------------------------------------------------------------------------------------------------------------- // ----------------------------------------------------------------------------------------------------------------
private: private:
bool m_hasFocus; //!< set the focus on this widget bool m_hasFocus; //!< set the focus on this widget
ewol::object::Param<bool> m_canFocus; //!< the focus can be done on this widget ewol::parameter::Value<bool> m_canFocus; //!< the focus can be done on this widget
public: public:
/** /**
* @brief get the focus state of the widget * @brief get the focus state of the widget
@ -665,7 +665,7 @@ namespace ewol {
public: // Derived function public: // Derived function
virtual bool loadXML(exml::Element* _node); virtual bool loadXML(exml::Element* _node);
protected: // Derived function protected: // Derived function
virtual void onParameterChangeValue(const ewol::object::ParameterRef& _paramPointer); virtual void onParameterChangeValue(const ewol::parameter::Ref& _paramPointer);
public: public:
/** /**
* @brief need to be call When the size of the current widget have change == > this force the system to recalculate all the widget positions * @brief need to be call When the size of the current widget have change == > this force the system to recalculate all the widget positions
@ -696,10 +696,10 @@ namespace ewol {
enum annimationMode m_annimationMode; //!< true when the annimation is started enum annimationMode m_annimationMode; //!< true when the annimation is started
float m_annimationratio; //!< Ratio of the annimation [0..1] float m_annimationratio; //!< Ratio of the annimation [0..1]
protected: protected:
ewol::object::ParamList<int32_t> m_annimationTypeStart; //!< type of start annimation ewol::parameter::List<int32_t> m_annimationTypeStart; //!< type of start annimation
ewol::object::ParamRange<float> m_annimationTimeStart; //!< time to produce start annimation ewol::parameter::Range<float> m_annimationTimeStart; //!< time to produce start annimation
ewol::object::ParamList<int32_t> m_annimationTypeStop; //!< type of start annimation ewol::parameter::List<int32_t> m_annimationTypeStop; //!< type of start annimation
ewol::object::ParamRange<float> m_annimationTimeStop; //!< time to produce start annimation ewol::parameter::Range<float> m_annimationTimeStop; //!< time to produce start annimation
protected: protected:
/** /**
* @brief Add a annimation type capabilities of this widget. * @brief Add a annimation type capabilities of this widget.

View File

@ -90,12 +90,14 @@ def create(target):
myModule.add_src_file([ myModule.add_src_file([
'ewol/object/Manager.cpp', 'ewol/object/Manager.cpp',
'ewol/object/Object.cpp', 'ewol/object/Object.cpp',
'ewol/object/Worker.cpp', 'ewol/object/Worker.cpp'
'ewol/object/Parameter.cpp',
'ewol/object/ParameterList.cpp',
'ewol/object/ParamList.cpp'
]) ])
# object : # parameter :
myModule.add_src_file([
'ewol/parameter/Parameter.cpp',
'ewol/parameter/Interface.cpp',
])
# Signal :
myModule.add_src_file([ myModule.add_src_file([
'ewol/signal/List.cpp', 'ewol/signal/List.cpp',
'ewol/signal/Base.cpp' 'ewol/signal/Base.cpp'