[DEV] set Parameter agnostic from Object
This commit is contained in:
parent
656fe783d4
commit
61afe48646
2
external/ege
vendored
2
external/ege
vendored
@ -1 +1 @@
|
||||
Subproject commit e9483bd0caaa64a7c9d72a5807d05f8663bc3e17
|
||||
Subproject commit 343021de91b1662da5dafe9ae9b6a089bb5edcfc
|
@ -15,6 +15,13 @@
|
||||
#include <mutex>
|
||||
#include <memory>
|
||||
|
||||
#include <ewol/debug.h>
|
||||
#include <ewol/parameter/Interface.h>
|
||||
#include <ewol/parameter/Value.h>
|
||||
#include <ewol/parameter/Range.h>
|
||||
#include <ewol/parameter/List.h>
|
||||
#include <ewol/signal/List.h>
|
||||
|
||||
namespace ewol {
|
||||
// some class need to define element befor other ...
|
||||
class Object;
|
||||
@ -24,13 +31,6 @@ namespace ewol {
|
||||
class Context;
|
||||
};
|
||||
|
||||
#include <ewol/debug.h>
|
||||
#include <ewol/object/ParameterList.h>
|
||||
#include <ewol/object/Param.h>
|
||||
#include <ewol/object/ParamRange.h>
|
||||
#include <ewol/object/ParamList.h>
|
||||
#include <ewol/signal/List.h>
|
||||
|
||||
#define DECLARE_FACTORY(className) \
|
||||
template<typename ... T> static std::shared_ptr<className> create( T&& ... all ) { \
|
||||
std::shared_ptr<className> object(new className()); \
|
||||
@ -51,7 +51,7 @@ namespace ewol {
|
||||
* this class mermit at every Object to communicate between them.
|
||||
*/
|
||||
class Object : public std::enable_shared_from_this<Object>,
|
||||
public ewol::object::ParameterList,
|
||||
public ewol::parameter::Interface,
|
||||
public ewol::signal::List {
|
||||
private:
|
||||
static size_t m_valUID; //!< Static used for the unique ID definition
|
||||
@ -145,7 +145,7 @@ namespace ewol {
|
||||
// TODO : Rework the position on this function ... This is a convignent function ...
|
||||
bool parameterSetOnWidgetNamed(const std::string& _objectName, const std::string& _config, const std::string& _value);
|
||||
protected:
|
||||
ewol::object::Param<std::string> m_name; //!< name of the element ...
|
||||
ewol::parameter::Value<std::string> m_name; //!< name of the element ...
|
||||
public:
|
||||
/**
|
||||
* @brief get the Object name
|
||||
|
@ -1,10 +0,0 @@
|
||||
/**
|
||||
* @author Edouard DUPIN
|
||||
*
|
||||
* @copyright 2011, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license APACHE v2.0 (see license file)
|
||||
*/
|
||||
|
||||
#include <ewol/debug.h>
|
||||
#include <ewol/object/ParamList.h>
|
@ -1,30 +0,0 @@
|
||||
/**
|
||||
* @author Edouard DUPIN
|
||||
*
|
||||
* @copyright 2011, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license APACHE v2.0 (see license file)
|
||||
*/
|
||||
|
||||
#include <ewol/debug.h>
|
||||
#include <ewol/object/ParameterList.h>
|
||||
#include <ewol/object/Parameter.h>
|
||||
|
||||
|
||||
ewol::object::Parameter::Parameter(ewol::object::ParameterList& _objectLink, const std::string& _name) :
|
||||
m_objectLink(_objectLink),
|
||||
m_name(_name) {
|
||||
// add a reference on the current parameter ...
|
||||
_objectLink.parameterAdd(this);
|
||||
}
|
||||
|
||||
void ewol::object::Parameter::notifyChange() const {
|
||||
m_objectLink.onParameterChangeValue(ewol::object::ParameterRef(this));
|
||||
}
|
||||
|
||||
bool ewol::object::operator==(const ParameterRef& _obj, const Parameter& _obj2) noexcept {
|
||||
return &_obj2 == _obj.m_ref;
|
||||
}
|
||||
bool ewol::object::operator==(const Parameter& _obj2, const ParameterRef& _obj) noexcept {
|
||||
return &_obj2 == _obj.m_ref;
|
||||
}
|
@ -7,19 +7,19 @@
|
||||
*/
|
||||
|
||||
#include <ewol/debug.h>
|
||||
#include <ewol/object/ParameterList.h>
|
||||
#include <ewol/object/Parameter.h>
|
||||
#include <ewol/parameter/List.h>
|
||||
#include <ewol/parameter/Parameter.h>
|
||||
|
||||
ewol::object::ParameterList::ParameterList() {
|
||||
ewol::parameter::Interface::Interface() {
|
||||
|
||||
}
|
||||
|
||||
ewol::object::ParameterList::~ParameterList() {
|
||||
ewol::parameter::Interface::~Interface() {
|
||||
parameterClean();
|
||||
}
|
||||
|
||||
// note this pointer is not allocated and not free at the end of the class
|
||||
void ewol::object::ParameterList::parameterAdd(Parameter* _pointerOnParameter) {
|
||||
void ewol::parameter::Interface::parameterAdd(ewol::parameter::Parameter* _pointerOnParameter) {
|
||||
if (_pointerOnParameter == nullptr) {
|
||||
EWOL_ERROR("Try to link a nullptr parameters");
|
||||
return;
|
||||
@ -27,14 +27,14 @@ void ewol::object::ParameterList::parameterAdd(Parameter* _pointerOnParameter) {
|
||||
m_list.push_back(_pointerOnParameter);
|
||||
}
|
||||
|
||||
void ewol::object::ParameterList::parameterClean() {
|
||||
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::object::ParameterList::parameterSet(const std::string& _parameter, const std::string& _value) {
|
||||
bool ewol::parameter::Interface::parameterSet(const std::string& _parameter, const std::string& _value) {
|
||||
for (auto &it : m_list) {
|
||||
if( it != nullptr
|
||||
&& it->getName() == _parameter) {
|
||||
@ -46,7 +46,7 @@ bool ewol::object::ParameterList::parameterSet(const std::string& _parameter, co
|
||||
return false;
|
||||
}
|
||||
|
||||
std::string ewol::object::ParameterList::parameterGet(const std::string& _parameter) const {
|
||||
std::string ewol::parameter::Interface::parameterGet(const std::string& _parameter) const {
|
||||
for (auto &it : m_list) {
|
||||
if( it != nullptr
|
||||
&& it->getName() == _parameter) {
|
||||
@ -56,7 +56,7 @@ std::string ewol::object::ParameterList::parameterGet(const std::string& _parame
|
||||
return "???";
|
||||
}
|
||||
|
||||
void ewol::object::ParameterList::parameterDisplay(bool _changeOnly) const {
|
||||
void ewol::parameter::Interface::parameterDisplay(bool _changeOnly) const {
|
||||
EWOL_INFO(" Object parameters:");
|
||||
for (auto &it : m_list) {
|
||||
if(it != nullptr) {
|
||||
@ -73,7 +73,7 @@ void ewol::object::ParameterList::parameterDisplay(bool _changeOnly) const {
|
||||
}
|
||||
}
|
||||
|
||||
std::map<std::string, std::string> ewol::object::ParameterList::parameterGetAll(bool _notIfDefault) const {
|
||||
std::map<std::string, std::string> ewol::parameter::Interface::parameterGetAll(bool _notIfDefault) const {
|
||||
std::map<std::string, std::string> out;
|
||||
for (auto &it : m_list) {
|
||||
if(it != nullptr) {
|
@ -7,29 +7,29 @@
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __EWOL_PARAMETER_LIST_H__
|
||||
#define __EWOL_PARAMETER_LIST_H__
|
||||
#ifndef __EWOL_PARAMETER_INTERFACE_H__
|
||||
#define __EWOL_PARAMETER_INTERFACE_H__
|
||||
|
||||
#include <vector>
|
||||
#include <map>
|
||||
|
||||
namespace ewol {
|
||||
namespace object {
|
||||
namespace parameter {
|
||||
class Parameter;
|
||||
class ParameterRef;
|
||||
class ParameterList {
|
||||
friend class ewol::object::Parameter; // to register parameter in the list.
|
||||
class Ref;
|
||||
class Interface {
|
||||
friend class ewol::parameter::Parameter; // to register parameter in the list.
|
||||
private:
|
||||
std::vector<ewol::object::Parameter*> m_list; //!< list of availlable Parameters
|
||||
std::vector<ewol::parameter::Parameter*> m_list; //!< list of availlable Parameters (no need to free)
|
||||
public:
|
||||
/**
|
||||
* @brief Constructor.
|
||||
*/
|
||||
ParameterList();
|
||||
Interface();
|
||||
/**
|
||||
* @brief Destructor.
|
||||
*/
|
||||
virtual ~ParameterList();
|
||||
virtual ~Interface();
|
||||
/**
|
||||
* @brief Register a parameter class pointer in the List of parameters
|
||||
* @note This class does not destroy the parameter pointer!!!
|
||||
@ -64,7 +64,7 @@ namespace ewol {
|
||||
* @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::object::ParameterRef& _paramPointer) { };
|
||||
virtual void onParameterChangeValue(const ewol::parameter::Ref& _paramPointer) { };
|
||||
/**
|
||||
* @brief Get All the parameter configuration:
|
||||
* @return map on the parameters
|
@ -6,17 +6,17 @@
|
||||
* @license APACHE v2.0 (see license file)
|
||||
*/
|
||||
|
||||
#ifndef __EWOL_PARAM_LIST_H__
|
||||
#define __EWOL_PARAM_LIST_H__
|
||||
#ifndef __EWOL_PARAMETER_LIST_H__
|
||||
#define __EWOL_PARAMETER_LIST_H__
|
||||
|
||||
#include <ewol/object/ParameterList.h>
|
||||
#include <ewol/object/Parameter.h>
|
||||
#include <ewol/parameter/Interface.h>
|
||||
#include <ewol/parameter/Parameter.h>
|
||||
#include <map>
|
||||
#include <typeinfo>
|
||||
|
||||
namespace ewol {
|
||||
namespace object {
|
||||
template<typename MY_TYPE, bool isEventReceiving=false> class ParamList : public Parameter {
|
||||
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.
|
||||
@ -28,11 +28,11 @@ namespace ewol {
|
||||
* @param[in] _name Static name of the parameter.
|
||||
* @param[in] _description description of the parameter.
|
||||
*/
|
||||
ParamList(ewol::object::ParameterList& _objectLink,
|
||||
const std::string& _name,
|
||||
const MY_TYPE& _defaultValue,
|
||||
const std::string& _description="") :
|
||||
Parameter(_objectLink, _name),
|
||||
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) {
|
||||
|
||||
@ -40,7 +40,7 @@ namespace ewol {
|
||||
/**
|
||||
* @brief Destructor.
|
||||
*/
|
||||
virtual ~ParamList() {
|
||||
virtual ~List() {
|
||||
|
||||
};
|
||||
void add(const MY_TYPE& _value, const std::string& _name, const std::string& _description = "") {
|
||||
@ -143,7 +143,7 @@ namespace ewol {
|
||||
* @brief assignement operator.
|
||||
* @param[in] newVal The new value of the parameter.
|
||||
*/
|
||||
const ParamList& operator= (MY_TYPE _newVal) {
|
||||
const List& operator= (MY_TYPE _newVal) {
|
||||
set(_newVal);
|
||||
return *this;
|
||||
}
|
||||
@ -160,7 +160,7 @@ namespace ewol {
|
||||
return &m_value;
|
||||
}
|
||||
};
|
||||
template<typename MY_TYPE> std::ostream& operator <<(std::ostream& _os, const ewol::object::ParamList<MY_TYPE>& _obj) {
|
||||
template<typename MY_TYPE> std::ostream& operator <<(std::ostream& _os, const ewol::parameter::List<MY_TYPE>& _obj) {
|
||||
_os << _obj.get();
|
||||
return _os;
|
||||
}
|
30
sources/ewol/parameter/Parameter.cpp
Normal file
30
sources/ewol/parameter/Parameter.cpp
Normal file
@ -0,0 +1,30 @@
|
||||
/**
|
||||
* @author Edouard DUPIN
|
||||
*
|
||||
* @copyright 2011, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license APACHE v2.0 (see license file)
|
||||
*/
|
||||
|
||||
#include <ewol/debug.h>
|
||||
#include <ewol/parameter/Interface.h>
|
||||
#include <ewol/parameter/Parameter.h>
|
||||
|
||||
|
||||
ewol::parameter::Parameter::Parameter(ewol::parameter::Interface& _paramInterfaceLink, const std::string& _name) :
|
||||
m_interfaceLink(_paramInterfaceLink),
|
||||
m_name(_name) {
|
||||
// add a reference on the current parameter ...
|
||||
m_interfaceLink.parameterAdd(this);
|
||||
}
|
||||
|
||||
void ewol::parameter::Parameter::notifyChange() const {
|
||||
m_interfaceLink.onParameterChangeValue(ewol::parameter::Ref(this));
|
||||
}
|
||||
|
||||
bool ewol::parameter::operator==(const Ref& _obj, const Parameter& _obj2) noexcept {
|
||||
return &_obj2 == _obj.m_ref;
|
||||
}
|
||||
bool ewol::parameter::operator==(const Parameter& _obj2, const Ref& _obj) noexcept {
|
||||
return &_obj2 == _obj.m_ref;
|
||||
}
|
@ -6,7 +6,7 @@
|
||||
* @license APACHE v2.0 (see license file)
|
||||
*/
|
||||
|
||||
#include <ewol/object/ParameterList.h>
|
||||
#include <ewol/parameter/Interface.h>
|
||||
|
||||
#ifndef __EWOL_PARAMETER_H__
|
||||
#define __EWOL_PARAMETER_H__
|
||||
@ -15,14 +15,14 @@
|
||||
#include <typeinfo>
|
||||
|
||||
namespace ewol {
|
||||
namespace object {
|
||||
class ParameterRef;
|
||||
namespace parameter {
|
||||
class Ref;
|
||||
class Parameter {
|
||||
private:
|
||||
ewol::object::ParameterList& m_objectLink;
|
||||
ewol::parameter::Interface& m_interfaceLink;
|
||||
std::string m_name;
|
||||
public:
|
||||
Parameter(ewol::object::ParameterList& _objectLink, const std::string& _name);
|
||||
Parameter(ewol::parameter::Interface& _paramInterfaceLink, const std::string& _name);
|
||||
virtual ~Parameter() { };
|
||||
/**
|
||||
* @brief call main class that parameterChange
|
||||
@ -70,16 +70,16 @@ namespace ewol {
|
||||
*/
|
||||
virtual void setDefault() = 0;
|
||||
};
|
||||
class ParameterRef {
|
||||
class Ref {
|
||||
public:
|
||||
const Parameter* m_ref;
|
||||
ParameterRef(const Parameter* _ref) :
|
||||
Ref(const Parameter* _ref) :
|
||||
m_ref(_ref) {
|
||||
// nothing to do ...
|
||||
}
|
||||
};
|
||||
bool operator==(const ParameterRef& _obj, const Parameter& _obj2) noexcept;
|
||||
bool operator==(const Parameter& _obj2, const ParameterRef& _obj) noexcept;
|
||||
bool operator==(const Ref& _obj, const Parameter& _obj2) noexcept;
|
||||
bool operator==(const Parameter& _obj2, const Ref& _obj) noexcept;
|
||||
};
|
||||
};
|
||||
|
@ -6,17 +6,17 @@
|
||||
* @license APACHE v2.0 (see license file)
|
||||
*/
|
||||
|
||||
#ifndef __EWOL_PARAM_RANGE_H__
|
||||
#define __EWOL_PARAM_RANGE_H__
|
||||
#ifndef __EWOL_PARAMETER_RANGE_H__
|
||||
#define __EWOL_PARAMETER_RANGE_H__
|
||||
|
||||
#include <ewol/object/ParameterList.h>
|
||||
#include <ewol/object/Parameter.h>
|
||||
#include <ewol/parameter/Interface.h>
|
||||
#include <ewol/parameter/Parameter.h>
|
||||
#include <etk/math/Vector2D.h>
|
||||
#include <typeinfo>
|
||||
|
||||
namespace ewol {
|
||||
namespace object {
|
||||
template<typename MY_TYPE, bool isEventReceiving=false> class ParamRange : public Parameter {
|
||||
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.
|
||||
@ -32,13 +32,13 @@ namespace ewol {
|
||||
* @param[in] _max Maximum value.
|
||||
* @param[in] _description description of the parameter.
|
||||
*/
|
||||
ParamRange(ewol::object::ParameterList& _objectLink,
|
||||
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(_objectLink, _name),
|
||||
Parameter(_paramInterfaceLink, _name),
|
||||
m_value(_defaultValue),
|
||||
m_min(_min),
|
||||
m_max(_max),
|
||||
@ -48,7 +48,7 @@ namespace ewol {
|
||||
/**
|
||||
* @brief Destructor.
|
||||
*/
|
||||
virtual ~ParamRange() { };
|
||||
virtual ~Range() { };
|
||||
// herited methode
|
||||
virtual std::string getType() const {
|
||||
return typeid(MY_TYPE).name();
|
||||
@ -123,7 +123,7 @@ namespace ewol {
|
||||
* @brief assignement operator.
|
||||
* @param[in] newVal The new value of the parameter.
|
||||
*/
|
||||
const Param<MY_TYPE>& operator= (const MY_TYPE& _newVal) {
|
||||
const Range<MY_TYPE>& operator= (const MY_TYPE& _newVal) {
|
||||
set(_newVal);
|
||||
return *this;
|
||||
};
|
||||
@ -141,7 +141,7 @@ namespace ewol {
|
||||
}
|
||||
};
|
||||
|
||||
template<typename MY_TYPE> std::ostream& operator <<(std::ostream& _os, const ewol::object::ParamRange<MY_TYPE>& _obj) {
|
||||
template<typename MY_TYPE> std::ostream& operator <<(std::ostream& _os, const ewol::parameter::Range<MY_TYPE>& _obj) {
|
||||
_os << _obj.get();
|
||||
return _os;
|
||||
}
|
@ -6,17 +6,17 @@
|
||||
* @license APACHE v2.0 (see license file)
|
||||
*/
|
||||
|
||||
#ifndef __EWOL_PARAM_H__
|
||||
#define __EWOL_PARAM_H__
|
||||
#ifndef __EWOL_PARAMETER_VALUE_H__
|
||||
#define __EWOL_PARAMETER_VALUE_H__
|
||||
|
||||
#include <ewol/object/ParameterList.h>
|
||||
#include <ewol/object/Parameter.h>
|
||||
#include <ewol/parameter/Interface.h>
|
||||
#include <ewol/parameter/Parameter.h>
|
||||
#include <etk/math/Vector2D.h>
|
||||
|
||||
|
||||
namespace ewol {
|
||||
namespace object {
|
||||
template<typename MY_TYPE, bool isEventReceiving=false> class Param : public Parameter {
|
||||
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.
|
||||
@ -30,19 +30,19 @@ namespace ewol {
|
||||
* @param[in] _max Maximum value.
|
||||
* @param[in] _description description of the parameter.
|
||||
*/
|
||||
Param(ewol::object::ParameterList& _objectLink,
|
||||
Value(ewol::parameter::Interface& _paramInterfaceLink,
|
||||
const std::string& _name,
|
||||
const MY_TYPE& _defaultValue,
|
||||
const std::string& _description = "") :
|
||||
Parameter(_objectLink, _name),
|
||||
Parameter(_paramInterfaceLink, _name),
|
||||
m_value(_defaultValue),
|
||||
m_default(_defaultValue) {
|
||||
|
||||
};
|
||||
Param(ewol::object::ParameterList& _objectLink,
|
||||
Value(ewol::parameter::Interface& _paramListLink,
|
||||
const std::string& _name,
|
||||
const std::string& _description = "") :
|
||||
Parameter(_objectLink, _name),
|
||||
Parameter(_paramListLink, _name),
|
||||
m_value(),
|
||||
m_default() {
|
||||
|
||||
@ -50,7 +50,7 @@ namespace ewol {
|
||||
/**
|
||||
* @brief Destructor.
|
||||
*/
|
||||
virtual ~Param() { };
|
||||
virtual ~Value() { };
|
||||
// herited methode
|
||||
virtual std::string getType() const {
|
||||
return typeid(MY_TYPE).name();
|
||||
@ -117,7 +117,7 @@ namespace ewol {
|
||||
* @brief assignement operator.
|
||||
* @param[in] newVal The new value of the parameter.
|
||||
*/
|
||||
const Param<MY_TYPE>& operator= (const MY_TYPE& _newVal) {
|
||||
const Value<MY_TYPE>& operator= (const MY_TYPE& _newVal) {
|
||||
set(_newVal);
|
||||
return *this;
|
||||
};
|
||||
@ -135,7 +135,7 @@ namespace ewol {
|
||||
}
|
||||
};
|
||||
|
||||
template<typename MY_TYPE, bool isEventReceiving=false> std::ostream& operator <<(std::ostream& _os, const ewol::object::Param<MY_TYPE, isEventReceiving>& _obj) {
|
||||
template<typename MY_TYPE, bool isEventReceiving=false> std::ostream& operator <<(std::ostream& _os, const ewol::parameter::Value<MY_TYPE, isEventReceiving>& _obj) {
|
||||
_os << _obj.get();
|
||||
return _os;
|
||||
}
|
@ -211,7 +211,7 @@ void ewol::widget::Button::periodicCall(const ewol::event::Time& _event) {
|
||||
markToRedraw();
|
||||
}
|
||||
|
||||
void ewol::widget::Button::onParameterChangeValue(const ewol::object::ParameterRef& _paramPointer) {
|
||||
void ewol::widget::Button::onParameterChangeValue(const ewol::parameter::Ref& _paramPointer) {
|
||||
ewol::widget::Container2::onParameterChangeValue(_paramPointer);
|
||||
if (_paramPointer == m_shaper) {
|
||||
markToRedraw();
|
||||
|
@ -43,7 +43,7 @@ namespace ewol {
|
||||
lockAccess, //!< all event are trashed == > acctivity of the button is disable
|
||||
};
|
||||
private:
|
||||
ewol::object::Param<ewol::compositing::Shaper> m_shaper; //!< Compositing theme.
|
||||
ewol::parameter::Value<ewol::compositing::Shaper> m_shaper; //!< Compositing theme.
|
||||
protected:
|
||||
/**
|
||||
* @brief Constructor
|
||||
@ -65,7 +65,7 @@ namespace ewol {
|
||||
m_shaper.setString(_shaperName);
|
||||
}
|
||||
protected:
|
||||
ewol::object::Param<bool> m_value; //!< Current state of the button.
|
||||
ewol::parameter::Value<bool> m_value; //!< Current state of the button.
|
||||
public:
|
||||
/**
|
||||
* @brief set the currentValue of the Button (pressed or not)
|
||||
@ -84,7 +84,7 @@ namespace ewol {
|
||||
return m_value;
|
||||
};
|
||||
protected:
|
||||
ewol::object::ParamList<enum buttonLock> m_lock; //!< Current lock state of the button.
|
||||
ewol::parameter::List<enum buttonLock> m_lock; //!< Current lock state of the button.
|
||||
public:
|
||||
/**
|
||||
* @brief set the button lock state.
|
||||
@ -101,7 +101,7 @@ namespace ewol {
|
||||
return m_lock;
|
||||
};
|
||||
protected:
|
||||
ewol::object::Param<bool> m_toggleMode; //!< The button is able to toggle.
|
||||
ewol::parameter::Value<bool> m_toggleMode; //!< The button is able to toggle.
|
||||
public:
|
||||
/**
|
||||
* @brief change the toggle mode.
|
||||
@ -118,7 +118,7 @@ namespace ewol {
|
||||
return m_toggleMode;
|
||||
};
|
||||
protected:
|
||||
ewol::object::Param<bool> m_enableSingle; //!< When a single subwidget is set display all time it.
|
||||
ewol::parameter::Value<bool> m_enableSingle; //!< When a single subwidget is set display all time it.
|
||||
public:
|
||||
/**
|
||||
* @brief Chane the display single widget mode availlable.
|
||||
@ -152,7 +152,7 @@ namespace ewol {
|
||||
void CheckStatus();
|
||||
protected: // Derived function
|
||||
virtual void onDraw();
|
||||
virtual void onParameterChangeValue(const ewol::object::ParameterRef& _paramPointer);
|
||||
virtual void onParameterChangeValue(const ewol::parameter::Ref& _paramPointer);
|
||||
public: // Derived function
|
||||
virtual void calculateMinMaxSize();
|
||||
virtual void calculateSize(const vec2& _availlable);
|
||||
|
@ -228,7 +228,7 @@ void ewol::widget::ButtonColor::periodicCall(const ewol::event::Time& _event) {
|
||||
}
|
||||
|
||||
|
||||
void ewol::widget::ButtonColor::onParameterChangeValue(const ewol::object::ParameterRef& _paramPointer) {
|
||||
void ewol::widget::ButtonColor::onParameterChangeValue(const ewol::parameter::Ref& _paramPointer) {
|
||||
ewol::Widget::onParameterChangeValue(_paramPointer);
|
||||
if (_paramPointer == m_textColorFg) {
|
||||
signalChange.emit(m_textColorFg);
|
||||
|
@ -54,7 +54,7 @@ namespace ewol {
|
||||
*/
|
||||
void setShaperName(std::string _shaperName);
|
||||
protected:
|
||||
ewol::object::Param<etk::Color<>> m_textColorFg; //!< Current color.
|
||||
ewol::parameter::Value<etk::Color<>> m_textColorFg; //!< Current color.
|
||||
public:
|
||||
/**
|
||||
* @brief get the current color of the color selection widget
|
||||
@ -76,7 +76,7 @@ namespace ewol {
|
||||
virtual void calculateMinMaxSize();
|
||||
virtual void onRegenerateDisplay();
|
||||
virtual bool onEventInput(const ewol::event::Input& _event);
|
||||
virtual void onParameterChangeValue(const ewol::object::ParameterRef& _paramPointer);
|
||||
virtual void onParameterChangeValue(const ewol::parameter::Ref& _paramPointer);
|
||||
private:
|
||||
/**
|
||||
* @brief internal system to change the property of the current status
|
||||
|
@ -195,7 +195,7 @@ void ewol::widget::CheckBox::periodicCall(const ewol::event::Time& _event) {
|
||||
markToRedraw();
|
||||
}
|
||||
|
||||
void ewol::widget::CheckBox::onParameterChangeValue(const ewol::object::ParameterRef& _paramPointer) {
|
||||
void ewol::widget::CheckBox::onParameterChangeValue(const ewol::parameter::Ref& _paramPointer) {
|
||||
ewol::widget::Container2::onParameterChangeValue(_paramPointer);
|
||||
if (_paramPointer == m_shaper) {
|
||||
markToRedraw();
|
||||
|
@ -28,7 +28,7 @@ namespace ewol {
|
||||
ewol::Signal<void> signalEnter;
|
||||
ewol::Signal<bool> signalValue;
|
||||
private:
|
||||
ewol::object::Param<ewol::compositing::Shaper> m_shaper; //!< Compositing theme.
|
||||
ewol::parameter::Value<ewol::compositing::Shaper> m_shaper; //!< Compositing theme.
|
||||
bool m_mouseHover; //!< Flag to know where the mouse is (inside the displayed widget (if not fill)).
|
||||
bool m_buttonPressed; //!< Flag to know if the button is curently pressed.
|
||||
// hover area :
|
||||
@ -58,7 +58,7 @@ namespace ewol {
|
||||
m_shaper.set(_shaperName);
|
||||
}
|
||||
protected:
|
||||
ewol::object::Param<bool> m_value; //!< Current state of the checkbox.
|
||||
ewol::parameter::Value<bool> m_value; //!< Current state of the checkbox.
|
||||
public:
|
||||
/**
|
||||
* @brief set the current value of the checkbox (check or not)
|
||||
@ -87,7 +87,7 @@ namespace ewol {
|
||||
void CheckStatus();
|
||||
protected: // Derived function
|
||||
virtual void onDraw();
|
||||
virtual void onParameterChangeValue(const ewol::object::ParameterRef& _paramPointer);
|
||||
virtual void onParameterChangeValue(const ewol::parameter::Ref& _paramPointer);
|
||||
public: // Derived function
|
||||
virtual void calculateMinMaxSize();
|
||||
virtual void calculateSize(const vec2& _availlable);
|
||||
|
@ -226,7 +226,7 @@ std::shared_ptr<ewol::Widget> ewol::widget::ContextMenu::getWidgetAtPos(const ve
|
||||
return std::dynamic_pointer_cast<ewol::Widget>(shared_from_this());
|
||||
}
|
||||
|
||||
void ewol::widget::ContextMenu::onParameterChangeValue(const ewol::object::ParameterRef& _paramPointer) {
|
||||
void ewol::widget::ContextMenu::onParameterChangeValue(const ewol::parameter::Ref& _paramPointer) {
|
||||
ewol::widget::Container::onParameterChangeValue(_paramPointer);
|
||||
if (_paramPointer == m_shaper) {
|
||||
markToRedraw();
|
||||
|
@ -38,7 +38,7 @@ namespace ewol {
|
||||
DECLARE_WIDGET_FACTORY(ContextMenu, "ContextMenu");
|
||||
virtual ~ContextMenu();
|
||||
private:
|
||||
ewol::object::Param<ewol::compositing::Shaper> m_shaper; //!< Compositing theme.
|
||||
ewol::parameter::Value<ewol::compositing::Shaper> m_shaper; //!< Compositing theme.
|
||||
public:
|
||||
/**
|
||||
* @brief set the shaper name (use the contructer one this permit to not noad unused shaper)
|
||||
@ -54,8 +54,8 @@ namespace ewol {
|
||||
etk::Color<> m_colorBorder;
|
||||
float m_offset;
|
||||
private:
|
||||
ewol::object::Param<vec2> m_arrowPos;
|
||||
ewol::object::ParamList<enum markPosition> m_arrawBorder;
|
||||
ewol::parameter::Value<vec2> m_arrowPos;
|
||||
ewol::parameter::List<enum markPosition> m_arrawBorder;
|
||||
public:
|
||||
void setPositionMark(enum markPosition _position, const vec2& _arrowPos) {
|
||||
m_arrawBorder.set(_position);
|
||||
@ -63,7 +63,7 @@ namespace ewol {
|
||||
}
|
||||
protected: // Derived function
|
||||
virtual void onDraw();
|
||||
virtual void onParameterChangeValue(const ewol::object::ParameterRef& _paramPointer);
|
||||
virtual void onParameterChangeValue(const ewol::parameter::Ref& _paramPointer);
|
||||
public: // Derived function
|
||||
virtual void onRegenerateDisplay();
|
||||
virtual bool onEventInput(const ewol::event::Input& _event);
|
||||
|
@ -559,7 +559,7 @@ void ewol::widget::Entry::periodicCall(const ewol::event::Time& _event) {
|
||||
markToRedraw();
|
||||
}
|
||||
|
||||
void ewol::widget::Entry::onParameterChangeValue(const ewol::object::ParameterRef& _paramPointer) {
|
||||
void ewol::widget::Entry::onParameterChangeValue(const ewol::parameter::Ref& _paramPointer) {
|
||||
ewol::Widget::onParameterChangeValue(_paramPointer);
|
||||
if (_paramPointer == m_shaper) {
|
||||
m_colorIdTextFg = m_shaper->requestColor("text-foreground");
|
||||
|
@ -38,7 +38,7 @@ namespace ewol {
|
||||
ewol::Signal<std::string> signalEnter; //!< Enter key is pressed
|
||||
ewol::Signal<std::string> signalModify; //!< data change
|
||||
private:
|
||||
ewol::object::Param<ewol::compositing::Shaper> m_shaper;
|
||||
ewol::parameter::Value<ewol::compositing::Shaper> m_shaper;
|
||||
int32_t m_colorIdTextFg; //!< color property of the text foreground
|
||||
int32_t m_colorIdTextBg; //!< color property of the text background
|
||||
int32_t m_colorIdCursor; //!< color property of the text cursor
|
||||
@ -58,7 +58,7 @@ namespace ewol {
|
||||
*/
|
||||
virtual ~Entry();
|
||||
private:
|
||||
ewol::object::Param<std::string> m_data; //!< sting that must be displayed
|
||||
ewol::parameter::Value<std::string> m_data; //!< sting that must be displayed
|
||||
protected:
|
||||
/**
|
||||
* @brief internal check the value with RegExp checking
|
||||
@ -79,7 +79,7 @@ namespace ewol {
|
||||
return m_data;
|
||||
};
|
||||
private:
|
||||
ewol::object::ParamRange<int32_t> m_maxCharacter; //!< number max of xharacter in the list
|
||||
ewol::parameter::Range<int32_t> m_maxCharacter; //!< number max of xharacter in the list
|
||||
public:
|
||||
/**
|
||||
* @brief Limit the number of Unicode character in the entry
|
||||
@ -96,7 +96,7 @@ namespace ewol {
|
||||
return m_maxCharacter;
|
||||
};
|
||||
private:
|
||||
ewol::object::Param<std::string> m_regexValue; //!< regular expression value
|
||||
ewol::parameter::Value<std::string> m_regexValue; //!< regular expression value
|
||||
std::regex m_regex; //!< regular expression to check content
|
||||
public:
|
||||
/**
|
||||
@ -147,7 +147,7 @@ namespace ewol {
|
||||
*/
|
||||
virtual void removeSelected();
|
||||
private:
|
||||
ewol::object::Param<std::string> m_textWhenNothing; //!< Text to display when nothing in in the entry (decorated text...)
|
||||
ewol::parameter::Value<std::string> m_textWhenNothing; //!< Text to display when nothing in in the entry (decorated text...)
|
||||
public:
|
||||
/**
|
||||
* @brief set The text displayed when nothing is in the entry.
|
||||
@ -175,7 +175,7 @@ namespace ewol {
|
||||
virtual void onLostFocus();
|
||||
virtual void changeStatusIn(int32_t _newStatusId);
|
||||
virtual void periodicCall(const ewol::event::Time& _event);
|
||||
virtual void onParameterChangeValue(const ewol::object::ParameterRef& _paramPointer);
|
||||
virtual void onParameterChangeValue(const ewol::parameter::Ref& _paramPointer);
|
||||
private: // callback functions
|
||||
void onCallbackShortCut(const std::string& _value);
|
||||
void onCallbackEntryClean();
|
||||
|
@ -179,7 +179,7 @@ bool ewol::widget::Image::loadXML(exml::Element* _node) {
|
||||
return true;
|
||||
}
|
||||
|
||||
void ewol::widget::Image::onParameterChangeValue(const ewol::object::ParameterRef& _paramPointer) {
|
||||
void ewol::widget::Image::onParameterChangeValue(const ewol::parameter::Ref& _paramPointer) {
|
||||
ewol::Widget::onParameterChangeValue(_paramPointer);
|
||||
if ( _paramPointer == m_fileName
|
||||
|| _paramPointer == m_imageSize) {
|
||||
|
@ -51,7 +51,7 @@ namespace ewol {
|
||||
*/
|
||||
void set(const std::string& _file, const ewol::Dimension& _border);
|
||||
protected:
|
||||
ewol::object::Param<std::string> m_fileName; //!< file name of the image.
|
||||
ewol::parameter::Value<std::string> m_fileName; //!< file name of the image.
|
||||
public:
|
||||
/**
|
||||
* @brief set the new filename
|
||||
@ -68,7 +68,7 @@ namespace ewol {
|
||||
return m_fileName;
|
||||
};
|
||||
protected:
|
||||
ewol::object::Param<ewol::Dimension> m_border; //!< border to add at the image.
|
||||
ewol::parameter::Value<ewol::Dimension> m_border; //!< border to add at the image.
|
||||
public:
|
||||
/**
|
||||
* @brief set tge Border size around the image
|
||||
@ -83,7 +83,7 @@ namespace ewol {
|
||||
return m_border;
|
||||
};
|
||||
protected:
|
||||
ewol::object::Param<ewol::Dimension> m_imageSize; //!< border to add at the image.
|
||||
ewol::parameter::Value<ewol::Dimension> m_imageSize; //!< border to add at the image.
|
||||
public:
|
||||
/**
|
||||
* @brief set tge Border size around the image
|
||||
@ -98,7 +98,7 @@ namespace ewol {
|
||||
return m_imageSize;
|
||||
};
|
||||
protected:
|
||||
ewol::object::Param<bool> m_keepRatio; //!< keep the image ratio between width and hight
|
||||
ewol::parameter::Value<bool> m_keepRatio; //!< keep the image ratio between width and hight
|
||||
public:
|
||||
/**
|
||||
* @brief set the current status of keeping ratio.
|
||||
@ -113,7 +113,7 @@ namespace ewol {
|
||||
return m_keepRatio;
|
||||
};
|
||||
protected:
|
||||
ewol::object::ParamRange<vec2> m_posStart; //!< position in the image to start the sisplay (when we want not to display all the image)
|
||||
ewol::parameter::Range<vec2> m_posStart; //!< position in the image to start the sisplay (when we want not to display all the image)
|
||||
public:
|
||||
/**
|
||||
* @brief set the current 'start' position in the image to display.
|
||||
@ -128,7 +128,7 @@ namespace ewol {
|
||||
return m_posStart;
|
||||
};
|
||||
protected:
|
||||
ewol::object::ParamRange<vec2> m_posStop; //!< position in the image to start the sisplay (when we want not to display all the image)
|
||||
ewol::parameter::Range<vec2> m_posStop; //!< position in the image to start the sisplay (when we want not to display all the image)
|
||||
public:
|
||||
/**
|
||||
* @brief set the current 'stop' position in the image to display.
|
||||
@ -143,7 +143,7 @@ namespace ewol {
|
||||
return m_posStop;
|
||||
};
|
||||
public:
|
||||
ewol::object::Param<bool> m_distanceFieldMode; //!< to have a parameter
|
||||
ewol::parameter::Value<bool> m_distanceFieldMode; //!< to have a parameter
|
||||
public:
|
||||
/**
|
||||
* @brief Set distance field rendering mode
|
||||
@ -161,7 +161,7 @@ namespace ewol {
|
||||
}
|
||||
protected: // Derived function
|
||||
virtual void onDraw();
|
||||
virtual void onParameterChangeValue(const ewol::object::ParameterRef& _paramPointer);
|
||||
virtual void onParameterChangeValue(const ewol::parameter::Ref& _paramPointer);
|
||||
public: // Derived function
|
||||
virtual void calculateMinMaxSize();
|
||||
virtual void onRegenerateDisplay();
|
||||
|
@ -142,7 +142,7 @@ bool ewol::widget::Label::loadXML(exml::Element* _node) {
|
||||
return true;
|
||||
}
|
||||
|
||||
void ewol::widget::Label::onParameterChangeValue(const ewol::object::ParameterRef& _paramPointer) {
|
||||
void ewol::widget::Label::onParameterChangeValue(const ewol::parameter::Ref& _paramPointer) {
|
||||
ewol::Widget::onParameterChangeValue(_paramPointer);
|
||||
if (_paramPointer == m_label) {
|
||||
markToRedraw();
|
||||
|
@ -28,7 +28,7 @@ namespace ewol {
|
||||
ewol::Signal<void> signalPressed;
|
||||
private:
|
||||
ewol::compositing::Text m_text; //!< Compositing text element.
|
||||
ewol::object::Param<std::u32string> m_label; //!< decorated text to display.
|
||||
ewol::parameter::Value<std::u32string> m_label; //!< decorated text to display.
|
||||
std::shared_ptr<ewol::resource::ColorFile> m_colorProperty; //!< theme color property
|
||||
int32_t m_colorDefaultFgText; //!< Default color of the text
|
||||
int32_t m_colorDefaultBgText; //!< Default Background color of the text
|
||||
@ -69,7 +69,7 @@ namespace ewol {
|
||||
};
|
||||
protected: // Derived function
|
||||
virtual void onDraw();
|
||||
virtual void onParameterChangeValue(const ewol::object::ParameterRef& _paramPointer);
|
||||
virtual void onParameterChangeValue(const ewol::parameter::Ref& _paramPointer);
|
||||
public: // Derived function
|
||||
virtual void calculateMinMaxSize();
|
||||
virtual void onRegenerateDisplay();
|
||||
|
@ -239,7 +239,7 @@ bool ewol::widget::ListFileSystem::onItemEvent(int32_t _IdInput,
|
||||
return false;
|
||||
}
|
||||
|
||||
void ewol::widget::ListFileSystem::onParameterChangeValue(const ewol::object::ParameterRef& _paramPointer) {
|
||||
void ewol::widget::ListFileSystem::onParameterChangeValue(const ewol::parameter::Ref& _paramPointer) {
|
||||
ewol::widget::List::onParameterChangeValue(_paramPointer);
|
||||
if (_paramPointer == m_folder) {
|
||||
regenerateView();
|
||||
|
@ -69,8 +69,8 @@ namespace ewol {
|
||||
*/
|
||||
std::string getSelect() const ;
|
||||
protected:
|
||||
ewol::object::Param<std::string> m_folder; //!< Current folder that display point on.
|
||||
ewol::object::Param<std::string, true> m_selectFile; //!< current selected file
|
||||
ewol::parameter::Value<std::string> m_folder; //!< Current folder that display point on.
|
||||
ewol::parameter::Value<std::string, true> m_selectFile; //!< current selected file
|
||||
public:
|
||||
/**
|
||||
* @brief Set a folder to display (might be a valid folder !!!)
|
||||
@ -87,7 +87,7 @@ namespace ewol {
|
||||
return m_folder;
|
||||
};
|
||||
protected:
|
||||
ewol::object::Param<bool> m_showFile; //!< Show files elements
|
||||
ewol::parameter::Value<bool> m_showFile; //!< Show files elements
|
||||
public:
|
||||
/**
|
||||
* @brief Set the status of the displaying files or Not.
|
||||
@ -104,7 +104,7 @@ namespace ewol {
|
||||
return m_showFile;
|
||||
};
|
||||
protected:
|
||||
ewol::object::Param<bool> m_showFolder; //!< Display the folders elements
|
||||
ewol::parameter::Value<bool> m_showFolder; //!< Display the folders elements
|
||||
public:
|
||||
/**
|
||||
* @brief Set the status of the displaying fodlers or Not.
|
||||
@ -121,7 +121,7 @@ namespace ewol {
|
||||
return m_showFile;
|
||||
};
|
||||
protected:
|
||||
ewol::object::Param<bool> m_showHidden; //!< Display hidden elements
|
||||
ewol::parameter::Value<bool> m_showHidden; //!< Display hidden elements
|
||||
public:
|
||||
/**
|
||||
* @brief Set the status of the displaying hidden files or folder or Not.
|
||||
@ -138,7 +138,7 @@ namespace ewol {
|
||||
return m_showFile;
|
||||
};
|
||||
protected:
|
||||
ewol::object::Param<bool> m_showTemporaryFile; //!< show the temporary files elements (XXX~, XXX.bck, XXX.pyc ...)
|
||||
ewol::parameter::Value<bool> m_showTemporaryFile; //!< show the temporary files elements (XXX~, XXX.bck, XXX.pyc ...)
|
||||
public:
|
||||
/**
|
||||
* @brief Set the status of the displaying temporary file (xxx~, xxx.bck, xxx.pyc) or Not.
|
||||
@ -155,7 +155,7 @@ namespace ewol {
|
||||
return m_showFile;
|
||||
};
|
||||
public: // glocal derived functions
|
||||
virtual void onParameterChangeValue(const ewol::object::ParameterRef& _paramPointer);
|
||||
virtual void onParameterChangeValue(const ewol::parameter::Ref& _paramPointer);
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -134,7 +134,7 @@ std::shared_ptr<ewol::Widget> ewol::widget::PopUp::getWidgetAtPos(const vec2& _p
|
||||
return std::dynamic_pointer_cast<ewol::Widget>(shared_from_this());
|
||||
}
|
||||
|
||||
void ewol::widget::PopUp::onParameterChangeValue(const ewol::object::ParameterRef& _paramPointer) {
|
||||
void ewol::widget::PopUp::onParameterChangeValue(const ewol::parameter::Ref& _paramPointer) {
|
||||
ewol::widget::Container::onParameterChangeValue(_paramPointer);
|
||||
if (_paramPointer == m_shaper) {
|
||||
markToRedraw();
|
||||
|
@ -24,7 +24,7 @@ namespace ewol {
|
||||
*/
|
||||
class PopUp : public ewol::widget::Container {
|
||||
protected:
|
||||
ewol::object::Param<ewol::compositing::Shaper> m_shaper; //!< Compositing theme.
|
||||
ewol::parameter::Value<ewol::compositing::Shaper> m_shaper; //!< Compositing theme.
|
||||
protected:
|
||||
/**
|
||||
* @brief Constructor
|
||||
@ -44,7 +44,7 @@ namespace ewol {
|
||||
*/
|
||||
void setShaperName(const std::string& _shaperName);
|
||||
protected:
|
||||
ewol::object::Param<bvec2> m_lockExpand; //!< Lock the expend of the sub widget to this one == > this permit to limit bigger subWidget
|
||||
ewol::parameter::Value<bvec2> m_lockExpand; //!< Lock the expend of the sub widget to this one == > this permit to limit bigger subWidget
|
||||
public:
|
||||
/**
|
||||
* @brief Limit the expend properties to the current widget (no contamination)
|
||||
@ -54,7 +54,7 @@ namespace ewol {
|
||||
m_lockExpand.set(_lockExpand);
|
||||
}
|
||||
private:
|
||||
ewol::object::Param<bool> m_closeOutEvent; //!< ratio progression of a sliding
|
||||
ewol::parameter::Value<bool> m_closeOutEvent; //!< ratio progression of a sliding
|
||||
public:
|
||||
/**
|
||||
* @brief Request the Auto-remove when the event input is set outside the widget
|
||||
@ -72,7 +72,7 @@ namespace ewol {
|
||||
};
|
||||
protected: // Derived function
|
||||
virtual void onDraw();
|
||||
virtual void onParameterChangeValue(const ewol::object::ParameterRef& _paramPointer);
|
||||
virtual void onParameterChangeValue(const ewol::parameter::Ref& _paramPointer);
|
||||
public: // Derived function
|
||||
virtual void periodicCall(const ewol::event::Time& _event);
|
||||
virtual void systemDraw(const ewol::DrawProperty& _displayProp);
|
||||
|
@ -73,7 +73,7 @@ void ewol::widget::ProgressBar::onRegenerateDisplay() {
|
||||
}
|
||||
}
|
||||
|
||||
void ewol::widget::ProgressBar::onParameterChangeValue(const ewol::object::ParameterRef& _paramPointer) {
|
||||
void ewol::widget::ProgressBar::onParameterChangeValue(const ewol::parameter::Ref& _paramPointer) {
|
||||
ewol::Widget::onParameterChangeValue(_paramPointer);
|
||||
if (_paramPointer == m_value) {
|
||||
markToRedraw();
|
||||
|
@ -38,13 +38,13 @@ namespace ewol {
|
||||
m_textColorFg = _newColor;
|
||||
};
|
||||
private:
|
||||
ewol::object::Param<float> m_value; //!< % used
|
||||
ewol::object::Param<etk::Color<>> m_textColorFg; //!< forder bar color
|
||||
ewol::object::Param<etk::Color<>> m_textColorBgOn; //!< bar color enable
|
||||
ewol::object::Param<etk::Color<>> m_textColorBgOff; //!< bar color disable
|
||||
ewol::parameter::Value<float> m_value; //!< % used
|
||||
ewol::parameter::Value<etk::Color<>> m_textColorFg; //!< forder bar color
|
||||
ewol::parameter::Value<etk::Color<>> m_textColorBgOn; //!< bar color enable
|
||||
ewol::parameter::Value<etk::Color<>> m_textColorBgOff; //!< bar color disable
|
||||
protected: // Derived function
|
||||
virtual void onDraw();
|
||||
virtual void onParameterChangeValue(const ewol::object::ParameterRef& _paramPointer);
|
||||
virtual void onParameterChangeValue(const ewol::parameter::Ref& _paramPointer);
|
||||
public: // Derived function
|
||||
virtual void onRegenerateDisplay();
|
||||
virtual void calculateMinMaxSize();
|
||||
|
@ -350,7 +350,7 @@ std::shared_ptr<ewol::Widget> ewol::widget::Scroll::getWidgetAtPos(const vec2& _
|
||||
}
|
||||
return std::dynamic_pointer_cast<ewol::Widget>(shared_from_this());;
|
||||
}
|
||||
void ewol::widget::Scroll::onParameterChangeValue(const ewol::object::ParameterRef& _paramPointer) {
|
||||
void ewol::widget::Scroll::onParameterChangeValue(const ewol::parameter::Ref& _paramPointer) {
|
||||
ewol::widget::Container::onParameterChangeValue(_paramPointer);
|
||||
if (_paramPointer == m_limit) {
|
||||
|
||||
|
@ -32,7 +32,7 @@ namespace ewol {
|
||||
ewol::compositing::Shaper m_shaperH; //!< Compositing theme Horizontal.
|
||||
ewol::compositing::Shaper m_shaperV; //!< Compositing theme Vertical.
|
||||
protected:
|
||||
ewol::object::ParamRange<vec2> m_limit;
|
||||
ewol::parameter::Range<vec2> m_limit;
|
||||
private:
|
||||
float m_pixelScrolling;
|
||||
vec2 m_highSpeedStartPos;
|
||||
@ -67,7 +67,7 @@ namespace ewol {
|
||||
virtual std::shared_ptr<ewol::Widget> getWidgetAtPos(const vec2& _pos);
|
||||
protected: // Derived function
|
||||
virtual void onDraw();
|
||||
virtual void onParameterChangeValue(const ewol::object::ParameterRef& _paramPointer);
|
||||
virtual void onParameterChangeValue(const ewol::parameter::Ref& _paramPointer);
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -178,7 +178,7 @@ void ewol::widget::Sizer::subWidgetUnLink(std::shared_ptr<ewol::Widget> _newWidg
|
||||
ewol::widget::ContainerN::subWidgetUnLink(_newWidget);
|
||||
}
|
||||
|
||||
void ewol::widget::Sizer::onParameterChangeValue(const ewol::object::ParameterRef& _paramPointer) {
|
||||
void ewol::widget::Sizer::onParameterChangeValue(const ewol::parameter::Ref& _paramPointer) {
|
||||
ewol::widget::ContainerN::onParameterChangeValue(_paramPointer);
|
||||
if (_paramPointer == m_mode) {
|
||||
markToRedraw();
|
||||
|
@ -31,7 +31,7 @@ namespace ewol {
|
||||
modeHori, //!< Horizontal mode
|
||||
};
|
||||
private:
|
||||
ewol::object::ParamList<enum displayMode> m_mode; //!< Methode to display the widget list (vert/hory ...)
|
||||
ewol::parameter::List<enum displayMode> m_mode; //!< Methode to display the widget list (vert/hory ...)
|
||||
protected:
|
||||
/**
|
||||
* @brief Constructor
|
||||
@ -60,7 +60,7 @@ namespace ewol {
|
||||
return m_mode;
|
||||
}
|
||||
private:
|
||||
ewol::object::Param<ewol::Dimension> m_borderSize; //!< Border size needed for all the display
|
||||
ewol::parameter::Value<ewol::Dimension> m_borderSize; //!< Border size needed for all the display
|
||||
public:
|
||||
/**
|
||||
* @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 void subWidgetRemove(std::shared_ptr<ewol::Widget> _newWidget);
|
||||
virtual void subWidgetUnLink(std::shared_ptr<ewol::Widget> _newWidget);
|
||||
virtual void onParameterChangeValue(const ewol::object::ParameterRef& _paramPointer);
|
||||
virtual void onParameterChangeValue(const ewol::parameter::Ref& _paramPointer);
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -105,7 +105,7 @@ void ewol::widget::Slider::updateValue(float _newValue) {
|
||||
}
|
||||
|
||||
// TODO : Review this really bad things ...
|
||||
void ewol::widget::Slider::onParameterChangeValue(const ewol::object::ParameterRef& _paramPointer) {
|
||||
void ewol::widget::Slider::onParameterChangeValue(const ewol::parameter::Ref& _paramPointer) {
|
||||
ewol::Widget::onParameterChangeValue(_paramPointer);
|
||||
if (_paramPointer == m_value) {
|
||||
updateValue(m_value.get());
|
||||
|
@ -32,7 +32,7 @@ namespace ewol {
|
||||
DECLARE_WIDGET_FACTORY(Slider, "Slider");
|
||||
virtual ~Slider();
|
||||
protected:
|
||||
ewol::object::Param<float> m_value; //!< current value of the Slider
|
||||
ewol::parameter::Value<float> m_value; //!< current value of the Slider
|
||||
public:
|
||||
/**
|
||||
* @brief Set the value of the slider.
|
||||
@ -49,7 +49,7 @@ namespace ewol {
|
||||
return m_value;
|
||||
}
|
||||
protected:
|
||||
ewol::object::Param<float> m_min; //!< minimum value of the slider
|
||||
ewol::parameter::Value<float> m_min; //!< minimum value of the slider
|
||||
public:
|
||||
/**
|
||||
* @brief Set the minumum value of the slider.
|
||||
@ -66,7 +66,7 @@ namespace ewol {
|
||||
return m_min;
|
||||
}
|
||||
protected:
|
||||
ewol::object::Param<float> m_max; //!< maximum value of the slider
|
||||
ewol::parameter::Value<float> m_max; //!< maximum value of the slider
|
||||
public:
|
||||
/**
|
||||
* @brief Set the maximum value of the slider.
|
||||
@ -83,7 +83,7 @@ namespace ewol {
|
||||
return m_max;
|
||||
}
|
||||
protected:
|
||||
ewol::object::Param<float> m_step;
|
||||
ewol::parameter::Value<float> m_step;
|
||||
public:
|
||||
/**
|
||||
* @brief Set the step value of the slider.
|
||||
@ -114,7 +114,7 @@ namespace ewol {
|
||||
virtual void calculateMinMaxSize();
|
||||
virtual void onRegenerateDisplay();
|
||||
virtual bool onEventInput(const ewol::event::Input& _event);
|
||||
virtual void onParameterChangeValue(const ewol::object::ParameterRef& _paramPointer);
|
||||
virtual void onParameterChangeValue(const ewol::parameter::Ref& _paramPointer);
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -48,7 +48,7 @@ void ewol::widget::Spacer::onRegenerateDisplay() {
|
||||
m_draw.rectangleWidth(vec3(m_size.x(), m_size.y(),0) );
|
||||
}
|
||||
|
||||
void ewol::widget::Spacer::onParameterChangeValue(const ewol::object::ParameterRef& _paramPointer) {
|
||||
void ewol::widget::Spacer::onParameterChangeValue(const ewol::parameter::Ref& _paramPointer) {
|
||||
ewol::Widget::onParameterChangeValue(_paramPointer);
|
||||
if (_paramPointer == m_color) {
|
||||
markToRedraw();
|
||||
|
@ -37,7 +37,7 @@ namespace ewol {
|
||||
*/
|
||||
virtual ~Spacer();
|
||||
protected:
|
||||
ewol::object::Param<etk::Color<>> m_color; //!< Background color
|
||||
ewol::parameter::Value<etk::Color<>> m_color; //!< Background color
|
||||
public:
|
||||
/**
|
||||
* @brief Spziby the background color (basicly transparent)
|
||||
@ -51,7 +51,7 @@ namespace ewol {
|
||||
virtual std::shared_ptr<ewol::Widget> getWidgetAtPos(const vec2& _pos) { return nullptr; };
|
||||
virtual void onRegenerateDisplay();
|
||||
virtual void onDraw();
|
||||
virtual void onParameterChangeValue(const ewol::object::ParameterRef& _paramPointer);
|
||||
virtual void onParameterChangeValue(const ewol::parameter::Ref& _paramPointer);
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -270,7 +270,7 @@ void ewol::widget::WSlider::onRegenerateDisplay() {
|
||||
}
|
||||
}
|
||||
}
|
||||
void ewol::widget::WSlider::onParameterChangeValue(const ewol::object::ParameterRef& _paramPointer) {
|
||||
void ewol::widget::WSlider::onParameterChangeValue(const ewol::parameter::Ref& _paramPointer) {
|
||||
ewol::widget::ContainerN::onParameterChangeValue(_paramPointer);
|
||||
if (_paramPointer == m_selectNewWidget) {
|
||||
if (m_selectNewWidget.get() != "") {
|
||||
|
@ -43,7 +43,7 @@ namespace ewol {
|
||||
int32_t m_windowsDestination; //!< widget destinated viewed
|
||||
int32_t m_windowsRequested; //!< widget destination requested when change in modification in progress
|
||||
float m_slidingProgress; //!< ratio progression of a sliding
|
||||
ewol::object::Param<std::string, true> m_selectNewWidget; // input config requesting
|
||||
ewol::parameter::Value<std::string, true> m_selectNewWidget; // input config requesting
|
||||
protected:
|
||||
/**
|
||||
* @brief Generate the move on the specific vector ID (This is not a public acces, because the vector can have some null pointer inside ...)
|
||||
@ -67,7 +67,7 @@ namespace ewol {
|
||||
*/
|
||||
void subWidgetSelectSet(const std::string& _widgetName);
|
||||
private:
|
||||
ewol::object::ParamRange<float> m_transitionSpeed; //!< speed of the transition (default 1 == > 1s)
|
||||
ewol::parameter::Range<float> m_transitionSpeed; //!< speed of the transition (default 1 == > 1s)
|
||||
public:
|
||||
/**
|
||||
* @brief set transition speed element.
|
||||
@ -84,7 +84,7 @@ namespace ewol {
|
||||
return m_transitionSpeed;
|
||||
};
|
||||
private:
|
||||
ewol::object::ParamList<enum sladingMode> m_transitionSlide; //!< mode to slide the widgets
|
||||
ewol::parameter::List<enum sladingMode> m_transitionSlide; //!< mode to slide the widgets
|
||||
public:
|
||||
/**
|
||||
* @brief set a new mode of sliding element
|
||||
@ -106,7 +106,7 @@ namespace ewol {
|
||||
virtual void onRegenerateDisplay();
|
||||
virtual std::shared_ptr<ewol::Widget> getWidgetAtPos(const vec2& _pos);
|
||||
virtual void periodicCall(const ewol::event::Time& _event);
|
||||
virtual void onParameterChangeValue(const ewol::object::ParameterRef& _paramPointer);
|
||||
virtual void onParameterChangeValue(const ewol::parameter::Ref& _paramPointer);
|
||||
};
|
||||
};
|
||||
std::ostream& operator <<(std::ostream& _os, const enum ewol::widget::WSlider::sladingMode _obj);
|
||||
|
@ -613,7 +613,7 @@ bool ewol::Widget::systemEventInput(ewol::event::InputSystem& _event) {
|
||||
return onEventInput(_event.m_event);
|
||||
}
|
||||
|
||||
void ewol::Widget::onParameterChangeValue(const ewol::object::ParameterRef& _paramPointer) {
|
||||
void ewol::Widget::onParameterChangeValue(const ewol::parameter::Ref& _paramPointer) {
|
||||
ewol::Object::onParameterChangeValue(_paramPointer);
|
||||
if (_paramPointer == m_canFocus) {
|
||||
if (m_hasFocus == true) {
|
||||
|
@ -228,7 +228,7 @@ namespace ewol {
|
||||
*/
|
||||
virtual vec2 getOrigin();
|
||||
protected:
|
||||
ewol::object::Param<ewol::Dimension> m_userMinSize; //!< user define the minimum size of the widget
|
||||
ewol::parameter::Value<ewol::Dimension> m_userMinSize; //!< user define the minimum size of the widget
|
||||
public:
|
||||
/**
|
||||
* @brief User set the minimum size he want to set the display
|
||||
@ -255,7 +255,7 @@ namespace ewol {
|
||||
*/
|
||||
virtual void checkMinSize();
|
||||
protected:
|
||||
ewol::object::Param<ewol::Dimension> m_userMaxSize; //!< user define the maximum size of the widget
|
||||
ewol::parameter::Value<ewol::Dimension> m_userMaxSize; //!< user define the maximum size of the widget
|
||||
public:
|
||||
/**
|
||||
* @brief User set the maximum size he want to set the display
|
||||
@ -282,7 +282,7 @@ namespace ewol {
|
||||
*/
|
||||
virtual void checkMaxSize();
|
||||
protected:
|
||||
ewol::object::Param<bvec2> m_userExpand;
|
||||
ewol::parameter::Value<bvec2> m_userExpand;
|
||||
public:
|
||||
/**
|
||||
* @brief set the expend capabilities (x&y)
|
||||
@ -305,7 +305,7 @@ namespace ewol {
|
||||
*/
|
||||
virtual bvec2 canExpand();
|
||||
protected:
|
||||
ewol::object::Param<bvec2> m_userFill;
|
||||
ewol::parameter::Value<bvec2> m_userFill;
|
||||
public:
|
||||
/**
|
||||
* @brief set the x&y filling capacity
|
||||
@ -328,7 +328,7 @@ namespace ewol {
|
||||
*/
|
||||
const bvec2& canFill();
|
||||
protected:
|
||||
ewol::object::Param<bool> m_hide; //!< hide a widget on the display
|
||||
ewol::parameter::Value<bool> m_hide; //!< hide a widget on the display
|
||||
public:
|
||||
/**
|
||||
* @brief set the widget hidden
|
||||
@ -351,7 +351,7 @@ namespace ewol {
|
||||
};
|
||||
|
||||
protected:
|
||||
ewol::object::ParamList<enum ewol::gravity> m_gravity; //!< Gravity of the widget
|
||||
ewol::parameter::List<enum ewol::gravity> m_gravity; //!< Gravity of the widget
|
||||
public:
|
||||
/**
|
||||
* @brief set the widget gravity
|
||||
@ -372,7 +372,7 @@ namespace ewol {
|
||||
// ----------------------------------------------------------------------------------------------------------------
|
||||
private:
|
||||
bool m_hasFocus; //!< set the focus on this widget
|
||||
ewol::object::Param<bool> m_canFocus; //!< the focus can be done on this widget
|
||||
ewol::parameter::Value<bool> m_canFocus; //!< the focus can be done on this widget
|
||||
public:
|
||||
/**
|
||||
* @brief get the focus state of the widget
|
||||
@ -665,7 +665,7 @@ namespace ewol {
|
||||
public: // Derived function
|
||||
virtual bool loadXML(exml::Element* _node);
|
||||
protected: // Derived function
|
||||
virtual void onParameterChangeValue(const ewol::object::ParameterRef& _paramPointer);
|
||||
virtual void onParameterChangeValue(const ewol::parameter::Ref& _paramPointer);
|
||||
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
|
||||
@ -696,10 +696,10 @@ namespace ewol {
|
||||
enum annimationMode m_annimationMode; //!< true when the annimation is started
|
||||
float m_annimationratio; //!< Ratio of the annimation [0..1]
|
||||
protected:
|
||||
ewol::object::ParamList<int32_t> m_annimationTypeStart; //!< type of start annimation
|
||||
ewol::object::ParamRange<float> m_annimationTimeStart; //!< time to produce start annimation
|
||||
ewol::object::ParamList<int32_t> m_annimationTypeStop; //!< type of start annimation
|
||||
ewol::object::ParamRange<float> m_annimationTimeStop; //!< time to produce start annimation
|
||||
ewol::parameter::List<int32_t> m_annimationTypeStart; //!< type of start annimation
|
||||
ewol::parameter::Range<float> m_annimationTimeStart; //!< time to produce start annimation
|
||||
ewol::parameter::List<int32_t> m_annimationTypeStop; //!< type of start annimation
|
||||
ewol::parameter::Range<float> m_annimationTimeStop; //!< time to produce start annimation
|
||||
protected:
|
||||
/**
|
||||
* @brief Add a annimation type capabilities of this widget.
|
||||
|
@ -90,12 +90,14 @@ def create(target):
|
||||
myModule.add_src_file([
|
||||
'ewol/object/Manager.cpp',
|
||||
'ewol/object/Object.cpp',
|
||||
'ewol/object/Worker.cpp',
|
||||
'ewol/object/Parameter.cpp',
|
||||
'ewol/object/ParameterList.cpp',
|
||||
'ewol/object/ParamList.cpp'
|
||||
'ewol/object/Worker.cpp'
|
||||
])
|
||||
# object :
|
||||
# parameter :
|
||||
myModule.add_src_file([
|
||||
'ewol/parameter/Parameter.cpp',
|
||||
'ewol/parameter/Interface.cpp',
|
||||
])
|
||||
# Signal :
|
||||
myModule.add_src_file([
|
||||
'ewol/signal/List.cpp',
|
||||
'ewol/signal/Base.cpp'
|
||||
|
Loading…
Reference in New Issue
Block a user