[DEV] start think of new simplest API for properties (not build and not work)
This commit is contained in:
parent
86f537913b
commit
1a3bbc297c
@ -77,6 +77,10 @@ namespace ewol {
|
|||||||
class Object : public std::enable_shared_from_this<Object>,
|
class Object : public std::enable_shared_from_this<Object>,
|
||||||
public eproperty::Interface,
|
public eproperty::Interface,
|
||||||
public esignal::Interface {
|
public esignal::Interface {
|
||||||
|
public: // Event list
|
||||||
|
|
||||||
|
public: // propertie list
|
||||||
|
eproperty::Value<std::string> propertyName; //!< name of the element ...
|
||||||
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:
|
||||||
@ -187,23 +191,6 @@ 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 propertySetOnWidgetNamed(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:
|
|
||||||
eproperty::Value<std::string> m_name; //!< name of the element ...
|
|
||||||
public:
|
|
||||||
/**
|
|
||||||
* @brief get the Object name
|
|
||||||
* @return The requested name
|
|
||||||
*/
|
|
||||||
const std::string& getName() const {
|
|
||||||
return m_name.get();
|
|
||||||
};
|
|
||||||
/**
|
|
||||||
* @brief get the Widget name
|
|
||||||
* @param[in] _name The new name
|
|
||||||
*/
|
|
||||||
void setName(const std::string& _name) {
|
|
||||||
m_name = _name;
|
|
||||||
};
|
|
||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
* @brief load properties with an XML node.
|
* @brief load properties with an XML node.
|
||||||
@ -310,8 +297,4 @@ 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 <esignal/Signal.h>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -26,21 +26,27 @@ namespace ewol {
|
|||||||
*/
|
*/
|
||||||
class Button : public ewol::widget::Container2 {
|
class Button : public ewol::widget::Container2 {
|
||||||
public:
|
public:
|
||||||
// Event list of properties
|
|
||||||
esignal::Signal<void> signalPressed;
|
|
||||||
esignal::Signal<void> signalDown;
|
|
||||||
esignal::Signal<void> signalUp;
|
|
||||||
esignal::Signal<void> signalEnter;
|
|
||||||
esignal::Signal<void> signalLeave;
|
|
||||||
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
|
||||||
lockWhenReleased, //!< When the state is set in not pressed, the status stay in this one
|
lockWhenReleased, //!< When the state is set in not pressed, the status stay in this one
|
||||||
lockAccess, //!< all event are trashed == > acctivity of the button is disable
|
lockAccess, //!< all event are trashed == > acctivity of the button is disable
|
||||||
};
|
};
|
||||||
|
public: // Event list
|
||||||
|
esignal::Signal<void> signalPressed;
|
||||||
|
esignal::Signal<void> signalDown;
|
||||||
|
esignal::Signal<void> signalUp;
|
||||||
|
esignal::Signal<void> signalEnter;
|
||||||
|
esignal::Signal<void> signalLeave;
|
||||||
|
esignal::Signal<bool> signalValue;
|
||||||
|
public: // propertie list
|
||||||
|
eproperty::Value<std::string> propertyShaper; //!< shaper name property
|
||||||
|
eproperty::Value<bool> propertyValue; //!< Current state of the button.
|
||||||
|
eproperty::List<enum buttonLock> propertyLock; //!< Current lock state of the button.
|
||||||
|
eproperty::Value<bool> propertyToggleMode; //!< The button is able to toggle.
|
||||||
|
eproperty::Value<bool> propertyEnableSingle; //!< When a single subwidget is set display all time it.
|
||||||
private:
|
private:
|
||||||
eproperty::Value<ewol::compositing::Shaper> m_shaper; //!< Compositing theme.
|
ewol::compositing::Shaper m_shaper; //!< Compositing theme.
|
||||||
protected:
|
protected:
|
||||||
/**
|
/**
|
||||||
* @brief Constructor
|
* @brief Constructor
|
||||||
@ -61,76 +67,6 @@ namespace ewol {
|
|||||||
void setShaperName(const std::string& _shaperName) {
|
void setShaperName(const std::string& _shaperName) {
|
||||||
m_shaper.setString(_shaperName);
|
m_shaper.setString(_shaperName);
|
||||||
}
|
}
|
||||||
protected:
|
|
||||||
eproperty::Value<bool> m_value; //!< Current state of the button.
|
|
||||||
public:
|
|
||||||
/**
|
|
||||||
* @brief set the currentValue of the Button (pressed or not)
|
|
||||||
* @note Work only in toggle mode
|
|
||||||
* @param[in] _val New value of the button
|
|
||||||
*/
|
|
||||||
void setValue(bool _val) {
|
|
||||||
m_value.set(_val);
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* @brief get the current button value.
|
|
||||||
* @return True : The button is pressed.
|
|
||||||
* @return false : The button is released.
|
|
||||||
*/
|
|
||||||
bool getValue() const {
|
|
||||||
return m_value;
|
|
||||||
};
|
|
||||||
protected:
|
|
||||||
eproperty::List<enum buttonLock> m_lock; //!< Current lock state of the button.
|
|
||||||
public:
|
|
||||||
/**
|
|
||||||
* @brief set the button lock state.
|
|
||||||
* @param[in] _lock New lock mode of the button
|
|
||||||
*/
|
|
||||||
void setLock(enum buttonLock _lock) {
|
|
||||||
m_lock.set(_lock);
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* @brief get the current button lock value.
|
|
||||||
* @return The requested lock mode
|
|
||||||
*/
|
|
||||||
enum buttonLock getLock() const {
|
|
||||||
return m_lock;
|
|
||||||
};
|
|
||||||
protected:
|
|
||||||
eproperty::Value<bool> m_toggleMode; //!< The button is able to toggle.
|
|
||||||
public:
|
|
||||||
/**
|
|
||||||
* @brief change the toggle mode.
|
|
||||||
* @param[in] _togg New toggle mode
|
|
||||||
*/
|
|
||||||
void setToggleMode(bool _togg) {
|
|
||||||
m_toggleMode.set(_togg);
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* @brief get the current toggle mode.
|
|
||||||
* @return the current toggle mode.
|
|
||||||
*/
|
|
||||||
bool getToggleMode() const {
|
|
||||||
return m_toggleMode;
|
|
||||||
};
|
|
||||||
protected:
|
|
||||||
eproperty::Value<bool> m_enableSingle; //!< When a single subwidget is set display all time it.
|
|
||||||
public:
|
|
||||||
/**
|
|
||||||
* @brief Chane the display single widget mode availlable.
|
|
||||||
* @param[in] _single single mode widget set
|
|
||||||
*/
|
|
||||||
void setEnableSingle(bool _single) {
|
|
||||||
m_enableSingle.set(_single);
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* @brief get the current single mode enableling.
|
|
||||||
* @return the current value.
|
|
||||||
*/
|
|
||||||
bool getEnableSingle() const {
|
|
||||||
return m_enableSingle;
|
|
||||||
};
|
|
||||||
private:
|
private:
|
||||||
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.
|
||||||
|
@ -20,9 +20,10 @@
|
|||||||
namespace ewol {
|
namespace ewol {
|
||||||
namespace widget {
|
namespace widget {
|
||||||
class ButtonColor : public ewol::Widget {
|
class ButtonColor : public ewol::Widget {
|
||||||
public:
|
public: // signals
|
||||||
// Event list of properties
|
|
||||||
esignal::Signal<etk::Color<>> signalChange;
|
esignal::Signal<etk::Color<>> signalChange;
|
||||||
|
public: // properties
|
||||||
|
eproperty::Value<etk::Color<>> m_textColorFg; //!< Current color.
|
||||||
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.
|
||||||
@ -51,23 +52,6 @@ namespace ewol {
|
|||||||
* @param[in] _shaperName The new shaper filename.
|
* @param[in] _shaperName The new shaper filename.
|
||||||
*/
|
*/
|
||||||
void setShaperName(std::string _shaperName);
|
void setShaperName(std::string _shaperName);
|
||||||
protected:
|
|
||||||
eproperty::Value<etk::Color<>> m_textColorFg; //!< Current color.
|
|
||||||
public:
|
|
||||||
/**
|
|
||||||
* @brief get the current color of the color selection widget
|
|
||||||
* @return The current color
|
|
||||||
*/
|
|
||||||
const etk::Color<>& getValue() {
|
|
||||||
return m_textColorFg.get();
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* @brief Specify the current color.
|
|
||||||
* @param[in] _color The new display color.
|
|
||||||
*/
|
|
||||||
void setValue(const etk::Color<>& _color) {
|
|
||||||
m_textColorFg.set(_color);
|
|
||||||
}
|
|
||||||
protected: // Derived function
|
protected: // Derived function
|
||||||
virtual void onDraw();
|
virtual void onDraw();
|
||||||
public: // Derived function
|
public: // Derived function
|
||||||
|
@ -25,6 +25,7 @@ ewol::widget::CheckBox::CheckBox() :
|
|||||||
signalUp(*this, "up", "CheckBox is UP"),
|
signalUp(*this, "up", "CheckBox is UP"),
|
||||||
signalEnter(*this, "enter", "The cursor enter inside the CheckBox"),
|
signalEnter(*this, "enter", "The cursor enter inside the CheckBox"),
|
||||||
signalValue(*this, "value", "CheckBox value change"),
|
signalValue(*this, "value", "CheckBox value change"),
|
||||||
|
propertyshaper(*this, "shaper", "The display name for config file"),
|
||||||
m_shaper(*this, "shaper", "The display name for config file"),
|
m_shaper(*this, "shaper", "The display name for config file"),
|
||||||
m_mouseHover(false),
|
m_mouseHover(false),
|
||||||
m_buttonPressed(false),
|
m_buttonPressed(false),
|
||||||
|
@ -18,15 +18,17 @@
|
|||||||
namespace ewol {
|
namespace ewol {
|
||||||
namespace widget {
|
namespace widget {
|
||||||
class CheckBox : public ewol::widget::Container2 {
|
class CheckBox : public ewol::widget::Container2 {
|
||||||
public:
|
public: // Event list
|
||||||
// Event list of properties
|
|
||||||
esignal::Signal<void> signalPressed;
|
esignal::Signal<void> signalPressed;
|
||||||
esignal::Signal<void> signalDown;
|
esignal::Signal<void> signalDown;
|
||||||
esignal::Signal<void> signalUp;
|
esignal::Signal<void> signalUp;
|
||||||
esignal::Signal<void> signalEnter;
|
esignal::Signal<void> signalEnter;
|
||||||
esignal::Signal<bool> signalValue;
|
esignal::Signal<bool> signalValue;
|
||||||
|
public: // propertie list
|
||||||
|
eproperty::Value<std::string> propertyShaper;
|
||||||
|
eproperty::Value<bool> propertyValue; //!< Current state of the checkbox.
|
||||||
private:
|
private:
|
||||||
eproperty::Value<ewol::compositing::Shaper> m_shaper; //!< Compositing theme.
|
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 :
|
||||||
@ -48,31 +50,6 @@ namespace ewol {
|
|||||||
* @brief main destructor.
|
* @brief main destructor.
|
||||||
*/
|
*/
|
||||||
virtual ~CheckBox();
|
virtual ~CheckBox();
|
||||||
/**
|
|
||||||
* @brief set the shaper name (use the contructer one this permit to not noad unused shaper)
|
|
||||||
* @param[in] _shaperName The new shaper filename
|
|
||||||
*/
|
|
||||||
void setShaperName(const std::string& _shaperName) {
|
|
||||||
m_shaper.set(_shaperName);
|
|
||||||
}
|
|
||||||
protected:
|
|
||||||
eproperty::Value<bool> m_value; //!< Current state of the checkbox.
|
|
||||||
public:
|
|
||||||
/**
|
|
||||||
* @brief set the current value of the checkbox (check or not)
|
|
||||||
* @param[in] _val New value of the button
|
|
||||||
*/
|
|
||||||
void setValue(bool _val) {
|
|
||||||
m_value.set(_val);
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* @brief get the current button value.
|
|
||||||
* @return True : The checkbox is active.
|
|
||||||
* @return false : The checkbox is disable.
|
|
||||||
*/
|
|
||||||
bool getValue() const {
|
|
||||||
return m_value;
|
|
||||||
};
|
|
||||||
protected:
|
protected:
|
||||||
/**
|
/**
|
||||||
* @brief internal system to change the property of the current status
|
* @brief internal system to change the property of the current status
|
||||||
|
@ -18,8 +18,7 @@
|
|||||||
namespace ewol {
|
namespace ewol {
|
||||||
namespace widget {
|
namespace widget {
|
||||||
class ColorBar : public ewol::Widget {
|
class ColorBar : public ewol::Widget {
|
||||||
public:
|
public: // signals
|
||||||
// Event list of properties
|
|
||||||
esignal::Signal<etk::Color<>> signalChange;
|
esignal::Signal<etk::Color<>> signalChange;
|
||||||
protected:
|
protected:
|
||||||
ColorBar();
|
ColorBar();
|
||||||
|
@ -29,6 +29,10 @@ namespace ewol {
|
|||||||
markLeft,
|
markLeft,
|
||||||
markNone
|
markNone
|
||||||
};
|
};
|
||||||
|
public: // properties
|
||||||
|
eproperty::Value<vec2> propertyArrowPos;
|
||||||
|
eproperty::List<enum markPosition> propertyArrawBorder;
|
||||||
|
eproperty::Value<std::string> propertyShaper; //!< Compositing theme.
|
||||||
protected:
|
protected:
|
||||||
ContextMenu();
|
ContextMenu();
|
||||||
void init(const std::string& _shaperName="{ewol}THEME:GUI:ContextMenu.json");
|
void init(const std::string& _shaperName="{ewol}THEME:GUI:ContextMenu.json");
|
||||||
@ -36,22 +40,11 @@ namespace ewol {
|
|||||||
DECLARE_WIDGET_FACTORY(ContextMenu, "ContextMenu");
|
DECLARE_WIDGET_FACTORY(ContextMenu, "ContextMenu");
|
||||||
virtual ~ContextMenu();
|
virtual ~ContextMenu();
|
||||||
private:
|
private:
|
||||||
eproperty::Value<ewol::compositing::Shaper> m_shaper; //!< Compositing theme.
|
ewol::compositing::Shaper m_shaper; //!< Compositing theme.
|
||||||
public:
|
|
||||||
/**
|
|
||||||
* @brief set the shaper name (use the contructer one this permit to not noad unused shaper)
|
|
||||||
* @param[in] _shaperName The new shaper filename
|
|
||||||
*/
|
|
||||||
void setShaperName(const std::string& _shaperName);
|
|
||||||
private:
|
|
||||||
// TODO : Rework the displayer ....
|
|
||||||
ewol::compositing::Drawing m_compositing;
|
ewol::compositing::Drawing m_compositing;
|
||||||
etk::Color<> m_colorBackGroung;
|
etk::Color<> m_colorBackGroung;
|
||||||
etk::Color<> m_colorBorder;
|
etk::Color<> m_colorBorder;
|
||||||
float m_offset;
|
float m_offset;
|
||||||
private:
|
|
||||||
eproperty::Value<vec2> m_arrowPos;
|
|
||||||
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);
|
||||||
|
@ -31,12 +31,18 @@ namespace ewol {
|
|||||||
* ~~~~~~~~~~~~~~~~~~~~~~
|
* ~~~~~~~~~~~~~~~~~~~~~~
|
||||||
*/
|
*/
|
||||||
class Entry : public ewol::Widget {
|
class Entry : public ewol::Widget {
|
||||||
public:
|
public: // Event list
|
||||||
esignal::Signal<void> signalClick; //!< bang on click the entry box
|
esignal::Signal<void> signalClick; //!< bang on click the entry box
|
||||||
esignal::Signal<std::string> signalEnter; //!< Enter key is pressed
|
esignal::Signal<std::string> signalEnter; //!< Enter key is pressed
|
||||||
esignal::Signal<std::string> signalModify; //!< data change
|
esignal::Signal<std::string> signalModify; //!< data change
|
||||||
|
public: // propertie list
|
||||||
|
eproperty::Value<std::string> propertyShaper;
|
||||||
|
eproperty::Value<std::string> propertyValue; //!< string that must be displayed
|
||||||
|
eproperty::Range<int32_t> propertyMaxCharacter; //!< number max of xharacter in the list
|
||||||
|
eproperty::Value<std::string> propertyRegex; //!< regular expression value
|
||||||
|
eproperty::Value<std::string> propertyTextWhenNothing; //!< Text to display when nothing in in the entry (decorated text...)
|
||||||
private:
|
private:
|
||||||
eproperty::Value<ewol::compositing::Shaper> m_shaper;
|
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
|
||||||
@ -56,62 +62,14 @@ namespace ewol {
|
|||||||
* @brief Destuctor
|
* @brief Destuctor
|
||||||
*/
|
*/
|
||||||
virtual ~Entry();
|
virtual ~Entry();
|
||||||
private:
|
|
||||||
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
|
||||||
* @param[in] _newData The new string to display
|
* @param[in] _newData The new string to display
|
||||||
*/
|
*/
|
||||||
void setInternalValue(const std::string& _newData);
|
void setInternalValue(const std::string& _newData);
|
||||||
public:
|
|
||||||
/**
|
|
||||||
* @brief set a new value on the entry.
|
|
||||||
* @param[in] _newData the new string to display.
|
|
||||||
*/
|
|
||||||
void setValue(const std::string& _newData);
|
|
||||||
/**
|
|
||||||
* @brief get the current value in the entry
|
|
||||||
* @return The current display value
|
|
||||||
*/
|
|
||||||
std::string getValue() const {
|
|
||||||
return m_data;
|
|
||||||
};
|
|
||||||
private:
|
private:
|
||||||
eproperty::Range<int32_t> m_maxCharacter; //!< number max of xharacter in the list
|
|
||||||
public:
|
|
||||||
/**
|
|
||||||
* @brief Limit the number of Unicode character in the entry
|
|
||||||
* @param[in] _nbMax Number of max character set in the List (0x7FFFFFFF for no limit)
|
|
||||||
*/
|
|
||||||
void setMaxChar(int32_t _nbMax) {
|
|
||||||
m_maxCharacter.set(_nbMax);
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* @brief Limit the number of Unicode character in the entry
|
|
||||||
* @return Number of max character set in the List.
|
|
||||||
*/
|
|
||||||
int32_t getMaxChar() const {
|
|
||||||
return m_maxCharacter;
|
|
||||||
};
|
|
||||||
private:
|
|
||||||
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:
|
|
||||||
/**
|
|
||||||
* @brief Limit the input entry at a regular expression... (by default it is "*")
|
|
||||||
* @param _expression New regular expression
|
|
||||||
*/
|
|
||||||
void setRegex(const std::string& _expression) {
|
|
||||||
m_regexValue.set(_expression);
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* @brief get the regualar expression limitation
|
|
||||||
* @param The regExp string
|
|
||||||
*/
|
|
||||||
std::string getRegex() const {
|
|
||||||
return m_regexValue;
|
|
||||||
};
|
|
||||||
private:
|
private:
|
||||||
bool m_needUpdateTextPos; //!< text position can have change
|
bool m_needUpdateTextPos; //!< text position can have change
|
||||||
int32_t m_displayStartPosition; //!< ofset in pixel of the display of the UString
|
int32_t m_displayStartPosition; //!< ofset in pixel of the display of the UString
|
||||||
|
@ -93,44 +93,3 @@ void ewol::widget::Spin::onCallbackDown() {
|
|||||||
int64_t value = m_value.get() - m_increment.get();
|
int64_t value = m_value.get() - m_increment.get();
|
||||||
checkValue(value);
|
checkValue(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ewol::widget::Spin::setValue(int64_t _val) {
|
|
||||||
m_value.set(_val);
|
|
||||||
}
|
|
||||||
|
|
||||||
int64_t ewol::widget::Spin::getValue() const {
|
|
||||||
return m_value;
|
|
||||||
}
|
|
||||||
|
|
||||||
void ewol::widget::Spin::setMinimum(int64_t _val) {
|
|
||||||
m_min.set(_val);
|
|
||||||
}
|
|
||||||
|
|
||||||
int64_t ewol::widget::Spin::getMinimum() const {
|
|
||||||
return m_min;
|
|
||||||
}
|
|
||||||
|
|
||||||
void ewol::widget::Spin::setMaximum(int64_t _val) {
|
|
||||||
m_max.set(_val);
|
|
||||||
}
|
|
||||||
|
|
||||||
int64_t ewol::widget::Spin::getMaximum() const {
|
|
||||||
return m_max;
|
|
||||||
}
|
|
||||||
|
|
||||||
void ewol::widget::Spin::setIncrement(int64_t _val) {
|
|
||||||
m_increment.set(_val);
|
|
||||||
}
|
|
||||||
|
|
||||||
int64_t ewol::widget::Spin::getIncrement() const {
|
|
||||||
return m_increment;
|
|
||||||
}
|
|
||||||
|
|
||||||
void ewol::widget::Spin::setMantis(int8_t _val) {
|
|
||||||
m_mantis.set(_val);
|
|
||||||
}
|
|
||||||
|
|
||||||
int8_t ewol::widget::Spin::getMantis() const {
|
|
||||||
return m_mantis;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
@ -22,6 +22,12 @@ namespace ewol {
|
|||||||
// Event list of properties
|
// Event list of properties
|
||||||
esignal::Signal<int64_t> signalValue;
|
esignal::Signal<int64_t> signalValue;
|
||||||
esignal::Signal<double> signalValueDouble;
|
esignal::Signal<double> signalValueDouble;
|
||||||
|
public:
|
||||||
|
eproperty::Value<int64_t> propertyValue; //!< Current value of the Spin.
|
||||||
|
eproperty::Value<int64_t> propertyMin; //!< Minimum value
|
||||||
|
eproperty::Value<int64_t> propertyMax; //!< Maximum value
|
||||||
|
eproperty::Value<int64_t> propertyIncrement; //!< Increment value
|
||||||
|
eproperty::Value<int8_t> propertyMantis; //!< number of value under '.' value
|
||||||
protected:
|
protected:
|
||||||
/**
|
/**
|
||||||
* @brief Constructor
|
* @brief Constructor
|
||||||
@ -37,78 +43,6 @@ namespace ewol {
|
|||||||
* @brief Destructor
|
* @brief Destructor
|
||||||
*/
|
*/
|
||||||
virtual ~Spin();
|
virtual ~Spin();
|
||||||
/**
|
|
||||||
* @brief set the shaper name (use the contructer one this permit to not noad unused shaper)
|
|
||||||
* @param[in] _shaperName The new shaper filename
|
|
||||||
*/
|
|
||||||
void setShaperName(const std::string& _shaperName) {
|
|
||||||
//m_shaper.setString(_shaperName);
|
|
||||||
}
|
|
||||||
protected:
|
|
||||||
eproperty::Value<int64_t> m_value; //!< Current value of the Spin.
|
|
||||||
public:
|
|
||||||
/**
|
|
||||||
* @brief set the current value of the Spin
|
|
||||||
* @param[in] _val New value to set
|
|
||||||
*/
|
|
||||||
void setValue(int64_t _val);
|
|
||||||
/**
|
|
||||||
* @brief get the current Spin value.
|
|
||||||
* @return The current spin value.
|
|
||||||
*/
|
|
||||||
int64_t getValue() const;
|
|
||||||
protected:
|
|
||||||
eproperty::Value<int64_t> m_min; //!< Minimum value
|
|
||||||
public:
|
|
||||||
/**
|
|
||||||
* @brief set the minimum of the Spin
|
|
||||||
* @param[in] _val New minimum to set
|
|
||||||
*/
|
|
||||||
void setMinimum(int64_t _val);
|
|
||||||
/**
|
|
||||||
* @brief get the current Spin minimum.
|
|
||||||
* @return The current spin minimum.
|
|
||||||
*/
|
|
||||||
int64_t getMinimum() const;
|
|
||||||
protected:
|
|
||||||
eproperty::Value<int64_t> m_max; //!< Maximum value
|
|
||||||
public:
|
|
||||||
/**
|
|
||||||
* @brief set the maxnimum of the Spin
|
|
||||||
* @param[in] _val New maxnimum to set
|
|
||||||
*/
|
|
||||||
void setMaximum(int64_t _val);
|
|
||||||
/**
|
|
||||||
* @brief get the current Spin maxnimum.
|
|
||||||
* @return The current spin maxnimum.
|
|
||||||
*/
|
|
||||||
int64_t getMaximum() const;
|
|
||||||
protected:
|
|
||||||
eproperty::Value<int64_t> m_increment; //!< Increment value
|
|
||||||
public:
|
|
||||||
/**
|
|
||||||
* @brief set the increment value of the Spin
|
|
||||||
* @param[in] _val New increment to set
|
|
||||||
*/
|
|
||||||
void setIncrement(int64_t _val);
|
|
||||||
/**
|
|
||||||
* @brief get the current Spin increment.
|
|
||||||
* @return The current spin increment.
|
|
||||||
*/
|
|
||||||
int64_t getIncrement() const;
|
|
||||||
protected:
|
|
||||||
eproperty::Value<int8_t> m_mantis; //!< number of value under '.' value
|
|
||||||
public:
|
|
||||||
/**
|
|
||||||
* @brief set the mantis value of the Spin
|
|
||||||
* @param[in] _val New mantis to set
|
|
||||||
*/
|
|
||||||
void setMantis(int8_t _val);
|
|
||||||
/**
|
|
||||||
* @brief get the current Spin mantis.
|
|
||||||
* @return The current spin mantis.
|
|
||||||
*/
|
|
||||||
int8_t getMantis() const;
|
|
||||||
protected:
|
protected:
|
||||||
virtual void checkValue(int64_t _value);
|
virtual void checkValue(int64_t _value);
|
||||||
virtual void onPropertyChangeValue(const eproperty::Ref& _paramPointer);
|
virtual void onPropertyChangeValue(const eproperty::Ref& _paramPointer);
|
||||||
|
@ -24,8 +24,7 @@ namespace ewol {
|
|||||||
* @ingroup ewolWidgetGroup
|
* @ingroup ewolWidgetGroup
|
||||||
*/
|
*/
|
||||||
class ColorChooser : public ewol::widget::Sizer {
|
class ColorChooser : public ewol::widget::Sizer {
|
||||||
public:
|
public: // signals
|
||||||
// Event list of properties
|
|
||||||
esignal::Signal<etk::Color<>> signalChange;
|
esignal::Signal<etk::Color<>> signalChange;
|
||||||
protected:
|
protected:
|
||||||
ColorChooser();
|
ColorChooser();
|
||||||
|
@ -63,8 +63,7 @@ namespace ewol {
|
|||||||
* This is the best example of a Meta-widget.
|
* This is the best example of a Meta-widget.
|
||||||
*/
|
*/
|
||||||
class FileChooser : public ewol::widget::Composer {
|
class FileChooser : public ewol::widget::Composer {
|
||||||
public:
|
public: // signals
|
||||||
// Event list of properties
|
|
||||||
esignal::Signal<void> signalCancel;
|
esignal::Signal<void> signalCancel;
|
||||||
esignal::Signal<std::string> signalValidate;
|
esignal::Signal<std::string> signalValidate;
|
||||||
protected:
|
protected:
|
||||||
|
@ -25,8 +25,7 @@ namespace ewol {
|
|||||||
* @ingroup ewolWidgetGroup
|
* @ingroup ewolWidgetGroup
|
||||||
*/
|
*/
|
||||||
class Parameter : public ewol::widget::PopUp {
|
class Parameter : public ewol::widget::PopUp {
|
||||||
public:
|
public: // signals
|
||||||
// Event list of properties
|
|
||||||
esignal::Signal<void> signalClose;
|
esignal::Signal<void> signalClose;
|
||||||
protected:
|
protected:
|
||||||
Parameter();
|
Parameter();
|
||||||
|
@ -36,9 +36,10 @@ namespace ewol {
|
|||||||
* @ingroup ewolWidgetGroup
|
* @ingroup ewolWidgetGroup
|
||||||
*/
|
*/
|
||||||
class ParameterList :public ewol::widget::WidgetScrolled {
|
class ParameterList :public ewol::widget::WidgetScrolled {
|
||||||
public:
|
public: //signals
|
||||||
// Event list of properties
|
|
||||||
esignal::Signal<int32_t> signalSelect;
|
esignal::Signal<int32_t> signalSelect;
|
||||||
|
public: // properties
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int32_t m_idSelected;
|
int32_t m_idSelected;
|
||||||
std::vector<ewol::widget::elementPL *> m_list;
|
std::vector<ewol::widget::elementPL *> m_list;
|
||||||
|
@ -61,6 +61,8 @@ namespace ewol {
|
|||||||
* @ingroup ewolWidgetGroup
|
* @ingroup ewolWidgetGroup
|
||||||
*/
|
*/
|
||||||
class SpinBase : public ewol::widget::Sizer {
|
class SpinBase : public ewol::widget::Sizer {
|
||||||
|
public: // properties list:
|
||||||
|
eproperty::List<enum ewol::widget::spinPosition> m_spinMode; //!< How to display the spin base
|
||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
* @brief Main call of recording the widget on the List of "widget named creator"
|
* @brief Main call of recording the widget on the List of "widget named creator"
|
||||||
@ -74,7 +76,6 @@ 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;
|
||||||
eproperty::List<enum ewol::widget::spinPosition> m_spinMode; //!< How to display the spin base
|
|
||||||
protected:
|
protected:
|
||||||
/**
|
/**
|
||||||
* @brief Constructor
|
* @brief Constructor
|
||||||
@ -88,20 +89,6 @@ namespace ewol {
|
|||||||
* @brief Destructor
|
* @brief Destructor
|
||||||
*/
|
*/
|
||||||
virtual ~SpinBase();
|
virtual ~SpinBase();
|
||||||
/**
|
|
||||||
* @brief set the mode to display elements.
|
|
||||||
* @param[in] _mode The mode to display the elements.
|
|
||||||
*/
|
|
||||||
void setMode(enum ewol::widget::spinPosition _mode) {
|
|
||||||
m_spinMode.set(_mode);
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* @brief get the mode to display elements.
|
|
||||||
* @return The current mode to display the elements.
|
|
||||||
*/
|
|
||||||
enum ewol::widget::spinPosition getMode() const {
|
|
||||||
return m_spinMode;
|
|
||||||
}
|
|
||||||
protected:
|
protected:
|
||||||
std::shared_ptr<ewol::widget::Entry> m_widgetEntry;
|
std::shared_ptr<ewol::widget::Entry> m_widgetEntry;
|
||||||
std::shared_ptr<ewol::widget::Button> m_widgetButtonDown;
|
std::shared_ptr<ewol::widget::Button> m_widgetButtonDown;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user