diff --git a/ewol/memory.h b/ewol/memory.h deleted file mode 100644 index cf30e17f..00000000 --- a/ewol/memory.h +++ /dev/null @@ -1,28 +0,0 @@ -/** - * @author Edouard DUPIN - * - * @copyright 2011, Edouard DUPIN, all right reserved - * - * @license APACHE v2.0 (see license file) - */ -#pragma once - -#include -#include -#include -#include -#include - -namespace ewol { - template - using SharedPtr = std::shared_ptr; - template - using WeakPtr = std::weak_ptr; - template - using EnableSharedFromThis = std::enable_shared_from_this; - /* - template - using DynamicPointerCastZZ = std::dynamic_pointer_cast; - */ -} - diff --git a/ewol/object/Object.h b/ewol/object/Object.h index 05518192..4edcbaf0 100644 --- a/ewol/object/Object.h +++ b/ewol/object/Object.h @@ -15,7 +15,7 @@ #include #include -#include +#include #include #include #include @@ -32,12 +32,12 @@ namespace ewol { class Context; } -template static void baseInit(const ewol::SharedPtr& _object) { +template static void baseInit(const ememory::SharedPtr& _object) { // end of recurtion return; } -template static void baseInit(const ewol::SharedPtr& _object, const std::string& _name, const TYPE_VAL& _val, TYPE&& ... _all ) { +template static void baseInit(const ememory::SharedPtr& _object, const std::string& _name, const TYPE_VAL& _val, TYPE&& ... _all ) { eproperty::Property* prop(nullptr); eproperty::PropertyType* propType(nullptr); if (_object == nullptr) { @@ -61,17 +61,15 @@ exit_on_error: } #define UN_DECLARE_FACTORY(className) \ - template static ewol::SharedPtr create(const TYPE& ... _all) = delete; + template static ememory::SharedPtr create(const EWOL_FACTORY_CREATE_TYPE& ... _all) = delete; #define DECLARE_FACTORY(className) \ - template static ewol::SharedPtr create(const TYPE& ... _all) { \ - ewol::SharedPtr object(new className()); \ + template static ememory::SharedPtr create(const EWOL_FACTORY_CREATE_TYPE& ... _all) { \ + ememory::SharedPtr object(new className()); \ if (object == nullptr) { \ EWOL_ERROR("Factory error"); \ return nullptr; \ } \ - /*object->initNoValue();*/ \ - /*baseInit(object, std::forward(_all)... ); */ \ baseInit(object, _all... ); \ object->init(); \ if (object->objectHasBeenCorectlyInit() == false) { \ @@ -81,30 +79,40 @@ exit_on_error: } #define DECLARE_SINGLE_FACTORY(className, uniqueName) \ - template static ewol::SharedPtr create(const TYPE& ... _all) { \ - ewol::SharedPtr object; \ - ewol::SharedPtr object2 = getObjectNamed(uniqueName); \ + template static ememory::SharedPtr create(const EWOL_FACTORY_CREATE_TYPE& ... _all) { \ + ememory::SharedPtr object; \ + ememory::SharedPtr object2 = getObjectNamed(uniqueName); \ if (object2 != nullptr) { \ object = std::dynamic_pointer_cast(object2); \ if (object == nullptr) { \ - GALE_CRITICAL("Request object element: '" << uniqueName << "' With the wrong type (dynamic cast error)"); \ + EWOL_CRITICAL("Request object element: '" << uniqueName << "' With the wrong type (dynamic cast error)"); \ return nullptr; \ } \ } \ if (object != nullptr) { \ return object; \ } \ - return create("name", std::string(uniqueName), _all...); \ + object = ememory::SharedPtr(new className()); \ + if (object == nullptr) { \ + EWOL_ERROR("Factory error"); \ + return nullptr; \ + } \ + baseInit(object, "name", std::string(uniqueName), _all... ); \ + object->init(); \ + if (object->objectHasBeenCorectlyInit() == false) { \ + EWOL_CRITICAL("Object Is not correctly init : " << #className ); \ + } \ + return object; \ } namespace ewol { - using ObjectShared = ewol::SharedPtr; - using ObjectWeak = ewol::WeakPtr; + using ObjectShared = ememory::SharedPtr; + using ObjectWeak = ememory::WeakPtr; /** * @brief Basic message classes for ewol system * this class mermit at every Object to communicate between them. */ - class Object : public ewol::EnableSharedFromThis, + class Object : public ememory::EnableSharedFromThis, public eproperty::Interface, public esignal::Interface { public: // Event list @@ -281,7 +289,7 @@ namespace ewol { * @brief link on an signal in the subwiget with his name */ #define subBind(_type, _name, _event, _shared_ptr, _func, ...) do {\ - ewol::SharedPtr<_type> myObject = std::dynamic_pointer_cast<_type>(getSubObjectNamed(_name)); \ + ememory::SharedPtr<_type> myObject = std::dynamic_pointer_cast<_type>(getSubObjectNamed(_name)); \ if (myObject != nullptr) { \ myObject->_event.connect(_shared_ptr, _func, ##__VA_ARGS__); \ } else { \ @@ -289,8 +297,8 @@ namespace ewol { } \ } while (false) /* - template void subBind(ewol::SharedPtr _obj, void (TYPE::*_func)()) { - ewol::SharedPtr obj2 = std::dynamic_pointer_cast(_obj); + template void subBind(ememory::SharedPtr _obj, void (TYPE::*_func)()) { + ememory::SharedPtr obj2 = std::dynamic_pointer_cast(_obj); if (obj2 == nullptr) { EWOL_ERROR("Can not connect signal ..."); return; @@ -306,7 +314,7 @@ namespace ewol { * @brief link on an signal in the global object list with his name */ #define globalBind(_type, _name, _event, _obj, _func, ...) do {\ - ewol::SharedPtr<_type> myObject = std::dynamic_pointer_cast<_type>(ewol::getContext().getEObjectManager().getObjectNamed(_name)); \ + ememory::SharedPtr<_type> myObject = std::dynamic_pointer_cast<_type>(ewol::getContext().getEObjectManager().getObjectNamed(_name)); \ if (myObject != nullptr) { \ myObject->_event.connect(_obj, _func, ##__VA_ARGS__); \ } else { \ @@ -318,7 +326,7 @@ namespace ewol { * @brief link on an signal in the subWidget of an object with his name */ #define externSubBind(_object, _type, _name, _event, _obj, _func, ...) do {\ - ewol::SharedPtr<_type> myObject = std::dynamic_pointer_cast<_type>(_object->getObjectNamed(_name)); \ + ememory::SharedPtr<_type> myObject = std::dynamic_pointer_cast<_type>(_object->getObjectNamed(_name)); \ if (myObject != nullptr) { \ myObject->_event.connect(_obj, _func, ##__VA_ARGS__); \ } else { \ diff --git a/ewol/object/Worker.h b/ewol/object/Worker.h index 06de2519..509cd26e 100644 --- a/ewol/object/Worker.h +++ b/ewol/object/Worker.h @@ -13,8 +13,8 @@ namespace ewol { namespace object { class Worker; - using WorkerShared = ewol::SharedPtr; - using WorkerWeak = ewol::WeakPtr; + using WorkerShared = ememory::SharedPtr; + using WorkerWeak = ememory::WeakPtr; /** * @brief A worker might not been possesed by someone, then the system might keep a pointer on it. */ diff --git a/ewol/translate.cpp b/ewol/translate.cpp index 6b312c3e..ca3dcedc 100644 --- a/ewol/translate.cpp +++ b/ewol/translate.cpp @@ -103,17 +103,44 @@ class LocalInstanceTranslation { return m_language; }; - const std::string& get(const std::string& _instance) { + std::string get(const std::string& _instance) { loadTranslation(); - if (etk::start_with(_instance, "TRANSLATE:") == false) { - return _instance; + EWOL_VERBOSE("Request translate: '" << _instance << "'"); + // find all iterance of '_T{' ... '}' + std::string out; + auto itOld = _instance.begin(); + size_t pos = _instance.find("_T{"); + while (pos != std::string::npos) { + out.append(itOld, _instance.begin() + pos); + auto it = _instance.begin() + pos + 3; + itOld = it; + pos = _instance.find("}", pos); + if (pos == std::string::npos) { + EWOL_WARNING("missing end translation '}' in: '" << _instance << "'"); + it = _instance.end(); + } else { + it = _instance.begin() + pos; + } + std::string basicEmptyValue = std::string(itOld, it); + auto itTranslate = m_translate.find(basicEmptyValue); + if (itTranslate == m_translate.end()) { + EWOL_DEBUG("Can not find tranlation : '" << _instance << "'"); + out += basicEmptyValue; + } else { + out += itTranslate->second; + } + if (it != _instance.end()) { + itOld = it+1; + } else { + itOld = it; + } + pos = _instance.find("_T{", pos); } - auto it = m_translate.find(std::string(_instance.begin() + 9, _instance.end())); - if (it == m_translate.end()) { - EWOL_DEBUG("Can not find tranlation : '" << _instance << "'"); - return _instance; + if (itOld != _instance.end()) { + out.append(itOld, _instance.end()); } - return it->second; + EWOL_VERBOSE(" translation: '" << out << "'"); + return out; }; private: void loadTranslation() { @@ -229,7 +256,7 @@ void ewol::translate::autoDetectLanguage() { #endif } -const std::string& ewol::translate::get(const std::string& _instance) { +std::string ewol::translate::get(const std::string& _instance) { return getInstanceTranslation().get(_instance); } diff --git a/ewol/translate.h b/ewol/translate.h index ad8531bd..6be61597 100644 --- a/ewol/translate.h +++ b/ewol/translate.h @@ -30,7 +30,7 @@ namespace ewol { * @brief Set the path folder of the translation files * @param[in] _lib Library name that the path depend * @param[in] _path ETK generic path (DATA:... or /xxx) - * @param[in] _major This path is the major path (The last loaded, the one wichi overload all) + * @param[in] _major This path is the major path (The last loaded, the one which overload all) */ void addPath(const std::string& _lib, const std::string& _path, bool _major = false); /** @@ -68,7 +68,7 @@ namespace ewol { * @param[in] _instance Text to translate. * @return The tranlated text. */ - const std::string& get(const std::string& _instance); + std::string get(const std::string& _instance); }; }; // Here we define a simple macro to Translate all string simply: diff --git a/ewol/widget/Button.h b/ewol/widget/Button.h index 9f430c25..8f2c64b9 100644 --- a/ewol/widget/Button.h +++ b/ewol/widget/Button.h @@ -21,8 +21,8 @@ namespace ewol { namespace widget { class Button; - using ButtonShared = ewol::SharedPtr; - using ButtonWeak = ewol::WeakPtr; + using ButtonShared = ememory::SharedPtr; + using ButtonWeak = ememory::WeakPtr; /** * @brief a composed button is a button with an inside composed with the specify XML element * ==> this permit to generate standard element simple diff --git a/ewol/widget/ButtonColor.h b/ewol/widget/ButtonColor.h index 978e2f72..edf84ec9 100644 --- a/ewol/widget/ButtonColor.h +++ b/ewol/widget/ButtonColor.h @@ -20,8 +20,8 @@ namespace ewol { namespace widget { class ButtonColor; - using ButtonColorShared = ewol::SharedPtr; - using ButtonColorWeak = ewol::WeakPtr; + using ButtonColorShared = ememory::SharedPtr; + using ButtonColorWeak = ememory::WeakPtr; class ButtonColor : public ewol::Widget { public: // signals esignal::ISignal> signalChange; diff --git a/ewol/widget/CheckBox.h b/ewol/widget/CheckBox.h index d379575a..e051cbbf 100644 --- a/ewol/widget/CheckBox.h +++ b/ewol/widget/CheckBox.h @@ -18,8 +18,8 @@ namespace ewol { namespace widget { class CheckBox; - using CheckBoxShared = ewol::SharedPtr; - using CheckBoxWeak = ewol::WeakPtr; + using CheckBoxShared = ememory::SharedPtr; + using CheckBoxWeak = ememory::WeakPtr; class CheckBox : public ewol::widget::Container2 { public: // Event list esignal::ISignal<> signalPressed; diff --git a/ewol/widget/ColorBar.h b/ewol/widget/ColorBar.h index 4e3830dd..105d743f 100644 --- a/ewol/widget/ColorBar.h +++ b/ewol/widget/ColorBar.h @@ -18,8 +18,8 @@ namespace ewol { namespace widget { class ColorBar; - using ColorBarShared = ewol::SharedPtr; - using ColorBarWeak = ewol::WeakPtr; + using ColorBarShared = ememory::SharedPtr; + using ColorBarWeak = ememory::WeakPtr; class ColorBar : public ewol::Widget { public: // signals esignal::ISignal> signalChange; diff --git a/ewol/widget/Composer.h b/ewol/widget/Composer.h index 069fde8d..07ba2341 100644 --- a/ewol/widget/Composer.h +++ b/ewol/widget/Composer.h @@ -14,8 +14,8 @@ namespace ewol { namespace widget { class Composer; - using ComposerShared = ewol::SharedPtr; - using ComposerWeak = ewol::WeakPtr; + using ComposerShared = ememory::SharedPtr; + using ComposerWeak = ememory::WeakPtr; /** * @ingroup ewolWidgetGroup * @brief the composer widget is a widget that create a link on a string.file to parse the data and generate some widget tree diff --git a/ewol/widget/Container.h b/ewol/widget/Container.h index bafe75e4..6e2b96ed 100644 --- a/ewol/widget/Container.h +++ b/ewol/widget/Container.h @@ -14,8 +14,8 @@ namespace ewol { namespace widget { class Container; - using ContainerShared = ewol::SharedPtr; - using ContainerWeak = ewol::WeakPtr; + using ContainerShared = ememory::SharedPtr; + using ContainerWeak = ememory::WeakPtr; /** * @ingroup ewolWidgetGroup * @brief the Cotainer widget is a widget that have an only one subWidget diff --git a/ewol/widget/Container2.h b/ewol/widget/Container2.h index 8302d8d1..b8db400a 100644 --- a/ewol/widget/Container2.h +++ b/ewol/widget/Container2.h @@ -15,8 +15,8 @@ namespace ewol { namespace widget { class Container2; - using Container2Shared = ewol::SharedPtr; - using Container2Weak = ewol::WeakPtr; + using Container2Shared = ememory::SharedPtr; + using Container2Weak = ememory::WeakPtr; /** * @ingroup ewolWidgetGroup * @brief the Cotainer widget is a widget that have an only one subWidget diff --git a/ewol/widget/ContainerN.h b/ewol/widget/ContainerN.h index aa0af262..f3f8901c 100644 --- a/ewol/widget/ContainerN.h +++ b/ewol/widget/ContainerN.h @@ -15,8 +15,8 @@ namespace ewol { namespace widget { class ContainerN; - using ContainerNShared = ewol::SharedPtr; - using ContainerNWeak = ewol::WeakPtr; + using ContainerNShared = ememory::SharedPtr; + using ContainerNWeak = ememory::WeakPtr; /** * @ingroup ewolWidgetGroup * @brief the Cotainer widget is a widget that have an only one subWidget diff --git a/ewol/widget/ContextMenu.h b/ewol/widget/ContextMenu.h index ce0e5842..2d636d7e 100644 --- a/ewol/widget/ContextMenu.h +++ b/ewol/widget/ContextMenu.h @@ -18,8 +18,8 @@ namespace ewol { namespace widget { class ContextMenu; - using ContextMenuShared = ewol::SharedPtr; - using ContextMenuWeak = ewol::WeakPtr; + using ContextMenuShared = ememory::SharedPtr; + using ContextMenuWeak = ememory::WeakPtr; /** * @ingroup ewolWidgetGroup */ diff --git a/ewol/widget/Entry.h b/ewol/widget/Entry.h index 6252f921..a8b087d8 100644 --- a/ewol/widget/Entry.h +++ b/ewol/widget/Entry.h @@ -21,8 +21,8 @@ namespace ewol { namespace widget { class Entry; - using EntryShared = ewol::SharedPtr; - using EntryWeak = ewol::WeakPtr; + using EntryShared = ememory::SharedPtr; + using EntryWeak = ememory::WeakPtr; /** * @ingroup ewolWidgetGroup * @brief Entry box display : diff --git a/ewol/widget/Gird.h b/ewol/widget/Gird.h index e0098f31..3d74e100 100644 --- a/ewol/widget/Gird.h +++ b/ewol/widget/Gird.h @@ -16,8 +16,8 @@ namespace ewol { namespace widget { class Gird; - using GirdShared = ewol::SharedPtr; - using GirdWeak = ewol::WeakPtr; + using GirdShared = ememory::SharedPtr; + using GirdWeak = ememory::WeakPtr; /** * @ingroup ewolWidgetGroup */ diff --git a/ewol/widget/Image.h b/ewol/widget/Image.h index e4d8e51c..8aa870f8 100644 --- a/ewol/widget/Image.h +++ b/ewol/widget/Image.h @@ -18,8 +18,8 @@ namespace ewol { namespace widget { class Image; - using ImageShared = ewol::SharedPtr; - using ImageWeak = ewol::WeakPtr; + using ImageShared = ememory::SharedPtr; + using ImageWeak = ememory::WeakPtr; /** * @ingroup ewolWidgetGroup */ diff --git a/ewol/widget/Joystick.h b/ewol/widget/Joystick.h index 384b8d52..eca9be8d 100644 --- a/ewol/widget/Joystick.h +++ b/ewol/widget/Joystick.h @@ -18,8 +18,8 @@ namespace ewol { namespace widget { class Joystick; - using JoystickShared = ewol::SharedPtr; - using JoystickWeak = ewol::WeakPtr; + using JoystickShared = ememory::SharedPtr; + using JoystickWeak = ememory::WeakPtr; /** * @ingroup ewolWidgetGroup */ diff --git a/ewol/widget/Label.cpp b/ewol/widget/Label.cpp index 582b5a62..4e39af66 100644 --- a/ewol/widget/Label.cpp +++ b/ewol/widget/Label.cpp @@ -18,6 +18,10 @@ // TODO : Remove the label name in the constructor ... ewol::widget::Label::Label() : signalPressed(this, "pressed", ""), + propertyAutoTranslate(this, "auto-translate", + true, + "Translate the String with the marker _{T:xxxxxx}", + &ewol::widget::Label::onChangePropertyAutoTranslate), propertyValue(this, "value", "", "displayed value string", @@ -142,8 +146,15 @@ bool ewol::widget::Label::loadXML(const std::shared_ptr& _n } void ewol::widget::Label::onChangePropertyValue() { - m_value = etk::to_u32string(propertyValue.get()); + if (*propertyAutoTranslate == true) { + m_value = etk::to_u32string(ewol::translate::get(*propertyValue)); + } else { + m_value = etk::to_u32string(*propertyValue); + } markToRedraw(); requestUpdateSize(); } +void ewol::widget::Label::onChangePropertyAutoTranslate() { + onChangePropertyValue(); +} diff --git a/ewol/widget/Label.h b/ewol/widget/Label.h index f4141881..264cb08b 100644 --- a/ewol/widget/Label.h +++ b/ewol/widget/Label.h @@ -18,8 +18,8 @@ namespace ewol { namespace widget { class Label; - using LabelShared = ewol::SharedPtr; - using LabelWeak = ewol::WeakPtr; + using LabelShared = ememory::SharedPtr; + using LabelWeak = ememory::WeakPtr; /** * @ingroup ewolWidgetGroup */ @@ -27,6 +27,7 @@ namespace ewol { public: // signals esignal::ISignal<> signalPressed; public: // properties + eproperty::Value propertyAutoTranslate; //!< if at true the data is translate automaticaly translate. eproperty::Value propertyValue; //!< decorated text to display. private: ewol::compositing::Text m_text; //!< Compositing text element. @@ -55,6 +56,7 @@ namespace ewol { virtual bool loadXML(const std::shared_ptr& _node); protected: virtual void onChangePropertyValue(); + virtual void onChangePropertyAutoTranslate(); }; }; }; diff --git a/ewol/widget/Layer.h b/ewol/widget/Layer.h index 791055d5..a1b42b9c 100644 --- a/ewol/widget/Layer.h +++ b/ewol/widget/Layer.h @@ -15,8 +15,8 @@ namespace ewol { namespace widget { class Layer; - using LayerShared = ewol::SharedPtr; - using LayerWeak = ewol::WeakPtr; + using LayerShared = ememory::SharedPtr; + using LayerWeak = ememory::WeakPtr; /** * @ingroup ewolWidgetGroup */ diff --git a/ewol/widget/List.h b/ewol/widget/List.h index 375cf715..071b8562 100644 --- a/ewol/widget/List.h +++ b/ewol/widget/List.h @@ -16,8 +16,8 @@ namespace ewol { namespace widget { class List; - using ListShared = ewol::SharedPtr; - using ListWeak = ewol::WeakPtr; + using ListShared = ememory::SharedPtr; + using ListWeak = ememory::WeakPtr; /** * @ingroup ewolWidgetGroup */ diff --git a/ewol/widget/ListFileSystem.h b/ewol/widget/ListFileSystem.h index f61dc69f..cc98da03 100644 --- a/ewol/widget/ListFileSystem.h +++ b/ewol/widget/ListFileSystem.h @@ -15,8 +15,8 @@ namespace ewol { namespace widget { class ListFileSystem; - using ListFileSystemShared = ewol::SharedPtr; - using ListFileSystemWeak = ewol::WeakPtr; + using ListFileSystemShared = ememory::SharedPtr; + using ListFileSystemWeak = ememory::WeakPtr; /** * @brief Generic display folder class. This widget display the content of a single folder : */ diff --git a/ewol/widget/Menu.cpp b/ewol/widget/Menu.cpp index 4e513838..832ba0fd 100644 --- a/ewol/widget/Menu.cpp +++ b/ewol/widget/Menu.cpp @@ -99,7 +99,9 @@ int32_t ewol::widget::Menu::add(int32_t _parent, composeString+="\n"; myButton->setSubWidget(ewol::widget::composerGenerateString(composeString)); } else { - myButton->setSubWidget(ewol::widget::Label::create("value", "" + tmpObject.m_label + "") ); + ewol::widget::LabelShared label = ewol::widget::Label::create(); + label->propertyValue.set("" + tmpObject.m_label + ""); + myButton->setSubWidget(label); } // add it in the widget list ewol::widget::Sizer::subWidgetAdd(myButton); @@ -174,8 +176,9 @@ void ewol::widget::Menu::onButtonPressed(ewol::widget::ButtonWeak _button) { tmpContext->setPositionMark(ewol::widget::ContextMenu::markTop, newPosition); ewol::widget::SizerShared mySizer; ewol::widget::ButtonShared myButton; - mySizer = ewol::widget::Sizer::create("mode", widget::Sizer::modeVert); + mySizer = ewol::widget::Sizer::create(); if (mySizer != nullptr) { + mySizer->propertyMode.set(widget::Sizer::modeVert); mySizer->propertyLockExpand.set(vec2(true,true)); mySizer->propertyFill.set(vec2(true,true)); // set it in the pop-up-system: diff --git a/ewol/widget/Menu.h b/ewol/widget/Menu.h index 46c5b7f6..d71f423f 100644 --- a/ewol/widget/Menu.h +++ b/ewol/widget/Menu.h @@ -28,8 +28,8 @@ namespace ewol { std::string m_message; }; class Menu; - using MenuShared = ewol::SharedPtr; - using MenuWeak = ewol::WeakPtr; + using MenuShared = ememory::SharedPtr; + using MenuWeak = ememory::WeakPtr; /** * @ingroup ewolWidgetGroup */ diff --git a/ewol/widget/PopUp.h b/ewol/widget/PopUp.h index 6e2c3695..8a75ce50 100644 --- a/ewol/widget/PopUp.h +++ b/ewol/widget/PopUp.h @@ -18,8 +18,8 @@ namespace ewol { namespace widget { class PopUp; - using PopUpShared = ewol::SharedPtr; - using PopUpWeak = ewol::WeakPtr; + using PopUpShared = ememory::SharedPtr; + using PopUpWeak = ememory::WeakPtr; /** * @ingroup ewolWidgetGroup */ diff --git a/ewol/widget/ProgressBar.h b/ewol/widget/ProgressBar.h index fb2e85f1..850ec580 100644 --- a/ewol/widget/ProgressBar.h +++ b/ewol/widget/ProgressBar.h @@ -17,8 +17,8 @@ namespace ewol { namespace widget { class ProgressBar; - using ProgressBarShared = ewol::SharedPtr; - using ProgressBarWeak = ewol::WeakPtr; + using ProgressBarShared = ememory::SharedPtr; + using ProgressBarWeak = ememory::WeakPtr; /** * @ingroup ewolWidgetGroup */ diff --git a/ewol/widget/Scroll.h b/ewol/widget/Scroll.h index 4d33058e..4b0cc2f8 100644 --- a/ewol/widget/Scroll.h +++ b/ewol/widget/Scroll.h @@ -17,8 +17,8 @@ namespace ewol { namespace widget { class Scroll; - using ScrollShared = ewol::SharedPtr; - using ScrollWeak = ewol::WeakPtr; + using ScrollShared = ememory::SharedPtr; + using ScrollWeak = ememory::WeakPtr; class Scroll : public ewol::widget::Container { public: // properties eproperty::Range propertyLimit; //!< Set the limitation of the ratio in the sreen diff --git a/ewol/widget/Select.h b/ewol/widget/Select.h index 5a65a33a..145a93db 100644 --- a/ewol/widget/Select.h +++ b/ewol/widget/Select.h @@ -14,8 +14,8 @@ namespace ewol { namespace widget { class Select; - using SelectShared = ewol::SharedPtr; - using SelectWeak = ewol::WeakPtr; + using SelectShared = ememory::SharedPtr; + using SelectWeak = ememory::WeakPtr; /** * @brief a composed Select is a Select with an inside composed with the specify XML element * ==> this permit to generate standard element simple diff --git a/ewol/widget/Sizer.h b/ewol/widget/Sizer.h index f7ff0fd4..cf8ef90a 100644 --- a/ewol/widget/Sizer.h +++ b/ewol/widget/Sizer.h @@ -17,8 +17,8 @@ namespace ewol { namespace widget { class Sizer; - using SizerShared = ewol::SharedPtr; - using SizerWeak = ewol::WeakPtr; + using SizerShared = ememory::SharedPtr; + using SizerWeak = ememory::WeakPtr; /** * @ingroup ewolWidgetGroup */ diff --git a/ewol/widget/Slider.h b/ewol/widget/Slider.h index 2c65535d..8f4244c8 100644 --- a/ewol/widget/Slider.h +++ b/ewol/widget/Slider.h @@ -17,8 +17,8 @@ namespace ewol { namespace widget { class Slider; - using SliderShared = ewol::SharedPtr; - using SliderWeak = ewol::WeakPtr; + using SliderShared = ememory::SharedPtr; + using SliderWeak = ememory::WeakPtr; /** * @ingroup ewolWidgetGroup */ diff --git a/ewol/widget/Spacer.h b/ewol/widget/Spacer.h index 1f3b5039..433b49bb 100644 --- a/ewol/widget/Spacer.h +++ b/ewol/widget/Spacer.h @@ -17,8 +17,8 @@ namespace ewol { namespace widget { class Spacer; - using SpacerShared = ewol::SharedPtr; - using SpacerWeak = ewol::WeakPtr; + using SpacerShared = ememory::SharedPtr; + using SpacerWeak = ememory::WeakPtr; /** * @ingroup ewolWidgetGroup */ diff --git a/ewol/widget/Spin.h b/ewol/widget/Spin.h index f581fccd..db8fcf45 100644 --- a/ewol/widget/Spin.h +++ b/ewol/widget/Spin.h @@ -14,8 +14,8 @@ namespace ewol { namespace widget { class Spin; - using SpinShared = ewol::SharedPtr; - using SpinWeak = ewol::WeakPtr; + using SpinShared = ememory::SharedPtr; + using SpinWeak = ememory::WeakPtr; /** * @brief a composed Spin is a Spin with an inside composed with the specify XML element * ==> this permit to generate standard element simple diff --git a/ewol/widget/WSlider.h b/ewol/widget/WSlider.h index de96a275..f9fec807 100644 --- a/ewol/widget/WSlider.h +++ b/ewol/widget/WSlider.h @@ -16,8 +16,8 @@ namespace ewol { namespace widget { class WSlider; - using WSliderShared = ewol::SharedPtr; - using WSliderWeak = ewol::WeakPtr; + using WSliderShared = ememory::SharedPtr; + using WSliderWeak = ememory::WeakPtr; /** * @ingroup ewolWidgetGroup */ diff --git a/ewol/widget/Widget.h b/ewol/widget/Widget.h index 370f2b03..a82bae4a 100644 --- a/ewol/widget/Widget.h +++ b/ewol/widget/Widget.h @@ -22,8 +22,8 @@ namespace ewol { class Manager; class Windows; }; - using WidgetShared = ewol::SharedPtr; - using WidgetWeak = ewol::WeakPtr; + using WidgetShared = ememory::SharedPtr; + using WidgetWeak = ememory::WeakPtr; }; #include #include @@ -528,7 +528,7 @@ namespace ewol { /** * @brief get the curent Windows */ - ewol::SharedPtr getWindows(); + ememory::SharedPtr getWindows(); /* * Annimation section : */ diff --git a/ewol/widget/WidgetScrolled.h b/ewol/widget/WidgetScrolled.h index 2fcc516f..7832760f 100644 --- a/ewol/widget/WidgetScrolled.h +++ b/ewol/widget/WidgetScrolled.h @@ -18,8 +18,8 @@ namespace ewol { namespace widget { class WidgetScrolled; - using WidgetScrolledShared = ewol::SharedPtr; - using WidgetScrolledWeak = ewol::WeakPtr; + using WidgetScrolledShared = ememory::SharedPtr; + using WidgetScrolledWeak = ememory::WeakPtr; /** * @brief Widget to integrate a scrool bar in a widget. This is not a stadalone widget. */ diff --git a/ewol/widget/Windows.h b/ewol/widget/Windows.h index 35967a00..67152036 100644 --- a/ewol/widget/Windows.h +++ b/ewol/widget/Windows.h @@ -17,8 +17,8 @@ namespace ewol { namespace widget { class Windows; - using WindowsShared = ewol::SharedPtr; - using WindowsWeak = ewol::WeakPtr; + using WindowsShared = ememory::SharedPtr; + using WindowsWeak = ememory::WeakPtr; /** * @brief Windows basic interface */ diff --git a/ewol/widget/meta/ColorChooser.h b/ewol/widget/meta/ColorChooser.h index d56fe96d..8cd5cb35 100644 --- a/ewol/widget/meta/ColorChooser.h +++ b/ewol/widget/meta/ColorChooser.h @@ -21,8 +21,8 @@ namespace ewol { namespace widget { class ColorChooser; - using ColorChooserShared = ewol::SharedPtr; - using ColorChooserWeak = ewol::WeakPtr; + using ColorChooserShared = ememory::SharedPtr; + using ColorChooserWeak = ememory::WeakPtr; /** * @ingroup ewolWidgetGroup */ diff --git a/ewol/widget/meta/FileChooser.cpp b/ewol/widget/meta/FileChooser.cpp index d1746b81..b4ef3a01 100644 --- a/ewol/widget/meta/FileChooser.cpp +++ b/ewol/widget/meta/FileChooser.cpp @@ -45,15 +45,15 @@ ewol::widget::FileChooser::FileChooser() : "", &ewol::widget::FileChooser::onChangePropertyFile), propertyLabelTitle(this, "title", - "TRANSLATE:FileChooser", + "_T{FileChooser}", "", &ewol::widget::FileChooser::onChangePropertyLabelTitle), propertyLabelValidate(this, "label-validate", - "TRANSLATE:Validate", + "_T{Validate}", "", &ewol::widget::FileChooser::onChangePropertyLabelValidate), propertyLabelCancel(this, "label-cancel", - "TRANSLATE:Cancel", + "_T{Cancel}", "", &ewol::widget::FileChooser::onChangePropertyLabelCancel) { addObjectType("ewol::widget::FileChooser"); @@ -66,19 +66,19 @@ void ewol::widget::FileChooser::init() { + " \n" + " \n" + " \n" - + " \n" + + " \n" + " \n" + " \n" + " \n" + " \n" + " \n" @@ -109,7 +109,7 @@ void ewol::widget::FileChooser::init() { + " \n" + " \n" + " \n" - + " \n" + + " \n" + " \n" + ""; loadFromString(myDescription); @@ -149,15 +149,15 @@ void ewol::widget::FileChooser::onChangePropertyFile() { } void ewol::widget::FileChooser::onChangePropertyLabelTitle() { - propertySetOnWidgetNamed("[" + etk::to_string(getId()) + "]file-shooser:title-label", "value", TRANSLATE(propertyLabelTitle)); + propertySetOnWidgetNamed("[" + etk::to_string(getId()) + "]file-shooser:title-label", "value", propertyLabelTitle); } void ewol::widget::FileChooser::onChangePropertyLabelValidate() { - propertySetOnWidgetNamed("[" + etk::to_string(getId()) + "]file-shooser:validate-label", "value", TRANSLATE(propertyLabelValidate)); + propertySetOnWidgetNamed("[" + etk::to_string(getId()) + "]file-shooser:validate-label", "value", propertyLabelValidate); } void ewol::widget::FileChooser::onChangePropertyLabelCancel() { - propertySetOnWidgetNamed("[" + etk::to_string(getId()) + "]file-shooser:cancel-label", "value", TRANSLATE(propertyLabelCancel)); + propertySetOnWidgetNamed("[" + etk::to_string(getId()) + "]file-shooser:cancel-label", "value", propertyLabelCancel); } void ewol::widget::FileChooser::onCallbackEntryFolderChangeValue(const std::string& _value) { diff --git a/ewol/widget/meta/FileChooser.h b/ewol/widget/meta/FileChooser.h index 77e52989..4c4e0cdc 100644 --- a/ewol/widget/meta/FileChooser.h +++ b/ewol/widget/meta/FileChooser.h @@ -15,8 +15,8 @@ namespace ewol { namespace widget { class FileChooser; - using FileChooserShared = ewol::SharedPtr; - using FileChooserWeak = ewol::WeakPtr; + using FileChooserShared = ememory::SharedPtr; + using FileChooserWeak = ememory::WeakPtr; /** * @brief File Chooser is a simple selector of file for opening, saving, and what you want ... * diff --git a/ewol/widget/meta/Parameter.cpp b/ewol/widget/meta/Parameter.cpp index b7cb41b2..049847c6 100644 --- a/ewol/widget/meta/Parameter.cpp +++ b/ewol/widget/meta/Parameter.cpp @@ -24,7 +24,7 @@ ewol::widget::Parameter::Parameter() : signalClose(this, "close", ""), propertyLabelTitle(this, "title", - "TRANSLATE:Parameter", + "_T{Parameter}", "Title of the parameter interface", &ewol::widget::Parameter::onChangePropertyLabelTitle), m_currentIdList(0), @@ -76,9 +76,9 @@ void ewol::widget::Parameter::init() { EWOL_ERROR("Can not allocate widget == > display might be in error"); } else { tmpButton->setSubWidget(ewol::widget::composerGenerateString( - "\n" - " \n" - " \n" + "\n" + " \n" + " \n" "\n")); tmpButton->signalPressed.connect(shared_from_this(), &ewol::widget::Parameter::onCallbackParameterSave); mySizerHori->subWidgetAdd(tmpButton); @@ -98,9 +98,9 @@ void ewol::widget::Parameter::init() { EWOL_ERROR("Can not allocate widget == > display might be in error"); } else { tmpButton->setSubWidget(ewol::widget::composerGenerateString( - "\n" - " \n" - " \n" + "\n" + " \n" + " \n" "\n")); tmpButton->signalPressed.connect(shared_from_this(), &ewol::widget::Parameter::onCallbackMenuclosed); mySizerHori->subWidgetAdd(tmpButton); @@ -177,7 +177,7 @@ void ewol::widget::Parameter::init() { if (m_widgetTitle == nullptr) { EWOL_ERROR("Can not allocate widget == > display might be in error"); } else { - m_widgetTitle->propertyValue.set(TRANSLATE(propertyLabelTitle)); + m_widgetTitle->propertyValue.set(propertyLabelTitle); m_widgetTitle->propertyExpand.set(bvec2(true,false)); mySizerVert->subWidgetAdd(m_widgetTitle); } @@ -191,7 +191,7 @@ ewol::widget::Parameter::~Parameter() { void ewol::widget::Parameter::onChangePropertyLabelTitle() { if (m_widgetTitle != nullptr) { - m_widgetTitle->propertyValue.set(TRANSLATE(propertyLabelTitle)); + m_widgetTitle->propertyValue.set(propertyLabelTitle); } } diff --git a/ewol/widget/meta/Parameter.h b/ewol/widget/meta/Parameter.h index e0e4124e..694a88b6 100644 --- a/ewol/widget/meta/Parameter.h +++ b/ewol/widget/meta/Parameter.h @@ -22,8 +22,8 @@ namespace ewol { namespace widget { class Parameter; - using ParameterShared = ewol::SharedPtr; - using ParameterWeak = ewol::WeakPtr; + using ParameterShared = ememory::SharedPtr; + using ParameterWeak = ememory::WeakPtr; /** * @ingroup ewolWidgetGroup */ diff --git a/ewol/widget/meta/ParameterList.h b/ewol/widget/meta/ParameterList.h index 54082e39..9d6ed0fa 100644 --- a/ewol/widget/meta/ParameterList.h +++ b/ewol/widget/meta/ParameterList.h @@ -30,8 +30,8 @@ namespace ewol { virtual ~elementPL() {}; }; class ParameterList; - using ParameterListShared = ewol::SharedPtr; - using ParameterListWeak = ewol::WeakPtr; + using ParameterListShared = ememory::SharedPtr; + using ParameterListWeak = ememory::WeakPtr; /** * @ingroup ewolWidgetGroup */ diff --git a/ewol/widget/meta/SpinBase.h b/ewol/widget/meta/SpinBase.h index 6d9989de..9e771b6f 100644 --- a/ewol/widget/meta/SpinBase.h +++ b/ewol/widget/meta/SpinBase.h @@ -58,8 +58,8 @@ namespace ewol { spinPosition_RightRight }; class SpinBase; - using SpinBaseShared = ewol::SharedPtr; - using SpinBaseWeak = ewol::WeakPtr; + using SpinBaseShared = ememory::SharedPtr; + using SpinBaseWeak = ememory::WeakPtr; /** * @ingroup ewolWidgetGroup */ diff --git a/ewol/widget/meta/StdPopUp.h b/ewol/widget/meta/StdPopUp.h index 66a5eb32..f98e8873 100644 --- a/ewol/widget/meta/StdPopUp.h +++ b/ewol/widget/meta/StdPopUp.h @@ -14,8 +14,8 @@ namespace ewol { namespace widget { class StdPopUp; - using StdPopUpShared = ewol::SharedPtr; - using StdPopUpWeak = ewol::WeakPtr; + using StdPopUpShared = ememory::SharedPtr; + using StdPopUpWeak = ememory::WeakPtr; /** * @brief The std pop up widget is a siple message widget to notify user of some simple things, like: * diff --git a/lutin_ewol.py b/lutin_ewol.py index 4bf49bd7..2dafbee4 100644 --- a/lutin_ewol.py +++ b/lutin_ewol.py @@ -48,8 +48,7 @@ def create(target, module_name): 'ewol/Padding.h', 'ewol/translate.h', 'ewol/DrawProperty.h', - 'ewol/gravity.h', - 'ewol/memory.h' + 'ewol/gravity.h' ]) # compositing: @@ -239,9 +238,11 @@ def create(target, module_name): # name of the dependency my_module.add_module_depend([ + 'elog', 'etk', 'esignal', 'eproperty', + 'ememory', 'gale', 'freetype', 'exml',