class: ewol::widget::Button
Description:
a composed button is a button with an inside composed with the specify XML element ==> this permit to generate standard element simpleenum:
Constructor and Destructor:
# Button ();
+ virtual ~Button ();
Synopsis:
+ ewol::object::Signal<void> signalPressed;
+ ewol::object::Signal<void> signalDown;
+ ewol::object::Signal<void> signalUp;
+ ewol::object::Signal<void> signalEnter;
+ ewol::object::Signal<void> signalLeave;
+ ewol::object::Signal<bool> signalValue;
# void init (const std::string & _shaperName);
+ DECLARE_WIDGET_FACTORY (Button ,
"Button" );
+ void setShaperName (const std::string & _shaperName);
# ewol::object::Param<bool> m_value;
+ void setValue (bool _val);
+ bool getValue () const;
# ewol::object::ParamList<enumbuttonLock> m_lock;
+ void setLock (enum buttonLock _lock);
+ enum buttonLock getLock () const;
# ewol::object::Param<bool> m_toggleMode;
+ void setToggleMode (bool _togg);
+ bool getToggleMode () const;
# ewol::object::Param<bool> m_enableSingle;
+ void setEnableSingle (bool _single);
+ bool getEnableSingle () const;
# virtual void onDraw ();
# virtual void onParameterChangeValue (const ewol::object::ParameterRef & _paramPointer);
+ virtual void calculateMinMaxSize ();
+ virtual void calculateSize (const vec2 & _availlable);
+ virtual void onRegenerateDisplay ();
+ virtual bool onEventInput (const ewol::event::Input & _event);
+ virtual bool onEventEntry (const ewol::event::Entry & _event);
+ virtual void onDetectPresenceToggleWidget ();
Object Hierarchy:
+std::enable_shared_from_this<Object>
+ewol::object::ParameterList
+ewol::object::SignalList
+--> +ewol::Object
+--> +ewol::Widget
+--> +ewol::widget::Container2
+--> ewol::widget::Button
Detail:
signalPressed
+ ewol::object::Signal<void> signalPressed;
signalDown
+ ewol::object::Signal<void> signalDown;
signalUp
+ ewol::object::Signal<void> signalUp;
signalEnter
+ ewol::object::Signal<void> signalEnter;
signalLeave
+ ewol::object::Signal<void> signalLeave;
signalValue
+ ewol::object::Signal<bool> signalValue;
Button
# Button ();
Constructor
Parameter [input]: _shaperName Shaper file properties
init
# void init (const std::string & _shaperName);
DECLARE_WIDGET_FACTORY
+ DECLARE_WIDGET_FACTORY (Button ,
"Button" );
~Button
+ virtual ~Button ();
Destructor
setShaperName
+ void setShaperName (const std::string & _shaperName);
set the shaper name (use the contructer one this permit to not noad unused shaper)
Parameter [input]: _shaperName The new shaper filename
m_value
# ewol::object::Param<bool> m_value;
Current state of the button.
setValue
+ void setValue (bool _val);
set the currentValue of the Button (pressed or not)
Note: Work only in toggle mode
Parameter [input]: _val New value of the button
getValue
+ bool getValue () const;
get the current button value.
Return: True : The button is pressed.<br/>false : The button is released.
m_lock
# ewol::object::ParamList<enumbuttonLock> m_lock;
Current lock state of the button.
setLock
+ void setLock (enum buttonLock _lock);
set the button lock state.
Parameter [input]: _lock New lock mode of the button
getLock
+ enum buttonLock getLock () const;
get the current button lock value.
Return: The requested lock mode
m_toggleMode
# ewol::object::Param<bool> m_toggleMode;
The button is able to toggle.
setToggleMode
+ void setToggleMode (bool _togg);
change the toggle mode.
Parameter [input]: _togg New toggle mode
getToggleMode
+ bool getToggleMode () const;
get the current toggle mode.
Return: the current toggle mode.
m_enableSingle
# ewol::object::Param<bool> m_enableSingle;
When a single subwidget is set display all time it.
setEnableSingle
+ void setEnableSingle (bool _single);
Chane the display single widget mode availlable.
Parameter [input]: _single single mode widget set
getEnableSingle
+ bool getEnableSingle () const;
get the current single mode enableling.
Return: the current value.
onDraw
# virtual void onDraw ();
Common widget drawing function (called by the drawing thread [Android, X11, ...])
onParameterChangeValue
# virtual void onParameterChangeValue (const ewol::object::ParameterRef & _paramPointer);
calculateMinMaxSize
+ virtual void calculateMinMaxSize ();
calculate the minimum and maximum size (need to estimate expend properties of the widget)
Note: : INTERNAL EWOL SYSTEM
calculateSize
+ virtual void calculateSize (const vec2 & _availlable);
Parent set the possible diplay size of the current widget whith his own possibilities
By default this save the widget available size in the widget size
Note: : INTERNAL EWOL SYSTEM
Parameter [input]: _available Available x&y pixel size
onRegenerateDisplay
+ virtual void onRegenerateDisplay ();
Event generated when a redraw is needed
onEventInput
+ virtual bool onEventInput (const ewol::event::Input & _event);
Event on an input of this Widget (finger, mouse, stilet)
Parameter [input]: _event Event properties
Return: true the event is used<br/>false the event is not used
onEventEntry
+ virtual bool onEventEntry (const ewol::event::Entry & _event);
Entry event.
represent the physical event :
- Keyboard (key event and move event)
- Accelerometer
- Joystick
Parameter [input]: _event Event properties
Return: true if the event has been used<br/>false if the event has not been used
onDetectPresenceToggleWidget
+ virtual void onDetectPresenceToggleWidget ();
Called when parsing a XML and detect the presence of a second Widget
+std::enable_shared_from_this<Object>
+ewol::object::ParameterList
+ewol::object::SignalList
+--> +ewol::Object
+--> +ewol::Widget
+--> +ewol::widget::Container2
+--> ewol::widget::Button
Detail:
signalPressed
+ ewol::object::Signal<void> signalPressed;
signalDown
+ ewol::object::Signal<void> signalDown;
signalUp
+ ewol::object::Signal<void> signalUp;
signalEnter
+ ewol::object::Signal<void> signalEnter;
signalLeave
+ ewol::object::Signal<void> signalLeave;
signalValue
+ ewol::object::Signal<bool> signalValue;
Button
# Button ();Constructor
Parameter [input]: | _shaperName | Shaper file properties |
init
# void init (const std::string & _shaperName);
DECLARE_WIDGET_FACTORY
+ DECLARE_WIDGET_FACTORY (Button ,
"Button" );
~Button
+ virtual ~Button ();Destructor
setShaperName
+ void setShaperName (const std::string & _shaperName);set the shaper name (use the contructer one this permit to not noad unused shaper)
Parameter [input]: | _shaperName | The new shaper filename |
m_value
# ewol::object::Param<bool> m_value;Current state of the button.
setValue
+ void setValue (bool _val);set the currentValue of the Button (pressed or not)
Note: Work only in toggle mode
Parameter [input]: | _val | New value of the button |
getValue
+ bool getValue () const;get the current button value.
Return: | True : The button is pressed.<br/>false : The button is released. |
m_lock
# ewol::object::ParamList<enumbuttonLock> m_lock;Current lock state of the button.
setLock
+ void setLock (enum buttonLock _lock);set the button lock state.
Parameter [input]: | _lock | New lock mode of the button |
getLock
+ enum buttonLock getLock () const;get the current button lock value.
Return: | The requested lock mode |
m_toggleMode
# ewol::object::Param<bool> m_toggleMode;The button is able to toggle.
setToggleMode
+ void setToggleMode (bool _togg);change the toggle mode.
Parameter [input]: | _togg | New toggle mode |
getToggleMode
+ bool getToggleMode () const;get the current toggle mode.
Return: | the current toggle mode. |
m_enableSingle
# ewol::object::Param<bool> m_enableSingle;When a single subwidget is set display all time it.
setEnableSingle
+ void setEnableSingle (bool _single);Chane the display single widget mode availlable.
Parameter [input]: | _single | single mode widget set |
getEnableSingle
+ bool getEnableSingle () const;get the current single mode enableling.
Return: | the current value. |
onDraw
# virtual void onDraw ();Common widget drawing function (called by the drawing thread [Android, X11, ...])
onParameterChangeValue
# virtual void onParameterChangeValue (const ewol::object::ParameterRef & _paramPointer);
calculateMinMaxSize
+ virtual void calculateMinMaxSize ();calculate the minimum and maximum size (need to estimate expend properties of the widget)
Note: : INTERNAL EWOL SYSTEM
calculateSize
+ virtual void calculateSize (const vec2 & _availlable);Parent set the possible diplay size of the current widget whith his own possibilities By default this save the widget available size in the widget size
Note: : INTERNAL EWOL SYSTEM
Parameter [input]: | _available | Available x&y pixel size |
onRegenerateDisplay
+ virtual void onRegenerateDisplay ();Event generated when a redraw is needed
onEventInput
+ virtual bool onEventInput (const ewol::event::Input & _event);Event on an input of this Widget (finger, mouse, stilet)
Parameter [input]: | _event | Event properties |
Return: | true the event is used<br/>false the event is not used |
onEventEntry
+ virtual bool onEventEntry (const ewol::event::Entry & _event);Entry event. represent the physical event : - Keyboard (key event and move event) - Accelerometer - Joystick
Parameter [input]: | _event | Event properties |
Return: | true if the event has been used<br/>false if the event has not been used |
onDetectPresenceToggleWidget
+ virtual void onDetectPresenceToggleWidget ();Called when parsing a XML and detect the presence of a second Widget