Class: ewol::Widget


Synopsis:

+                           Widget                  (void);
+ ~Widget (void);
+ void setUpperWidget (ewol::Widget * _upper);
+ void removeUpperWidget (void);
+ ewol::Widget * getUpperWidget (void);
+ vec2 relativePosition (const vec2 & _pos);
+ void calculateSize (const vec2 & _available);
+ vec2 getSize (void);
+ void calculateMinMaxSize (void);
+ vec2 getCalculateMinSize (void);
+ vec2 getCalculateMaxSize (void);
+ void setOffset (const vec2 & _newVal);
+ const vec2 & getOffset (void);
+ void setZoom (float _newVal);
+ float getZoom (void);
+ void setOrigin (const vec2 & _pos);
+ vec2 getOrigin (void);
+ void setMinSize (const ewol::Dimension & _size);
+ void setNoMinSize (void);
+ const ewol::Dimension & getMinSize (void);
+ void checkMinSize (void);
+ void setMaxSize (const ewol::Dimension & _size);
+ void setNoMaxSize (void);
+ const ewol::Dimension & getMaxSize (void);
+ void checkMaxSize (void);
+ void setExpand (const bvec2 & _newExpand);
+ bvec2 getExpand (void);
+ bvec2 canExpand (void);
+ void setFill (const bvec2 & _newFill);
+ const bvec2 & getFill (void);
+ const bvec2 & canFill (void);
+ void hide (void);
+ void show (void);
+ bool isHide (void);
+ void setGravity (enum ewol::gravity _gravity);
+ enum ewol::gravity getGravity (void);
+ bool getFocus (void);
+ bool canHaveFocus (void);
+ bool setFocus (void);
+ bool rmFocus (void);
+ void setCanHaveFocus (bool _canFocusState);
+ void keepFocus (void);
+ int32_t getMouseLimit (void);
+ void setMouseLimit (int32_t _numberState);
+ bool getKeyboardRepeate (void);
+ int64_t systemGetCallDeltaTime (void);
+ int64_t systemGetLastCallTime (void);
+ void systemSetLastCallTime (int64_t _time);
+ void periodicCall (const ewol::EventTime & _event);
+ ewol::Widget * getWidgetAtPos (const vec2 & _pos);
+ ewol::Widget * getWidgetNamed (const std::string & _widgetName);
+ bool systemEventInput (ewol::EventInputSystem & _event);
+ bool systemEventEntry (ewol::EventEntrySystem & _event);
+ void onEventClipboard (enum ewol::clipBoard::clipboardListe _clipboardID);
+ bool onEventShortCut (ewol::SpecialKey & _special,
char32_t _unicodeValue,
enum ewol::keyEvent::keyboard _kbMove,
bool _isDown);
+ void systemDraw (const DrawProperty & _displayProp);
+ void onRegenerateDisplay (void);
+ void grabCursor (void);
+ void unGrabCursor (void);
+ bool getGrabStatus (void);
+ void setCursor (enum ewol::cursorDisplay _newCursor);
+ enum ewol::cursorDisplay getCursor (void);
+ void onObjectRemove (ewol::EObject * _removeObject);
+ bool loadXML (exml::Element * _node);
+ void requestUpdateSize (void);
+ ewol::WidgetManager & getWidgetManager (void);
+ ewol::Windows * getWindows (void);
+ void setAnnimationType (enum annimationMode _mode,
const std::string & _type);
+ void setAnnimationTime (enum annimationMode _mode,
float _time);
+ bool startAnnimation (enum annimationMode _mode);
+ bool stopAnnimation (void);
# void onGetFocus (void);
# void onLostFocus (void);
# void setKeyboardRepeate (bool _state);
# void showKeyboard (void);
# void hideKeyboard (void);
# void periodicCallDisable (void);
# void periodicCallEnable (float _callInSecond);
# bool onEventInput (const ewol::EventInput & _event);
# bool onEventEntry (const ewol::EventEntry & _event);
# void shortCutAdd (const char * _descriptiveString,
const char * _generateEventId,
std::string _data,
bool _broadcast);
# void shortCutClean (void);
# void markToRedraw (void);
# bool needRedraw (void);
# void onDraw (void);
# bool onSetConfig (const ewol::EConfig & _conf);
# bool onGetConfig (const char * _config,
std::string & _result);
# void addAnnimationType (enum annimationMode _mode,
const char * _type);
# bool onStartAnnimation (enum annimationMode _mode);
# void onStopAnnimation (void);

Object Hierarchy:

ewol::EObject
    +--> ewol::Widget
        +--> widget::ContainerN
        +--> widget::ProgressBar
        +--> widget::Slider
        +--> widget::Entry
        +--> widget::Spacer
        +--> widget::Joystick
        +--> widget::Container
        +--> ewol::Windows
        +--> widget::ColorBar
        +--> widget::ButtonColor
        +--> widget::Label
        +--> widget::Mesh
        +--> widget::Button
        +--> widget::WidgetScrooled
        +--> widget::Image
        +--> widget::Gird
        +--> widget::CheckBox

Description:

/** * @ingroup ewolWidgetGroup */

Detail:

ewol::Widget ()

Widget(void);

Constructor of the widget classes


ewol::~Widget ()

~Widget(void);

Destructor of the widget classes


setUpperWidget ()

void setUpperWidget(ewol::Widget * _upper);

set the upper widget of this widget.


removeUpperWidget ()

void removeUpperWidget(void);

remove the upper widget of this widget.


getUpperWidget ()

ewol::Widget * getUpperWidget(void);

get the upper widget (father).


relativePosition ()

vec2 relativePosition(const vec2 & _pos);

convert the absolute position in the local Position (Relative)


calculateSize ()

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
Notes: : INTERNAL EWOL SYSTEM


getSize ()

vec2 getSize(void);

get the widget size
Notes: : INTERNAL EWOL SYSTEM


calculateMinMaxSize ()

void calculateMinMaxSize(void);

calculate the minimum and maximum size (need to estimate expend properties of the widget)
Notes: : INTERNAL EWOL SYSTEM


getCalculateMinSize ()

vec2 getCalculateMinSize(void);

get the widget minimum size calculated
Notes: : INTERNAL EWOL SYSTEM


getCalculateMaxSize ()

vec2 getCalculateMaxSize(void);

get the widget maximum size calculated
Notes: : INTERNAL EWOL SYSTEM


setOffset ()

void setOffset(const vec2 & _newVal);

set the zoom property of the widget.


getOffset ()

const vec2 & getOffset(void);

get the offset property of the widget.


setZoom ()

void setZoom(float _newVal);

set the zoom property of the widget


getZoom ()

float getZoom(void);

get the zoom property of the widget


setOrigin ()

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
Notes: : INTERNAL EWOL SYSTEM


getOrigin ()

vec2 getOrigin(void);

get the origin (obsolute position in the windows)


setMinSize ()

void setMinSize(const ewol::Dimension & _size);

User set the minimum size he want to set the display


setNoMinSize ()

void setNoMinSize(void);

User set No minimum size.


getMinSize ()

const ewol::Dimension & getMinSize(void);

get the current calculated min size


checkMinSize ()

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.
Notes: : INTERNAL EWOL SYSTEM


setMaxSize ()

void setMaxSize(const ewol::Dimension & _size);

User set the maximum size he want to set the display


setNoMaxSize ()

void setNoMaxSize(void);

User set No maximum size.


getMaxSize ()

const ewol::Dimension & getMaxSize(void);

get the current maximum size


checkMaxSize ()

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.
Notes: : INTERNAL EWOL SYSTEM


setExpand ()

void setExpand(const bvec2 & _newExpand);

set the expend capabilities (x&y)


getExpand ()

bvec2 getExpand(void);

get the expend capabilities (x&y) (set by the user)


canExpand ()

bvec2 canExpand(void);

get the expend capabilities (x&y)
Notes: : INTERNAL EWOL SYSTEM


setFill ()

void setFill(const bvec2 & _newFill);

set the x&y filling capacity


getFill ()

const bvec2 & getFill(void);

set the x&y filling capacity set by the user


canFill ()

const bvec2 & canFill(void);

get the filling capabilities x&y
Notes: : INTERNAL EWOL SYSTEM


hide ()

void hide(void);

set the widget hidden


show ()

void show(void);

set the widget visible


isHide ()

bool isHide(void);

get the visibility of the widget


setGravity ()

void setGravity(enum ewol::gravity _gravity);

set the widget gravity


getGravity ()

enum ewol::gravity getGravity(void);

get the widget gravity


getFocus ()

bool getFocus(void);

get the focus state of the widget


canHaveFocus ()

bool canHaveFocus(void);

get the capability to have focus


setFocus ()

bool setFocus(void);

set focus on this widget


rmFocus ()

bool rmFocus(void);

remove the focus on this widget


setCanHaveFocus ()

void setCanHaveFocus(bool _canFocusState);

set the capability to have the focus


keepFocus ()

void keepFocus(void);

keep the focus on this widget == > this remove the previous focus on all other widget


getMouseLimit ()

int32_t getMouseLimit(void);

get the number of mouse event supported


setMouseLimit ()

void setMouseLimit(int32_t _numberState);

get the number of mouse event supported


getKeyboardRepeate ()

bool getKeyboardRepeate(void);

get the keyboard repeating event supporting.


systemGetCallDeltaTime ()

int64_t systemGetCallDeltaTime(void);

{SYSTEM} get a reference of the periodic call delta time


systemGetLastCallTime ()

int64_t systemGetLastCallTime(void);

{SYSTEM} get a reference of the periodic call time


systemSetLastCallTime ()

void systemSetLastCallTime(int64_t _time);

{SYSTEM} get a reference of the periodic call time


periodicCall ()

void periodicCall(const ewol::EventTime & _event);

periodic call of this widget


getWidgetAtPos ()

ewol::Widget * getWidgetAtPos(const vec2 & _pos);

get the widget at the specific windows absolute position
Notes: : INTERNAL EWOL SYSTEM


getWidgetNamed ()

ewol::Widget * getWidgetNamed(const std::string & _widgetName);

get the widget if it have this name or one of the subwidget with the same name


systemEventInput ()

bool systemEventInput(ewol::EventInputSystem & _event);

{SYSTEM} system event input (only meta widget might overwrite this function).


systemEventEntry ()

bool systemEventEntry(ewol::EventEntrySystem & _event);

{SYSTEM} Entry event (only meta widget might overwrite this function).


onEventClipboard ()

void onEventClipboard(enum ewol::clipBoard::clipboardListe _clipboardID);

Event on a past event == > this event is asynchronous due to all system does not support direct getting datas
Notes: : need to have focus ...


onEventShortCut ()

bool onEventShortCut(ewol::SpecialKey & _special,
                     char32_t _unicodeValue,
                     enum ewol::keyEvent::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
Notes: 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.


systemDraw ()

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
Notes: This function is virtual for the scrolled widget, and the more complicated openGl widget
Notes: : INTERNAL EWOL SYSTEM


onRegenerateDisplay ()

void onRegenerateDisplay(void);

Event generated when a redraw is needed


grabCursor ()

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.
Notes: : the generation of the offset is due to the fact the cursor position is forced at the center of the widget.
Notes: This done nothing in "Finger" or "Stylet" mode.


unGrabCursor ()

void unGrabCursor(void);

Un-Grab the cursor (default mode cursor offset)


getGrabStatus ()

bool getGrabStatus(void);

get the grabbing status of the cursor.


setCursor ()

void setCursor(enum ewol::cursorDisplay _newCursor);

set the cursor display type.


getCursor ()

enum ewol::cursorDisplay getCursor(void);

get the currrent cursor.


onObjectRemove ()

void onObjectRemove(ewol::EObject * _removeObject);



loadXML ()

bool loadXML(exml::Element * _node);



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::WidgetManager & getWidgetManager(void);

get the current Widget Manager


getWindows ()

ewol::Windows * getWindows(void);

get the curent Windows


setAnnimationType ()

void setAnnimationType(enum annimationMode _mode,
                       const std::string & _type);

set a annimation type.


setAnnimationTime ()

void setAnnimationTime(enum annimationMode _mode,
                       float _time);

set a annimation time to produce.


startAnnimation ()

bool startAnnimation(enum annimationMode _mode);

Start the annimation.


stopAnnimation ()

bool stopAnnimation(void);

Stop/Break the annimation.


onGetFocus ()

void onGetFocus(void);

Event of the focus has been grep by the current widget


onLostFocus ()

void onLostFocus(void);

Event of the focus has been lost by the current widget


setKeyboardRepeate ()

void setKeyboardRepeate(bool _state);

set the keyboard repeating event supporting.


showKeyboard ()

void showKeyboard(void);

display the virtual keyboard (if needed)


hideKeyboard ()

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.


onEventInput ()

bool onEventInput(const ewol::EventInput & _event);

Event on an input of this Widget (finger, mouse, stilet)


onEventEntry ()

bool onEventEntry(const ewol::EventEntry & _event);

Entry event. represent the physical event : - Keyboard (key event and move event) - Accelerometer - Joystick


shortCutAdd ()

void shortCutAdd(const char * _descriptiveString,
                 const char * _generateEventId,
                 std::string _data,
                 bool _broadcast);

add a specific shortcut with his description


shortCutClean ()

void shortCutClean(void);

remove all curent shortCut


markToRedraw ()

void markToRedraw(void);

The widget mark itself that it need to regenerate the nest time.


needRedraw ()

bool needRedraw(void);

get the need of the redrawing of the widget and reset it to false


onDraw ()

void onDraw(void);

Common widget drawing function (called by the drawing thread [Android, X11, ...])


onSetConfig ()

bool onSetConfig(const ewol::EConfig & _conf);



onGetConfig ()

bool onGetConfig(const char * _config,
                 std::string & _result);



addAnnimationType ()

void addAnnimationType(enum annimationMode _mode,
                       const char * _type);

Add a annimation type capabilities of this widget.


onStartAnnimation ()

bool onStartAnnimation(enum annimationMode _mode);

Event when start the annimation.


onStopAnnimation ()

void onStopAnnimation(void);

Event when Stop the annimation.