diff --git a/external/etk b/external/etk index 2cac9e69..d2099c51 160000 --- a/external/etk +++ b/external/etk @@ -1 +1 @@ -Subproject commit 2cac9e69dd5c890ad403e62ecae5e48da2a6d027 +Subproject commit d2099c51e917243edd4bb808f66a32e9df69aa30 diff --git a/external/parsersvg b/external/parsersvg index 7081b728..18832b23 160000 --- a/external/parsersvg +++ b/external/parsersvg @@ -1 +1 @@ -Subproject commit 7081b72812e2e9e9603bd2d37dae5acae5b2c827 +Subproject commit 18832b2305675e930e775332a7c3ba6f1aa8eaa4 diff --git a/sources/ewol/UserConfig.cpp b/sources/ewol/UserConfig.cpp index a1410983..fe66ace7 100644 --- a/sources/ewol/UserConfig.cpp +++ b/sources/ewol/UserConfig.cpp @@ -112,19 +112,16 @@ bool ewol::userConfig::Load(void) return false; } for(int32_t iii=0; iii< root->Size(); iii++) { - exml::Node* child = root->Get(iii); + exml::Element* child = root->GetElement(iii); if (child==NULL) { - continue; - } - if (!child->IsElement()) { - // nothing to do, just proceed to next step + // other than element is trash here continue; } bool elementFound = false; for (int32_t iii=0; iiiGetName() == child->GetValue()) { - l_obj().List()[iii]->LoadXML((exml::Element*)child); + l_obj().List()[iii]->LoadXML(child); elementFound = true; break; } diff --git a/sources/ewol/compositing/Drawing.cpp b/sources/ewol/compositing/Drawing.cpp index b4abc746..52139f6f 100644 --- a/sources/ewol/compositing/Drawing.cpp +++ b/sources/ewol/compositing/Drawing.cpp @@ -402,7 +402,7 @@ void ewol::Drawing::LineTo(const vec3& _dest) { ResetCount(); InternalSetColor(m_color); - EWOL_DEBUG("DrawLine : " << m_position << " to " << _dest); + EWOL_VERBOSE("DrawLine : " << m_position << " to " << _dest); if (m_position.x() == _dest.x() && m_position.y() == _dest.y() && m_position.z() == _dest.z()) { EWOL_WARNING("Try to draw an line width 0"); return; diff --git a/sources/ewol/compositing/Text.cpp b/sources/ewol/compositing/Text.cpp index 476f5411..6eb6008a 100644 --- a/sources/ewol/compositing/Text.cpp +++ b/sources/ewol/compositing/Text.cpp @@ -10,6 +10,10 @@ #include #include + +#undef __class__ +#define __class__ "ewol::Text" + ewol::Text::Text(void) : m_position(0.0, 0.0, 0.0), m_clippingPosStart(0.0, 0.0, 0.0), @@ -441,20 +445,19 @@ void ewol::Text::ParseHtmlNode(exml::Element* _element) EWOL_ERROR( "Error Input node does not existed ..."); } for(int32_t iii=0; iii< _element->Size(); iii++) { - exml::Node* child = _element->Get(iii); - if (child==NULL) { - continue; - } - if (child->GetType()==exml::typeComment) { + + if (_element->GetType(iii)==exml::typeComment) { // nothing to do ... - } else if (child->GetType()==exml::typeText) { + } else if (_element->GetType(iii)==exml::typeText) { + exml::Node* child = _element->GetNode(iii); HtmlAddData(child->GetValue() ); EWOL_VERBOSE("XML Add : " << child->GetValue()); - } else if (child->GetType()!=exml::typeElement) { - EWOL_ERROR("(l "<< child->Pos() << ") node not suported type : " << child->GetType() << " val=\""<< child->GetValue() << "\"" ); + continue; + } else if (_element->GetType(iii)!=exml::typeElement) { + EWOL_ERROR("(l "<< _element->GetNode(iii)->Pos() << ") node not suported type : " << _element->GetType(iii) << " val=\""<< _element->GetNode(iii)->GetValue() << "\"" ); continue; } - exml::Element* elem = (exml::Element*)child; + exml::Element* elem = _element->GetElement(iii); if (elem==NULL) { EWOL_ERROR("Cast error ..."); continue; @@ -538,9 +541,9 @@ void ewol::Text::ParseHtmlNode(exml::Element* _element) void ewol::Text::PrintDecorated(const etk::UString& _text) { - etk::UString tmpData("\n"); + etk::UString tmpData("\n\n"); tmpData+=_text; - tmpData+="\n\n"; + tmpData+="\n\n\n"; //EWOL_DEBUG("plop : " << tmpData); PrintHTML(tmpData); } @@ -562,6 +565,7 @@ void ewol::Text::PrintHTML(const etk::UString& _text) exml::Element* root = (exml::Element*)doc.GetNamed( "html" ); if (NULL == root) { EWOL_ERROR( "can not load XML: main node not find: \"html\""); + doc.Display(); return; } exml::Element* bodyNode = (exml::Element*)root->GetNamed( "body" ); diff --git a/sources/ewol/widget/Button.cpp b/sources/ewol/widget/Button.cpp index 12e1a3d5..a1967ffb 100644 --- a/sources/ewol/widget/Button.cpp +++ b/sources/ewol/widget/Button.cpp @@ -443,12 +443,9 @@ bool widget::Button::LoadXML(exml::Element* _node) // parse all the elements : for(int32_t iii=0; iii< _node->Size(); iii++) { - exml::Node* pNode = _node->Get(iii); + exml::Element* pNode = _node->GetElement(iii); if (pNode==NULL) { - continue; - } - if (!pNode->IsElement()) { - // nothing to do, just proceed to next step + // trash here all that is not element continue; } etk::UString widgetName = pNode->GetValue(); @@ -477,7 +474,7 @@ bool widget::Button::LoadXML(exml::Element* _node) SetToggleMode(true); SetSubWidgetToggle(tmpWidget); } - if (false == tmpWidget->LoadXML((exml::Element*)pNode)) { + if (false == tmpWidget->LoadXML(pNode)) { EWOL_ERROR ("(l "<Pos()<<") can not load widget properties : \"" << widgetName << "\""); return false; } diff --git a/sources/ewol/widget/Container.cpp b/sources/ewol/widget/Container.cpp index ad0fd99f..24a5309b 100644 --- a/sources/ewol/widget/Container.cpp +++ b/sources/ewol/widget/Container.cpp @@ -178,12 +178,9 @@ bool widget::Container::LoadXML(exml::Element* _node) // parse all the elements : for(int32_t iii=0; iii< _node->Size(); iii++) { - exml::Node* pNode = _node->Get(iii); + exml::Element* pNode = _node->GetElement(iii); if (pNode==NULL) { - continue; - } - if (!pNode->IsElement()) { - // nothing to do, just proceed to next step + // trash here all that is not element continue; } etk::UString widgetName = pNode->GetValue(); @@ -203,7 +200,7 @@ bool widget::Container::LoadXML(exml::Element* _node) } // add widget : SetSubWidget(tmpWidget); - if (false == tmpWidget->LoadXML((exml::Element*)pNode)) { + if (false == tmpWidget->LoadXML(pNode)) { EWOL_ERROR ("(l "<Pos()<<") can not load widget properties : \"" << widgetName << "\""); return false; } diff --git a/sources/ewol/widget/ContainerN.cpp b/sources/ewol/widget/ContainerN.cpp index 1cab0b81..20dea6e8 100644 --- a/sources/ewol/widget/ContainerN.cpp +++ b/sources/ewol/widget/ContainerN.cpp @@ -304,12 +304,9 @@ bool widget::ContainerN::LoadXML(exml::Element* _node) } // parse all the elements : for(int32_t iii=0; iii< _node->Size(); iii++) { - exml::Node* pNode = _node->Get(iii); + exml::Element* pNode = _node->GetElement(iii); if (pNode==NULL) { - continue; - } - if (!pNode->IsElement()) { - // nothing to do, just proceed to next step + // trash here all that is not element continue; } etk::UString widgetName = pNode->GetValue(); @@ -329,7 +326,7 @@ bool widget::ContainerN::LoadXML(exml::Element* _node) } else { SubWidgetAddStart(subWidget); } - if (false == subWidget->LoadXML((exml::Element*)pNode)) { + if (false == subWidget->LoadXML(pNode)) { EWOL_ERROR ("[" << GetId() << "] {" << GetObjectType() << "} (l "<Pos()<<") can not load widget properties : \"" << widgetName << "\""); return false; } diff --git a/sources/ewol/widget/Label.cpp b/sources/ewol/widget/Label.cpp index 4c798325..14fe144f 100644 --- a/sources/ewol/widget/Label.cpp +++ b/sources/ewol/widget/Label.cpp @@ -142,8 +142,7 @@ bool widget::Label::LoadXML(exml::Element* _node) } ewol::Widget::LoadXML(_node); // get internal data : - // TODO : Unparse data type XML ... - EWOL_DEBUG("Load label:" << _node->GetValue()); - SetLabel(_node->GetValue()); + EWOL_DEBUG("Load label:" << _node->GetText()); + SetLabel(_node->GetText()); return true; } diff --git a/sources/ewol/widget/Menu.cpp b/sources/ewol/widget/Menu.cpp index 9794f85e..9aeb5145 100644 --- a/sources/ewol/widget/Menu.cpp +++ b/sources/ewol/widget/Menu.cpp @@ -98,7 +98,7 @@ int32_t widget::Menu::Add(int32_t parent, etk::UString label, etk::UString image " m_image + "\" size=\"8,8mm\"/>\n" " \n" " \n" - "\n")); } else { myButton->SetSubWidget( new widget::Label(label) ); } @@ -205,7 +205,7 @@ void widget::Menu::OnReceiveMessage(const ewol::EMessage& _msg) etk::UString("\n") + " \n" " m_image + "\" size=\"8,8mm\"/>\n" - " \n" + " \n" " \n" "\n")); } else { @@ -219,7 +219,7 @@ void widget::Menu::OnReceiveMessage(const ewol::EMessage& _msg) " \n" "\n")); } else { - widget::Label* tmpLabel = new widget::Label(etk::UString("") + m_listElement[jjj]->m_label + ""); + widget::Label* tmpLabel = new widget::Label(etk::UString("") + m_listElement[jjj]->m_label + "\n"); if (NULL != tmpLabel) { tmpLabel->SetExpand(bvec2(true,false)); tmpLabel->SetFill(bvec2(true,true)); diff --git a/sources/ewol/widget/meta/FileChooser.cpp b/sources/ewol/widget/meta/FileChooser.cpp index b6648713..6baf0105 100644 --- a/sources/ewol/widget/meta/FileChooser.cpp +++ b/sources/ewol/widget/meta/FileChooser.cpp @@ -154,7 +154,7 @@ widget::FileChooser::FileChooser(void) " \n" " \n" " \n" - "\n")); m_widgetValidate->RegisterOnEvent(this, widget::Button::eventPressed, ewolEventFileChooserValidate); mySizerHori->SubWidgetAdd(m_widgetValidate); } @@ -169,7 +169,7 @@ widget::FileChooser::FileChooser(void) " \n" " \n" " \n" - "\n")); m_widgetCancel->RegisterOnEvent(this, widget::Button::eventPressed, ewolEventFileChooserCancel); mySizerHori->SubWidgetAdd(m_widgetCancel); } diff --git a/sources/ewol/widget/meta/Parameter.cpp b/sources/ewol/widget/meta/Parameter.cpp index fc1ebc3c..2188282f 100644 --- a/sources/ewol/widget/meta/Parameter.cpp +++ b/sources/ewol/widget/meta/Parameter.cpp @@ -80,7 +80,7 @@ widget::Parameter::Parameter(void) : " \n" " \n" " \n" - "\n")); tmpButton->RegisterOnEvent(this, widget::Button::eventPressed, ewolEventParameterSave); mySizerHori->SubWidgetAdd(tmpButton); } @@ -105,7 +105,7 @@ widget::Parameter::Parameter(void) : " \n" " \n" " \n" - "\n")); tmpButton->RegisterOnEvent(this, widget::Button::eventPressed, ewolEventParameterClose); mySizerHori->SubWidgetAdd(tmpButton); }