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 (void );
+ virtual ~Widget (void );
Synopsis:
+ const char* const configFill;
+ const char* const configExpand;
+ const char* const configHide;
+ const char* const configFocus;
+ const char* const configMinSize;
+ const char* const configMaxSize;
+ const char* const configGravity;
# ewol::Widget* m_up;
+ void setUpperWidget (ewol::Widget* _upper);
+ void removeUpperWidget (void );
+ ewol::Widget* getUpperWidget (void );
# vec2 m_size;
# vec2 m_minSize;
# vec2 m_maxSize;
+ virtual vec2 relativePosition (const vec2 & _pos);
+ virtual void calculateSize (const vec2 & _available);
+ virtual vec2 getSize (void );
+ virtual void calculateMinMaxSize (void );
+ virtual vec2 getCalculateMinSize (void );
+ virtual vec2 getCalculateMaxSize (void );
# vec2 m_offset;
+ virtual void setOffset (const vec2 & _newVal);
+ virtual const vec2 & getOffset (void );
# float m_zoom;
+ virtual void setZoom (float _newVal);
+ virtual float getZoom (void );
# vec2 m_origin;
+ virtual void setOrigin (const vec2 & _pos);
+ virtual vec2 getOrigin (void );
# ewol::Dimension m_userMinSize;
+ void setMinSize (const ewol::Dimension & _size);
+ void setNoMinSize (void );
+ const ewol::Dimension & getMinSize (void );
+ virtual void checkMinSize (void );
# ewol::Dimension m_userMaxSize;
+ void setMaxSize (const ewol::Dimension & _size);
+ void setNoMaxSize (void );
+ const ewol::Dimension & getMaxSize (void );
+ virtual void checkMaxSize (void );
# bvec2 m_userExpand;
+ virtual void setExpand (const bvec2 & _newExpand);
+ virtual bvec2 getExpand (void );
+ virtual bvec2 canExpand (void );
# bvec2 m_userFill;
+ virtual void setFill (const bvec2 & _newFill);
+ virtual const bvec2 & getFill (void );
+ const bvec2 & canFill (void );
# bool m_hide;
+ virtual void hide (void );
+ virtual void show (void );
+ virtual bool isHide (void );
+ virtual void setGravity (enum ewol::gravity _gravity);
+ virtual enum ewol::gravity getGravity (void );
+ virtual bool getFocus (void );
+ virtual bool canHaveFocus (void );
+ virtual bool setFocus (void );
+ virtual bool rmFocus (void );
+ virtual void setCanHaveFocus (bool _canFocusState);
+ virtual void keepFocus (void );
# virtual void onGetFocus (void );
# virtual void onLostFocus (void );
+ virtual int32_t getMouseLimit (void );
+ virtual void setMouseLimit (int32_t _numberState);
+ virtual bool getKeyboardRepeate (void );
# virtual void setKeyboardRepeate (bool _state);
# virtual void showKeyboard (void );
# virtual void hideKeyboard (void );
# void periodicCallDisable (void );
# void periodicCallEnable (float _callInSecond);
+ int64_t systemGetCallDeltaTime (void ) const;
+ int64_t systemGetLastCallTime (void ) const;
+ void systemSetLastCallTime (int64_t _time);
+ virtual void periodicCall (const ewol::event::Time & _event);
+ virtual ewol::Widget* getWidgetAtPos (const vec2 & _pos);
+ virtual ewol::Widget* getWidgetNamed (const std::string & _widgetName);
+ 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);
# virtual void shortCutAdd (const char* _descriptiveString,
const char* _generateEventId,
std::string _data,
bool _broadcast);
# virtual void shortCutClean (void );
+ virtual bool onEventShortCut (ewol::key::Special & _special,
char32_t _unicodeValue,
enum ewol::key::keyboard _kbMove,
bool _isDown);
# bool m_needRegenerateDisplay;
# virtual void markToRedraw (void );
# virtual bool needRedraw (void );
+ virtual void systemDraw (const DrawProperty & _displayProp);
# virtual void onDraw (void );
+ virtual void onRegenerateDisplay (void );
+ virtual void grabCursor (void );
+ virtual void unGrabCursor (void );
+ virtual bool getGrabStatus (void );
+ virtual void setCursor (enum ewol::context::cursorDisplay _newCursor);
+ virtual enum ewol::context::cursorDisplay getCursor (void );
+ virtual void onObjectRemove (ewol::Object* _removeObject);
+ virtual bool loadXML (exml::Element* _node);
# virtual bool onSetConfig (const ewol::object::Config & _conf);
# virtual bool onGetConfig (const char* _config,
std::string & _result) const;
+ void requestUpdateSize (void );
+ ewol::widget::Manager & getWidgetManager (void );
+ ewol::widget::Windows* getWindows (void );
+ const char* const configAnnimationAddType;
+ const char* const configAnnimationAddTime;
+ const char* const configAnnimationRemoveType;
+ const char* const configAnnimationRemoveTime;
+ const char* const eventAnnimationStart;
+ const char* const eventAnnimationRatio;
+ const char* const eventAnnimationStop;
# float m_annimationratio;
# const char* m_annimationType;
# float m_annimationTime;
# 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 (void );
# virtual bool onStartAnnimation (enum ewol::Widget::annimationMode _mode);
# virtual void onStopAnnimation (void );
Object Hierarchy:
+ewol::Object
+--> ewol::Widget
+--> ewol::widget::Button
+--> ewol::widget::ButtonColor
+--> ewol::widget::WidgetScrooled
+--> ewol::widget::Joystick
+--> ewol::widget::Slider
+--> ewol::widget::Spacer
+--> ewol::widget::Label
+--> ewol::widget::Image
+--> ewol::widget::ProgressBar
+--> ewol::widget::CheckBox
+--> 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:
configFill
+ const char* const configFill;
configExpand
+ const char* const configExpand;
configHide
+ const char* const configHide;
configFocus
+ const char* const configFocus;
configMinSize
+ const char* const configMinSize;
configMaxSize
+ const char* const configMaxSize;
configGravity
+ const char* const configGravity;
Widget
+ Widget (void );
Constructor of the widget classes
Return: (no execption generated (not managed in embended platform))
~Widget
+ virtual ~Widget (void );
Destructor of the widget classes
m_up
# ewol::Widget* m_up;
uppper widget in the tree of widget
setUpperWidget
+ void setUpperWidget (ewol::Widget* _upper);
set the upper widget of this widget.
Parameter [input]: _upper Father widget (only keep the last and write error if a previous was set) == > disable with NULL.
removeUpperWidget
+ void removeUpperWidget (void );
remove the upper widget of this widget.
getUpperWidget
+ ewol::Widget* getUpperWidget (void );
get the upper widget (father).
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 (void );
get the widget size
Note: : INTERNAL EWOL SYSTEM
Return: Requested size
calculateMinMaxSize
+ virtual void calculateMinMaxSize (void );
calculate the minimum and maximum size (need to estimate expend properties of the widget)
Note: : INTERNAL EWOL SYSTEM
getCalculateMinSize
+ virtual vec2 getCalculateMinSize (void );
get the widget minimum size calculated
Note: : INTERNAL EWOL SYSTEM
Return: Requested size
getCalculateMaxSize
+ virtual vec2 getCalculateMaxSize (void );
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 (void );
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 (void );
get the zoom property of the widget
Return: the current zoom value
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 (void );
get the origin (obsolute position in the windows)
Return: coordonate of the origin requested
m_userMinSize
# 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 (void );
User set No minimum size.
getMinSize
+ const ewol::Dimension & getMinSize (void );
get the current calculated min size
Return: the size requested
checkMinSize
+ virtual void checkMinSize (void );
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::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 (void );
User set No maximum size.
getMaxSize
+ const ewol::Dimension & getMaxSize (void );
get the current maximum size
Return: the size requested
checkMaxSize
+ virtual void checkMaxSize (void );
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
# 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 (void );
get the expend capabilities (x&y) (set by the user)
Return: 2D boolean repensent the capacity to expend
canExpand
+ virtual bvec2 canExpand (void );
get the expend capabilities (x&y)
Note: : INTERNAL EWOL SYSTEM
Return: 2D boolean repensent the capacity to expend
m_userFill
# 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 (void );
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 (void );
get the filling capabilities x&y
Note: : INTERNAL EWOL SYSTEM
Return: bvec2 repensent the capacity to x&y filling
m_hide
# bool m_hide;
hide a widget on the display
hide
+ virtual void hide (void );
set the widget hidden
show
+ virtual void show (void );
set the widget visible
isHide
+ virtual bool isHide (void );
get the visibility of the widget
Return: true: if the widget is hiden, false: it is visible
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 (void );
get the widget gravity
Return: the gravity type
getFocus
+ virtual bool getFocus (void );
get the focus state of the widget
Return: focus state
canHaveFocus
+ virtual bool canHaveFocus (void );
get the capability to have focus
Return: State capability to have focus
setFocus
+ virtual bool setFocus (void );
set focus on this widget
Return: return true if the widget keep the focus
rmFocus
+ virtual bool rmFocus (void );
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 (void );
keep the focus on this widget == > this remove the previous focus on all other widget
onGetFocus
# virtual void onGetFocus (void );
Event of the focus has been grep by the current widget
onLostFocus
# virtual void onLostFocus (void );
Event of the focus has been lost by the current widget
getMouseLimit
+ virtual int32_t getMouseLimit (void );
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 (void );
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 (void );
display the virtual keyboard (if needed)
hideKeyboard
# virtual void hideKeyboard (void );
Hide the virtual keyboard (if needed)
periodicCallDisable
# void periodicCallDisable (void );
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 (void ) 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 (void ) 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 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: NULL No widget found<br/>pointer on the widget found
getWidgetNamed
+ virtual ewol::Widget* getWidgetNamed (const std::string & _widgetName);
get the widget if it have this name or one of the subwidget with the same name
Parameter [input]: _widgetName name of the widget
Return: the requested pointer on the node (or NULL pointer)
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
shortCutAdd
# virtual void shortCutAdd (const char* _descriptiveString,
const char* _generateEventId,
std::string _data,
bool _broadcast);
add a specific shortcut with his description
Parameter [input]: _descriptiveString Description string of the shortcut
Parameter [input]: _generateEventId Event generic of the element
Parameter [input]: _data Associate data wit the event
shortCutClean
# virtual void shortCutClean (void );
remove all curent shortCut
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 (void );
The widget mark itself that it need to regenerate the nest time.
needRedraw
# virtual bool needRedraw (void );
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 (void );
Common widget drawing function (called by the drawing thread [Android, X11, ...])
onRegenerateDisplay
+ virtual void onRegenerateDisplay (void );
Event generated when a redraw is needed
grabCursor
+ virtual void grabCursor (void );
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 (void );
Un-Grab the cursor (default mode cursor offset)
getGrabStatus
+ virtual bool getGrabStatus (void );
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 (void );
get the currrent cursor.
Return: the type of the cursor.
onObjectRemove
+ virtual void onObjectRemove (ewol::Object* _removeObject);
Inform object that an other object is removed ...
Note: : Sub classes must call this class
Parameter [input]: _removObject Pointer on the Object remeved == > the user must remove all reference on this Object
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.
onSetConfig
# virtual bool onSetConfig (const ewol::object::Config & _conf);
Configuration requested to the curent Object
Parameter [input]: _conf Configuration handle.
Return: true if the parametere has been used
onGetConfig
# virtual bool onGetConfig (const char* _config,
std::string & _result) const;
Receive a configuration message from an other element system or from the curent Object
Parameter [input]: _config Configuration name.
Parameter [output]: _result Result of the request.
Return: true if the config is set
requestUpdateSize
+ void requestUpdateSize (void );
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 (void );
get the current Widget Manager
getWindows
+ ewol::widget::Windows* getWindows (void );
get the curent Windows
configAnnimationAddType
+ const char* const configAnnimationAddType;
configAnnimationAddTime
+ const char* const configAnnimationAddTime;
configAnnimationRemoveType
+ const char* const configAnnimationRemoveType;
configAnnimationRemoveTime
+ const char* const configAnnimationRemoveTime;
eventAnnimationStart
+ const char* const eventAnnimationStart;
event when start annimation
eventAnnimationRatio
+ const char* const eventAnnimationRatio;
event when % of annimation change (integer)
eventAnnimationStop
+ const char* const eventAnnimationStop;
event when stop annimation
m_annimationratio
# float m_annimationratio;
Ratio of the annimation [0..1]
m_annimationType
# const char* m_annimationType;
type of start annimation (default NULL ==> no annimation)
m_annimationTime
# float m_annimationTime;
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 (void );
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 (void );
Event when Stop the annimation.
+ewol::Object
+--> ewol::Widget
+--> ewol::widget::Button
+--> ewol::widget::ButtonColor
+--> ewol::widget::WidgetScrooled
+--> ewol::widget::Joystick
+--> ewol::widget::Slider
+--> ewol::widget::Spacer
+--> ewol::widget::Label
+--> ewol::widget::Image
+--> ewol::widget::ProgressBar
+--> ewol::widget::CheckBox
+--> 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:
configFill
+ const char* const configFill;
configExpand
+ const char* const configExpand;
configHide
+ const char* const configHide;
configFocus
+ const char* const configFocus;
configMinSize
+ const char* const configMinSize;
configMaxSize
+ const char* const configMaxSize;
configGravity
+ const char* const configGravity;
Widget
+ Widget (void );Constructor of the widget classes
Return: | (no execption generated (not managed in embended platform)) |
~Widget
+ virtual ~Widget (void );Destructor of the widget classes
m_up
# ewol::Widget* m_up;uppper widget in the tree of widget
setUpperWidget
+ void setUpperWidget (ewol::Widget* _upper);set the upper widget of this widget.
Parameter [input]: | _upper | Father widget (only keep the last and write error if a previous was set) == > disable with NULL. |
removeUpperWidget
+ void removeUpperWidget (void );remove the upper widget of this widget.
getUpperWidget
+ ewol::Widget* getUpperWidget (void );get the upper widget (father).
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 (void );get the widget size
Note: : INTERNAL EWOL SYSTEM
Return: | Requested size |
calculateMinMaxSize
+ virtual void calculateMinMaxSize (void );calculate the minimum and maximum size (need to estimate expend properties of the widget)
Note: : INTERNAL EWOL SYSTEM
getCalculateMinSize
+ virtual vec2 getCalculateMinSize (void );get the widget minimum size calculated
Note: : INTERNAL EWOL SYSTEM
Return: | Requested size |
getCalculateMaxSize
+ virtual vec2 getCalculateMaxSize (void );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 (void );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 (void );get the zoom property of the widget
Return: | the current zoom value |
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 (void );get the origin (obsolute position in the windows)
Return: | coordonate of the origin requested |
m_userMinSize
# 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 (void );User set No minimum size.
getMinSize
+ const ewol::Dimension & getMinSize (void );get the current calculated min size
Return: | the size requested |
checkMinSize
+ virtual void checkMinSize (void );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::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 (void );User set No maximum size.
getMaxSize
+ const ewol::Dimension & getMaxSize (void );get the current maximum size
Return: | the size requested |
checkMaxSize
+ virtual void checkMaxSize (void );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
# 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 (void );get the expend capabilities (x&y) (set by the user)
Return: | 2D boolean repensent the capacity to expend |
canExpand
+ virtual bvec2 canExpand (void );get the expend capabilities (x&y)
Note: : INTERNAL EWOL SYSTEM
Return: | 2D boolean repensent the capacity to expend |
m_userFill
# 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 (void );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 (void );get the filling capabilities x&y
Note: : INTERNAL EWOL SYSTEM
Return: | bvec2 repensent the capacity to x&y filling |
m_hide
# bool m_hide;hide a widget on the display
hide
+ virtual void hide (void );set the widget hidden
show
+ virtual void show (void );set the widget visible
isHide
+ virtual bool isHide (void );get the visibility of the widget
Return: | true: if the widget is hiden, false: it is visible |
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 (void );get the widget gravity
Return: | the gravity type |
getFocus
+ virtual bool getFocus (void );get the focus state of the widget
Return: | focus state |
canHaveFocus
+ virtual bool canHaveFocus (void );get the capability to have focus
Return: | State capability to have focus |
setFocus
+ virtual bool setFocus (void );set focus on this widget
Return: | return true if the widget keep the focus |
rmFocus
+ virtual bool rmFocus (void );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 (void );keep the focus on this widget == > this remove the previous focus on all other widget
onGetFocus
# virtual void onGetFocus (void );Event of the focus has been grep by the current widget
onLostFocus
# virtual void onLostFocus (void );Event of the focus has been lost by the current widget
getMouseLimit
+ virtual int32_t getMouseLimit (void );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 (void );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 (void );display the virtual keyboard (if needed)
hideKeyboard
# virtual void hideKeyboard (void );Hide the virtual keyboard (if needed)
periodicCallDisable
# void periodicCallDisable (void );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 (void ) 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 (void ) 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 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: | NULL No widget found<br/>pointer on the widget found |
getWidgetNamed
+ virtual ewol::Widget* getWidgetNamed (const std::string & _widgetName);get the widget if it have this name or one of the subwidget with the same name
Parameter [input]: | _widgetName | name of the widget |
Return: | the requested pointer on the node (or NULL pointer) |
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 |
shortCutAdd
# virtual void shortCutAdd (const char* _descriptiveString,add a specific shortcut with his description
const char* _generateEventId,
std::string _data,
bool _broadcast);
Parameter [input]: | _descriptiveString | Description string of the shortcut | Parameter [input]: | _generateEventId | Event generic of the element | Parameter [input]: | _data | Associate data wit the event |
shortCutClean
# virtual void shortCutClean (void );remove all curent shortCut
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 (void );The widget mark itself that it need to regenerate the nest time.
needRedraw
# virtual bool needRedraw (void );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 (void );Common widget drawing function (called by the drawing thread [Android, X11, ...])
onRegenerateDisplay
+ virtual void onRegenerateDisplay (void );Event generated when a redraw is needed
grabCursor
+ virtual void grabCursor (void );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 (void );Un-Grab the cursor (default mode cursor offset)
getGrabStatus
+ virtual bool getGrabStatus (void );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 (void );get the currrent cursor.
Return: | the type of the cursor. |
onObjectRemove
+ virtual void onObjectRemove (ewol::Object* _removeObject);Inform object that an other object is removed ...
Note: : Sub classes must call this class
Parameter [input]: | _removObject | Pointer on the Object remeved == > the user must remove all reference on this Object |
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. |
onSetConfig
# virtual bool onSetConfig (const ewol::object::Config & _conf);Configuration requested to the curent Object
Parameter [input]: | _conf | Configuration handle. |
Return: | true if the parametere has been used |
onGetConfig
# virtual bool onGetConfig (const char* _config,Receive a configuration message from an other element system or from the curent Object
std::string & _result) const;
Parameter [input]: | _config | Configuration name. | Parameter [output]: | _result | Result of the request. |
Return: | true if the config is set |
requestUpdateSize
+ void requestUpdateSize (void );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 (void );get the current Widget Manager
getWindows
+ ewol::widget::Windows* getWindows (void );get the curent Windows
configAnnimationAddType
+ const char* const configAnnimationAddType;
configAnnimationAddTime
+ const char* const configAnnimationAddTime;
configAnnimationRemoveType
+ const char* const configAnnimationRemoveType;
configAnnimationRemoveTime
+ const char* const configAnnimationRemoveTime;
eventAnnimationStart
+ const char* const eventAnnimationStart;event when start annimation
eventAnnimationRatio
+ const char* const eventAnnimationRatio;event when % of annimation change (integer)
eventAnnimationStop
+ const char* const eventAnnimationStop;event when stop annimation
m_annimationratio
# float m_annimationratio;Ratio of the annimation [0..1]
m_annimationType
# const char* m_annimationType;type of start annimation (default NULL ==> no annimation)
m_annimationTime
# float m_annimationTime;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 (void );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 (void );Event when Stop the annimation.