class: ewol::widget::Entry
Constructor and Destructor:
+ Entry (std::string _newData);
+ virtual ~Entry (void );
Synopsis:
+ const char* const eventClick;
+ const char* const eventEnter;
+ const char* const eventModify;
+ const char* const configMaxChar;
+ const char* const configRegExp;
+ const char* const configColorFg;
+ const char* const configColorBg;
+ const char* const configEmptyMessage;
+ void init (ewol::widget::Manager & _widgetManager);
# void setInternalValue (const std::string & _newData);
+ void setValue (const std::string & _newData);
+ std::string getValue (void ) const;
+ void setMaxChar (int32_t _nbMax);
+ int32_t getMaxChar (void ) const;
+ void setRegExp (const std::string & _expression);
+ std::string getRegExp (void ) const;
# virtual void markToUpdateTextPosition (void );
# virtual void updateTextPosition (void );
# virtual void updateCursorPosition (const vec2 & _pos,
bool _Selection);
+ virtual void copySelectionToClipBoard (enum ewol::context::clipBoard::clipboardListe _clipboardID);
+ virtual void removeSelected (void );
+ void setColorText (const etk::Color<> & _color);
+ const etk::Color<> & getColorText (void ) const;
+ void setColorTextSelected (const etk::Color<> & _color);
+ const etk::Color<> & getColorTextSelected (void ) const;
+ void setEmptyText (const std::string & _text);
+ const std::string & getEmptyText (void ) const;
+ virtual void onRegenerateDisplay (void );
+ virtual bool onEventInput (const ewol::event::Input & _event);
+ virtual bool onEventEntry (const ewol::event::Entry & _event);
+ virtual void onReceiveMessage (const ewol::object::Message & _msg);
+ virtual void onEventClipboard (enum ewol::context::clipBoard::clipboardListe _clipboardID);
+ virtual void calculateMinMaxSize (void );
# virtual void onDraw (void );
# virtual void onGetFocus (void );
# virtual void onLostFocus (void );
# virtual void changeStatusIn (int32_t _newStatusId);
# virtual void periodicCall (const ewol::event::Time & _event);
# virtual bool onSetConfig (const ewol::object::Config & _conf);
# virtual bool onGetConfig (const char* _config,
std::string & _result) const;
Object Hierarchy:
+ewol::Object
+--> +ewol::Widget
+--> ewol::widget::Entry
Detail:
eventClick
+ const char* const eventClick;
eventEnter
+ const char* const eventEnter;
eventModify
+ const char* const eventModify;
configMaxChar
+ const char* const configMaxChar;
configRegExp
+ const char* const configRegExp;
configColorFg
+ const char* const configColorFg;
configColorBg
+ const char* const configColorBg;
configEmptyMessage
+ const char* const configEmptyMessage;
init
+ void init (ewol::widget::Manager & _widgetManager);
Entry
+ Entry (std::string _newData);
Contuctor
Parameter [input]: _newData The USting that might be set in the Entry box (no event generation!!)
~Entry
+ virtual ~Entry (void );
Destuctor
setInternalValue
# void setInternalValue (const std::string & _newData);
internal check the value with RegExp checking
Parameter [input]: _newData The new string to display
setValue
+ void setValue (const std::string & _newData);
set a new value on the entry.
Parameter [input]: _newData the new string to display.
getValue
+ std::string getValue (void ) const;
get the current value in the entry
Return: The current display value
setMaxChar
+ void setMaxChar (int32_t _nbMax);
Limit the number of Unicode character in the entry
Parameter [input]: _nbMax Number of max character set in the List (0x7FFFFFFF for no limit)
getMaxChar
+ int32_t getMaxChar (void ) const;
Limit the number of Unicode character in the entry
Return: Number of max character set in the List.
setRegExp
+ void setRegExp (const std::string & _expression);
Limit the input entry at a regular expression... (by default it is "")
Parameter: _expression New regular expression
getRegExp
+ std::string getRegExp (void ) const;
get the regualar expression limitation
Parameter: The regExp string
markToUpdateTextPosition
# virtual void markToUpdateTextPosition (void );
informe the system thet the text change and the start position change
updateTextPosition
# virtual void updateTextPosition (void );
update the display position start == > depending of the position of the Cursor and the size of the Data inside
updateCursorPosition
# virtual void updateCursorPosition (const vec2 & _pos,
bool _Selection);
change the cursor position with the curent position requested on the display
Note: The display is automaticly requested when change apear.
Parameter [input]: _pos Absolute position of the event
copySelectionToClipBoard
+ virtual void copySelectionToClipBoard (enum ewol::context::clipBoard::clipboardListe _clipboardID);
Copy the selected data on the specify clipboard
Parameter [input]: _clipboardID Selected clipboard
removeSelected
+ virtual void removeSelected (void );
remove the selected area
Note: This request a regeneration of the display
setColorText
+ void setColorText (const etk::Color<> & _color);
set text color.
Parameter: _color Color that is selected.
getColorText
+ const etk::Color<> & getColorText (void ) const;
get the color for the text.
Return: The color requested.
setColorTextSelected
+ void setColorTextSelected (const etk::Color<> & _color);
set text backgroung color when selected.
Parameter: _color Color that is selected.
getColorTextSelected
+ const etk::Color<> & getColorTextSelected (void ) const;
get the selected color for the text in selection mode.
Return: The color requested.
setEmptyText
+ void setEmptyText (const std::string & _text);
set The text displayed when nothing is in the entry.
Parameter: _text Text to display when the entry box is empty (this text can be decorated).
getEmptyText
+ const std::string & getEmptyText (void ) const;
get The text displayed when nothing is in the entry.
Return: Text display when nothing
onRegenerateDisplay
+ virtual void onRegenerateDisplay (void );
Event generated when a redraw is needed
onEventInput
+ virtual bool onEventInput (const ewol::event::Input & _event);
Event on an input of this Widget (finger, mouse, stilet)
Parameter [input]: _event Event properties
Return: true the event is used<br/>false the event is not used
onEventEntry
+ virtual bool onEventEntry (const ewol::event::Entry & _event);
Entry event.
represent the physical event :
- Keyboard (key event and move event)
- Accelerometer
- Joystick
Parameter [input]: _event Event properties
Return: true if the event has been used<br/>false if the event has not been used
onReceiveMessage
+ virtual void onReceiveMessage (const ewol::object::Message & _msg);
Receive a message from an other Object with a specific eventId and data
Parameter [input]: _msg Message handle
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
calculateMinMaxSize
+ virtual void calculateMinMaxSize (void );
calculate the minimum and maximum size (need to estimate expend properties of the widget)
Note: : INTERNAL EWOL SYSTEM
onDraw
# virtual void onDraw (void );
Common widget drawing function (called by the drawing thread [Android, X11, ...])
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
changeStatusIn
# virtual void changeStatusIn (int32_t _newStatusId);
periodicCall
# virtual void periodicCall (const ewol::event::Time & _event);
periodic call of this widget
Parameter: _event Current time property
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
+ewol::Object
+--> +ewol::Widget
+--> ewol::widget::Entry
Detail:
eventClick
+ const char* const eventClick;
eventEnter
+ const char* const eventEnter;
eventModify
+ const char* const eventModify;
configMaxChar
+ const char* const configMaxChar;
configRegExp
+ const char* const configRegExp;
configColorFg
+ const char* const configColorFg;
configColorBg
+ const char* const configColorBg;
configEmptyMessage
+ const char* const configEmptyMessage;
init
+ void init (ewol::widget::Manager & _widgetManager);
Entry
+ Entry (std::string _newData);Contuctor
Parameter [input]: | _newData | The USting that might be set in the Entry box (no event generation!!) |
~Entry
+ virtual ~Entry (void );Destuctor
setInternalValue
# void setInternalValue (const std::string & _newData);internal check the value with RegExp checking
Parameter [input]: | _newData | The new string to display |
setValue
+ void setValue (const std::string & _newData);set a new value on the entry.
Parameter [input]: | _newData | the new string to display. |
getValue
+ std::string getValue (void ) const;get the current value in the entry
Return: | The current display value |
setMaxChar
+ void setMaxChar (int32_t _nbMax);Limit the number of Unicode character in the entry
Parameter [input]: | _nbMax | Number of max character set in the List (0x7FFFFFFF for no limit) |
getMaxChar
+ int32_t getMaxChar (void ) const;Limit the number of Unicode character in the entry
Return: | Number of max character set in the List. |
setRegExp
+ void setRegExp (const std::string & _expression);Limit the input entry at a regular expression... (by default it is "")
Parameter: | _expression | New regular expression |
getRegExp
+ std::string getRegExp (void ) const;get the regualar expression limitation
Parameter: | The | regExp string |
markToUpdateTextPosition
# virtual void markToUpdateTextPosition (void );informe the system thet the text change and the start position change
updateTextPosition
# virtual void updateTextPosition (void );update the display position start == > depending of the position of the Cursor and the size of the Data inside
updateCursorPosition
# virtual void updateCursorPosition (const vec2 & _pos,change the cursor position with the curent position requested on the display
bool _Selection);
Note: The display is automaticly requested when change apear.
Parameter [input]: | _pos | Absolute position of the event |
copySelectionToClipBoard
+ virtual void copySelectionToClipBoard (enum ewol::context::clipBoard::clipboardListe _clipboardID);Copy the selected data on the specify clipboard
Parameter [input]: | _clipboardID | Selected clipboard |
removeSelected
+ virtual void removeSelected (void );remove the selected area
Note: This request a regeneration of the display
setColorText
+ void setColorText (const etk::Color<> & _color);set text color.
Parameter: | _color | Color that is selected. |
getColorText
+ const etk::Color<> & getColorText (void ) const;get the color for the text.
Return: | The color requested. |
setColorTextSelected
+ void setColorTextSelected (const etk::Color<> & _color);set text backgroung color when selected.
Parameter: | _color | Color that is selected. |
getColorTextSelected
+ const etk::Color<> & getColorTextSelected (void ) const;get the selected color for the text in selection mode.
Return: | The color requested. |
setEmptyText
+ void setEmptyText (const std::string & _text);set The text displayed when nothing is in the entry.
Parameter: | _text | Text to display when the entry box is empty (this text can be decorated). |
getEmptyText
+ const std::string & getEmptyText (void ) const;get The text displayed when nothing is in the entry.
Return: | Text display when nothing |
onRegenerateDisplay
+ virtual void onRegenerateDisplay (void );Event generated when a redraw is needed
onEventInput
+ virtual bool onEventInput (const ewol::event::Input & _event);Event on an input of this Widget (finger, mouse, stilet)
Parameter [input]: | _event | Event properties |
Return: | true the event is used<br/>false the event is not used |
onEventEntry
+ virtual bool onEventEntry (const ewol::event::Entry & _event);Entry event. represent the physical event : - Keyboard (key event and move event) - Accelerometer - Joystick
Parameter [input]: | _event | Event properties |
Return: | true if the event has been used<br/>false if the event has not been used |
onReceiveMessage
+ virtual void onReceiveMessage (const ewol::object::Message & _msg);Receive a message from an other Object with a specific eventId and data
Parameter [input]: | _msg | Message handle |
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 |
calculateMinMaxSize
+ virtual void calculateMinMaxSize (void );calculate the minimum and maximum size (need to estimate expend properties of the widget)
Note: : INTERNAL EWOL SYSTEM
onDraw
# virtual void onDraw (void );Common widget drawing function (called by the drawing thread [Android, X11, ...])
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
changeStatusIn
# virtual void changeStatusIn (int32_t _newStatusId);
periodicCall
# virtual void periodicCall (const ewol::event::Time & _event);periodic call of this widget
Parameter: | _event | Current time property |
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 |