diff --git a/external/etk b/external/etk index fb13e03d..951a94c0 160000 --- a/external/etk +++ b/external/etk @@ -1 +1 @@ -Subproject commit fb13e03dc913ccd56c27aef4c780e68e3b384b84 +Subproject commit 951a94c0d9cb72b558f0152e76dd44c2b2818791 diff --git a/sources/ewol/compositing/Text.h b/sources/ewol/compositing/Text.h index 3b48b2e1..550b86ba 100644 --- a/sources/ewol/compositing/Text.h +++ b/sources/ewol/compositing/Text.h @@ -47,22 +47,21 @@ namespace ewol alignJustify } aligneMode_te; private: - ewol::Drawing m_vectorialDraw; //!< This is used to draw background selection and other things ... + ewol::Drawing m_vectorialDraw; //!< This is used to draw background selection and other things ... private: - int32_t m_nbCharDisplayed; //!< prevent some error in calculation size. - vec3 m_sizeDisplayStart; //!< The start windows of the display. - vec3 m_sizeDisplayStop; //!< The end windows of the display. - bool m_needDisplay; //!< This just need the display and not the size rendering. - - vec3 m_position; //!< The current position to draw - vec3 m_clippingPosStart; //!< Clipping start position - vec3 m_clippingPosStop; //!< Clipping stop position - bool m_clippingEnable; //!< true if the clipping must be activated + int32_t m_nbCharDisplayed; //!< prevent some error in calculation size. + vec3 m_sizeDisplayStart; //!< The start windows of the display. + vec3 m_sizeDisplayStop; //!< The end windows of the display. + bool m_needDisplay; //!< This just need the display and not the size rendering. + vec3 m_position; //!< The current position to draw + vec3 m_clippingPosStart; //!< Clipping start position + vec3 m_clippingPosStop; //!< Clipping stop position + bool m_clippingEnable; //!< true if the clipping must be activated private: - draw::Color m_color; //!< The text foreground color - draw::Color m_colorBg; //!< The text background color - draw::Color m_colorCursor; //!< The text cursor color - draw::Color m_colorSelection; //!< The text Selection color + draw::Color m_color; //!< The text foreground color + draw::Color m_colorBg; //!< The text background color + draw::Color m_colorCursor; //!< The text cursor color + draw::Color m_colorSelection; //!< The text Selection color private: ewol::font::mode_te m_mode; //!< font display property : Regular/Bold/Italic/BoldItalic bool m_kerning; //!< Kerning enable or disable on the next elements displayed diff --git a/sources/ewol/widget/Button.cpp b/sources/ewol/widget/Button.cpp index f96873d0..910c2f05 100644 --- a/sources/ewol/widget/Button.cpp +++ b/sources/ewol/widget/Button.cpp @@ -36,7 +36,9 @@ widget::Button::Button(etk::UString newLabel, etk::UString shaperName) : m_value(false), m_mouseHover(false), m_buttonPressed(false), - m_imageDisplaySize(32) + m_imageDisplaySize(32), + m_selectableAreaPos(0,0), + m_selectableAreaSize(0,0) { AddEventId(ewolEventButtonPressed); AddEventId(ewolEventButtonDown); @@ -173,7 +175,7 @@ void widget::Button::OnRegenerateDisplay(void) vec2 padding = m_shaper.GetPadding(); // to know the size of one Line : vec3 minSize = m_displayText.CalculateSize('A'); - vec3 curentTextSize; + vec3 curentTextSize(0,0,0); if( false == m_toggleMode || false == m_value || m_labelToggle.Size()==0) { diff --git a/sources/ewol/widget/Entry.cpp b/sources/ewol/widget/Entry.cpp index 60755ee9..e887d5c6 100644 --- a/sources/ewol/widget/Entry.cpp +++ b/sources/ewol/widget/Entry.cpp @@ -33,21 +33,21 @@ const char * const ewolEventEntrySelect = "ewol-Entry-Select"; widget::Entry::Entry(etk::UString newData) : - m_shaper("THEME:GUI:widgetEntry.conf") + m_shaper("THEME:GUI:widgetEntry.conf"), + m_data(""), + m_textColorFg(draw::color::black), + m_textColorBg(draw::color::white), + m_userSize(50), + m_displayStartPosition(0), + m_displayCursor(false), + m_displayCursorPos(0), + m_displayCursorPosSelection(0) { + m_textColorBg.a = 0xAF; + SetCanHaveFocus(true); AddEventId(ewolEventEntryClick); AddEventId(ewolEventEntryEnter); AddEventId(ewolEventEntryModify); - m_displayStartPosition = 0; - m_displayCursorPos = 0; - m_displayCursorPosSelection = 0; - m_userSize = 50; - m_displayCursor = false; - m_textColorFg = draw::color::black; - - m_textColorBg = draw::color::white; - m_textColorBg.a = 0xAF; - SetCanHaveFocus(true); ShortCutAdd("ctrl+w", ewolEventEntryClean); ShortCutAdd("ctrl+x", ewolEventEntryCut); ShortCutAdd("ctrl+c", ewolEventEntryCopy); diff --git a/sources/ewol/widget/Entry.h b/sources/ewol/widget/Entry.h index e4977667..9431444b 100644 --- a/sources/ewol/widget/Entry.h +++ b/sources/ewol/widget/Entry.h @@ -34,20 +34,16 @@ namespace widget { class Entry : public ewol::Widget { private: - float m_pos[4]; - int32_t m_GLposText; - int32_t m_GLstate; - private: - ewol::Shaper m_shaper; - ewol::Text m_oObjectText; //!< text display - etk::UString m_data; //!< sting that must be displayed - draw::Color m_textColorFg; //!< Text color - draw::Color m_textColorBg; //!< Background color - int32_t m_userSize; //!< Display size requested by the user - int32_t m_displayStartPosition; //!< ofset in pixel of the display of the UString - bool m_displayCursor; //!< Cursor mus be display only when the widget has the focus - int32_t m_displayCursorPos; //!< Cursor position in number of Char - int32_t m_displayCursorPosSelection; //!< Selection position end (can be befor or after cursor and == m_displayCursorPos chan no selection availlable + ewol::Shaper m_shaper; + ewol::Text m_oObjectText; //!< text display + etk::UString m_data; //!< sting that must be displayed + draw::Color m_textColorFg; //!< Text color + draw::Color m_textColorBg; //!< Background color + int32_t m_userSize; //!< Display size requested by the user + int32_t m_displayStartPosition; //!< ofset in pixel of the display of the UString + bool m_displayCursor; //!< Cursor mus be display only when the widget has the focus + int32_t m_displayCursorPos; //!< Cursor position in number of Char + int32_t m_displayCursorPosSelection; //!< Selection position end (can be befor or after cursor and == m_displayCursorPos chan no selection availlable public: /** * @brief Contuctor diff --git a/sources/ewol/widget/Widget.cpp b/sources/ewol/widget/Widget.cpp index 97a78b87..4b9925c3 100644 --- a/sources/ewol/widget/Widget.cpp +++ b/sources/ewol/widget/Widget.cpp @@ -20,26 +20,24 @@ #define __class__ "Widget" ewol::Widget::Widget(void) : - m_userMaxSize(-1,-1) + m_hide(false), + m_zoom(1.0f), + m_origin(0,0), + m_size(10,10), + m_minSize(-1,-1), + m_userMinSize(-1,-1), + m_userMaxSize(-1,-1), + m_userExpend(false,false), + m_userFill(false,false), + m_hasFocus(false), + m_canFocus(false), + m_limitMouseEvent(3), + m_allowRepeateKeyboardEvent(true), + m_needRegenerateDisplay(true), + m_grabCursor(false), + m_cursorDisplay(ewol::cursorArrow) { - m_allowRepeateKeyboardEvent = true; - m_limitMouseEvent = 3; - m_needRegenerateDisplay = true; - m_origin.setValue(0,0); - m_size.setValue(10,10); - m_minSize.setValue(-1,-1); - // user settings : - m_userMinSize.setValue(-1,-1); - SetExpendX(); - SetExpendY(); - SetFillX(); - SetFillY(); - m_canFocus = false; - m_hasFocus = false; - m_hide = false; - m_zoom = 1.0; - m_grabCursor = false; - m_cursorDisplay = ewol::cursorArrow; + } @@ -49,7 +47,6 @@ ewol::Widget::~Widget(void) ewol::widgetManager::Rm(this); // clean all the short-cut ... ShortCutClean(); - }