[DEV] update externalisation of signal and property

This commit is contained in:
Edouard DUPIN 2016-02-11 21:45:21 +01:00
parent 287815eaa6
commit ea4cc45ac5
64 changed files with 242 additions and 1651 deletions

View File

@ -9,13 +9,13 @@
#include <etk/types.h> #include <etk/types.h>
#include <ewol/object/Object.h> #include <ewol/object/Object.h>
#include <ewol/signal/Signal.h> #include <esignal/Signal.h>
#include <ewol/event/Time.h> #include <ewol/event/Time.h>
namespace ewol { namespace ewol {
class Context; class Context;
namespace object { namespace object {
class Manager : public ewol::signal::Interface { class Manager : public esignal::Interface {
private: private:
std::vector<std::weak_ptr<ewol::Object>> m_eObjectList; // all widget allocated == > all time increment ... never removed ... std::vector<std::weak_ptr<ewol::Object>> m_eObjectList; // all widget allocated == > all time increment ... never removed ...
Context& m_context; Context& m_context;
@ -76,7 +76,7 @@ namespace ewol {
*/ */
void workerRemove(const std::shared_ptr<ewol::Object>& _worker); void workerRemove(const std::shared_ptr<ewol::Object>& _worker);
public: public:
ewol::Signal<ewol::event::Time> periodicCall; esignal::Signal<ewol::event::Time> periodicCall;
private: private:
int64_t m_applWakeUpTime; //!< Time of the application initialize int64_t m_applWakeUpTime; //!< Time of the application initialize
int64_t m_lastPeriodicCallTime; //!< last call time ... int64_t m_lastPeriodicCallTime; //!< last call time ...

View File

@ -119,7 +119,7 @@ bool ewol::Object::loadXML(const std::shared_ptr<const exml::Element>& _node) {
if (pair.first == "") { if (pair.first == "") {
continue; continue;
} }
if (parameterSet(pair.first, pair.second) == false) { if (propertySet(pair.first, pair.second) == false) {
errorOccured = true; errorOccured = true;
} }
} }
@ -131,18 +131,18 @@ bool ewol::Object::storeXML(const std::shared_ptr<exml::Element>& _node) const {
return false; return false;
} }
bool errorOccured = true; bool errorOccured = true;
for (auto &it : parameterGetAll(true)) { for (auto &it : propertyGetAll(true)) {
_node->setAttribute(it.first, it.second); _node->setAttribute(it.first, it.second);
} }
return errorOccured; return errorOccured;
} }
bool ewol::Object::parameterSetOnWidgetNamed(const std::string& _objectName, const std::string& _config, const std::string& _value) { bool ewol::Object::propertySetOnWidgetNamed(const std::string& _objectName, const std::string& _config, const std::string& _value) {
std::shared_ptr<ewol::Object> object = getObjectManager().get(_objectName); std::shared_ptr<ewol::Object> object = getObjectManager().get(_objectName);
if (object == nullptr) { if (object == nullptr) {
return false; return false;
} }
return object->parameterSet(_config, _value); return object->propertySet(_config, _value);
} }
ewol::object::Manager& ewol::Object::getObjectManager() { ewol::object::Manager& ewol::Object::getObjectManager() {
@ -166,11 +166,11 @@ std::shared_ptr<ewol::Object> ewol::Object::getSubObjectNamed(const std::string&
} }
bool ewol::parameterSetOnObjectNamed(const std::string& _objectName, const std::string& _config, const std::string& _value) { bool epropertySetOnObjectNamed(const std::string& _objectName, const std::string& _config, const std::string& _value) {
std::shared_ptr<ewol::Object> object = ewol::getContext().getEObjectManager().get(_objectName); std::shared_ptr<ewol::Object> object = ewol::getContext().getEObjectManager().get(_objectName);
if (object == nullptr) { if (object == nullptr) {
return false; return false;
} }
return object->parameterSet(_config, _value); return object->propertySet(_config, _value);
} }

View File

@ -14,11 +14,11 @@
#include <memory> #include <memory>
#include <ewol/debug.h> #include <ewol/debug.h>
#include <ewol/parameter/Interface.h> #include <eproperty/Interface.h>
#include <ewol/parameter/Value.h> #include <eproperty/Value.h>
#include <ewol/parameter/Range.h> #include <eproperty/Range.h>
#include <ewol/parameter/List.h> #include <eproperty/List.h>
#include <ewol/signal/Interface.h> #include <esignal/Interface.h>
namespace ewol { namespace ewol {
// some class need to define element befor other ... // some class need to define element befor other ...
@ -75,8 +75,8 @@ 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::parameter::Interface, public eproperty::Interface,
public ewol::signal::Interface { public esignal::Interface {
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
private: private:
@ -186,9 +186,9 @@ namespace ewol {
}; };
public: public:
// 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 propertySetOnWidgetNamed(const std::string& _objectName, const std::string& _config, const std::string& _value);
protected: protected:
ewol::parameter::Value<std::string> m_name; //!< name of the element ... eproperty::Value<std::string> m_name; //!< name of the element ...
public: public:
/** /**
* @brief get the Object name * @brief get the Object name
@ -284,7 +284,7 @@ namespace ewol {
} }
*/ */
}; };
bool parameterSetOnObjectNamed(const std::string& _objectName, const std::string& _config, const std::string& _value); bool propertySetOnObjectNamed(const std::string& _objectName, const std::string& _config, const std::string& _value);
}; };
/** /**
@ -310,7 +310,7 @@ namespace ewol {
EWOL_ERROR("object named='" << _name << "' not exit or can not be cast in : " << #_type); \ EWOL_ERROR("object named='" << _name << "' not exit or can not be cast in : " << #_type); \
} \ } \
} while (false) } while (false)
//#include <ewol/signal/Signal.h> //#include <esignal/Signal.h>

View File

@ -1,107 +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/parameter/List.h>
#include <ewol/parameter/Parameter.h>
ewol::parameter::Interface::Interface() {
}
ewol::parameter::Interface::~Interface() {
parameterClean();
}
// note this pointer is not allocated and not free at the end of the class
void ewol::parameter::Interface::parameterAdd(ewol::parameter::Parameter* _pointerOnParameter) {
if (_pointerOnParameter == nullptr) {
EWOL_ERROR("Try to link a nullptr parameters");
return;
}
m_list.push_back(_pointerOnParameter);
}
void ewol::parameter::Interface::parameterClean() {
// remove all pointer on these parameters
m_list.clear();
}
// 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 ...
bool ewol::parameter::Interface::parameterSet(const std::string& _parameter, const std::string& _value) {
for (auto &it : m_list) {
if( it != nullptr
&& it->getName() == _parameter) {
it->setString(_value);
return true;
}
}
// can not find the parameters :
return false;
}
std::string ewol::parameter::Interface::parameterGet(const std::string& _parameter) const {
for (auto &it : m_list) {
if( it != nullptr
&& it->getName() == _parameter) {
return it->getString();
}
}
return "???";
}
void ewol::parameter::Interface::parameterDisplay(bool _changeOnly) const {
EWOL_INFO(" Object parameters:");
for (auto &it : m_list) {
if(it != nullptr) {
std::string paramName = it->getName();
std::string paramVal = it->getString();
std::string paramInfo = it->getInfo();
if ( _changeOnly == false
|| it->isDefault() == false) {
EWOL_INFO(" | param='" << paramName << "' value=" << paramVal << " (" << paramInfo << ")");
}
} else {
EWOL_INFO(" | param=nullptr");
}
}
}
void ewol::parameter::Interface::onParameterChangeValue(const ewol::parameter::Ref& _paramPointer) {
// nothing to do ...
}
std::map<std::string, std::string> ewol::parameter::Interface::parameterGetAll(bool _notIfDefault) const {
std::map<std::string, std::string> out;
for (auto &it : m_list) {
if(it != nullptr) {
std::string paramName = it->getName();
std::string paramVal = it->getString();
if ( _notIfDefault == false
|| it->isDefault() == false) {
out.insert(std::make_pair(paramName, paramVal));
}
}
}
return out;
}
size_t ewol::parameter::Interface::getParameterCount() const {
return m_list.size();
}
ewol::parameter::Parameter* ewol::parameter::Interface::getParameterRaw(const size_t& _id) const {
if (_id >= m_list.size()) {
EWOL_ERROR("Wrong ID for parameter list. " << _id << " >= " << m_list.size());
return nullptr;
}
return m_list[_id];
}

View File

@ -1,88 +0,0 @@
/**
* @author Edouard DUPIN
*
* @copyright 2011, Edouard DUPIN, all right reserved
*
* @license APACHE v2.0 (see license file)
*/
#pragma once
#include <vector>
#include <map>
namespace ewol {
namespace parameter {
class Parameter;
class Ref;
class Interface {
friend class ewol::parameter::Parameter; // to register parameter in the list.
private:
std::vector<ewol::parameter::Parameter*> m_list; //!< list of availlable Parameters (no need to free)
public:
/**
* @brief Constructor.
*/
Interface();
/**
* @brief Destructor.
*/
virtual ~Interface();
/**
* @brief Register a parameter class pointer in the List of parameters
* @note This class does not destroy the parameter pointer!!!
* @param[in] pointerOnParameter Pointer on the parameter that might be added.
*/
void parameterAdd(Parameter* _pointerOnParameter);
/**
* @brief Remove all the parameter reference in this class.
* @note no delete, just clean and inform that a parameter has not been removed.
*/
void parameterClean();
/**
* @brief Set a specific value to the parameter reference name.
* @param[in] parameter The parameter string name.
* @param[in] value The new value of the parameter (string).
* @return true Parameter update.
* @return false Parameter not update.
*/
bool parameterSet(const std::string& _parameter, const std::string& _value);
/**
* @brief Get a specific value of the parameter reference name.
* @param[in] parameter The parameter string name.
* @return The value of the parameter (string).
*/
std::string parameterGet(const std::string& _parameter) const;
/**
* @brief Display all the parameter value with there name.
* @param[in] changeOnly check at true if the user want to display only parameter that are not at default value.
*/
void parameterDisplay(bool _changeOnly = false) const;
/**
* @brief Called when a parameter change value.
* @param[in] _paramPointer Pointer on the parameter (to know which parameter have change);
*/
virtual void onParameterChangeValue(const ewol::parameter::Ref& _paramPointer);
/**
* @brief Get All the parameter configuration:
* @return map on the parameters
*/
std::map<std::string, std::string> parameterGetAll(bool _notIfDefault=true) const;
public:
/**
* @brief Get count of parameters.
* @return The number of the parameter.
*/
size_t getParameterCount() const;
/**
* @brief Get name of a parameters.
* @return _id Id of the parameter.
* @return pointer on the parameter.
*/
ewol::parameter::Parameter* getParameterRaw(const size_t& _id) const;
};
};
};

View File

@ -1,171 +0,0 @@
/**
* @author Edouard DUPIN
*
* @copyright 2011, Edouard DUPIN, all right reserved
*
* @license APACHE v2.0 (see license file)
*/
#pragma once
#include <ewol/parameter/Interface.h>
#include <ewol/parameter/Parameter.h>
#include <map>
#include <typeinfo>
namespace ewol {
namespace parameter {
template<typename MY_TYPE, bool isEventReceiving=false> class List : public Parameter {
private:
MY_TYPE m_value; //!< Element value ==> can be directly used.
MY_TYPE m_default; //!< Default value.
std::map<std::string, MY_TYPE> m_list; //!< pointer on the list of all elements.
public:
/**
* @brief Create a parameter with List of element parameter.
* @param[in] _objectLink reference on the parameter lister.
* @param[in] _name Static name of the parameter.
* @param[in] _description description of the parameter.
*/
List(ewol::parameter::Interface& _paramInterfaceLink,
const std::string& _name,
const MY_TYPE& _defaultValue,
const std::string& _description="") :
Parameter(_paramInterfaceLink, _name),
m_value(_defaultValue),
m_default(_defaultValue) {
};
/**
* @brief Destructor.
*/
virtual ~List() {
};
void add(const MY_TYPE& _value, const std::string& _name, const std::string& _description = "") {
auto it = m_list.find(_name);
if (it != m_list.end()) {
it->second = _value;
return;
}
m_list.insert(std::make_pair(_name, _value));
}
// herited methode
virtual std::string getParameterType() const {
return "ewol::parameter::List";
}
// herited methode
virtual std::string getType() const {
return typeid(MY_TYPE).name();
}
// herited methode
virtual std::string getString() const {
return getElement(m_value);
}
// herited methode
virtual std::string getDefault() const {
return getElement(m_default);
}
// herited methode
virtual void setString(const std::string& _newVal) {
auto it = m_list.find(_newVal);
if (it != m_list.end()) {
if (it->second != m_value) {
m_value = it->second;
notifyChange();
}
return;
}
EWOL_WARNING("paramList value='" << _newVal << "' is not un the list ... ==> no change");
for (auto &it : m_list) {
EWOL_VERBOSE(" element : " << it.first);
}
}
// herited methode
virtual std::string getInfo() const {
std::string list = "List default=" + getElement(m_default) + " in : [";
for (auto &it : m_list) {
list += it.first + "/";
}
return list + "]";
}
// herited methode
virtual bool isDefault() const {
return m_value == m_default;
}
// herited methode
virtual void setDefault() {
set(m_default);
}
void setDefaultValue(const MY_TYPE& _value) {
m_default = _value;
}
/**
* @brief Get the value of the current parameter.
* @return the Reference value
*/
inline MY_TYPE& get() {
return m_value;
};
const inline MY_TYPE& get() const {
return m_value;
};
/**
* @brief Set the value of the current parameter.
* @param[in] _newVal New value of the parameter. (not set if out of range)
*/
void set(MY_TYPE _newVal) {
if (_newVal == m_value) {
return;
}
for (auto &it : m_list) {
if (it.second == _newVal) {
m_value = it.second;
notifyChange();
return;
}
}
EWOL_WARNING("paramList value=??? is not un the list ... ==> no change");
}
private:
/**
* @brief Get the element description from real Value.
* @param[in] _intValue value that might be converted in string.
* @return the description string coresponding to this ID.
*/
std::string getElement(MY_TYPE _intValue) const {
for (auto &it : m_list) {
if (it.second == _intValue) {
return it.first;
}
}
return "???";
}
public:
/**
* @brief assignement operator.
* @param[in] newVal The new value of the parameter.
*/
const List& operator= (MY_TYPE _newVal) {
set(_newVal);
return *this;
}
operator const MY_TYPE&() const {
return m_value;
}
MY_TYPE& operator *() const noexcept {
return m_value;
}
const MY_TYPE* operator->() const noexcept {
return &m_value;
}
MY_TYPE* operator->() noexcept {
return &m_value;
}
};
template<typename MY_TYPE> std::ostream& operator <<(std::ostream& _os, const ewol::parameter::List<MY_TYPE>& _obj) {
_os << _obj.get();
return _os;
}
};
};

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/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

@ -1,89 +0,0 @@
/**
* @author Edouard DUPIN
*
* @copyright 2011, Edouard DUPIN, all right reserved
*
* @license APACHE v2.0 (see license file)
*/
#include <ewol/parameter/Interface.h>
#pragma once
#include <string>
#include <typeinfo>
namespace ewol {
namespace parameter {
class Ref;
class Parameter {
private:
ewol::parameter::Interface& m_interfaceLink;
std::string m_name;
public:
Parameter(ewol::parameter::Interface& _paramInterfaceLink, const std::string& _name);
virtual ~Parameter() { };
/**
* @brief call main class that parameterChange
*/
void notifyChange() const;
/**
* @brief Get the name of the parameter.
* @return The name of the parameter
*/
virtual std::string getName() const {
return m_name;
};
/**
* @brief Get the parameter type of the class in string mode.
* @return The string type of the parameter.
*/
virtual std::string getParameterType() const = 0;
/**
* @brief Get the type of the parameter in string mode.
* @return The string type of the parameter.
*/
virtual std::string getType() const = 0;
/**
* @brief Get the string of the current value of the parameter.
* @return The string description of the value.
*/
virtual std::string getString() const = 0;
/**
* @brief Get the string of the default value of the parameter.
* @return the string decription of the default value.
*/
virtual std::string getDefault() const = 0;
/**
* @brief Set a new value of the parameter (with string interface).
* @param[in] _newVal New value of the parameters.
*/
virtual void setString(const std::string& _newVal) = 0;
/**
* @brief Description of the parameters.
* @return Descriptive information of the parameter (for remote UI).
*/
virtual std::string getInfo() const = 0;
/**
* @brief Check if the value is the default
* @return true : the vakue is the default one, false otherwise.
*/
virtual bool isDefault() const = 0;
/**
* @brief Reset the value to the default value.
*/
virtual void setDefault() = 0;
};
class Ref {
public:
const Parameter* m_ref;
Ref(const Parameter* _ref) :
m_ref(_ref) {
// nothing to do ...
}
};
bool operator==(const Ref& _obj, const Parameter& _obj2) noexcept;
bool operator==(const Parameter& _obj2, const Ref& _obj) noexcept;
};
};

View File

@ -1,152 +0,0 @@
/**
* @author Edouard DUPIN
*
* @copyright 2011, Edouard DUPIN, all right reserved
*
* @license APACHE v2.0 (see license file)
*/
#pragma once
#include <ewol/parameter/Interface.h>
#include <ewol/parameter/Parameter.h>
#include <etk/math/Vector2D.h>
#include <typeinfo>
namespace ewol {
namespace parameter {
template<typename MY_TYPE, bool isEventReceiving=false> class Range : public Parameter {
private:
MY_TYPE m_value; //!< Current value.
MY_TYPE m_min; //!< Minimum value.
MY_TYPE m_max; //!< Maximum value.
MY_TYPE m_default; //!< Default value.
public:
/**
* @brief Create a parameter with a specific type.
* @param[in] _objectLink reference on the parameter lister.
* @param[in] _name Static name of the parameter.
* @param[in] _defaultValue Default value of the parameter.
* @param[in] _min Minumum value.
* @param[in] _max Maximum value.
* @param[in] _description description of the parameter.
*/
Range(ewol::parameter::Interface& _paramInterfaceLink,
const std::string& _name,
const MY_TYPE& _defaultValue,
const MY_TYPE& _min,
const MY_TYPE& _max,
const std::string& _description = "") :
Parameter(_paramInterfaceLink, _name),
m_value(_defaultValue),
m_min(_min),
m_max(_max),
m_default(_defaultValue) {
};
/**
* @brief Destructor.
*/
virtual ~Range() { };
// herited methode
virtual std::string getParameterType() const {
return "ewol::parameter::Range";
}
// herited methode
virtual std::string getType() const {
return typeid(MY_TYPE).name();
}
// herited methode
virtual std::string getString() const {
return getValueSpecific(m_value);
};
// herited methode
virtual std::string getDefault() const {
return getValueSpecific(m_default);
};
// herited methode
virtual void setString(const std::string& _newVal) {
MY_TYPE val;
// when you want to set an element in parameter you will implement the function template std::from_string
etk::from_string(val, _newVal);
set(val);
}
// herited methode
virtual std::string getInfo() const {
return getType() + " default=" + getDefault();
}
// herited methode
virtual bool isDefault() const {
return m_value == m_default;
}
// herited methode
virtual void setDefault() {
set(m_default);
}
public:
/**
* @brief Get the value of the current parameter.
* @note For performence, this function must be inline
* @return the Reference value
*/
inline MY_TYPE& get() {
return m_value;
};
const inline MY_TYPE& get() const {
return m_value;
};
/**
* @brief Set a new value for this parameter
* @param[in] newVal New value to set (set the nearest value if range is set)
*/
void set(const MY_TYPE& _newVal) {
if (m_min == m_max) {
if (_newVal != m_value) {
m_value = _newVal;
notifyChange();
}
} else {
MY_TYPE newVal = std::avg(m_min, _newVal, m_max);
if (newVal != m_value) {
m_value = newVal;
notifyChange();
}
}
}
private:
/**
* @brief Get the string of the specify value.
* @return convetion of the velue in string.
*/
std::string getValueSpecific(const MY_TYPE& _valueRequested) const {
return etk::to_string(_valueRequested);
}
public:
/**
* @brief assignement operator.
* @param[in] newVal The new value of the parameter.
*/
const Range<MY_TYPE>& operator= (const MY_TYPE& _newVal) {
set(_newVal);
return *this;
};
operator const MY_TYPE&() const {
return m_value;
}
MY_TYPE& operator *() const noexcept {
return m_value;
}
const MY_TYPE* operator->() const noexcept {
return &m_value;
}
MY_TYPE* operator->() noexcept {
return &m_value;
}
};
template<typename MY_TYPE> std::ostream& operator <<(std::ostream& _os, const ewol::parameter::Range<MY_TYPE>& _obj) {
_os << _obj.get();
return _os;
}
};
};

View File

@ -1,146 +0,0 @@
/**
* @author Edouard DUPIN
*
* @copyright 2011, Edouard DUPIN, all right reserved
*
* @license APACHE v2.0 (see license file)
*/
#pragma once
#include <ewol/parameter/Interface.h>
#include <ewol/parameter/Parameter.h>
#include <etk/math/Vector2D.h>
namespace ewol {
namespace parameter {
template<typename MY_TYPE, bool isEventReceiving=false> class Value : public Parameter {
private:
MY_TYPE m_value; //!< Current value.
MY_TYPE m_default; //!< Default value.
public:
/**
* @brief Create a parameter with a specific type.
* @param[in] _objectLink reference on the parameter lister.
* @param[in] _name Static name of the parameter.
* @param[in] _defaultValue Default value of the parameter.
* @param[in] _min Minumum value.
* @param[in] _max Maximum value.
* @param[in] _description description of the parameter.
*/
Value(ewol::parameter::Interface& _paramInterfaceLink,
const std::string& _name,
const MY_TYPE& _defaultValue,
const std::string& _description = "") :
Parameter(_paramInterfaceLink, _name),
m_value(_defaultValue),
m_default(_defaultValue) {
};
Value(ewol::parameter::Interface& _paramListLink,
const std::string& _name,
const std::string& _description = "") :
Parameter(_paramListLink, _name),
m_value(),
m_default() {
};
/**
* @brief Destructor.
*/
virtual ~Value() { };
// herited methode
virtual std::string getParameterType() const {
return "ewol::parameter::Value";
}
// herited methode
virtual std::string getType() const {
return typeid(MY_TYPE).name();
}
// herited methode
virtual std::string getString() const {
return getValueSpecific(m_value);
}
// herited methode
virtual std::string getDefault() const {
return getValueSpecific(m_default);
}
// herited methode
virtual void setString(const std::string& _newVal) {
// when you want to set an element in parameter you will implement the function template std::from_string
etk::from_string(m_value, _newVal);
// TODO : Do it better ...
notifyChange();
}
// herited methode
virtual std::string getInfo() const {
return getType() + " default=" + getDefault();
}
// herited methode
virtual bool isDefault() const {
return m_value == m_default;
}
// herited methode
virtual void setDefault() {
set(m_default);
}
public:
/**
* @brief Get the value of the current parameter.
* @note For performence, this function must be inline
* @return the Reference value
*/
inline MY_TYPE& get() {
return m_value;
};
const inline MY_TYPE& get() const {
return m_value;
};
/**
* @brief Set a new value for this parameter
* @param[in] newVal New value to set (set the nearest value if range is set)
*/
void set(const MY_TYPE& _newVal) {
if (_newVal != m_value) {
m_value = _newVal;
notifyChange();
}
}
private:
/**
* @brief Get the string of the specify value.
* @return convetion of the velue in string.
*/
std::string getValueSpecific(const MY_TYPE& _valueRequested) const {
return etk::to_string(_valueRequested);
}
public:
/**
* @brief assignement operator.
* @param[in] newVal The new value of the parameter.
*/
const Value<MY_TYPE>& operator= (const MY_TYPE& _newVal) {
set(_newVal);
return *this;
};
operator const MY_TYPE&() const {
return m_value;
}
MY_TYPE& operator *() const noexcept {
return m_value;
}
const MY_TYPE* operator->() const noexcept {
return &m_value;
}
MY_TYPE* operator->() noexcept {
return &m_value;
}
};
template<typename MY_TYPE, bool isEventReceiving=false> std::ostream& operator <<(std::ostream& _os, const ewol::parameter::Value<MY_TYPE, isEventReceiving>& _obj) {
_os << _obj.get();
return _os;
}
}
}

View File

@ -1,45 +0,0 @@
/**
* @author Edouard DUPIN
*
* @copyright 2011, Edouard DUPIN, all right reserved
*
* @license APACHE v2.0 (see license file)
*/
#include <memory>
#include <ewol/debug.h>
#include <ewol/signal/Interface.h>
#include <ewol/signal/Base.h>
#ifdef DEBUG
int32_t ewol::signal::Base::m_uidSignal = 0;
int32_t ewol::signal::Base::m_signalCallLevel = 0;
#endif
ewol::signal::Base::Base(ewol::signal::Interface& _signalInterfaceLink,
const std::string& _name,
const std::string& _description,
bool _periodic) :
m_signalInterfaceLink(_signalInterfaceLink),
m_name(_name),
m_description(_description),
m_callInProgress(0),
m_someOneRemoveInCall(false),
m_periodic(_periodic) {
// add a reference on the current signal ...
m_signalInterfaceLink.signalAdd(this);
}
std::ostream& ewol::signal::operator <<(std::ostream& _os, const ewol::signal::Base& _obj) {
_os << _obj.getName();
return _os;
}
const char* ewol::signal::logIndent(int32_t _iii) {
static const char g_val[] = " ";
if (_iii > 5) {
return g_val;
}
return g_val + (5-_iii)*4;
}

View File

@ -1,54 +0,0 @@
/**
* @author Edouard DUPIN
*
* @copyright 2011, Edouard DUPIN, all right reserved
*
* @license APACHE v2.0 (see license file)
*/
#pragma once
#include <ewol/signal/Interface.h>
namespace ewol {
namespace signal {
class Base {
protected:
#ifdef DEBUG
static int32_t m_uidSignal;
static int32_t m_signalCallLevel;
#endif
ewol::signal::Interface& m_signalInterfaceLink;
std::string m_name;
std::string m_description;
int32_t m_callInProgress;
bool m_someOneRemoveInCall;
bool m_periodic;
public:
/**
* @brief Create a parameter with a specific type.
* @param[in] _signalInterfaceLink reference on the signal list.
* @param[in] _name Static name of the parameter.
* @param[in] _description description of the parameter.
* @param[in] _periodic Customisation of the log display tag at true to down debug lebel at verbose.
*/
Base(ewol::signal::Interface& _signalInterfaceLink,
const std::string& _name,
const std::string& _description = "",
bool _periodic = false);
/**
* @brief Destructor.
*/
virtual ~Base() { };
const std::string& getName() const {
return m_name;
}
const std::string& getDescription() const {
return m_description;
}
virtual void release(std::shared_ptr<void> _obj) = 0;
};
std::ostream& operator <<(std::ostream& _os, const ewol::signal::Base& _obj);
const char* logIndent(int32_t _iii);
};
};

View File

@ -1,52 +0,0 @@
/**
* @author Edouard DUPIN
*
* @copyright 2011, Edouard DUPIN, all right reserved
*
* @license APACHE v2.0 (see license file)
*/
#include <memory>
#include <ewol/debug.h>
#include <ewol/signal/Interface.h>
#include <ewol/signal/Base.h>
ewol::signal::Interface::Interface() {
}
ewol::signal::Interface::~Interface() {
m_list.clear();
}
// note this pointer is not allocated and not free at the end of the class
void ewol::signal::Interface::signalAdd(ewol::signal::Base* _pointerOnSignal) {
if (_pointerOnSignal == nullptr) {
EWOL_ERROR("Try to link a nullptr parameters");
return;
}
m_list.push_back(_pointerOnSignal);
}
std::vector<std::string> ewol::signal::Interface::signalGetAll() const {
std::vector<std::string> out;
for (auto &it : m_list) {
if(it != nullptr) {
out.push_back(it->getName());
}
}
return out;
}
void ewol::signal::Interface::signalUnBindAll(const std::shared_ptr<void>& _object) {
if (_object == nullptr) {
EWOL_ERROR("Input ERROR nullptr pointer Object ...");
return;
}
for(auto &it : m_list) {
if (it == nullptr) {
continue;
}
it->release(_object);
}
}

View File

@ -1,48 +0,0 @@
/**
* @author Edouard DUPIN
*
* @copyright 2011, Edouard DUPIN, all right reserved
*
* @license APACHE v2.0 (see license file)
*/
#pragma once
#include <vector>
#include <map>
namespace ewol {
namespace signal {
class Base;
class Interface {
friend class ewol::signal::Base; // to register parameter in the list.
private:
std::vector<ewol::signal::Base*> m_list; //!< list of availlable Parameters
public:
/**
* @brief Constructor.
*/
Interface();
/**
* @brief Destructor.
*/
~Interface();
/**
* @brief Register a parameter class pointer in the List of parameters
* @note This class does not destroy the parameter pointer!!!
* @param[in] pointerOnParameter Pointer on the parameter that might be added.
*/
void signalAdd(ewol::signal::Base* _pointerOnParameter);
/**
* @brief Get All the signal list:
* @return vector on all the signals names
*/
std::vector<std::string> signalGetAll() const;
/**
* @brief Remove binding on all event class.
* @param[in] _sharedPtr sharedPtr to unlink (no type needed ...).
*/
void signalUnBindAll(const std::shared_ptr<void>& _sharedPtr);
};
};
};

View File

@ -1,412 +0,0 @@
/**
* @author Edouard DUPIN
*
* @copyright 2011, Edouard DUPIN, all right reserved
*
* @license APACHE v2.0 (see license file)
*/
#pragma once
#include <functional>
#include <ewol/signal/Base.h>
namespace ewol {
#undef __class__
#define __class__ "Signal<T>"
template<typename T> class Signal : public signal::Base {
private:
std::vector<std::pair<std::weak_ptr<void>,
std::function<void(const T&)>>> m_callerList; // current list of binded element
std::vector<std::pair<std::weak_ptr<void>,
std::function<void(const T&)>>> m_callerListInCallback; // temporaty list (when add one in call process)
std::vector<std::function<void(const T&)>> m_callerListDirect; // current list of binded element
std::vector<std::function<void(const T&)>> m_callerListDirectInCallback; // temporaty list (when add one in call process)
public:
/**
* @brief Create a signal with a specific type.
* @param[in] _signalInterfaceLink reference on the signal lister.
* @param[in] _name Static name of the signal.
* @param[in] _description Description of the signal.
* @param[in] _periodic Customisation of the log display tag at true to down debug lebel at verbose.
*/
Signal(ewol::signal::Interface& _signalInterfaceLink,
const std::string& _name,
const std::string& _description = "",
bool _periodic = false) :
signal::Base(_signalInterfaceLink, _name, _description, _periodic) {
};
/**
* @brief Destructor.
*/
virtual ~Signal() { };
/**
* @brief Bind a callback function to the current signal (generic methis (simplest))
* @param[in] _obj Shared pointer on the caller object
* @param[in] _func Link on the fuction that might be called (inside a class)
* @example signalXXXX.bind(shared_from_this(), &ClassName::onCallbackXXX);
*/
template<class TYPE_CLASS, class TYPE, typename... TArgs>
void bind(std::shared_ptr<TYPE_CLASS> _obj, void (TYPE::*_func)(const T&, TArgs...), TArgs... _args2) {
std::shared_ptr<TYPE> obj2 = std::dynamic_pointer_cast<TYPE>(_obj);
if (obj2 == nullptr) {
EWOL_ERROR("Can not bind signal ...");
return;
}
if (m_callInProgress == 0) {
m_callerList.push_back(std::make_pair(std::weak_ptr<void>(_obj), std::bind(_func, obj2.get(), std::placeholders::_1, std::forward<TArgs>(_args2)...)));
} else {
m_callerListInCallback.push_back(std::make_pair(std::weak_ptr<void>(_obj), std::bind(_func, obj2.get(), std::placeholders::_1, std::forward<TArgs>(_args2)...)));
}
}
/**
* @brief Advanced binding a callback function to the current signal.
* @param[in] _obj Shared pointer on the caller object
* @param[in] _func functor to call (do it yourself)
* @example signalXXXX.connect(shared_from_this(), std::bind(&ClassName::onCallbackXXX, this, std::placeholders::_1));
*/
void connect(std::shared_ptr<void> _obj, std::function<void(const T&)> _function ) {
if (m_callInProgress == 0) {
m_callerList.push_back(std::make_pair(std::weak_ptr<void>(_obj), _function));
} else {
m_callerListInCallback.push_back(std::make_pair(std::weak_ptr<void>(_obj), _function));
}
}
//! @previous
void connect(std::function<void(const T&)> _function ) {
if (m_callInProgress == 0) {
m_callerListDirect.push_back(_function);
} else {
m_callerListDirectInCallback.push_back(_function);
}
}
/**
* @brief Check if an object is registered in the Signal
* @param[in] _obj shared pointer on the object
* @return true The object is connected at this signal.
* @return false The object is NOT connected on this signal.
*/
bool isRegistered(std::shared_ptr<void> _obj) {
if (_obj == nullptr) {
return false;
}
for (auto &it : m_callerList) {
std::shared_ptr<void> obj = it.first.lock();
if (obj == _obj) {
return true;
}
}
for (auto &it : m_callerListInCallback) {
std::shared_ptr<void> obj = it.first.lock();
if (obj == _obj) {
return true;
}
}
return false;
}
/**
* @brief remove link on the signal.
* @param[in] _obj shared pointer on the removing object
*/
void release(std::shared_ptr<void> _obj) {
if (m_callInProgress == 0) {
// Remove from the list :
auto it(m_callerList.begin());
while(it != m_callerList.end()) {
if (it->first.lock() == _obj) {
it = m_callerList.erase(it);
} else {
++it;
}
}
} else {
// just remove weak poointer
auto it(m_callerList.begin());
while(it != m_callerList.end()) {
if (it->first.lock() == _obj) {
it->first.reset();
} else {
++it;
}
}
m_someOneRemoveInCall = true;
}
// remove from add list in callback progress
auto it = m_callerListInCallback.begin();
while(it != m_callerListInCallback.end()) {
if (it->first.lock() == _obj) {
it = m_callerListInCallback.erase(it);
} else {
++it;
}
}
}
/**
* @brief Generate a signal on all interface listening.
* @param[in] _data data to emit
*/
void emit(const T& _data) {
#ifdef DEBUG
m_signalCallLevel++;
int32_t tmpID = m_uidSignal++;
#endif
m_callInProgress++;
if (m_periodic == true) {
EWOL_VERBOSE(ewol::signal::logIndent(m_signalCallLevel-1) << "emit signal{" << tmpID << "} : signal='" << m_name << "' data='" << etk::to_string(_data) << "' to: " << m_callerList.size() << " element(s)");
} else {
EWOL_DEBUG(ewol::signal::logIndent(m_signalCallLevel-1) << "emit signal{" << tmpID << "} : signal='" << m_name << "' data='" << etk::to_string(_data) << "' to: " << m_callerList.size() << " element(s)");
}
{
auto it(m_callerList.begin());
while (it != m_callerList.end()) {
std::shared_ptr<void> destObject = it->first.lock();
if (destObject == nullptr) {
it = m_callerList.erase(it);
EWOL_DEBUG(ewol::signal::logIndent(m_signalCallLevel-1) << " nullptr dest");
continue;
}
if (m_periodic == true) {
EWOL_VERBOSE(ewol::signal::logIndent(m_signalCallLevel-1) << " signal{" << tmpID << "} :");// [" << destObject->getId() << "]" << destObject->getObjectType());
} else {
EWOL_DEBUG(ewol::signal::logIndent(m_signalCallLevel-1) << " signal{" << tmpID << "} :");// [" << destObject->getId() << "]" << destObject->getObjectType());
}
it->second(_data);
++it;
}
}
{
auto it(m_callerListDirect.begin());
while (it != m_callerListDirect.end()) {
if (m_periodic == true) {
EWOL_VERBOSE(ewol::signal::logIndent(m_signalCallLevel-1) << "X signal{" << tmpID << "} :");// [" << destObject->getId() << "]" << destObject->getObjectType());
} else {
EWOL_DEBUG(ewol::signal::logIndent(m_signalCallLevel-1) << "X signal{" << tmpID << "} :");// [" << destObject->getId() << "]" << destObject->getObjectType());
}
(*it)(_data);
++it;
}
}
m_callInProgress--;
#ifdef DEBUG
m_signalCallLevel--;
#endif
// Remove element in call phase:
if (m_someOneRemoveInCall == true) {
m_someOneRemoveInCall = false;
// Remove from the list :
auto it(m_callerList.begin());
while(it != m_callerList.end()) {
if (it->first.expired() == true) {
it = m_callerList.erase(it);
} else {
++it;
}
}
}
// add element in call phase:
if (m_callerListInCallback.size() > 0) {
for (auto &it : m_callerListInCallback) {
m_callerList.push_back(it);
}
m_callerListInCallback.clear();
}
if (m_callerListDirectInCallback.size() > 0) {
for (auto &it : m_callerListDirectInCallback) {
m_callerListDirect.push_back(it);
}
m_callerListDirectInCallback.clear();
}
}
size_t getNumberConnected() {
return m_callerList.size() + m_callerListDirect.size();
}
};
#undef __class__
#define __class__ "Signal<void>"
template<> class Signal<void> : public signal::Base {
private:
std::vector<std::pair<std::weak_ptr<void>, std::function<void()>>> m_callerList;
std::vector<std::pair<std::weak_ptr<void>, std::function<void()>>> m_callerListInCallback;
std::vector<std::function<void()>> m_callerListDirect;
std::vector<std::function<void()>> m_callerListDirectInCallback;
public:
/**
* @brief Create a signal with a specific 'void' type.
* @param[in] _signalInterfaceLink reference on the signal lister.
* @param[in] _name Static name of the signal.
* @param[in] _description Description of the signal.
* @param[in] _periodic Customisation of the log display tag at true to down debug lebel at verbose.
*/
Signal(ewol::signal::Interface& _signalInterfaceLink,
const std::string& _name,
const std::string& _description = "",
bool _periodic = false) :
signal::Base(_signalInterfaceLink, _name, _description, _periodic) {
};
/**
* @brief Destructor.
*/
virtual ~Signal() { };
/**
* @brief Bind a callback function to the current signal (generic methis (simplest))
* @param[in] _obj Shared pointer on the caller object
* @param[in] _func Link on the fuction that might be called (inside a class)
* @example signalXXXX.connect(shared_from_this(), &ClassName::onCallbackXXX);
*/
template<class TYPE_CLASS, class TYPE, typename... TArgs>
void bind(std::shared_ptr<TYPE_CLASS> _obj, void (TYPE::*_func)(TArgs...), TArgs... args2) {
std::shared_ptr<TYPE> obj2 = std::dynamic_pointer_cast<TYPE>(_obj);
if (obj2 == nullptr) {
EWOL_ERROR("Can not bind signal ...");
return;
}
if (m_callInProgress == 0) {
m_callerList.push_back(std::make_pair(std::weak_ptr<void>(_obj), std::bind(_func, obj2.get(), std::forward<TArgs>(args2)...)));
} else {
m_callerListInCallback.push_back(std::make_pair(std::weak_ptr<void>(_obj), std::bind(_func, obj2.get(), std::forward<TArgs>(args2)...)));
}
}
/**
* @brief Advanced binding a callback function to the current signal.
* @param[in] _obj Shared pointer on the caller object
* @param[in] _func functor to call (do it yourself)
* @example signalXXXX.connect(shared_from_this(), std::bind(&ClassName::onCallbackXXX, this, std::placeholders::_1));
*/
void connect(std::shared_ptr<void> _obj, std::function<void()> _function ) {
if (m_callInProgress == 0) {
m_callerList.push_back(std::make_pair(std::weak_ptr<void>(_obj), _function));
} else {
m_callerListInCallback.push_back(std::make_pair(std::weak_ptr<void>(_obj), _function));
}
}
//! @previous
void connect(std::function<void()> _function ) {
if (m_callInProgress == 0) {
m_callerListDirect.push_back(_function);
} else {
m_callerListDirectInCallback.push_back(_function);
}
}
/**
* @brief remove link on the signal.
* @param[in] _obj shared pointer on the removing object
*/
void release(std::shared_ptr<void> _obj) {
auto it(m_callerList.begin());
if (m_callInProgress == 0) {
// Remove from the list :
while(it != m_callerList.end()) {
if (it->first.lock() == _obj) {
//EWOL_DEBUG(" unbind : " << _obj->getObjectType() << " signal='" << m_name << "'");
it = m_callerList.erase(it);
} else {
++it;
}
}
} else {
// just remove weak poointer
while(it != m_callerList.end()) {
if (it->first.lock() == _obj) {
//EWOL_DEBUG(" unbind : " << _obj->getObjectType() << " signal='" << m_name << "' (delayed)");
it->first.reset();
} else {
++it;
}
}
m_someOneRemoveInCall = true;
}
// remove from add list in callback progress
it = m_callerListInCallback.begin();
while(it != m_callerListInCallback.end()) {
if (it->first.lock() == _obj) {
//EWOL_DEBUG(" unbind : " << _obj->getObjectType() << " signal='" << m_name << "' (notActive)");
it = m_callerListInCallback.erase(it);
} else {
++it;
}
}
}
void emit() {
#ifdef DEBUG
m_signalCallLevel++;
int32_t tmpID = m_uidSignal++;
#endif
m_callInProgress++;
if (m_periodic == true) {
EWOL_VERBOSE(ewol::signal::logIndent(m_signalCallLevel-1) << "emit signal{" << tmpID << "} : signal='" << m_name << "' to: " << m_callerList.size() << " element(s)");
} else {
EWOL_DEBUG(ewol::signal::logIndent(m_signalCallLevel-1) << "emit signal{" << tmpID << "} : signal='" << m_name << "' to: " << m_callerList.size() << " element(s)");
}
{
auto it(m_callerList.begin());
while (it != m_callerList.end()) {
std::shared_ptr<void> destObject = it->first.lock();
if (destObject == nullptr) {
it = m_callerList.erase(it);
EWOL_DEBUG(ewol::signal::logIndent(m_signalCallLevel-1) << " nullptr dest");
continue;
}
if (m_periodic == true) {
EWOL_VERBOSE(ewol::signal::logIndent(m_signalCallLevel-1) << " signal{" << tmpID << "} :");// [" << destObject->getId() << "]" << destObject->getObjectType());
} else {
EWOL_DEBUG(ewol::signal::logIndent(m_signalCallLevel-1) << " signal{" << tmpID << "} :");// [" << destObject->getId() << "]" << destObject->getObjectType());
}
it->second();
++it;
}
}
{
auto it(m_callerListDirect.begin());
while (it != m_callerListDirect.end()) {
if (m_periodic == true) {
EWOL_VERBOSE(ewol::signal::logIndent(m_signalCallLevel-1) << " signal{" << tmpID << "} :");// [" << destObject->getId() << "]" << destObject->getObjectType());
} else {
EWOL_DEBUG(ewol::signal::logIndent(m_signalCallLevel-1) << " signal{" << tmpID << "} :");// [" << destObject->getId() << "]" << destObject->getObjectType());
}
(*it)();
++it;
}
}
m_callInProgress--;
#ifdef DEBUG
m_signalCallLevel--;
#endif
// Remove element in call phase:
if (m_someOneRemoveInCall == true) {
m_someOneRemoveInCall = false;
// Remove from the list :
auto it(m_callerList.begin());
while(it != m_callerList.end()) {
if (it->first.expired() == true) {
it = m_callerList.erase(it);
} else {
++it;
}
}
}
// add element in call phase:
if (m_callerListInCallback.size() > 0) {
for (auto &it : m_callerListInCallback) {
if (it.first.expired() == false) {
m_callerList.push_back(it);
}
}
m_callerListInCallback.clear();
}
if (m_callerListDirectInCallback.size() > 0) {
for (auto &it : m_callerListDirectInCallback) {
m_callerListDirect.push_back(it);
}
m_callerListDirectInCallback.clear();
}
}
size_t getNumberConnected() {
return m_callerList.size() + m_callerListDirect.size();;
}
};
#undef __class__
#define __class__ nullptr
}

View File

@ -209,8 +209,8 @@ void ewol::widget::Button::periodicCall(const ewol::event::Time& _event) {
markToRedraw(); markToRedraw();
} }
void ewol::widget::Button::onParameterChangeValue(const ewol::parameter::Ref& _paramPointer) { void ewol::widget::Button::onPropertyChangeValue(const eproperty::Ref& _paramPointer) {
ewol::widget::Container2::onParameterChangeValue(_paramPointer); ewol::widget::Container2::onPropertyChangeValue(_paramPointer);
if (_paramPointer == m_shaper) { if (_paramPointer == m_shaper) {
markToRedraw(); markToRedraw();
} else if (_paramPointer == m_value) { } else if (_paramPointer == m_value) {

View File

@ -14,7 +14,7 @@
#include <ewol/compositing/Shaper.h> #include <ewol/compositing/Shaper.h>
#include <ewol/widget/Container2.h> #include <ewol/widget/Container2.h>
#include <ewol/widget/Manager.h> #include <ewol/widget/Manager.h>
#include <ewol/signal/Signal.h> #include <esignal/Signal.h>
@ -27,12 +27,12 @@ namespace ewol {
class Button : public ewol::widget::Container2 { class Button : public ewol::widget::Container2 {
public: public:
// Event list of properties // Event list of properties
ewol::Signal<void> signalPressed; esignal::Signal<void> signalPressed;
ewol::Signal<void> signalDown; esignal::Signal<void> signalDown;
ewol::Signal<void> signalUp; esignal::Signal<void> signalUp;
ewol::Signal<void> signalEnter; esignal::Signal<void> signalEnter;
ewol::Signal<void> signalLeave; esignal::Signal<void> signalLeave;
ewol::Signal<bool> signalValue; esignal::Signal<bool> signalValue;
enum buttonLock{ enum buttonLock{
lockNone, //!< normal status of the button lockNone, //!< normal status of the button
lockWhenPressed, //!< When the state is set in pressed, the status stay in this one lockWhenPressed, //!< When the state is set in pressed, the status stay in this one
@ -40,7 +40,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::parameter::Value<ewol::compositing::Shaper> m_shaper; //!< Compositing theme. eproperty::Value<ewol::compositing::Shaper> m_shaper; //!< Compositing theme.
protected: protected:
/** /**
* @brief Constructor * @brief Constructor
@ -62,7 +62,7 @@ namespace ewol {
m_shaper.setString(_shaperName); m_shaper.setString(_shaperName);
} }
protected: protected:
ewol::parameter::Value<bool> m_value; //!< Current state of the button. eproperty::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)
@ -81,7 +81,7 @@ namespace ewol {
return m_value; return m_value;
}; };
protected: protected:
ewol::parameter::List<enum buttonLock> m_lock; //!< Current lock state of the button. eproperty::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.
@ -98,7 +98,7 @@ namespace ewol {
return m_lock; return m_lock;
}; };
protected: protected:
ewol::parameter::Value<bool> m_toggleMode; //!< The button is able to toggle. eproperty::Value<bool> m_toggleMode; //!< The button is able to toggle.
public: public:
/** /**
* @brief change the toggle mode. * @brief change the toggle mode.
@ -115,7 +115,7 @@ namespace ewol {
return m_toggleMode; return m_toggleMode;
}; };
protected: protected:
ewol::parameter::Value<bool> m_enableSingle; //!< When a single subwidget is set display all time it. eproperty::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.
@ -149,7 +149,7 @@ namespace ewol {
void CheckStatus(); void CheckStatus();
protected: // Derived function protected: // Derived function
virtual void onDraw(); virtual void onDraw();
virtual void onParameterChangeValue(const ewol::parameter::Ref& _paramPointer); virtual void onPropertyChangeValue(const eproperty::Ref& _paramPointer);
public: // Derived function public: // Derived function
virtual void calculateMinMaxSize(); virtual void calculateMinMaxSize();
virtual void onChangeSize(); virtual void onChangeSize();

View File

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

View File

@ -15,14 +15,14 @@
#include <ewol/compositing/Shaper.h> #include <ewol/compositing/Shaper.h>
#include <ewol/widget/Widget.h> #include <ewol/widget/Widget.h>
#include <ewol/widget/Manager.h> #include <ewol/widget/Manager.h>
#include <ewol/signal/Signal.h> #include <esignal/Signal.h>
namespace ewol { namespace ewol {
namespace widget { namespace widget {
class ButtonColor : public ewol::Widget { class ButtonColor : public ewol::Widget {
public: public:
// Event list of properties // Event list of properties
ewol::Signal<etk::Color<>> signalChange; esignal::Signal<etk::Color<>> signalChange;
private: private:
ewol::compositing::Shaper m_shaper; //!< Compositing theme. ewol::compositing::Shaper m_shaper; //!< Compositing theme.
ewol::compositing::Text m_text; //!< Compositing Test display. ewol::compositing::Text m_text; //!< Compositing Test display.
@ -52,7 +52,7 @@ namespace ewol {
*/ */
void setShaperName(std::string _shaperName); void setShaperName(std::string _shaperName);
protected: protected:
ewol::parameter::Value<etk::Color<>> m_textColorFg; //!< Current color. eproperty::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
@ -74,7 +74,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::parameter::Ref& _paramPointer); virtual void onPropertyChangeValue(const eproperty::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

@ -200,8 +200,8 @@ void ewol::widget::CheckBox::periodicCall(const ewol::event::Time& _event) {
markToRedraw(); markToRedraw();
} }
void ewol::widget::CheckBox::onParameterChangeValue(const ewol::parameter::Ref& _paramPointer) { void ewol::widget::CheckBox::onPropertyChangeValue(const eproperty::Ref& _paramPointer) {
ewol::widget::Container2::onParameterChangeValue(_paramPointer); ewol::widget::Container2::onPropertyChangeValue(_paramPointer);
if (_paramPointer == m_shaper) { if (_paramPointer == m_shaper) {
markToRedraw(); markToRedraw();
} else if (_paramPointer == m_value) { } else if (_paramPointer == m_value) {

View File

@ -12,7 +12,7 @@
#include <ewol/compositing/Shaper.h> #include <ewol/compositing/Shaper.h>
#include <ewol/widget/Container2.h> #include <ewol/widget/Container2.h>
#include <ewol/widget/Manager.h> #include <ewol/widget/Manager.h>
#include <ewol/signal/Signal.h> #include <esignal/Signal.h>
namespace ewol { namespace ewol {
@ -20,13 +20,13 @@ namespace ewol {
class CheckBox : public ewol::widget::Container2 { class CheckBox : public ewol::widget::Container2 {
public: public:
// Event list of properties // Event list of properties
ewol::Signal<void> signalPressed; esignal::Signal<void> signalPressed;
ewol::Signal<void> signalDown; esignal::Signal<void> signalDown;
ewol::Signal<void> signalUp; esignal::Signal<void> signalUp;
ewol::Signal<void> signalEnter; esignal::Signal<void> signalEnter;
ewol::Signal<bool> signalValue; esignal::Signal<bool> signalValue;
private: private:
ewol::parameter::Value<ewol::compositing::Shaper> m_shaper; //!< Compositing theme. eproperty::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 :
@ -56,7 +56,7 @@ namespace ewol {
m_shaper.set(_shaperName); m_shaper.set(_shaperName);
} }
protected: protected:
ewol::parameter::Value<bool> m_value; //!< Current state of the checkbox. eproperty::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)
@ -85,7 +85,7 @@ namespace ewol {
void CheckStatus(); void CheckStatus();
protected: // Derived function protected: // Derived function
virtual void onDraw(); virtual void onDraw();
virtual void onParameterChangeValue(const ewol::parameter::Ref& _paramPointer); virtual void onPropertyChangeValue(const eproperty::Ref& _paramPointer);
public: // Derived function public: // Derived function
virtual void calculateMinMaxSize(); virtual void calculateMinMaxSize();
virtual void onChangeSize(); virtual void onChangeSize();

View File

@ -12,7 +12,7 @@
#include <etk/Color.h> #include <etk/Color.h>
#include <ewol/widget/Widget.h> #include <ewol/widget/Widget.h>
#include <ewol/compositing/Drawing.h> #include <ewol/compositing/Drawing.h>
#include <ewol/signal/Signal.h> #include <esignal/Signal.h>
namespace ewol { namespace ewol {
@ -20,7 +20,7 @@ namespace ewol {
class ColorBar : public ewol::Widget { class ColorBar : public ewol::Widget {
public: public:
// Event list of properties // Event list of properties
ewol::Signal<etk::Color<>> signalChange; esignal::Signal<etk::Color<>> signalChange;
protected: protected:
ColorBar(); ColorBar();
void init(); void init();

View File

@ -231,8 +231,8 @@ void ewol::widget::ContextMenu::setShaperName(const std::string& _shaperName) {
m_shaper.set(_shaperName); m_shaper.set(_shaperName);
} }
void ewol::widget::ContextMenu::onParameterChangeValue(const ewol::parameter::Ref& _paramPointer) { void ewol::widget::ContextMenu::onPropertyChangeValue(const eproperty::Ref& _paramPointer) {
ewol::widget::Container::onParameterChangeValue(_paramPointer); ewol::widget::Container::onPropertyChangeValue(_paramPointer);
if (_paramPointer == m_shaper) { if (_paramPointer == m_shaper) {
markToRedraw(); markToRedraw();
} else if (_paramPointer == m_arrowPos) { } else if (_paramPointer == m_arrowPos) {

View File

@ -36,7 +36,7 @@ namespace ewol {
DECLARE_WIDGET_FACTORY(ContextMenu, "ContextMenu"); DECLARE_WIDGET_FACTORY(ContextMenu, "ContextMenu");
virtual ~ContextMenu(); virtual ~ContextMenu();
private: private:
ewol::parameter::Value<ewol::compositing::Shaper> m_shaper; //!< Compositing theme. eproperty::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)
@ -50,14 +50,14 @@ namespace ewol {
etk::Color<> m_colorBorder; etk::Color<> m_colorBorder;
float m_offset; float m_offset;
private: private:
ewol::parameter::Value<vec2> m_arrowPos; eproperty::Value<vec2> m_arrowPos;
ewol::parameter::List<enum markPosition> m_arrawBorder; eproperty::List<enum markPosition> m_arrawBorder;
public: public:
void setPositionMarkAuto(const vec2& _origin, const vec2& _size); void setPositionMarkAuto(const vec2& _origin, const vec2& _size);
void setPositionMark(enum markPosition _position, const vec2& _arrowPos); void setPositionMark(enum markPosition _position, const vec2& _arrowPos);
protected: // Derived function protected: // Derived function
virtual void onDraw(); virtual void onDraw();
virtual void onParameterChangeValue(const ewol::parameter::Ref& _paramPointer); virtual void onPropertyChangeValue(const eproperty::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,8 +559,8 @@ void ewol::widget::Entry::periodicCall(const ewol::event::Time& _event) {
markToRedraw(); markToRedraw();
} }
void ewol::widget::Entry::onParameterChangeValue(const ewol::parameter::Ref& _paramPointer) { void ewol::widget::Entry::onPropertyChangeValue(const eproperty::Ref& _paramPointer) {
ewol::Widget::onParameterChangeValue(_paramPointer); ewol::Widget::onPropertyChangeValue(_paramPointer);
if (_paramPointer == m_shaper) { if (_paramPointer == m_shaper) {
m_colorIdTextFg = m_shaper->requestColor("text-foreground"); m_colorIdTextFg = m_shaper->requestColor("text-foreground");
m_colorIdTextBg = m_shaper->requestColor("text-background"); m_colorIdTextBg = m_shaper->requestColor("text-background");

View File

@ -16,7 +16,7 @@
#include <ewol/widget/Widget.h> #include <ewol/widget/Widget.h>
#include <etk/Color.h> #include <etk/Color.h>
#include <ewol/widget/Manager.h> #include <ewol/widget/Manager.h>
#include <ewol/signal/Signal.h> #include <esignal/Signal.h>
namespace ewol { namespace ewol {
namespace widget { namespace widget {
@ -32,11 +32,11 @@ namespace ewol {
*/ */
class Entry : public ewol::Widget { class Entry : public ewol::Widget {
public: public:
ewol::Signal<void> signalClick; //!< bang on click the entry box esignal::Signal<void> signalClick; //!< bang on click the entry box
ewol::Signal<std::string> signalEnter; //!< Enter key is pressed esignal::Signal<std::string> signalEnter; //!< Enter key is pressed
ewol::Signal<std::string> signalModify; //!< data change esignal::Signal<std::string> signalModify; //!< data change
private: private:
ewol::parameter::Value<ewol::compositing::Shaper> m_shaper; eproperty::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
@ -57,7 +57,7 @@ namespace ewol {
*/ */
virtual ~Entry(); virtual ~Entry();
private: private:
ewol::parameter::Value<std::string> m_data; //!< sting that must be displayed eproperty::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
@ -78,7 +78,7 @@ namespace ewol {
return m_data; return m_data;
}; };
private: private:
ewol::parameter::Range<int32_t> m_maxCharacter; //!< number max of xharacter in the list eproperty::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
@ -95,7 +95,7 @@ namespace ewol {
return m_maxCharacter; return m_maxCharacter;
}; };
private: private:
ewol::parameter::Value<std::string> m_regexValue; //!< regular expression value eproperty::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:
/** /**
@ -146,7 +146,7 @@ namespace ewol {
*/ */
virtual void removeSelected(); virtual void removeSelected();
private: private:
ewol::parameter::Value<std::string> m_textWhenNothing; //!< Text to display when nothing in in the entry (decorated text...) eproperty::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.
@ -174,7 +174,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::parameter::Ref& _paramPointer); virtual void onPropertyChangeValue(const eproperty::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

@ -194,8 +194,8 @@ bool ewol::widget::Image::loadXML(const std::shared_ptr<const exml::Element>& _n
return true; return true;
} }
void ewol::widget::Image::onParameterChangeValue(const ewol::parameter::Ref& _paramPointer) { void ewol::widget::Image::onPropertyChangeValue(const eproperty::Ref& _paramPointer) {
ewol::Widget::onParameterChangeValue(_paramPointer); ewol::Widget::onPropertyChangeValue(_paramPointer);
if ( _paramPointer == m_fileName if ( _paramPointer == m_fileName
|| _paramPointer == m_imageSize) { || _paramPointer == m_imageSize) {
markToRedraw(); markToRedraw();

View File

@ -13,7 +13,7 @@
#include <ewol/compositing/Image.h> #include <ewol/compositing/Image.h>
#include <ewol/resource/ColorFile.h> #include <ewol/resource/ColorFile.h>
#include <ewol/widget/Manager.h> #include <ewol/widget/Manager.h>
#include <ewol/signal/Signal.h> #include <esignal/Signal.h>
namespace ewol { namespace ewol {
namespace widget { namespace widget {
@ -23,7 +23,7 @@ namespace ewol {
class Image :public ewol::Widget { class Image :public ewol::Widget {
public: public:
// Event list of properties // Event list of properties
ewol::Signal<void> signalPressed; esignal::Signal<void> signalPressed;
protected: protected:
ewol::compositing::Image m_compositing; //!< compositing element of the image. ewol::compositing::Image m_compositing; //!< compositing element of the image.
std::shared_ptr<ewol::resource::ColorFile> m_colorProperty; //!< theme color property std::shared_ptr<ewol::resource::ColorFile> m_colorProperty; //!< theme color property
@ -48,7 +48,7 @@ namespace ewol {
*/ */
void set(const std::string& _file, const gale::Dimension& _border); void set(const std::string& _file, const gale::Dimension& _border);
protected: protected:
ewol::parameter::Value<std::string> m_fileName; //!< file name of the image. eproperty::Value<std::string> m_fileName; //!< file name of the image.
public: public:
/** /**
* @brief set the new filename * @brief set the new filename
@ -65,7 +65,7 @@ namespace ewol {
return m_fileName; return m_fileName;
}; };
protected: protected:
ewol::parameter::Value<gale::Dimension> m_border; //!< border to add at the image. eproperty::Value<gale::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
@ -80,7 +80,7 @@ namespace ewol {
return m_border; return m_border;
}; };
protected: protected:
ewol::parameter::Value<gale::Dimension> m_imageSize; //!< border to add at the image. eproperty::Value<gale::Dimension> m_imageSize; //!< border to add at the image.
vec2 m_imageRenderSize; //!< size of the image when we render it vec2 m_imageRenderSize; //!< size of the image when we render it
public: public:
/** /**
@ -96,7 +96,7 @@ namespace ewol {
return m_imageSize; return m_imageSize;
}; };
protected: protected:
ewol::parameter::Value<bool> m_keepRatio; //!< keep the image ratio between width and hight eproperty::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.
@ -111,7 +111,7 @@ namespace ewol {
return m_keepRatio; return m_keepRatio;
}; };
protected: protected:
ewol::parameter::Range<vec2> m_posStart; //!< position in the image to start the sisplay (when we want not to display all the image) eproperty::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.
@ -126,7 +126,7 @@ namespace ewol {
return m_posStart; return m_posStart;
}; };
protected: protected:
ewol::parameter::Range<vec2> m_posStop; //!< position in the image to start the sisplay (when we want not to display all the image) eproperty::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.
@ -141,7 +141,7 @@ namespace ewol {
return m_posStop; return m_posStop;
}; };
protected: protected:
ewol::parameter::Value<bool> m_distanceFieldMode; //!< to have a parameter eproperty::Value<bool> m_distanceFieldMode; //!< to have a parameter
public: public:
/** /**
* @brief Set distance field rendering mode * @brief Set distance field rendering mode
@ -158,7 +158,7 @@ namespace ewol {
return m_compositing.getDistanceFieldMode(); return m_compositing.getDistanceFieldMode();
} }
protected: protected:
ewol::parameter::Value<bool> m_smooth; //!< display is done in the pixed approximation if false eproperty::Value<bool> m_smooth; //!< display is done in the pixed approximation if false
public: public:
/** /**
* @brief Set smooth rendering mode * @brief Set smooth rendering mode
@ -176,7 +176,7 @@ namespace ewol {
} }
protected: // Derived function protected: // Derived function
virtual void onDraw(); virtual void onDraw();
virtual void onParameterChangeValue(const ewol::parameter::Ref& _paramPointer); virtual void onPropertyChangeValue(const eproperty::Ref& _paramPointer);
public: // Derived function public: // Derived function
virtual void calculateMinMaxSize(); virtual void calculateMinMaxSize();
virtual void onRegenerateDisplay(); virtual void onRegenerateDisplay();

View File

@ -11,7 +11,7 @@
#include <etk/Color.h> #include <etk/Color.h>
#include <ewol/debug.h> #include <ewol/debug.h>
#include <ewol/widget/Widget.h> #include <ewol/widget/Widget.h>
#include <ewol/signal/Signal.h> #include <esignal/Signal.h>
namespace ewol { namespace ewol {
@ -22,9 +22,9 @@ namespace ewol {
class Joystick :public ewol::Widget { class Joystick :public ewol::Widget {
public: public:
// Event list of properties // Event list of properties
ewol::Signal<void> signalEnable; esignal::Signal<void> signalEnable;
ewol::Signal<void> signalDisable; esignal::Signal<void> signalDisable;
ewol::Signal<vec2> signalMove; esignal::Signal<vec2> signalMove;
public: public:
enum joystickMode { enum joystickMode {
modeNormal, modeNormal,

View File

@ -142,8 +142,8 @@ bool ewol::widget::Label::loadXML(const std::shared_ptr<const exml::Element>& _n
return true; return true;
} }
void ewol::widget::Label::onParameterChangeValue(const ewol::parameter::Ref& _paramPointer) { void ewol::widget::Label::onPropertyChangeValue(const eproperty::Ref& _paramPointer) {
ewol::Widget::onParameterChangeValue(_paramPointer); ewol::Widget::onPropertyChangeValue(_paramPointer);
if (_paramPointer == m_label) { if (_paramPointer == m_label) {
markToRedraw(); markToRedraw();
requestUpdateSize(); requestUpdateSize();

View File

@ -13,7 +13,7 @@
#include <ewol/widget/Widget.h> #include <ewol/widget/Widget.h>
#include <ewol/widget/Manager.h> #include <ewol/widget/Manager.h>
#include <ewol/resource/ColorFile.h> #include <ewol/resource/ColorFile.h>
#include <ewol/signal/Signal.h> #include <esignal/Signal.h>
namespace ewol { namespace ewol {
namespace widget { namespace widget {
@ -23,10 +23,10 @@ namespace ewol {
class Label : public ewol::Widget { class Label : public ewol::Widget {
public: public:
// Event list of properties // Event list of properties
ewol::Signal<void> signalPressed; esignal::Signal<void> signalPressed;
private: private:
ewol::compositing::Text m_text; //!< Compositing text element. ewol::compositing::Text m_text; //!< Compositing text element.
ewol::parameter::Value<std::u32string> m_label; //!< decorated text to display. eproperty::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
@ -67,7 +67,7 @@ namespace ewol {
}; };
protected: // Derived function protected: // Derived function
virtual void onDraw(); virtual void onDraw();
virtual void onParameterChangeValue(const ewol::parameter::Ref& _paramPointer); virtual void onPropertyChangeValue(const eproperty::Ref& _paramPointer);
public: // Derived function public: // Derived function
virtual void calculateMinMaxSize(); virtual void calculateMinMaxSize();
virtual void onRegenerateDisplay(); virtual void onRegenerateDisplay();

View File

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

View File

@ -10,7 +10,7 @@
#include <ewol/widget/List.h> #include <ewol/widget/List.h>
#include <etk/os/FSNode.h> #include <etk/os/FSNode.h>
#include <ewol/resource/ColorFile.h> #include <ewol/resource/ColorFile.h>
#include <ewol/signal/Signal.h> #include <esignal/Signal.h>
namespace ewol { namespace ewol {
namespace widget { namespace widget {
@ -20,10 +20,10 @@ namespace ewol {
class ListFileSystem : public ewol::widget::List { class ListFileSystem : public ewol::widget::List {
public: public:
// Event list of properties // Event list of properties
ewol::Signal<std::string> signalFileSelect; //!< @event "file-select" Generated when a file is selected. esignal::Signal<std::string> signalFileSelect; //!< @event "file-select" Generated when a file is selected.
ewol::Signal<std::string> signalFileValidate; //!< @event "file-validate" Generate when the user validate (return) or double click on the element esignal::Signal<std::string> signalFileValidate; //!< @event "file-validate" Generate when the user validate (return) or double click on the element
ewol::Signal<std::string> signalFolderSelect; esignal::Signal<std::string> signalFolderSelect;
ewol::Signal<std::string> signalFolderValidate; esignal::Signal<std::string> signalFolderValidate;
protected: protected:
ListFileSystem(); ListFileSystem();
void init(); void init();
@ -67,8 +67,8 @@ namespace ewol {
*/ */
std::string getSelect() const ; std::string getSelect() const ;
protected: protected:
ewol::parameter::Value<std::string> m_folder; //!< Current folder that display point on. eproperty::Value<std::string> m_folder; //!< Current folder that display point on.
ewol::parameter::Value<std::string, true> m_selectFile; //!< current selected file eproperty::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 !!!)
@ -85,7 +85,7 @@ namespace ewol {
return m_folder; return m_folder;
}; };
protected: protected:
ewol::parameter::Value<bool> m_showFile; //!< Show files elements eproperty::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.
@ -102,7 +102,7 @@ namespace ewol {
return m_showFile; return m_showFile;
}; };
protected: protected:
ewol::parameter::Value<bool> m_showFolder; //!< Display the folders elements eproperty::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.
@ -119,7 +119,7 @@ namespace ewol {
return m_showFile; return m_showFile;
}; };
protected: protected:
ewol::parameter::Value<bool> m_showHidden; //!< Display hidden elements eproperty::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.
@ -136,7 +136,7 @@ namespace ewol {
return m_showFile; return m_showFile;
}; };
protected: protected:
ewol::parameter::Value<bool> m_showTemporaryFile; //!< show the temporary files elements (XXX~, XXX.bck, XXX.pyc ...) eproperty::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.
@ -153,7 +153,7 @@ namespace ewol {
return m_showFile; return m_showFile;
}; };
public: // glocal derived functions public: // glocal derived functions
virtual void onParameterChangeValue(const ewol::parameter::Ref& _paramPointer); virtual void onPropertyChangeValue(const eproperty::Ref& _paramPointer);
}; };
}; };
}; };

View File

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

View File

@ -136,8 +136,8 @@ 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::parameter::Ref& _paramPointer) { void ewol::widget::PopUp::onPropertyChangeValue(const eproperty::Ref& _paramPointer) {
ewol::widget::Container::onParameterChangeValue(_paramPointer); ewol::widget::Container::onPropertyChangeValue(_paramPointer);
if (_paramPointer == m_shaper) { if (_paramPointer == m_shaper) {
markToRedraw(); markToRedraw();
requestUpdateSize(); requestUpdateSize();

View File

@ -22,7 +22,7 @@ namespace ewol {
*/ */
class PopUp : public ewol::widget::Container { class PopUp : public ewol::widget::Container {
protected: protected:
ewol::parameter::Value<ewol::compositing::Shaper> m_shaper; //!< Compositing theme. eproperty::Value<ewol::compositing::Shaper> m_shaper; //!< Compositing theme.
protected: protected:
/** /**
* @brief Constructor * @brief Constructor
@ -42,7 +42,7 @@ namespace ewol {
*/ */
void setShaperName(const std::string& _shaperName); void setShaperName(const std::string& _shaperName);
protected: protected:
ewol::parameter::Value<bvec2> m_lockExpand; //!< Lock the expend of the sub widget to this one == > this permit to limit bigger subWidget eproperty::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)
@ -52,7 +52,7 @@ namespace ewol {
m_lockExpand.set(_lockExpand); m_lockExpand.set(_lockExpand);
} }
private: private:
ewol::parameter::Value<bool> m_closeOutEvent; //!< ratio progression of a sliding eproperty::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
@ -70,7 +70,7 @@ namespace ewol {
}; };
protected: // Derived function protected: // Derived function
virtual void onDraw(); virtual void onDraw();
virtual void onParameterChangeValue(const ewol::parameter::Ref& _paramPointer); virtual void onPropertyChangeValue(const eproperty::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,8 +73,8 @@ void ewol::widget::ProgressBar::onRegenerateDisplay() {
} }
} }
void ewol::widget::ProgressBar::onParameterChangeValue(const ewol::parameter::Ref& _paramPointer) { void ewol::widget::ProgressBar::onPropertyChangeValue(const eproperty::Ref& _paramPointer) {
ewol::Widget::onParameterChangeValue(_paramPointer); ewol::Widget::onPropertyChangeValue(_paramPointer);
if (_paramPointer == m_value) { if (_paramPointer == m_value) {
markToRedraw(); markToRedraw();
} else if (_paramPointer == m_textColorFg) { } else if (_paramPointer == m_textColorFg) {

View File

@ -36,13 +36,13 @@ namespace ewol {
m_textColorFg = _newColor; m_textColorFg = _newColor;
}; };
private: private:
ewol::parameter::Value<float> m_value; //!< % used eproperty::Value<float> m_value; //!< % used
ewol::parameter::Value<etk::Color<>> m_textColorFg; //!< forder bar color eproperty::Value<etk::Color<>> m_textColorFg; //!< forder bar color
ewol::parameter::Value<etk::Color<>> m_textColorBgOn; //!< bar color enable eproperty::Value<etk::Color<>> m_textColorBgOn; //!< bar color enable
ewol::parameter::Value<etk::Color<>> m_textColorBgOff; //!< bar color disable eproperty::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::parameter::Ref& _paramPointer); virtual void onPropertyChangeValue(const eproperty::Ref& _paramPointer);
public: // Derived function public: // Derived function
virtual void onRegenerateDisplay(); virtual void onRegenerateDisplay();
virtual void calculateMinMaxSize(); virtual void calculateMinMaxSize();

View File

@ -350,8 +350,8 @@ 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::parameter::Ref& _paramPointer) { void ewol::widget::Scroll::onPropertyChangeValue(const eproperty::Ref& _paramPointer) {
ewol::widget::Container::onParameterChangeValue(_paramPointer); ewol::widget::Container::onPropertyChangeValue(_paramPointer);
if (_paramPointer == m_limit) { if (_paramPointer == m_limit) {
} }

View File

@ -30,7 +30,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::parameter::Range<vec2> m_limit; eproperty::Range<vec2> m_limit;
private: private:
float m_pixelScrolling; float m_pixelScrolling;
vec2 m_highSpeedStartPos; vec2 m_highSpeedStartPos;
@ -65,7 +65,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::parameter::Ref& _paramPointer); virtual void onPropertyChangeValue(const eproperty::Ref& _paramPointer);
}; };
} }
} }

View File

@ -44,8 +44,8 @@ ewol::widget::Select::~Select() {
} }
void ewol::widget::Select::onParameterChangeValue(const ewol::parameter::Ref& _paramPointer) { void ewol::widget::Select::onPropertyChangeValue(const eproperty::Ref& _paramPointer) {
ewol::widget::SpinBase::onParameterChangeValue(_paramPointer); ewol::widget::SpinBase::onPropertyChangeValue(_paramPointer);
if (_paramPointer == m_value) { if (_paramPointer == m_value) {
markToRedraw(); markToRedraw();
if (m_widgetEntry == nullptr) { if (m_widgetEntry == nullptr) {

View File

@ -20,7 +20,7 @@ namespace ewol {
class Select : public ewol::widget::SpinBase { class Select : public ewol::widget::SpinBase {
public: public:
// Event list of properties // Event list of properties
ewol::Signal<int32_t> signalValue; esignal::Signal<int32_t> signalValue;
protected: protected:
/** /**
* @brief Constructor * @brief Constructor
@ -57,7 +57,7 @@ namespace ewol {
void optionClear(); void optionClear();
void optionAdd(int32_t _value, std::string _name); void optionAdd(int32_t _value, std::string _name);
protected: protected:
ewol::parameter::Value<int32_t> m_value; //!< Current state of the Select. eproperty::Value<int32_t> m_value; //!< Current state of the Select.
public: public:
/** /**
* @brief set the currentValue of the Select (pressed or not) * @brief set the currentValue of the Select (pressed or not)
@ -72,7 +72,7 @@ namespace ewol {
*/ */
int32_t getValue() const; int32_t getValue() const;
protected: protected:
virtual void onParameterChangeValue(const ewol::parameter::Ref& _paramPointer); virtual void onPropertyChangeValue(const eproperty::Ref& _paramPointer);
virtual bool loadXML(const std::shared_ptr<const exml::Element>& _node); virtual bool loadXML(const std::shared_ptr<const exml::Element>& _node);
virtual void updateGui(); virtual void updateGui();
protected: protected:

View File

@ -284,8 +284,8 @@ 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::parameter::Ref& _paramPointer) { void ewol::widget::Sizer::onPropertyChangeValue(const eproperty::Ref& _paramPointer) {
ewol::widget::ContainerN::onParameterChangeValue(_paramPointer); ewol::widget::ContainerN::onPropertyChangeValue(_paramPointer);
if (_paramPointer == m_mode) { if (_paramPointer == m_mode) {
markToRedraw(); markToRedraw();
requestUpdateSize(); requestUpdateSize();

View File

@ -31,7 +31,7 @@ namespace ewol {
modeHori, //!< Horizontal mode modeHori, //!< Horizontal mode
}; };
protected: protected:
ewol::parameter::List<enum displayMode> m_mode; //!< Methode to display the widget list (vert/hory ...) eproperty::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;
} }
protected: protected:
ewol::parameter::Value<gale::Dimension> m_borderSize; //!< Border size needed for all the display eproperty::Value<gale::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::parameter::Ref& _paramPointer); virtual void onPropertyChangeValue(const eproperty::Ref& _paramPointer);
}; };
} }
} }

View File

@ -105,8 +105,8 @@ 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::parameter::Ref& _paramPointer) { void ewol::widget::Slider::onPropertyChangeValue(const eproperty::Ref& _paramPointer) {
ewol::Widget::onParameterChangeValue(_paramPointer); ewol::Widget::onPropertyChangeValue(_paramPointer);
if (_paramPointer == m_value) { if (_paramPointer == m_value) {
updateValue(m_value.get()); updateValue(m_value.get());
return; return;

View File

@ -12,7 +12,7 @@
#include <ewol/debug.h> #include <ewol/debug.h>
#include <ewol/widget/Widget.h> #include <ewol/widget/Widget.h>
#include <ewol/compositing/Drawing.h> #include <ewol/compositing/Drawing.h>
#include <ewol/signal/Signal.h> #include <esignal/Signal.h>
namespace ewol { namespace ewol {
namespace widget { namespace widget {
@ -22,7 +22,7 @@ namespace ewol {
class Slider : public ewol::Widget { class Slider : public ewol::Widget {
public: public:
// Event list of properties // Event list of properties
ewol::Signal<float> signalChange; esignal::Signal<float> signalChange;
protected: protected:
Slider(); Slider();
void init(); void init();
@ -30,7 +30,7 @@ namespace ewol {
DECLARE_WIDGET_FACTORY(Slider, "Slider"); DECLARE_WIDGET_FACTORY(Slider, "Slider");
virtual ~Slider(); virtual ~Slider();
protected: protected:
ewol::parameter::Value<float> m_value; //!< current value of the Slider eproperty::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.
@ -47,7 +47,7 @@ namespace ewol {
return m_value; return m_value;
} }
protected: protected:
ewol::parameter::Value<float> m_min; //!< minimum value of the slider eproperty::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.
@ -64,7 +64,7 @@ namespace ewol {
return m_min; return m_min;
} }
protected: protected:
ewol::parameter::Value<float> m_max; //!< maximum value of the slider eproperty::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.
@ -81,7 +81,7 @@ namespace ewol {
return m_max; return m_max;
} }
protected: protected:
ewol::parameter::Value<float> m_step; eproperty::Value<float> m_step;
public: public:
/** /**
* @brief Set the step value of the slider. * @brief Set the step value of the slider.
@ -112,7 +112,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::parameter::Ref& _paramPointer); virtual void onPropertyChangeValue(const eproperty::Ref& _paramPointer);
}; };
} }
} }

View File

@ -48,8 +48,8 @@ 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::parameter::Ref& _paramPointer) { void ewol::widget::Spacer::onPropertyChangeValue(const eproperty::Ref& _paramPointer) {
ewol::Widget::onParameterChangeValue(_paramPointer); ewol::Widget::onPropertyChangeValue(_paramPointer);
if (_paramPointer == m_color) { if (_paramPointer == m_color) {
markToRedraw(); markToRedraw();
} }

View File

@ -35,7 +35,7 @@ namespace ewol {
*/ */
virtual ~Spacer(); virtual ~Spacer();
protected: protected:
ewol::parameter::Value<etk::Color<>> m_color; //!< Background color eproperty::Value<etk::Color<>> m_color; //!< Background color
public: public:
/** /**
* @brief Spziby the background color (basicly transparent) * @brief Spziby the background color (basicly transparent)
@ -49,7 +49,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::parameter::Ref& _paramPointer); virtual void onPropertyChangeValue(const eproperty::Ref& _paramPointer);
}; };
} }
} }

View File

@ -39,8 +39,8 @@ ewol::widget::Spin::~Spin() {
} }
void ewol::widget::Spin::onParameterChangeValue(const ewol::parameter::Ref& _paramPointer) { void ewol::widget::Spin::onPropertyChangeValue(const eproperty::Ref& _paramPointer) {
ewol::widget::SpinBase::onParameterChangeValue(_paramPointer); ewol::widget::SpinBase::onPropertyChangeValue(_paramPointer);
if (_paramPointer == m_value) { if (_paramPointer == m_value) {
markToRedraw(); markToRedraw();
if (m_widgetEntry == nullptr) { if (m_widgetEntry == nullptr) {

View File

@ -20,8 +20,8 @@ namespace ewol {
class Spin : public ewol::widget::SpinBase { class Spin : public ewol::widget::SpinBase {
public: public:
// Event list of properties // Event list of properties
ewol::Signal<int64_t> signalValue; esignal::Signal<int64_t> signalValue;
ewol::Signal<double> signalValueDouble; esignal::Signal<double> signalValueDouble;
protected: protected:
/** /**
* @brief Constructor * @brief Constructor
@ -45,7 +45,7 @@ namespace ewol {
//m_shaper.setString(_shaperName); //m_shaper.setString(_shaperName);
} }
protected: protected:
ewol::parameter::Value<int64_t> m_value; //!< Current value of the Spin. eproperty::Value<int64_t> m_value; //!< Current value of the Spin.
public: public:
/** /**
* @brief set the current value of the Spin * @brief set the current value of the Spin
@ -58,7 +58,7 @@ namespace ewol {
*/ */
int64_t getValue() const; int64_t getValue() const;
protected: protected:
ewol::parameter::Value<int64_t> m_min; //!< Minimum value eproperty::Value<int64_t> m_min; //!< Minimum value
public: public:
/** /**
* @brief set the minimum of the Spin * @brief set the minimum of the Spin
@ -71,7 +71,7 @@ namespace ewol {
*/ */
int64_t getMinimum() const; int64_t getMinimum() const;
protected: protected:
ewol::parameter::Value<int64_t> m_max; //!< Maximum value eproperty::Value<int64_t> m_max; //!< Maximum value
public: public:
/** /**
* @brief set the maxnimum of the Spin * @brief set the maxnimum of the Spin
@ -84,7 +84,7 @@ namespace ewol {
*/ */
int64_t getMaximum() const; int64_t getMaximum() const;
protected: protected:
ewol::parameter::Value<int64_t> m_increment; //!< Increment value eproperty::Value<int64_t> m_increment; //!< Increment value
public: public:
/** /**
* @brief set the increment value of the Spin * @brief set the increment value of the Spin
@ -97,7 +97,7 @@ namespace ewol {
*/ */
int64_t getIncrement() const; int64_t getIncrement() const;
protected: protected:
ewol::parameter::Value<int8_t> m_mantis; //!< number of value under '.' value eproperty::Value<int8_t> m_mantis; //!< number of value under '.' value
public: public:
/** /**
* @brief set the mantis value of the Spin * @brief set the mantis value of the Spin
@ -111,7 +111,7 @@ namespace ewol {
int8_t getMantis() const; int8_t getMantis() const;
protected: protected:
virtual void checkValue(int64_t _value); virtual void checkValue(int64_t _value);
virtual void onParameterChangeValue(const ewol::parameter::Ref& _paramPointer); virtual void onPropertyChangeValue(const eproperty::Ref& _paramPointer);
virtual void updateGui(); virtual void updateGui();
protected: protected:
void onCallbackUp(); void onCallbackUp();

View File

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

View File

@ -11,7 +11,7 @@
#include <ewol/debug.h> #include <ewol/debug.h>
#include <ewol/widget/ContainerN.h> #include <ewol/widget/ContainerN.h>
#include <ewol/widget/Manager.h> #include <ewol/widget/Manager.h>
#include <ewol/signal/Signal.h> #include <esignal/Signal.h>
namespace ewol { namespace ewol {
namespace widget { namespace widget {
@ -21,8 +21,8 @@ namespace ewol {
class WSlider :public ewol::widget::ContainerN { class WSlider :public ewol::widget::ContainerN {
public: public:
// Event list of properties // Event list of properties
ewol::Signal<void> signalStartSlide; esignal::Signal<void> signalStartSlide;
ewol::Signal<void> signalStopSlide; esignal::Signal<void> signalStopSlide;
enum sladingMode { enum sladingMode {
sladingTransitionVert, sladingTransitionVert,
sladingTransitionHori, sladingTransitionHori,
@ -41,7 +41,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::parameter::Value<std::string, true> m_selectNewWidget; // input config requesting eproperty::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 ...)
@ -65,7 +65,7 @@ namespace ewol {
*/ */
void subWidgetSelectSet(const std::string& _widgetName); void subWidgetSelectSet(const std::string& _widgetName);
private: private:
ewol::parameter::Range<float> m_transitionSpeed; //!< speed of the transition (default 1 == > 1s) eproperty::Range<float> m_transitionSpeed; //!< speed of the transition (default 1 == > 1s)
public: public:
/** /**
* @brief set transition speed element. * @brief set transition speed element.
@ -82,7 +82,7 @@ namespace ewol {
return m_transitionSpeed; return m_transitionSpeed;
}; };
private: private:
ewol::parameter::List<enum sladingMode> m_transitionSlide; //!< mode to slide the widgets eproperty::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
@ -104,7 +104,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::parameter::Ref& _paramPointer); virtual void onPropertyChangeValue(const eproperty::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

@ -552,8 +552,8 @@ bool ewol::Widget::systemEventInput(ewol::event::InputSystem& _event) {
return onEventInput(_event.m_event); return onEventInput(_event.m_event);
} }
void ewol::Widget::onParameterChangeValue(const ewol::parameter::Ref& _paramPointer) { void ewol::Widget::onPropertyChangeValue(const eproperty::Ref& _paramPointer) {
ewol::Object::onParameterChangeValue(_paramPointer); ewol::Object::onPropertyChangeValue(_paramPointer);
if (_paramPointer == m_canFocus) { if (_paramPointer == m_canFocus) {
if (m_hasFocus == true) { if (m_hasFocus == true) {
rmFocus(); rmFocus();

View File

@ -30,7 +30,7 @@ namespace ewol {
#include <ewol/event/Entry.h> #include <ewol/event/Entry.h>
#include <ewol/event/Time.h> #include <ewol/event/Time.h>
#include <ewol/translate.h> #include <ewol/translate.h>
#include <ewol/signal/Signal.h> #include <esignal/Signal.h>
#include <ewol/DrawProperty.h> #include <ewol/DrawProperty.h>
#include <ewol/gravity.h> #include <ewol/gravity.h>
@ -184,7 +184,7 @@ namespace ewol {
*/ */
virtual vec2 getOrigin(); virtual vec2 getOrigin();
protected: protected:
ewol::parameter::Value<gale::Dimension> m_userMinSize; //!< user define the minimum size of the widget eproperty::Value<gale::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
@ -211,7 +211,7 @@ namespace ewol {
*/ */
virtual void checkMinSize(); virtual void checkMinSize();
protected: protected:
ewol::parameter::Value<gale::Dimension> m_userMaxSize; //!< user define the maximum size of the widget eproperty::Value<gale::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
@ -238,7 +238,7 @@ namespace ewol {
*/ */
virtual void checkMaxSize(); virtual void checkMaxSize();
protected: protected:
ewol::parameter::Value<bvec2> m_userExpand; eproperty::Value<bvec2> m_userExpand;
public: public:
/** /**
* @brief set the expend capabilities (x&y) * @brief set the expend capabilities (x&y)
@ -261,7 +261,7 @@ namespace ewol {
*/ */
virtual bvec2 canExpand(); virtual bvec2 canExpand();
protected: protected:
ewol::parameter::Value<bvec2> m_userFill; eproperty::Value<bvec2> m_userFill;
public: public:
/** /**
* @brief set the x&y filling capacity * @brief set the x&y filling capacity
@ -284,7 +284,7 @@ namespace ewol {
*/ */
const bvec2& canFill(); const bvec2& canFill();
protected: protected:
ewol::parameter::Value<bool> m_hide; //!< hide a widget on the display eproperty::Value<bool> m_hide; //!< hide a widget on the display
public: public:
/** /**
* @brief set the widget hidden * @brief set the widget hidden
@ -307,7 +307,7 @@ namespace ewol {
}; };
protected: protected:
ewol::parameter::List<enum ewol::gravity> m_gravity; //!< Gravity of the widget eproperty::List<enum ewol::gravity> m_gravity; //!< Gravity of the widget
public: public:
/** /**
* @brief set the widget gravity * @brief set the widget gravity
@ -328,7 +328,7 @@ namespace ewol {
// ---------------------------------------------------------------------------------------------------------------- // ----------------------------------------------------------------------------------------------------------------
private: private:
bool m_hasFocus; //!< set the focus on this widget bool m_hasFocus; //!< set the focus on this widget
ewol::parameter::Value<bool> m_canFocus; //!< the focus can be done on this widget eproperty::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
@ -514,7 +514,7 @@ namespace ewol {
// -- Shortcut : management of the shortcut // -- Shortcut : management of the shortcut
// ---------------------------------------------------------------------------------------------------------------- // ----------------------------------------------------------------------------------------------------------------
public: public:
ewol::Signal<std::string> signalShortcut; //!< signal handle of the message esignal::Signal<std::string> signalShortcut; //!< signal handle of the message
private: private:
std::vector<EventShortCut*> m_localShortcut; //!< list of all shortcut in the widget std::vector<EventShortCut*> m_localShortcut; //!< list of all shortcut in the widget
protected: protected:
@ -621,7 +621,7 @@ namespace ewol {
public: // Derived function public: // Derived function
virtual bool loadXML(const std::shared_ptr<const exml::Element>& _node); virtual bool loadXML(const std::shared_ptr<const exml::Element>& _node);
protected: // Derived function protected: // Derived function
virtual void onParameterChangeValue(const ewol::parameter::Ref& _paramPointer); virtual void onPropertyChangeValue(const eproperty::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
@ -640,9 +640,9 @@ namespace ewol {
*/ */
public: public:
// event generated : // event generated :
ewol::Signal<void> signalAnnimationStart; //!< event when start annimation esignal::Signal<void> signalAnnimationStart; //!< event when start annimation
ewol::Signal<float> signalAnnimationRatio; //!< event when % of annimation change (integer) esignal::Signal<float> signalAnnimationRatio; //!< event when % of annimation change (integer)
ewol::Signal<void> signalAnnimationStop; //!< event when stop annimation esignal::Signal<void> signalAnnimationStop; //!< event when stop annimation
protected: protected:
enum annimationMode { enum annimationMode {
annimationModeEnableAdd, annimationModeEnableAdd,
@ -652,10 +652,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::parameter::List<int32_t> m_annimationTypeStart; //!< type of start annimation eproperty::List<int32_t> m_annimationTypeStart; //!< type of start annimation
ewol::parameter::Range<float> m_annimationTimeStart; //!< time to produce start annimation eproperty::Range<float> m_annimationTimeStart; //!< time to produce start annimation
ewol::parameter::List<int32_t> m_annimationTypeStop; //!< type of start annimation eproperty::List<int32_t> m_annimationTypeStop; //!< type of start annimation
ewol::parameter::Range<float> m_annimationTimeStop; //!< time to produce start annimation eproperty::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

@ -16,7 +16,7 @@
#include <ewol/widget/Sizer.h> #include <ewol/widget/Sizer.h>
#include <ewol/widget/ColorBar.h> #include <ewol/widget/ColorBar.h>
#include <ewol/widget/Slider.h> #include <ewol/widget/Slider.h>
#include <ewol/signal/Signal.h> #include <esignal/Signal.h>
namespace ewol { namespace ewol {
namespace widget { namespace widget {
@ -26,7 +26,7 @@ namespace ewol {
class ColorChooser : public ewol::widget::Sizer { class ColorChooser : public ewol::widget::Sizer {
public: public:
// Event list of properties // Event list of properties
ewol::Signal<etk::Color<>> signalChange; esignal::Signal<etk::Color<>> signalChange;
protected: protected:
ColorChooser(); ColorChooser();
void init(); void init();

View File

@ -113,7 +113,7 @@ void ewol::widget::FileChooser::init() {
void ewol::widget::FileChooser::onGetFocus() { void ewol::widget::FileChooser::onGetFocus() {
// transfert focus on a specific widget... // transfert focus on a specific widget...
parameterSetOnWidgetNamed("[" + etk::to_string(getId()) + "]file-shooser:entry-file", "focus", "true"); propertySetOnWidgetNamed("[" + etk::to_string(getId()) + "]file-shooser:entry-file", "focus", "true");
} }
ewol::widget::FileChooser::~FileChooser() { ewol::widget::FileChooser::~FileChooser() {
@ -121,15 +121,15 @@ ewol::widget::FileChooser::~FileChooser() {
} }
void ewol::widget::FileChooser::setTitle(const std::string& _label) { void ewol::widget::FileChooser::setTitle(const std::string& _label) {
parameterSetOnWidgetNamed("[" + etk::to_string(getId()) + "]file-shooser:title-label", "value", _label); propertySetOnWidgetNamed("[" + etk::to_string(getId()) + "]file-shooser:title-label", "value", _label);
} }
void ewol::widget::FileChooser::setValidateLabel(const std::string& _label) { void ewol::widget::FileChooser::setValidateLabel(const std::string& _label) {
parameterSetOnWidgetNamed("[" + etk::to_string(getId()) + "]file-shooser:validate-label", "value", _label); propertySetOnWidgetNamed("[" + etk::to_string(getId()) + "]file-shooser:validate-label", "value", _label);
} }
void ewol::widget::FileChooser::setCancelLabel(const std::string& _label) { void ewol::widget::FileChooser::setCancelLabel(const std::string& _label) {
parameterSetOnWidgetNamed("[" + etk::to_string(getId()) + "]file-shooser:cancel-label", "value", _label); propertySetOnWidgetNamed("[" + etk::to_string(getId()) + "]file-shooser:cancel-label", "value", _label);
} }
void ewol::widget::FileChooser::setFolder(const std::string& _folder) { void ewol::widget::FileChooser::setFolder(const std::string& _folder) {
@ -139,7 +139,7 @@ void ewol::widget::FileChooser::setFolder(const std::string& _folder) {
void ewol::widget::FileChooser::setFileName(const std::string& _filename) { void ewol::widget::FileChooser::setFileName(const std::string& _filename) {
m_file = _filename; m_file = _filename;
parameterSetOnWidgetNamed("[" + etk::to_string(getId()) + "]file-shooser:entry-file", "value", _filename); propertySetOnWidgetNamed("[" + etk::to_string(getId()) + "]file-shooser:entry-file", "value", _filename);
} }
@ -152,7 +152,7 @@ void ewol::widget::FileChooser::onCallbackEntryFileChangeValue(const std::string
// == > change the file name // == > change the file name
m_file = _value; m_file = _value;
// update the selected file in the list : // update the selected file in the list :
parameterSetOnWidgetNamed("[" + etk::to_string(getId()) + "]file-shooser:list-files", "select", m_file); propertySetOnWidgetNamed("[" + etk::to_string(getId()) + "]file-shooser:list-files", "select", m_file);
} }
void ewol::widget::FileChooser::onCallbackButtonCancelPressed() { void ewol::widget::FileChooser::onCallbackButtonCancelPressed() {
@ -163,11 +163,11 @@ void ewol::widget::FileChooser::onCallbackButtonCancelPressed() {
void ewol::widget::FileChooser::onCallbackHidenFileChangeChangeValue(const bool& _value) { void ewol::widget::FileChooser::onCallbackHidenFileChangeChangeValue(const bool& _value) {
if (_value == true) { if (_value == true) {
parameterSetOnWidgetNamed("[" + etk::to_string(getId()) + "]file-shooser:list-folder", "show-hidden", "true"); propertySetOnWidgetNamed("[" + etk::to_string(getId()) + "]file-shooser:list-folder", "show-hidden", "true");
parameterSetOnWidgetNamed("[" + etk::to_string(getId()) + "]file-shooser:list-files", "show-hidden", "true"); propertySetOnWidgetNamed("[" + etk::to_string(getId()) + "]file-shooser:list-files", "show-hidden", "true");
} else { } else {
parameterSetOnWidgetNamed("[" + etk::to_string(getId()) + "]file-shooser:list-folder", "show-hidden", "false"); propertySetOnWidgetNamed("[" + etk::to_string(getId()) + "]file-shooser:list-folder", "show-hidden", "false");
parameterSetOnWidgetNamed("[" + etk::to_string(getId()) + "]file-shooser:list-files", "show-hidden", "false"); propertySetOnWidgetNamed("[" + etk::to_string(getId()) + "]file-shooser:list-files", "show-hidden", "false");
} }
} }
@ -224,9 +224,9 @@ void ewol::widget::FileChooser::updateCurrentFolder() {
m_folder += "/"; m_folder += "/";
} }
} }
parameterSetOnWidgetNamed("[" + etk::to_string(getId()) + "]file-shooser:list-files", "path", m_folder); propertySetOnWidgetNamed("[" + etk::to_string(getId()) + "]file-shooser:list-files", "path", m_folder);
parameterSetOnWidgetNamed("[" + etk::to_string(getId()) + "]file-shooser:list-folder", "path", m_folder); propertySetOnWidgetNamed("[" + etk::to_string(getId()) + "]file-shooser:list-folder", "path", m_folder);
parameterSetOnWidgetNamed("[" + etk::to_string(getId()) + "]file-shooser:entry-folder", "value", m_folder); propertySetOnWidgetNamed("[" + etk::to_string(getId()) + "]file-shooser:entry-folder", "value", m_folder);
markToRedraw(); markToRedraw();
} }

View File

@ -10,7 +10,7 @@
#include <etk/types.h> #include <etk/types.h>
#include <ewol/debug.h> #include <ewol/debug.h>
#include <ewol/widget/Composer.h> #include <ewol/widget/Composer.h>
#include <ewol/signal/Signal.h> #include <esignal/Signal.h>
namespace ewol { namespace ewol {
namespace widget { namespace widget {
@ -65,8 +65,8 @@ namespace ewol {
class FileChooser : public ewol::widget::Composer { class FileChooser : public ewol::widget::Composer {
public: public:
// Event list of properties // Event list of properties
ewol::Signal<void> signalCancel; esignal::Signal<void> signalCancel;
ewol::Signal<std::string> signalValidate; esignal::Signal<std::string> signalValidate;
protected: protected:
FileChooser(); FileChooser();
void init(); void init();

View File

@ -27,7 +27,7 @@ namespace ewol {
class Parameter : public ewol::widget::PopUp { class Parameter : public ewol::widget::PopUp {
public: public:
// Event list of properties // Event list of properties
ewol::Signal<void> signalClose; esignal::Signal<void> signalClose;
protected: protected:
Parameter(); Parameter();
void init(); void init();

View File

@ -38,7 +38,7 @@ namespace ewol {
class ParameterList :public ewol::widget::WidgetScrolled { class ParameterList :public ewol::widget::WidgetScrolled {
public: public:
// Event list of properties // Event list of properties
ewol::Signal<int32_t> signalSelect; esignal::Signal<int32_t> signalSelect;
private: private:
int32_t m_idSelected; int32_t m_idSelected;
std::vector<ewol::widget::elementPL *> m_list; std::vector<ewol::widget::elementPL *> m_list;

View File

@ -55,8 +55,8 @@ ewol::widget::SpinBase::~SpinBase() {
} }
void ewol::widget::SpinBase::onParameterChangeValue(const ewol::parameter::Ref& _paramPointer) { void ewol::widget::SpinBase::onPropertyChangeValue(const eproperty::Ref& _paramPointer) {
ewol::widget::Sizer::onParameterChangeValue(_paramPointer); ewol::widget::Sizer::onPropertyChangeValue(_paramPointer);
if (_paramPointer == m_spinMode) { if (_paramPointer == m_spinMode) {
updateGui(); updateGui();
} }

View File

@ -74,7 +74,7 @@ namespace ewol {
int32_t m_confIdDownShaper; int32_t m_confIdDownShaper;
int32_t m_confIdUpData; int32_t m_confIdUpData;
int32_t m_confIdDownData; int32_t m_confIdDownData;
ewol::parameter::List<enum ewol::widget::spinPosition> m_spinMode; //!< How to display the spin base eproperty::List<enum ewol::widget::spinPosition> m_spinMode; //!< How to display the spin base
protected: protected:
/** /**
* @brief Constructor * @brief Constructor
@ -108,7 +108,7 @@ namespace ewol {
std::shared_ptr<ewol::widget::Button> m_widgetButtonUp; std::shared_ptr<ewol::widget::Button> m_widgetButtonUp;
virtual void updateGui(); virtual void updateGui();
public: // Derived function public: // Derived function
virtual void onParameterChangeValue(const ewol::parameter::Ref& _paramPointer); virtual void onPropertyChangeValue(const eproperty::Ref& _paramPointer);
virtual bool loadXML(const std::shared_ptr<const exml::Element>& _node); virtual bool loadXML(const std::shared_ptr<const exml::Element>& _node);
}; };
} }

View File

@ -10,7 +10,7 @@ def get_type():
return "LIBRARY" return "LIBRARY"
def get_desc(): def get_desc():
return "ewol is a main library to use widget in the openGl environement and manage all the wraping os" return "ewol is a widget management library"
def get_licence(): def get_licence():
return "APACHE-2" return "APACHE-2"
@ -112,30 +112,6 @@ def create(target, module_name):
'ewol/object/Object.h' 'ewol/object/Object.h'
]) ])
# parameter:
my_module.add_src_file([
'ewol/parameter/Parameter.cpp',
'ewol/parameter/Interface.cpp',
])
my_module.add_header_file([
'ewol/parameter/Value.h',
'ewol/parameter/Interface.h',
'ewol/parameter/Parameter.h',
'ewol/parameter/Range.h',
'ewol/parameter/List.h'
])
# Signal:
my_module.add_src_file([
'ewol/signal/Interface.cpp',
'ewol/signal/Base.cpp'
])
my_module.add_header_file([
'ewol/signal/Interface.h',
'ewol/signal/Base.h',
'ewol/signal/Signal.h'
])
# resources: # resources:
my_module.add_src_file([ my_module.add_src_file([
'ewol/resource/Colored3DObject.cpp', 'ewol/resource/Colored3DObject.cpp',
@ -261,7 +237,16 @@ def create(target, module_name):
my_module.copy_path('data/translate/*','translate/ewol') my_module.copy_path('data/translate/*','translate/ewol')
# name of the dependency # name of the dependency
my_module.add_module_depend(['etk', 'gale', 'freetype', 'exml', 'ejson', 'egami', 'edtaa3']) my_module.add_module_depend([
'etk',
'esignal',
'eproperty',
'gale',
'freetype',
'exml',
'ejson',
'egami',
'edtaa3'])
my_module.add_path(tools.get_current_path(__file__)) my_module.add_path(tools.get_current_path(__file__))

View File

@ -32,7 +32,7 @@
#include <appl/TestImage.h> #include <appl/TestImage.h>
#include <appl/TestDistanceField.h> #include <appl/TestDistanceField.h>
#include <etk/os/FSNode.h> #include <etk/os/FSNode.h>
#include <ewol/parameter/Value.h> #include <eproperty/Value.h>
static const char * l_eventChangeTheme = "event-change-theme"; static const char * l_eventChangeTheme = "event-change-theme";
@ -106,8 +106,8 @@ void appl::MainWindows::onCallbackGravityChange() {
m_gravity = ewol::gravity_center; m_gravity = ewol::gravity_center;
break; break;
} }
parameterSetOnWidgetNamed("appl-upper-test-widget", "gravity", ewol::gravityToString(m_gravity)); propertySetOnWidgetNamed("appl-upper-test-widget", "gravity", ewol::gravityToString(m_gravity));
parameterSetOnWidgetNamed("appl-next-gravity-label", "value", "Next gravity<br/>(" + ewol::gravityToString(m_gravity) + ")"); propertySetOnWidgetNamed("appl-next-gravity-label", "value", "Next gravity<br/>(" + ewol::gravityToString(m_gravity) + ")");
} }
void appl::MainWindows::onCallbackWidgetChange(int32_t _increment) { void appl::MainWindows::onCallbackWidgetChange(int32_t _increment) {
@ -183,7 +183,7 @@ void appl::MainWindows::onCallbackWidgetChange(int32_t _increment) {
if (m_subWidget != nullptr) { if (m_subWidget != nullptr) {
m_sizerVert->subWidgetReplace(oldWidget, m_subWidget); m_sizerVert->subWidgetReplace(oldWidget, m_subWidget);
} }
parameterSetOnWidgetNamed("appl-label-test", "value", tmpDescription); propertySetOnWidgetNamed("appl-label-test", "value", tmpDescription);
updateProperty(); updateProperty();
} }
@ -209,8 +209,8 @@ void appl::MainWindows::updateProperty() {
std::shared_ptr<ewol::widget::Label> widget = ewol::widget::Label::create(m_subWidget->getObjectType()); std::shared_ptr<ewol::widget::Label> widget = ewol::widget::Label::create(m_subWidget->getObjectType());
m_sizerDynamic->subWidgetAdd(widget); m_sizerDynamic->subWidgetAdd(widget);
addSpacer(m_sizerDynamic, etk::color::red); addSpacer(m_sizerDynamic, etk::color::red);
for (size_t iii=0; iii<m_subWidget->getParameterCount(); ++iii) { for (size_t iii=0; iii<m_subWidget->getPropertyCount(); ++iii) {
ewol::parameter::Parameter* param = m_subWidget->getParameterRaw(iii); eproperty::Property* param = m_subWidget->getPropertyRaw(iii);
if (param == nullptr) { if (param == nullptr) {
APPL_WARNING("Parameter EMPTY . " << iii << " : nullptr"); APPL_WARNING("Parameter EMPTY . " << iii << " : nullptr");
continue; continue;
@ -229,8 +229,8 @@ void appl::MainWindows::updateProperty() {
if (type == typeid(std::string).name()) { if (type == typeid(std::string).name()) {
std::shared_ptr<ewol::widget::Entry> widgetTmp = ewol::widget::Entry::create(); std::shared_ptr<ewol::widget::Entry> widgetTmp = ewol::widget::Entry::create();
widgetSizer->subWidgetAdd(widgetTmp); widgetSizer->subWidgetAdd(widgetTmp);
ewol::parameter::Parameter* param = m_subWidget->getParameterRaw(iii); eproperty::Property* param = m_subWidget->getPropertyRaw(iii);
ewol::parameter::Value<std::string>* paramValue = dynamic_cast<ewol::parameter::Value<std::string>*>(param); eproperty::Value<std::string>* paramValue = dynamic_cast<eproperty::Value<std::string>*>(param);
if (paramValue == nullptr) { if (paramValue == nullptr) {
APPL_ERROR("nullptr..."); APPL_ERROR("nullptr...");
return; return;
@ -250,8 +250,8 @@ void appl::MainWindows::updateProperty() {
addSpacer(widgetSizer); addSpacer(widgetSizer);
std::shared_ptr<ewol::widget::CheckBox> widgetTmp = ewol::widget::CheckBox::create(); std::shared_ptr<ewol::widget::CheckBox> widgetTmp = ewol::widget::CheckBox::create();
widgetSizer->subWidgetAdd(widgetTmp); widgetSizer->subWidgetAdd(widgetTmp);
ewol::parameter::Parameter* param = m_subWidget->getParameterRaw(iii); eproperty::Property* param = m_subWidget->getPropertyRaw(iii);
ewol::parameter::Value<bvec2>* paramValue = dynamic_cast<ewol::parameter::Value<bvec2>*>(param); eproperty::Value<bvec2>* paramValue = dynamic_cast<eproperty::Value<bvec2>*>(param);
if (paramValue == nullptr) { if (paramValue == nullptr) {
APPL_ERROR("nullptr... 2 "); APPL_ERROR("nullptr... 2 ");
return; return;
@ -296,7 +296,7 @@ void appl::MainWindows::updateProperty() {
return; return;
} }
APPL_INFO("set parameter : name=" << param->getName() << " value=" << _value); APPL_INFO("set parameter : name=" << param->getName() << " value=" << _value);
m_subWidget->parameterSet(param->getName(), etk::to_string(_value)); m_subWidget->propertySet(param->getName(), etk::to_string(_value));
return; return;
}); });
} else if ( type == typeid(int64_t).name() } else if ( type == typeid(int64_t).name()
@ -309,7 +309,7 @@ void appl::MainWindows::updateProperty() {
|| type == typeid(uint8_t).name()) { || type == typeid(uint8_t).name()) {
std::shared_ptr<ewol::widget::Entry> widgetTmp = ewol::widget::Entry::create(); std::shared_ptr<ewol::widget::Entry> widgetTmp = ewol::widget::Entry::create();
widgetSizer->subWidgetAdd(widgetTmp); widgetSizer->subWidgetAdd(widgetTmp);
ewol::parameter::Parameter* param = m_subWidget->getParameterRaw(iii); eproperty::Property* param = m_subWidget->getPropertyRaw(iii);
std::string value = param->getString(); std::string value = param->getString();
widgetTmp->setValue(value); widgetTmp->setValue(value);
widgetTmp->setExpand(bvec2(true,false)); widgetTmp->setExpand(bvec2(true,false));
@ -355,8 +355,8 @@ void appl::MainWindows::updateProperty() {
widgetTmp->optionAdd(int32_t(ewol::gravity_topLeft), "Top-left"); widgetTmp->optionAdd(int32_t(ewol::gravity_topLeft), "Top-left");
widgetTmp->optionAdd(int32_t(ewol::gravity_buttomRight), "Buttom-right"); widgetTmp->optionAdd(int32_t(ewol::gravity_buttomRight), "Buttom-right");
widgetTmp->optionAdd(int32_t(ewol::gravity_buttomLeft), "Buttom-left"); widgetTmp->optionAdd(int32_t(ewol::gravity_buttomLeft), "Buttom-left");
ewol::parameter::Parameter* param = m_subWidget->getParameterRaw(iii); eproperty::Property* param = m_subWidget->getPropertyRaw(iii);
ewol::parameter::List<ewol::gravity>* paramValue = dynamic_cast<ewol::parameter::List<ewol::gravity>*>(param); eproperty::List<ewol::gravity>* paramValue = dynamic_cast<eproperty::List<ewol::gravity>*>(param);
if (paramValue == nullptr) { if (paramValue == nullptr) {
APPL_ERROR("nullptr... 2 "); APPL_ERROR("nullptr... 2 ");
return; return;

View File

@ -34,11 +34,11 @@ namespace appl {
*/ */
virtual ~SizerColor(); virtual ~SizerColor();
private: private:
ewol::parameter::Value<etk::Color<>> m_borderColor; //!< Border color. eproperty::Value<etk::Color<>> m_borderColor; //!< Border color.
ewol::parameter::Value<etk::Color<>> m_leftColor; //!< Left color. eproperty::Value<etk::Color<>> m_leftColor; //!< Left color.
ewol::parameter::Value<etk::Color<>> m_rightColor; //!< Right color. eproperty::Value<etk::Color<>> m_rightColor; //!< Right color.
ewol::parameter::Value<etk::Color<>> m_topColor; //!< Top color. eproperty::Value<etk::Color<>> m_topColor; //!< Top color.
ewol::parameter::Value<etk::Color<>> m_buttomColor; //!< Buttom color. eproperty::Value<etk::Color<>> m_buttomColor; //!< Buttom color.
private: private:
ewol::compositing::Drawing m_draw; //!< Compositing drawing element for display the border. ewol::compositing::Drawing m_draw; //!< Compositing drawing element for display the border.
public: public: