class: ewol::Widget
Description:
Widget class is the main widget interface, it hase some generic properties:- known his parent
Can be display at a special position with a special scale
Can get focus
Associated Namespace:
enum:
Constructor and Destructor:
# Widget ();
+ virtual ~Widget ();
Synopsis:
# void init ();
# void init (const std::string & _name);
# vec2 m_size;
# vec2 m_minSize;
# vec2 m_maxSize;
+ virtual vec2 relativePosition (const vec2 & _pos);
+ virtual void calculateSize (const vec2 & _available);
+ virtual vec2 getSize ();
+ virtual void calculateMinMaxSize ();
+ virtual vec2 getCalculateMinSize ();
+ virtual vec2 getCalculateMaxSize ();
# vec2 m_offset;
+ virtual void setOffset (const vec2 & _newVal);
+ virtual const vec2 & getOffset ();
# float m_zoom;
+ virtual void setZoom (float _newVal);
+ virtual float getZoom ();
+ virtual void changeZoom (float _range);
# vec2 m_origin;
+ virtual void setOrigin (const vec2 & _pos);
+ virtual vec2 getOrigin ();
# ewol::object::Param<ewol::Dimension> m_userMinSize;
+ void setMinSize (const ewol::Dimension & _size);
+ void setNoMinSize ();
+ const ewol::Dimension & getMinSize ();
+ virtual void checkMinSize ();
# ewol::object::Param<ewol::Dimension> m_userMaxSize;
+ void setMaxSize (const ewol::Dimension & _size);
+ void setNoMaxSize ();
+ const ewol::Dimension & getMaxSize ();
+ virtual void checkMaxSize ();
# ewol::object::Param<bvec2> m_userExpand;
+ virtual void setExpand (const bvec2 & _newExpand);
+ virtual bvec2 getExpand ();
+ virtual bvec2 canExpand ();
# ewol::object::Param<bvec2> m_userFill;
+ virtual void setFill (const bvec2 & _newFill);
+ virtual const bvec2 & getFill ();
+ const bvec2 & canFill ();
# ewol::object::Param<bool> m_hide;
+ virtual void hide ();
+ virtual void show ();
+ virtual bool isHide ();
# ewol::object::ParamList<enumewol::gravity> m_gravity;
+ virtual void setGravity (enum ewol::gravity _gravity);
+ virtual enum ewol::gravity getGravity ();
+ virtual bool getFocus ();
+ virtual bool canHaveFocus ();
+ virtual bool setFocus ();
+ virtual bool rmFocus ();
+ virtual void setCanHaveFocus (bool _canFocusState);
+ virtual void keepFocus ();
# virtual void onGetFocus ();
# virtual void onLostFocus ();
+ virtual int32_t getMouseLimit ();
+ virtual void setMouseLimit (int32_t _numberState);
+ virtual bool getKeyboardRepeate ();
# virtual void setKeyboardRepeate (bool _state);
# virtual void showKeyboard ();
# virtual void hideKeyboard ();
# void periodicCallDisable ();
# void periodicCallEnable (float _callInSecond);
+ int64_t systemGetCallDeltaTime () const;
+ int64_t systemGetLastCallTime () const;
+ void systemSetLastCallTime (int64_t _time);
+ virtual void periodicCall (const ewol::event::Time & _event);
+ virtual std::shared_ptr<ewol::Widget> getWidgetAtPos (const vec2 & _pos);
+ virtual bool systemEventInput (ewol::event::InputSystem & _event);
# virtual bool onEventInput (const ewol::event::Input & _event);
+ virtual bool systemEventEntry (ewol::event::EntrySystem & _event);
# virtual bool onEventEntry (const ewol::event::Entry & _event);
+ virtual void onEventClipboard (enum ewol::context::clipBoard::clipboardListe _clipboardID);
+ ewol::object::Signal<std::string> signalShortcut;
# virtual void shortCutAdd (const std::string & _descriptiveString,
const std::string & _message);
# virtual void shortCutClean ();
# virtual void shortCutRemove (const std::string & _message);
+ virtual bool onEventShortCut (ewol::key::Special & _special,
char32_t _unicodeValue,
enum ewol::key::keyboard _kbMove,
bool _isDown);
# bool m_needRegenerateDisplay;
# virtual void markToRedraw ();
# virtual bool needRedraw ();
+ virtual void systemDraw (const DrawProperty & _displayProp);
# virtual void onDraw ();
+ virtual void onRegenerateDisplay ();
+ virtual void grabCursor ();
+ virtual void unGrabCursor ();
+ virtual bool getGrabStatus ();
+ virtual void setCursor (enum ewol::context::cursorDisplay _newCursor);
+ virtual enum ewol::context::cursorDisplay getCursor ();
+ virtual bool loadXML (exml::Element* _node);
# virtual void onParameterChangeValue (const ewol::object::ParameterRef & _paramPointer);
+ void requestUpdateSize ();
+ ewol::widget::Manager & getWidgetManager ();
+ std::shared_ptr<ewol::widget::Windows> getWindows ();
+ ewol::object::Signal<void> signalAnnimationStart;
+ ewol::object::Signal<float> signalAnnimationRatio;
+ ewol::object::Signal<void> signalAnnimationStop;
# float m_annimationratio;
# ewol::object::ParamList<int32_t> m_annimationTypeStart;
# ewol::object::ParamRange<float> m_annimationTimeStart;
# ewol::object::ParamList<int32_t> m_annimationTypeStop;
# ewol::object::ParamRange<float> m_annimationTimeStop;
# void addAnnimationType (enum ewol::Widget::annimationMode _mode,
const char* _type);
+ void setAnnimationType (enum ewol::Widget::annimationMode _mode,
const std::string & _type);
+ void setAnnimationTime (enum ewol::Widget::annimationMode _mode,
float _time);
+ bool startAnnimation (enum ewol::Widget::annimationMode _mode);
+ bool stopAnnimation ();
# virtual bool onStartAnnimation (enum ewol::Widget::annimationMode _mode);
# virtual void onStopAnnimation ();
Object Hierarchy:
+std::enable_shared_from_this<Object>
+ewol::object::ParameterList
+ewol::object::SignalList
+--> +ewol::Object
+--> ewol::Widget
+--> ewol::widget::ButtonColor
+--> ewol::widget::WidgetScrolled
+--> ewol::widget::Joystick
+--> ewol::widget::Slider
+--> ewol::widget::Spacer
+--> ewol::widget::Label
+--> ewol::widget::Container2
+--> ewol::widget::Image
+--> ewol::widget::ProgressBar
+--> ewol::widget::Windows
+--> ewol::widget::Container
+--> ewol::widget::ContainerN
+--> ewol::widget::Gird
+--> ewol::widget::Entry
+--> ewol::widget::ColorBar
+--> ege::widget::Mesh
+--> ege::widget::Scene
Detail:
Widget
# Widget ();
Constructor of the widget classes
Return: (no execption generated (not managed in embended platform))
init
# void init ();
init
# void init (const std::string & _name);
~Widget
+ virtual ~Widget ();
Destructor of the widget classes
m_size
# vec2 m_size;
internal : current size of the widget
m_minSize
# vec2 m_minSize;
internal : minimum size of the widget
m_maxSize
# vec2 m_maxSize;
internal : maximum size of the widget
relativePosition
+ virtual vec2 relativePosition (const vec2 & _pos);
convert the absolute position in the local Position (Relative)
Parameter [input]: _pos Absolute position that you request convertion
Return: the relative position
calculateSize
+ virtual void calculateSize (const vec2 & _available);
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
getSize
+ virtual vec2 getSize ();
get the widget size
Note: : INTERNAL EWOL SYSTEM
Return: Requested size
calculateMinMaxSize
+ virtual void calculateMinMaxSize ();
calculate the minimum and maximum size (need to estimate expend properties of the widget)
Note: : INTERNAL EWOL SYSTEM
getCalculateMinSize
+ virtual vec2 getCalculateMinSize ();
get the widget minimum size calculated
Note: : INTERNAL EWOL SYSTEM
Return: Requested size
getCalculateMaxSize
+ virtual vec2 getCalculateMaxSize ();
get the widget maximum size calculated
Note: : INTERNAL EWOL SYSTEM
Return: Requested size
m_offset
# vec2 m_offset;
Offset of the display in the viewport
setOffset
+ virtual void setOffset (const vec2 & _newVal);
set the zoom property of the widget.
Parameter [input]: _newVal offset value.
getOffset
+ virtual const vec2 & getOffset ();
get the offset property of the widget.
Return: The current offset value.
m_zoom
# float m_zoom;
generic widget zoom
setZoom
+ virtual void setZoom (float _newVal);
set the zoom property of the widget
Parameter [input]: _newVal newZoom value
getZoom
+ virtual float getZoom ();
get the zoom property of the widget
Return: the current zoom value
changeZoom
+ virtual void changeZoom (float _range);
Change Zoom property.
Parameter [input]: _range Range of the zoom change.
m_origin
# vec2 m_origin;
internal ... I do not really known how i can use it ...
setOrigin
+ virtual void setOrigin (const vec2 & _pos);
set origin at the widget (must be an parrent widget that set this parameter).
This represent the absolute origin in the program windows
Note: : INTERNAL EWOL SYSTEM
Parameter [input]: _pos Position of the origin
getOrigin
+ virtual vec2 getOrigin ();
get the origin (obsolute position in the windows)
Return: coordonate of the origin requested
m_userMinSize
# ewol::object::Param<ewol::Dimension> m_userMinSize;
user define the minimum size of the widget
setMinSize
+ void setMinSize (const ewol::Dimension & _size);
User set the minimum size he want to set the display
Parameter [input]: _size set minimum size (none : 0)
setNoMinSize
+ void setNoMinSize ();
User set No minimum size.
getMinSize
+ const ewol::Dimension & getMinSize ();
get the current calculated min size
Return: the size requested
checkMinSize
+ virtual void checkMinSize ();
Check if the current min size is compatible with the user minimum size
If it is not the user minimum size will overWrite the minimum size set.
Note: : INTERNAL EWOL SYSTEM
m_userMaxSize
# ewol::object::Param<ewol::Dimension> m_userMaxSize;
user define the maximum size of the widget
setMaxSize
+ void setMaxSize (const ewol::Dimension & _size);
User set the maximum size he want to set the display
Parameter [input]: _size The new maximum size requested (vec2(0,0) to unset)
setNoMaxSize
+ void setNoMaxSize ();
User set No maximum size.
getMaxSize
+ const ewol::Dimension & getMaxSize ();
get the current maximum size
Return: the size requested
checkMaxSize
+ virtual void checkMaxSize ();
Check if the current max size is compatible with the user maximum size
If it is not the user maximum size will overWrite the maximum size set.
Note: : INTERNAL EWOL SYSTEM
m_userExpand
# ewol::object::Param<bvec2> m_userExpand;
setExpand
+ virtual void setExpand (const bvec2 & _newExpand);
set the expend capabilities (x&y)
Parameter [input]: _newExpend 2D boolean repensent the capacity to expend
getExpand
+ virtual bvec2 getExpand ();
get the expend capabilities (x&y) (set by the user)
Return: 2D boolean repensent the capacity to expend
canExpand
+ virtual bvec2 canExpand ();
get the expend capabilities (x&y)
Note: : INTERNAL EWOL SYSTEM
Return: 2D boolean repensent the capacity to expend
m_userFill
# ewol::object::Param<bvec2> m_userFill;
setFill
+ virtual void setFill (const bvec2 & _newFill);
set the x&y filling capacity
Parameter [input]: _newFill new x&y fill state
getFill
+ virtual const bvec2 & getFill ();
set the x&y filling capacity set by the user
Return: bvec2 repensent the capacity to x&y filling (set by the user)
canFill
+ const bvec2 & canFill ();
get the filling capabilities x&y
Note: : INTERNAL EWOL SYSTEM
Return: bvec2 repensent the capacity to x&y filling
m_hide
# ewol::object::Param<bool> m_hide;
hide a widget on the display
hide
+ virtual void hide ();
set the widget hidden
show
+ virtual void show ();
set the widget visible
isHide
+ virtual bool isHide ();
get the visibility of the widget
Return: true: if the widget is hiden, false: it is visible
m_gravity
# ewol::object::ParamList<enumewol::gravity> m_gravity;
Gravity of the widget
setGravity
+ virtual void setGravity (enum ewol::gravity _gravity);
set the widget gravity
Parameter [input]: _gravity New gravity of the widget
getGravity
+ virtual enum ewol::gravity getGravity ();
get the widget gravity
Return: the gravity type
getFocus
+ virtual bool getFocus ();
get the focus state of the widget
Return: focus state
canHaveFocus
+ virtual bool canHaveFocus ();
get the capability to have focus
Return: State capability to have focus
setFocus
+ virtual bool setFocus ();
set focus on this widget
Return: return true if the widget keep the focus
rmFocus
+ virtual bool rmFocus ();
remove the focus on this widget
Return: return true if the widget have release his focus (if he has it)
setCanHaveFocus
+ virtual void setCanHaveFocus (bool _canFocusState);
set the capability to have the focus
Parameter [input]: _canFocusState new focus capability
keepFocus
+ virtual void keepFocus ();
keep the focus on this widget == > this remove the previous focus on all other widget
onGetFocus
# virtual void onGetFocus ();
Event of the focus has been grep by the current widget
onLostFocus
# virtual void onLostFocus ();
Event of the focus has been lost by the current widget
getMouseLimit
+ virtual int32_t getMouseLimit ();
get the number of mouse event supported
Return: return the number of event that the mouse supported [0..3]
setMouseLimit
+ virtual void setMouseLimit (int32_t _numberState);
get the number of mouse event supported
Parameter [input]: _numberState The number of event that the mouse supported [0..3]
getKeyboardRepeate
+ virtual bool getKeyboardRepeate ();
get the keyboard repeating event supporting.
Return: true : the event can be repeated.<br/>false : the event must not be repeated.
setKeyboardRepeate
# virtual void setKeyboardRepeate (bool _state);
set the keyboard repeating event supporting.
Parameter [input]: _state The repeating status (true: enable, false disable).
showKeyboard
# virtual void showKeyboard ();
display the virtual keyboard (if needed)
hideKeyboard
# virtual void hideKeyboard ();
Hide the virtual keyboard (if needed)
periodicCallDisable
# void periodicCallDisable ();
disable the periodic call.
periodicCallEnable
# void periodicCallEnable (float _callInSecond);
disable the periodic call.
Parameter [input]: _callInSecond periodic call in second (float)
systemGetCallDeltaTime
+ int64_t systemGetCallDeltaTime () const;
{SYSTEM} get a reference of the periodic call delta time
Return: the perodic time delta call -1 : disable / 0 : every time / else in US
systemGetLastCallTime
+ int64_t systemGetLastCallTime () const;
{SYSTEM} get a reference of the periodic call time
Return: Last call from the periodic call
systemSetLastCallTime
+ void systemSetLastCallTime (int64_t _time);
{SYSTEM} get a reference of the periodic call time
Return: Last call from the periodic call
periodicCall
+ virtual void periodicCall (const ewol::event::Time & _event);
periodic call of this widget
Parameter: _event Current time property
getWidgetAtPos
+ virtual std::shared_ptr<ewol::Widget> getWidgetAtPos (const vec2 & _pos);
get the widget at the specific windows absolute position
Note: : INTERNAL EWOL SYSTEM
Parameter [input]: _pos gAbsolute position of the requested widget knowledge
Return: nullptr No widget found<br/>pointer on the widget found
systemEventInput
+ virtual bool systemEventInput (ewol::event::InputSystem & _event);
{SYSTEM} system event input (only meta widget might overwrite this function).
Parameter [input]: _event Event properties
Return: true the event is used<br/>false the event is not used
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
systemEventEntry
+ virtual bool systemEventEntry (ewol::event::EntrySystem & _event);
{SYSTEM} Entry event (only meta widget might overwrite this function).
Parameter [input]: _event Event properties
Return: true if the event has been used<br/>false if the event has not been 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
onEventClipboard
+ virtual void onEventClipboard (enum ewol::context::clipBoard::clipboardListe _clipboardID);
Event on a past event == > this event is asynchronous due to all system does not support direct getting datas
Note: : need to have focus ...
Parameter [input]: mode Mode of data requested
signalShortcut
+ ewol::object::Signal<std::string> signalShortcut;
signal handle of the message
shortCutAdd
# virtual void shortCutAdd (const std::string & _descriptiveString,
const std::string & _message);
add a specific shortcut with his description
Parameter [input]: _descriptiveString Description string of the shortcut
Parameter [input]: _message massage to generate (or shortcut name)
shortCutClean
# virtual void shortCutClean ();
remove all curent shortCut
shortCutRemove
# virtual void shortCutRemove (const std::string & _message);
remove a specific shortCut whith his event name
Parameter [input]: _message renerated event name
onEventShortCut
+ virtual bool onEventShortCut (ewol::key::Special & _special,
char32_t _unicodeValue,
enum ewol::key::keyboard _kbMove,
bool _isDown);
Event on a short-cut of this Widget (in case of return false, the event on the keyevent will arrive in the function @ref onEventKb).
Note: To prevent some error when you get an event get it if it is down and Up ... == > like this it could not generate some ununderstanding error.
Parameter [input]: _special All the special kay pressed at this time.
Parameter [input]: _unicodeValue Key pressed by the user not used if the kbMove!=ewol::EVENT_KB_MOVE_TYPE_NONE.
Parameter [input]: _kbMove Special key of the keyboard.
Return: true if the event has been used.<br/>false if the event has not been used.
m_needRegenerateDisplay
# bool m_needRegenerateDisplay;
the display might be done the next regeneration
markToRedraw
# virtual void markToRedraw ();
The widget mark itself that it need to regenerate the nest time.
needRedraw
# virtual bool needRedraw ();
get the need of the redrawing of the widget and reset it to false
Return: true if we need to redraw<br/>false if we have no need to redraw
systemDraw
+ virtual void systemDraw (const DrawProperty & _displayProp);
{SYSTEM} extern interface to request a draw ... (called by the drawing thread [Android, X11, ...])
This function generate a clipping with the viewport openGL system. Like this a widget draw can not draw over an other widget
Note: This function is virtual for the scrolled widget, and the more complicated openGl widget
Note: : INTERNAL EWOL SYSTEM
Parameter [input]: _displayProp properties of the current display
onDraw
# virtual void onDraw ();
Common widget drawing function (called by the drawing thread [Android, X11, ...])
onRegenerateDisplay
+ virtual void onRegenerateDisplay ();
Event generated when a redraw is needed
grabCursor
+ virtual void grabCursor ();
Grab the cursor : This get all the mouvement of the mouse in PC mode, and generate an ofset instead of a position.
Note: : the generation of the offset is due to the fact the cursor position is forced at the center of the widget.
Note: This done nothing in "Finger" or "Stylet" mode.
unGrabCursor
+ virtual void unGrabCursor ();
Un-Grab the cursor (default mode cursor offset)
getGrabStatus
+ virtual bool getGrabStatus ();
get the grabbing status of the cursor.
Return: true if the cursor is curently grabbed
setCursor
+ virtual void setCursor (enum ewol::context::cursorDisplay _newCursor);
set the cursor display type.
Parameter [input]: _newCursor selected new cursor.
getCursor
+ virtual enum ewol::context::cursorDisplay getCursor ();
get the currrent cursor.
Return: the type of the cursor.
loadXML
+ virtual bool loadXML (exml::Element* _node);
load properties with an XML node.
Parameter [input]: _node Pointer on the tinyXML node.
Return: true : All has been done corectly.<br/>false : An error occured.
onParameterChangeValue
# virtual void onParameterChangeValue (const ewol::object::ParameterRef & _paramPointer);
requestUpdateSize
+ void requestUpdateSize ();
need to be call When the size of the current widget have change == > this force the system to recalculate all the widget positions
getWidgetManager
+ ewol::widget::Manager & getWidgetManager ();
get the current Widget Manager
getWindows
+ std::shared_ptr<ewol::widget::Windows> getWindows ();
get the curent Windows
signalAnnimationStart
+ ewol::object::Signal<void> signalAnnimationStart;
event when start annimation
signalAnnimationRatio
+ ewol::object::Signal<float> signalAnnimationRatio;
event when % of annimation change (integer)
signalAnnimationStop
+ ewol::object::Signal<void> signalAnnimationStop;
event when stop annimation
m_annimationratio
# float m_annimationratio;
Ratio of the annimation [0..1]
m_annimationTypeStart
# ewol::object::ParamList<int32_t> m_annimationTypeStart;
type of start annimation
m_annimationTimeStart
# ewol::object::ParamRange<float> m_annimationTimeStart;
time to produce start annimation
m_annimationTypeStop
# ewol::object::ParamList<int32_t> m_annimationTypeStop;
type of start annimation
m_annimationTimeStop
# ewol::object::ParamRange<float> m_annimationTimeStop;
time to produce start annimation
addAnnimationType
# void addAnnimationType (enum ewol::Widget::annimationMode _mode,
const char* _type);
Add a annimation type capabilities of this widget.
Parameter [input]: _mode Configuring mode.
Parameter [input]: _type Type of the annimation.
setAnnimationType
+ void setAnnimationType (enum ewol::Widget::annimationMode _mode,
const std::string & _type);
set a annimation type.
Parameter [input]: _mode Configuring mode.
Parameter [input]: _type type of the annimation
setAnnimationTime
+ void setAnnimationTime (enum ewol::Widget::annimationMode _mode,
float _time);
set a annimation time to produce.
Parameter [input]: _mode Configuring mode.
Parameter [input]: _time Time in second of the annimation display
startAnnimation
+ bool startAnnimation (enum ewol::Widget::annimationMode _mode);
Start the annimation.
Parameter [input]: _mode Configuring mode.
Return: true if an annimation will be started, false ==> no annimation and no event
stopAnnimation
+ bool stopAnnimation ();
Stop/Break the annimation.
Return: true if an annimation will be stoped, false ==> no curent annimation and no event wil be generated
onStartAnnimation
# virtual bool onStartAnnimation (enum ewol::Widget::annimationMode _mode);
Event when start the annimation.
Parameter [input]: _mode Configuring mode.
Return: true need to add periodic call.
onStopAnnimation
# virtual void onStopAnnimation ();
Event when Stop the annimation.
+std::enable_shared_from_this<Object>
+ewol::object::ParameterList
+ewol::object::SignalList
+--> +ewol::Object
+--> ewol::Widget
+--> ewol::widget::ButtonColor
+--> ewol::widget::WidgetScrolled
+--> ewol::widget::Joystick
+--> ewol::widget::Slider
+--> ewol::widget::Spacer
+--> ewol::widget::Label
+--> ewol::widget::Container2
+--> ewol::widget::Image
+--> ewol::widget::ProgressBar
+--> ewol::widget::Windows
+--> ewol::widget::Container
+--> ewol::widget::ContainerN
+--> ewol::widget::Gird
+--> ewol::widget::Entry
+--> ewol::widget::ColorBar
+--> ege::widget::Mesh
+--> ege::widget::Scene
Detail:
Widget
# Widget ();Constructor of the widget classes
Return: | (no execption generated (not managed in embended platform)) |
init
# void init ();
init
# void init (const std::string & _name);
~Widget
+ virtual ~Widget ();Destructor of the widget classes
m_size
# vec2 m_size;internal : current size of the widget
m_minSize
# vec2 m_minSize;internal : minimum size of the widget
m_maxSize
# vec2 m_maxSize;internal : maximum size of the widget
relativePosition
+ virtual vec2 relativePosition (const vec2 & _pos);convert the absolute position in the local Position (Relative)
Parameter [input]: | _pos | Absolute position that you request convertion |
Return: | the relative position |
calculateSize
+ virtual void calculateSize (const vec2 & _available);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 |
getSize
+ virtual vec2 getSize ();get the widget size
Note: : INTERNAL EWOL SYSTEM
Return: | Requested size |
calculateMinMaxSize
+ virtual void calculateMinMaxSize ();calculate the minimum and maximum size (need to estimate expend properties of the widget)
Note: : INTERNAL EWOL SYSTEM
getCalculateMinSize
+ virtual vec2 getCalculateMinSize ();get the widget minimum size calculated
Note: : INTERNAL EWOL SYSTEM
Return: | Requested size |
getCalculateMaxSize
+ virtual vec2 getCalculateMaxSize ();get the widget maximum size calculated
Note: : INTERNAL EWOL SYSTEM
Return: | Requested size |
m_offset
# vec2 m_offset;Offset of the display in the viewport
setOffset
+ virtual void setOffset (const vec2 & _newVal);set the zoom property of the widget.
Parameter [input]: | _newVal | offset value. |
getOffset
+ virtual const vec2 & getOffset ();get the offset property of the widget.
Return: | The current offset value. |
m_zoom
# float m_zoom;generic widget zoom
setZoom
+ virtual void setZoom (float _newVal);set the zoom property of the widget
Parameter [input]: | _newVal | newZoom value |
getZoom
+ virtual float getZoom ();get the zoom property of the widget
Return: | the current zoom value |
changeZoom
+ virtual void changeZoom (float _range);Change Zoom property.
Parameter [input]: | _range | Range of the zoom change. |
m_origin
# vec2 m_origin;internal ... I do not really known how i can use it ...
setOrigin
+ virtual void setOrigin (const vec2 & _pos);set origin at the widget (must be an parrent widget that set this parameter). This represent the absolute origin in the program windows
Note: : INTERNAL EWOL SYSTEM
Parameter [input]: | _pos | Position of the origin |
getOrigin
+ virtual vec2 getOrigin ();get the origin (obsolute position in the windows)
Return: | coordonate of the origin requested |
m_userMinSize
# ewol::object::Param<ewol::Dimension> m_userMinSize;user define the minimum size of the widget
setMinSize
+ void setMinSize (const ewol::Dimension & _size);User set the minimum size he want to set the display
Parameter [input]: | _size | set minimum size (none : 0) |
setNoMinSize
+ void setNoMinSize ();User set No minimum size.
getMinSize
+ const ewol::Dimension & getMinSize ();get the current calculated min size
Return: | the size requested |
checkMinSize
+ virtual void checkMinSize ();Check if the current min size is compatible with the user minimum size If it is not the user minimum size will overWrite the minimum size set.
Note: : INTERNAL EWOL SYSTEM
m_userMaxSize
# ewol::object::Param<ewol::Dimension> m_userMaxSize;user define the maximum size of the widget
setMaxSize
+ void setMaxSize (const ewol::Dimension & _size);User set the maximum size he want to set the display
Parameter [input]: | _size | The new maximum size requested (vec2(0,0) to unset) |
setNoMaxSize
+ void setNoMaxSize ();User set No maximum size.
getMaxSize
+ const ewol::Dimension & getMaxSize ();get the current maximum size
Return: | the size requested |
checkMaxSize
+ virtual void checkMaxSize ();Check if the current max size is compatible with the user maximum size If it is not the user maximum size will overWrite the maximum size set.
Note: : INTERNAL EWOL SYSTEM
m_userExpand
# ewol::object::Param<bvec2> m_userExpand;
setExpand
+ virtual void setExpand (const bvec2 & _newExpand);set the expend capabilities (x&y)
Parameter [input]: | _newExpend | 2D boolean repensent the capacity to expend |
getExpand
+ virtual bvec2 getExpand ();get the expend capabilities (x&y) (set by the user)
Return: | 2D boolean repensent the capacity to expend |
canExpand
+ virtual bvec2 canExpand ();get the expend capabilities (x&y)
Note: : INTERNAL EWOL SYSTEM
Return: | 2D boolean repensent the capacity to expend |
m_userFill
# ewol::object::Param<bvec2> m_userFill;
setFill
+ virtual void setFill (const bvec2 & _newFill);set the x&y filling capacity
Parameter [input]: | _newFill | new x&y fill state |
getFill
+ virtual const bvec2 & getFill ();set the x&y filling capacity set by the user
Return: | bvec2 repensent the capacity to x&y filling (set by the user) |
canFill
+ const bvec2 & canFill ();get the filling capabilities x&y
Note: : INTERNAL EWOL SYSTEM
Return: | bvec2 repensent the capacity to x&y filling |
m_hide
# ewol::object::Param<bool> m_hide;hide a widget on the display
hide
+ virtual void hide ();set the widget hidden
show
+ virtual void show ();set the widget visible
isHide
+ virtual bool isHide ();get the visibility of the widget
Return: | true: if the widget is hiden, false: it is visible |
m_gravity
# ewol::object::ParamList<enumewol::gravity> m_gravity;Gravity of the widget
setGravity
+ virtual void setGravity (enum ewol::gravity _gravity);set the widget gravity
Parameter [input]: | _gravity | New gravity of the widget |
getGravity
+ virtual enum ewol::gravity getGravity ();get the widget gravity
Return: | the gravity type |
getFocus
+ virtual bool getFocus ();get the focus state of the widget
Return: | focus state |
canHaveFocus
+ virtual bool canHaveFocus ();get the capability to have focus
Return: | State capability to have focus |
setFocus
+ virtual bool setFocus ();set focus on this widget
Return: | return true if the widget keep the focus |
rmFocus
+ virtual bool rmFocus ();remove the focus on this widget
Return: | return true if the widget have release his focus (if he has it) |
setCanHaveFocus
+ virtual void setCanHaveFocus (bool _canFocusState);set the capability to have the focus
Parameter [input]: | _canFocusState | new focus capability |
keepFocus
+ virtual void keepFocus ();keep the focus on this widget == > this remove the previous focus on all other widget
onGetFocus
# virtual void onGetFocus ();Event of the focus has been grep by the current widget
onLostFocus
# virtual void onLostFocus ();Event of the focus has been lost by the current widget
getMouseLimit
+ virtual int32_t getMouseLimit ();get the number of mouse event supported
Return: | return the number of event that the mouse supported [0..3] |
setMouseLimit
+ virtual void setMouseLimit (int32_t _numberState);get the number of mouse event supported
Parameter [input]: | _numberState | The number of event that the mouse supported [0..3] |
getKeyboardRepeate
+ virtual bool getKeyboardRepeate ();get the keyboard repeating event supporting.
Return: | true : the event can be repeated.<br/>false : the event must not be repeated. |
setKeyboardRepeate
# virtual void setKeyboardRepeate (bool _state);set the keyboard repeating event supporting.
Parameter [input]: | _state | The repeating status (true: enable, false disable). |
showKeyboard
# virtual void showKeyboard ();display the virtual keyboard (if needed)
hideKeyboard
# virtual void hideKeyboard ();Hide the virtual keyboard (if needed)
periodicCallDisable
# void periodicCallDisable ();disable the periodic call.
periodicCallEnable
# void periodicCallEnable (float _callInSecond);disable the periodic call.
Parameter [input]: | _callInSecond | periodic call in second (float) |
systemGetCallDeltaTime
+ int64_t systemGetCallDeltaTime () const;{SYSTEM} get a reference of the periodic call delta time
Return: | the perodic time delta call -1 : disable / 0 : every time / else in US |
systemGetLastCallTime
+ int64_t systemGetLastCallTime () const;{SYSTEM} get a reference of the periodic call time
Return: | Last call from the periodic call |
systemSetLastCallTime
+ void systemSetLastCallTime (int64_t _time);{SYSTEM} get a reference of the periodic call time
Return: | Last call from the periodic call |
periodicCall
+ virtual void periodicCall (const ewol::event::Time & _event);periodic call of this widget
Parameter: | _event | Current time property |
getWidgetAtPos
+ virtual std::shared_ptr<ewol::Widget> getWidgetAtPos (const vec2 & _pos);get the widget at the specific windows absolute position
Note: : INTERNAL EWOL SYSTEM
Parameter [input]: | _pos | gAbsolute position of the requested widget knowledge |
Return: | nullptr No widget found<br/>pointer on the widget found |
systemEventInput
+ virtual bool systemEventInput (ewol::event::InputSystem & _event);{SYSTEM} system event input (only meta widget might overwrite this function).
Parameter [input]: | _event | Event properties |
Return: | true the event is used<br/>false the event is not used |
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 |
systemEventEntry
+ virtual bool systemEventEntry (ewol::event::EntrySystem & _event);{SYSTEM} Entry event (only meta widget might overwrite this function).
Parameter [input]: | _event | Event properties |
Return: | true if the event has been used<br/>false if the event has not been 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 |
onEventClipboard
+ virtual void onEventClipboard (enum ewol::context::clipBoard::clipboardListe _clipboardID);Event on a past event == > this event is asynchronous due to all system does not support direct getting datas
Note: : need to have focus ...
Parameter [input]: | mode | Mode of data requested |
signalShortcut
+ ewol::object::Signal<std::string> signalShortcut;signal handle of the message
shortCutAdd
# virtual void shortCutAdd (const std::string & _descriptiveString,add a specific shortcut with his description
const std::string & _message);
Parameter [input]: | _descriptiveString | Description string of the shortcut | Parameter [input]: | _message | massage to generate (or shortcut name) |
shortCutClean
# virtual void shortCutClean ();remove all curent shortCut
shortCutRemove
# virtual void shortCutRemove (const std::string & _message);remove a specific shortCut whith his event name
Parameter [input]: | _message | renerated event name |
onEventShortCut
+ virtual bool onEventShortCut (ewol::key::Special & _special,Event on a short-cut of this Widget (in case of return false, the event on the keyevent will arrive in the function @ref onEventKb).
char32_t _unicodeValue,
enum ewol::key::keyboard _kbMove,
bool _isDown);
Note: To prevent some error when you get an event get it if it is down and Up ... == > like this it could not generate some ununderstanding error.
Parameter [input]: | _special | All the special kay pressed at this time. | Parameter [input]: | _unicodeValue | Key pressed by the user not used if the kbMove!=ewol::EVENT_KB_MOVE_TYPE_NONE. | Parameter [input]: | _kbMove | Special key of the keyboard. |
Return: | true if the event has been used.<br/>false if the event has not been used. |
m_needRegenerateDisplay
# bool m_needRegenerateDisplay;the display might be done the next regeneration
markToRedraw
# virtual void markToRedraw ();The widget mark itself that it need to regenerate the nest time.
needRedraw
# virtual bool needRedraw ();get the need of the redrawing of the widget and reset it to false
Return: | true if we need to redraw<br/>false if we have no need to redraw |
systemDraw
+ virtual void systemDraw (const DrawProperty & _displayProp);{SYSTEM} extern interface to request a draw ... (called by the drawing thread [Android, X11, ...]) This function generate a clipping with the viewport openGL system. Like this a widget draw can not draw over an other widget
Note: This function is virtual for the scrolled widget, and the more complicated openGl widget
Note: : INTERNAL EWOL SYSTEM
Parameter [input]: | _displayProp | properties of the current display |
onDraw
# virtual void onDraw ();Common widget drawing function (called by the drawing thread [Android, X11, ...])
onRegenerateDisplay
+ virtual void onRegenerateDisplay ();Event generated when a redraw is needed
grabCursor
+ virtual void grabCursor ();Grab the cursor : This get all the mouvement of the mouse in PC mode, and generate an ofset instead of a position.
Note: : the generation of the offset is due to the fact the cursor position is forced at the center of the widget.
Note: This done nothing in "Finger" or "Stylet" mode.
unGrabCursor
+ virtual void unGrabCursor ();Un-Grab the cursor (default mode cursor offset)
getGrabStatus
+ virtual bool getGrabStatus ();get the grabbing status of the cursor.
Return: | true if the cursor is curently grabbed |
setCursor
+ virtual void setCursor (enum ewol::context::cursorDisplay _newCursor);set the cursor display type.
Parameter [input]: | _newCursor | selected new cursor. |
getCursor
+ virtual enum ewol::context::cursorDisplay getCursor ();get the currrent cursor.
Return: | the type of the cursor. |
loadXML
+ virtual bool loadXML (exml::Element* _node);load properties with an XML node.
Parameter [input]: | _node | Pointer on the tinyXML node. |
Return: | true : All has been done corectly.<br/>false : An error occured. |
onParameterChangeValue
# virtual void onParameterChangeValue (const ewol::object::ParameterRef & _paramPointer);
requestUpdateSize
+ void requestUpdateSize ();need to be call When the size of the current widget have change == > this force the system to recalculate all the widget positions
getWidgetManager
+ ewol::widget::Manager & getWidgetManager ();get the current Widget Manager
getWindows
+ std::shared_ptr<ewol::widget::Windows> getWindows ();get the curent Windows
signalAnnimationStart
+ ewol::object::Signal<void> signalAnnimationStart;event when start annimation
signalAnnimationRatio
+ ewol::object::Signal<float> signalAnnimationRatio;event when % of annimation change (integer)
signalAnnimationStop
+ ewol::object::Signal<void> signalAnnimationStop;event when stop annimation
m_annimationratio
# float m_annimationratio;Ratio of the annimation [0..1]
m_annimationTypeStart
# ewol::object::ParamList<int32_t> m_annimationTypeStart;type of start annimation
m_annimationTimeStart
# ewol::object::ParamRange<float> m_annimationTimeStart;time to produce start annimation
m_annimationTypeStop
# ewol::object::ParamList<int32_t> m_annimationTypeStop;type of start annimation
m_annimationTimeStop
# ewol::object::ParamRange<float> m_annimationTimeStop;time to produce start annimation
addAnnimationType
# void addAnnimationType (enum ewol::Widget::annimationMode _mode,Add a annimation type capabilities of this widget.
const char* _type);
Parameter [input]: | _mode | Configuring mode. | Parameter [input]: | _type | Type of the annimation. |
setAnnimationType
+ void setAnnimationType (enum ewol::Widget::annimationMode _mode,set a annimation type.
const std::string & _type);
Parameter [input]: | _mode | Configuring mode. | Parameter [input]: | _type | type of the annimation |
setAnnimationTime
+ void setAnnimationTime (enum ewol::Widget::annimationMode _mode,set a annimation time to produce.
float _time);
Parameter [input]: | _mode | Configuring mode. | Parameter [input]: | _time | Time in second of the annimation display |
startAnnimation
+ bool startAnnimation (enum ewol::Widget::annimationMode _mode);Start the annimation.
Parameter [input]: | _mode | Configuring mode. |
Return: | true if an annimation will be started, false ==> no annimation and no event |
stopAnnimation
+ bool stopAnnimation ();Stop/Break the annimation.
Return: | true if an annimation will be stoped, false ==> no curent annimation and no event wil be generated |
onStartAnnimation
# virtual bool onStartAnnimation (enum ewol::Widget::annimationMode _mode);Event when start the annimation.
Parameter [input]: | _mode | Configuring mode. |
Return: | true need to add periodic call. |
onStopAnnimation
# virtual void onStopAnnimation ();Event when Stop the annimation.