[DEV] update new URI and treeview

This commit is contained in:
Edouard DUPIN 2018-10-09 23:03:07 +02:00
parent dbe995abd8
commit 844aaa90dd
59 changed files with 194 additions and 197 deletions

View File

@ -7,13 +7,13 @@
<spacer expand="true,false"/>
<button name="[{ID}]file-shooser:button-validate">
<sizer mode="hori">
<image src="{ewol}THEME:GUI:Load.svg" fill="true" size="7,7mm"/>
<image src="THEME_GUI:///Load.svg?lib=ewol" fill="true" size="7,7mm"/>
<label name="[{ID}]file-shooser:validate-label">_T{Validate}</label>
</sizer>
</button>
<button name="[{ID}]file-shooser:button-cancel">
<sizer mode="hori">
<image src="{ewol}THEME:GUI:Remove.svg" fill="true" size="7,7mm"/>
<image src="THEME_GUI:///Remove.svg?lib=ewol" fill="true" size="7,7mm"/>
<label name="[{ID}]file-shooser:cancel-label">_T{Cancel}</label>
</sizer>
</button>
@ -37,13 +37,13 @@
<spacer min-size="2,2mm"/>
</sizer>
<sizer mode="hori">
<image name="[{ID}]file-shooser:img-file" src="{ewol}THEME:GUI:File.svg" expand="false" size="8,8mm"/>
<image name="[{ID}]file-shooser:img-file" src="THEME_GUI:///File.svg?lib=ewol" expand="false" size="8,8mm"/>
<entry name="[{ID}]file-shooser:entry-file" expand="true,false" fill="true,false"/>
</sizer>
<sizer mode="hori">
<image name="[{ID}]file-shooser:img-folder" src="{ewol}THEME:GUI:Folder.svg" expand="false" size="8,8mm"/>
<image name="[{ID}]file-shooser:img-folder" src="THEME_GUI:///Folder.svg?lib=ewol" expand="false" size="8,8mm"/>
<entry name="[{ID}]file-shooser:entry-folder" expand="true,false" fill="true,false"/>
<image name="[{ID}]file-shooser:img-home" src="{ewol}THEME:GUI:Home.svg" expand="false" size="8,8mm"/>
<image name="[{ID}]file-shooser:img-home" src="THEME_GUI:///Home.svg?lib=ewol" expand="false" size="8,8mm"/>
</sizer>
<label name="[{ID}]file-shooser:title-label">_T{Title}</label>
</sizer>

View File

@ -18,6 +18,6 @@
padding-in-buttom:1,
change-time:356,
program:"{ewol}THEME:GUI:Button.prog",
color:"{ewol}THEME:COLOR:Button.json"
program:"THEME_GUI:///Button.prog?lib=ewol",
color:"THEME_COLOR:///Button.json?lib=ewol"
}

View File

@ -6,6 +6,6 @@
padding-top:10,
padding-buttom:10,
change-time:356,
program:"{ewol}THEME:GUI:CheckBox.prog",
color:"{ewol}THEME:COLOR:CheckBox.json"
program:"THEME_GUI:///CheckBox.prog?lib=ewol",
color:"THEME_COLOR:///CheckBox.json?lib=ewol"
}

View File

@ -18,6 +18,6 @@
padding-in-buttom:1,
change-time:356,
program:"{ewol}THEME:GUI:ContextMenu.prog",
color:"{ewol}THEME:COLOR:ContextMenu.json"
program:"THEME_GUI:///ContextMenu.prog?lib=ewol",
color:"THEME_COLOR:///ContextMenu.json?lib=ewol"
}

View File

@ -18,6 +18,6 @@
padding-in-buttom:1,
change-time:356,
program:"{ewol}THEME:GUI:Entry.prog",
color:"{ewol}THEME:COLOR:Entry.json"
program:"THEME_GUI:///Entry.prog?lib=ewol",
color:"THEME_COLOR:///Entry.json?lib=ewol"
}

View File

@ -18,6 +18,6 @@
padding-in-buttom:1,
change-time:356,
program:"{ewol}THEME:GUI:PopUp.prog",
color:"{ewol}THEME:COLOR:PopUp.json"
program:"THEME_GUI:///PopUp.prog?lib=ewol,
color:"THEME_COLOR:///PopUp.json?lib=ewol"
}

View File

@ -4,6 +4,6 @@
padding-top:16,
padding-buttom:16,
change-time:200,
program:"{ewol}THEME:GUI:WidgetScrolled.prog",
color:"{ewol}THEME:COLOR:WidgetScrolled.json"
program:"THEME_GUI:///WidgetScrolled.prog?lib=ewol",
color:"THEME_COLOR:///WidgetScrolled.json?lib=ewol"
}

View File

@ -18,6 +18,6 @@
padding-in-buttom:1,
change-time:356,
program:"{ewol}THEME:GUI:Button.prog",
color:"{ewol}THEME:COLOR:Button.json"
program:"THEME_GUI:///Button.prog?lib=ewol",
color:"THEME_COLOR:///Button.json?lib=ewol"
}

View File

@ -20,6 +20,6 @@
box-size:20,
box-inside:12,
change-time:356,
program:"{ewol}THEME:GUI:CheckBox.prog",
color:"{ewol}THEME:COLOR:CheckBox.json"
program:"THEME_GUI:///CheckBox.prog?lib=ewol",
color:"THEME_COLOR:///CheckBox.json?lib=ewol"
}

View File

@ -18,6 +18,6 @@
padding-in-buttom:2,
change-time:356,
program:"{ewol}THEME:GUI:ContextMenu.prog",
color:"{ewol}THEME:COLOR:ContextMenu.json"
program:"THEME_GUI:///ContextMenu.prog?lib=ewol",
color:"THEME_COLOR:///ContextMenu.json?lib=ewol"
}

View File

@ -18,6 +18,6 @@
padding-in-buttom:2,
change-time:356,
program:"{ewol}THEME:GUI:Entry.prog",
color:"{ewol}THEME:COLOR:Entry.json"
program:"THEME_GUI:///Entry.prog?lib=ewol",
color:"THEME_COLOR:///Entry.json?lib=ewol"
}

View File

@ -18,6 +18,6 @@
padding-in-buttom:2,
change-time:356,
program:"{ewol}THEME:GUI:PopUp.prog",
color:"{ewol}THEME:COLOR:PopUp.json"
program:"THEME_GUI:///PopUp.prog?lib=ewol",
color:"THEME_COLOR:///PopUp.json?lib=ewol"
}

View File

@ -1,5 +1,5 @@
{
entry-shaper:"{ewol}THEME:GUI:SelectEntry.json",
up-shaper:"{ewol}THEME:GUI:SelectBt.json",
entry-shaper:"THEME_GUI:///SelectEntry.json?lib=ewol",
up-shaper:"THEME_GUI:///SelectBt.json?lib=ewol",
up-data:"<label>*</label>",
}

View File

@ -18,6 +18,6 @@
padding-in-buttom:1,
change-time:356,
program:"{ewol}THEME:GUI:Button.prog",
color:"{ewol}THEME:COLOR:Button.json"
program:"THEME_GUI:///Button.prog?lib=ewol",
color:"THEME_COLOR:///Button.json?lib=ewol"
}

View File

@ -18,6 +18,6 @@
padding-in-buttom:1,
change-time:356,
program:"{ewol}THEME:GUI:Entry.prog",
color:"{ewol}THEME:COLOR:Entry.json"
program:"THEME_GUI:///Entry.prog?lib=ewol",
color:"THEME_COLOR:///Entry.json?lib=ewol"
}

View File

@ -1,7 +1,7 @@
{
entry-shaper:"{ewol}THEME:GUI:SpinEntry.json",
up-shaper:"{ewol}THEME:GUI:SpinUp.json",
entry-shaper:"THEME_GUI:///SpinEntry.json?lib=ewol",
up-shaper:"THEME_GUI:///SpinUp.json?lib=ewol",
up-data:"<label>+</label>",
down-shaper:"{ewol}THEME:GUI:SpinDown.json",
down-shaper:"THEME_GUI:///SpinDown.json?lib=ewol",
down-data:"<label>-</label>",
}

View File

@ -18,6 +18,6 @@
padding-in-buttom:1,
change-time:356,
program:"{ewol}THEME:GUI:Button.prog",
color:"{ewol}THEME:COLOR:Button.json"
program:"THEME_GUI:///Button.prog?lib=ewol",
color:"THEME_COLOR:///Button.json?lib=ewol"
}

View File

@ -18,6 +18,6 @@
padding-in-buttom:1,
change-time:356,
program:"{ewol}THEME:GUI:Entry.prog",
color:"{ewol}THEME:COLOR:Entry.json"
program:"THEME_GUI:///Entry.prog?lib=ewol",
color:"THEME_COLOR:///Entry.json?lib=ewol"
}

View File

@ -18,6 +18,6 @@
padding-in-buttom:1,
change-time:356,
program:"{ewol}THEME:GUI:Button.prog",
color:"{ewol}THEME:COLOR:Button.json"
program:"THEME_GUI:///Button.prog?lib=ewol",
color:"THEME_COLOR:///Button.json?lib=ewol"
}

View File

@ -18,6 +18,6 @@
padding-in-buttom:3,
change-time:200,
program:"{ewol}THEME:GUI:WidgetScrolled.prog",
color:"{ewol}THEME:COLOR:WidgetScrolled.json"
program:"THEME_GUI:///WidgetScrolled.prog?lib=ewol",
color:"THEME_COLOR:///WidgetScrolled.json?lib=ewol"
}

View File

@ -29,7 +29,7 @@ Generic Properties {#ewol_tutorial_file_access_pr
By default we dertermine some basics for files.
Then we need to determine file in the tree with:
- **"DATA:XXX"** Application internal data
- **"DATA:///XXX"** Application internal data
* Linux: /usr/share/applName/
* Android: /xxx/yyy/applName.apk/asssets/
* IOs: applName.app/share
@ -47,7 +47,7 @@ Then we need to determine file in the tree with:
When you will call a file, you need to just call it with the starting name.
For example if I want to access at an application data I will call the file : "DATA:myImage.png"
For example if I want to access at an application data I will call the file : "DATA:///myImage.png"
Integrate a file in a package {#ewol_tutorial_file_access_package}
=============================
@ -61,7 +61,7 @@ In your ```lutin_xxx.py``` file add:
myModule.copy_path("relative/path/start*.png","destination/folder/")
```
And now you can acces on these file with : "DATA:destination/folder/fileNewName.svg"
And now you can acces on these file with : "DATA:///destination/folder/fileNewName.svg"
Read a file {#ewol_tutorial_file_access_read}
@ -73,7 +73,7 @@ Read a file {#ewol_tutorial_file_access_read}
...
etk::FSNode file("DATA:destination/folder/file.svg");
etk::FSNode file("DATA:///destination/folder/file.svg");
if (file.exist() == false) {
APPL_ERROR("Can not read the file (Does not exist)");
return;
@ -144,7 +144,7 @@ And when you want to change the theme, just call:
This is not done automaticly, because reloading the resources can have a real cost of time.
```
You can acces on your theme with accessing the filename: "THEME:GUI_COLOR:your/sub/path/file.xx"
You can acces on your theme with accessing the filename: "THEME_GUI_COLOR:///your/sub/path/file.xx"
An important think is that the theme file is searching in many path in the order:
- USERDATA:GUI_COLOR:your/sub/path/file.xx

View File

@ -40,7 +40,7 @@ namespace appl {
//! @brief Constructor
MyObj(void) :
propertyConfig(this, "file",
"DATA:ExapleConfig.json",
"DATA:///ExapleConfig.json",
"no desc",
&appl::MyObj::onChangePropertyFile),
m_configValId(-1) {
@ -128,7 +128,7 @@ When loose hardware (juste update internal state the hardware is no more present
void removeContextToLate();
```
When user request to reload all resources (can be usefull when using file type : THEME:GUI:xxx)
When user request to reload all resources (can be usefull when using file type : THEME_GUI:///xxx)
```{.cpp}
void reload();
```

View File

@ -98,7 +98,7 @@ File ```gui.xml```
```{.cpp}
#include <ewol::widget::Composer.hpp>
ewol::widget::WidgetShared tmpWidget = ewol::widget::composerGenerateFile("DATA:gui.xml");
ewol::widget::WidgetShared tmpWidget = ewol::widget::composerGenerateFile("DATA:///gui.xml");
if (tmpWidget == null) {
APPL_CRITICAL("The widget can not be created");
}

View File

@ -46,7 +46,7 @@ ewol::compositing::Area::~Area() {
void ewol::compositing::Area::loadProgram() {
// get the shader resource :
m_GLPosition = 0;
m_GLprogram = gale::resource::Program::create(etk::String("{ewol}DATA:textured3D.prog"));
m_GLprogram = gale::resource::Program::create(etk::String("DATA:///textured3D.prog?lib=ewol"));
if (m_GLprogram != null) {
m_GLPosition = m_GLprogram->getAttribute("EW_coord3d");
m_GLColor = m_GLprogram->getAttribute("EW_color");

View File

@ -299,7 +299,7 @@ void ewol::compositing::Drawing::loadProgram() {
// remove previous loading ... in case
unLoadProgram();
// oad the new ...
m_GLprogram = gale::resource::Program::create("{ewol}DATA:color3.prog");
m_GLprogram = gale::resource::Program::create("DATA:///color3.prog?lib=ewol");
// get the shader resource :
if (m_GLprogram != null) {
m_GLPosition = m_GLprogram->getAttribute("EW_coord3d");

View File

@ -58,9 +58,9 @@ void ewol::compositing::Image::loadProgram() {
m_GLPosition = 0;
m_GLprogram.reset();
if (m_distanceFieldMode == true) {
m_GLprogram = gale::resource::Program::create("{ewol}DATA:texturedDF.prog");
m_GLprogram = gale::resource::Program::create("DATA:///texturedDF.prog?lib=ewol");
} else {
m_GLprogram = gale::resource::Program::create("{ewol}DATA:textured3D.prog");
m_GLprogram = gale::resource::Program::create("DATA:///textured3D.prog?lib=ewol");
}
if (m_GLprogram != null) {
m_GLPosition = m_GLprogram->getAttribute("EW_coord3d");

View File

@ -99,7 +99,7 @@ namespace ewol {
/**
* @brief generic constructor
*/
TextBase(const etk::String& _shaderName = "{ewol}DATA:text.prog", bool _loadProgram = true);
TextBase(const etk::String& _shaderName = "DATA:///text.prog?lib=ewol", bool _loadProgram = true);
/**
* @brief generic destructor
*/

View File

@ -17,7 +17,7 @@ ewol::compositing::TextDF::TextDF(const etk::String& _fontName, int32_t _fontSiz
m_GLglyphLevel(-1),
m_size(12.0) {
setFont(_fontName, _fontSize);
loadProgram("{ewol}DATA:fontDistanceField/font1.prog");
loadProgram("DATA:///fontDistanceField/font1.prog?lib=ewol");
}
ewol::compositing::TextDF::~TextDF() {

View File

@ -10,7 +10,7 @@
ETK_DECLARE_TYPE(ewol::context::ConfigFont);
ewol::context::ConfigFont::ConfigFont() :
m_folder("{ewol}DATA:fonts"),
m_folder("DATA:///fonts?lib=ewol"),
m_name("Arial;Helvetica"),
m_size(10),
m_useExternal(false) {

View File

@ -68,7 +68,7 @@ void ewol::Context::inputEventUnGrabPointer() {
void ewol::Context::onCreate(gale::Context& _context) {
EWOL_INFO(" == > Ewol system create (BEGIN)");
// Add basic ewol translation:
etranslate::addPath("ewol", "{ewol}DATA:translate/ewol/");
etranslate::addPath("ewol", "DATA:///translate/ewol/?lib=ewol");
etranslate::autoDetectLanguage();
// By default we set 2 themes (1 color and 1 shape ...) :
etk::theme::setNameDefault("GUI", "shape/square/");

View File

@ -24,7 +24,7 @@ void ewol::resource::Colored3DObject::init() {
gale::Resource::init();
// get the shader resource :
m_GLPosition = 0;
m_GLprogram = gale::resource::Program::create("{ewol}DATA:simple3D.prog");
m_GLprogram = gale::resource::Program::create("DATA:///simple3D.prog?lib=ewol");
if (m_GLprogram != null) {
m_GLPosition = m_GLprogram->getAttribute("EW_coord3d");
m_GLColor = m_GLprogram->getUniform("EW_color");

View File

@ -24,7 +24,7 @@ ewol::widget::Button::Button() :
signalEnter(this, "enter", "The cursor enter inside the button"),
signalLeave(this, "leave", "the cursor leave the button"),
signalValue(this, "value", "button value change"),
propertyShape(this, "shape", etk::Uri("THEME_GUI://Button.json?lib=ewol"), "The display name for config file", &ewol::widget::Button::onChangePropertyShape),
propertyShape(this, "shape", etk::Uri("THEME_GUI:///Button.json?lib=ewol"), "The display name for config file", &ewol::widget::Button::onChangePropertyShape),
propertyValue(this, "value", false, "Value of the Button", &ewol::widget::Button::onChangePropertyValue),
propertyLock(this, "lock", lockNone, "Lock the button in a special state to permit changing state only by the coder", &ewol::widget::Button::onChangePropertyLock),
propertyToggleMode(this, "toggle", false, "The Button can toogle", &ewol::widget::Button::onChangePropertyToggleMode),

View File

@ -25,7 +25,7 @@ ETK_DECLARE_TYPE(ewol::widget::ButtonColor);
ewol::widget::ButtonColor::ButtonColor() :
signalChange(this, "change", "Button color change value"),
propertyValue(this, "color", etk::color::black, "Current color", &ewol::widget::ButtonColor::onChangePropertyValue),
propertyShape(this, "shape", etk::Uri("THEME_GUI://Button.json?lib=ewol"), "shape of the widget", &ewol::widget::ButtonColor::onChangePropertyShape),
propertyShape(this, "shape", etk::Uri("THEME_GUI:///Button.json?lib=ewol"), "shape of the widget", &ewol::widget::ButtonColor::onChangePropertyShape),
m_widgetContextMenu(null) {
addObjectType("ewol::widget::ButtonColor");
changeStatusIn(STATUS_UP);

View File

@ -27,7 +27,7 @@ ewol::widget::CheckBox::CheckBox() :
"Basic value of the widget",
&ewol::widget::CheckBox::onChangePropertyValue),
propertyShape(this, "shape",
etk::Uri("THEME_GUI://CheckBox.json?lib=ewol"),
etk::Uri("THEME_GUI:///CheckBox.json?lib=ewol"),
"The display name for config file",
&ewol::widget::CheckBox::onChangePropertyShape),
m_mouseHover(false),

View File

@ -18,7 +18,7 @@ ETK_DECLARE_TYPE(enum ewol::widget::ContextMenu::markPosition);
ewol::widget::ContextMenu::ContextMenu():
propertyShape(this, "shape",
etk::Uri("THEME_GUI://ContextMenu.json?lib=ewol"),
etk::Uri("THEME_GUI:///ContextMenu.json?lib=ewol"),
"the display name for config file",
&ewol::widget::ContextMenu::onChangePropertyShape),
propertyArrowPos(this, "arrow-position",

View File

@ -27,7 +27,7 @@ ewol::widget::Entry::Entry() :
"Not display content in password mode",
&ewol::widget::Entry::onChangePropertyPassword),
propertyShape(this, "shape",
etk::Uri("THEME_GUI://Entry.json?lib=ewol"),
etk::Uri("THEME_GUI:///Entry.json?lib=ewol"),
"Shaper to display the background",
&ewol::widget::Entry::onChangePropertyShaper),
propertyValue(this, "value",
@ -162,7 +162,7 @@ void ewol::widget::Entry::onRegenerateDisplay() {
} else {
m_text.setCursorPos(m_displayCursorPos);
}
etk::String valueToDisplay = *propertyValue;
etk::UString valueToDisplay = etk::toUString(*propertyValue);
if (*propertyPassword == true) {
for (auto &it: valueToDisplay) {
it = '*';
@ -375,14 +375,16 @@ bool ewol::widget::Entry::onEventEntry(const ewol::event::Entry& _event) {
m_displayCursorPosSelection = m_displayCursorPos;
}
} else if(_event.getChar() >= 20) {
EWOL_ERROR("get data: '" << _event.getChar() << "' = '" << u32char::convertToUtf8(_event.getChar()) << "'");
if ((int64_t)propertyValue->size() > propertyMaxCharacter) {
EWOL_INFO("Reject data for entry : '" << _event.getChar() << "'");
} else {
etk::String newData = propertyValue;
newData.insert(newData.begin()+m_displayCursorPos, _event.getChar());
etk::String inputData = u32char::convertToUtf8(_event.getChar());
newData.insert(newData.begin()+m_displayCursorPos, inputData);
setInternalValue(newData);
if (propertyValue.get() == newData) {
m_displayCursorPos++;
m_displayCursorPos += inputData.size();
m_displayCursorPosSelection = m_displayCursorPos;
}
}

View File

@ -28,7 +28,7 @@ ewol::widget::Image::Image() :
m_colorId(-1) {
addObjectType("ewol::widget::Image");
m_imageRenderSize = vec2(0,0);
m_colorProperty = ewol::resource::ColorFile::create(etk::Uri("THEME_COLOR://Image.json?lib=ewol"));
m_colorProperty = ewol::resource::ColorFile::create(etk::Uri("THEME_COLOR:///Image.json?lib=ewol"));
if (m_colorProperty != null) {
m_colorId = m_colorProperty->request("foreground");
}

View File

@ -33,7 +33,7 @@ namespace ewol {
eproperty::Range<vec2> propertyPosStop; //!< position in the image to start the sisplay (when we want not to display all the image)
eproperty::Value<bool> propertyDistanceFieldMode; //!< to have a parameter
eproperty::Value<bool> propertySmooth; //!< display is done in the pixed approximation if false
eproperty::Value<bool> propertyUseThemeColor; //!< Use the themo color management ("{ewol}THEME:COLOR:Image.json") default false
eproperty::Value<bool> propertyUseThemeColor; //!< Use the themo color management ("THEME_COLOR:///Image.json?lib=ewol") default false
protected:
ewol::compositing::Image m_compositing; //!< compositing element of the image.
ememory::SharedPtr<ewol::resource::ColorFile> m_colorProperty; //!< theme color property

View File

@ -28,7 +28,7 @@ ewol::widget::Label::Label() :
m_colorDefaultFgText(-1),
m_colorDefaultBgText(-1){
addObjectType("ewol::widget::Label");
m_colorProperty = ewol::resource::ColorFile::create(etk::Uri("THEME_COLOR://Label.json?lib=ewol"));
m_colorProperty = ewol::resource::ColorFile::create(etk::Uri("THEME_COLOR:///Label.json?lib=ewol"));
if (m_colorProperty != null) {
m_colorDefaultFgText = m_colorProperty->request("foreground");
m_colorDefaultBgText = m_colorProperty->request("background");

View File

@ -29,16 +29,31 @@ ewol::widget::List::List() {
void ewol::widget::List::init() {
ewol::widget::WidgetScrolled::init();
addComposeElemnent("drawing", ememory::makeShared<ewol::compositing::Drawing>());
addComposeElemnent("text", ememory::makeShared<ewol::compositing::Text>());
}
ewol::widget::List::~List() {
//clean all the object
for (size_t iii=0; iii<m_listOObject.size(); iii++) {
ETK_DELETE(ewol::Compositing, m_listOObject[iii]);
m_listOObject[iii] = null;
}
void ewol::widget::List::addComposeElemnent(const etk::String& _name, const ememory::SharedPtr<ewol::Compositing>& _element) {
m_compositingElements.set(_name, _element);
m_listOObject.pushBack(_element);
}
void ewol::widget::List::clearComposeElemnent() {
for (auto &it: m_compositingElements) {
it.second->clear();
}
m_listOObject.clear();
}
void ewol::widget::List::removeComposeElemnent() {
m_compositingElements.clear();
}
ememory::SharedPtr<ewol::Compositing> ewol::widget::List::getComposeElemnent(const etk::String& _name) {
return m_compositingElements[_name];
}
/*
void ewol::widget::List::setRawVisible(int32_t _id) {
@ -79,27 +94,6 @@ void ewol::widget::List::calculateMinMaxSize() {
m_minSize.setValue(200, 150);
}
void ewol::widget::List::addOObject(ewol::Compositing* _newObject, int32_t _pos) {
if (_newObject == null) {
EWOL_ERROR("Try to add an empty object in the Widget generic display system");
return;
}
if ( _pos < 0
|| (size_t)_pos >= m_listOObject.size() ) {
m_listOObject.pushBack(_newObject);
} else {
m_listOObject.insert(m_listOObject.begin()+_pos, _newObject);
}
}
void ewol::widget::List::clearOObjectList() {
for (size_t iii=0; iii<m_listOObject.size(); iii++) {
ETK_DELETE(ewol::Compositing, m_listOObject[iii]);
m_listOObject[iii] = null;
}
m_listOObject.clear();
}
void ewol::widget::List::onDraw() {
for (size_t iii=0; iii<m_listOObject.size(); iii++) {
if (m_listOObject[iii] != null) {
@ -112,7 +106,7 @@ void ewol::widget::List::onDraw() {
void ewol::widget::List::onRegenerateDisplay() {
if (needRedraw() == true) {
// clean the object list ...
clearOObjectList();
clearComposeElemnent();
// -------------------------------------------------------
// -- Calculate the size of each element
// -------------------------------------------------------
@ -232,9 +226,9 @@ ivec2 ewol::widget::List::getMatrixSize() const {
}
vec2 ewol::widget::List::calculateElementSize(const ivec2& _pos) {
ewol::compositing::Text tmpText;
auto tmpText = ememory::staticPointerCast<ewol::compositing::Text>(getComposeElemnent("text"));
etk::String myTextToWrite = getData(ListRole::Text, _pos).getSafeString();
vec3 textSize = tmpText.calculateSize(myTextToWrite);
vec3 textSize = tmpText->calculateSize(myTextToWrite);
ivec2 count = getMatrixSize();
return vec2(textSize.x(),
textSize.y() + m_paddingSizeY*3
@ -242,9 +236,8 @@ vec2 ewol::widget::List::calculateElementSize(const ivec2& _pos) {
}
void ewol::widget::List::drawBackground() {
ewol::compositing::Drawing * BGOObjects = ETK_NEW(ewol::compositing::Drawing);
auto BGOObjects = ememory::staticPointerCast<ewol::compositing::Drawing>(getComposeElemnent("drawing"));
if (BGOObjects != null) {
addOObject(BGOObjects);
etk::Color<> basicBG = getBasicBG();
BGOObjects->setColor(basicBG);
BGOObjects->setPos(vec3(0, 0, 0) );
@ -258,18 +251,16 @@ void ewol::widget::List::drawElement(const ivec2& _pos, const vec2& _start, cons
auto backgroundVariant = getData(ListRole::BgColor, _pos);
if (backgroundVariant.isColor() == true) {
etk::Color<> bg = backgroundVariant.getColor();
ewol::compositing::Drawing * BGOObjects = ETK_NEW(ewol::compositing::Drawing);
auto BGOObjects = ememory::staticPointerCast<ewol::compositing::Drawing>(getComposeElemnent("drawing"));
if (BGOObjects != null) {
addOObject(BGOObjects);
BGOObjects->setColor(bg);
BGOObjects->setPos(vec3(_start.x(), _start.y(), 0) );
BGOObjects->rectangleWidth(_size);
}
}
if (myTextToWrite != "") {
ewol::compositing::Text * tmpText = ETK_NEW(ewol::compositing::Text);
auto tmpText = ememory::staticPointerCast<ewol::compositing::Text>(getComposeElemnent("text"));
if (tmpText != null) {
addOObject(tmpText);
int32_t displayPositionY = _start.y() + m_paddingSizeY;
tmpText->setColor(fg);
tmpText->setPos(vec3(_start.x() + m_paddingSizeX, displayPositionY, 0) );

View File

@ -45,11 +45,16 @@ namespace ewol {
void calculateMinMaxSize() override;
// drawing capabilities ....
protected:
etk::Vector<ewol::Compositing*> m_listOObject; //!< generic element to display...
etk::Vector<ememory::SharedPtr<ewol::Compositing>> m_listOObject; //!< generic element to display...
etk::Vector<int32_t> m_listSizeX; //!< size of every colomns
etk::Vector<int32_t> m_listSizeY; //!< size of every rows
protected:
etk::Map<etk::String, ememory::SharedPtr<ewol::Compositing>> m_compositingElements;
void addComposeElemnent(const etk::String& _name, const ememory::SharedPtr<ewol::Compositing>& _element);
void clearComposeElemnent();
void removeComposeElemnent();
ememory::SharedPtr<ewol::Compositing> getComposeElemnent(const etk::String& _name);
public:
void addOObject(ewol::Compositing* _newObject, int32_t _pos=-1);
void clearOObjectList();
// list properties ...
protected:

View File

@ -7,7 +7,7 @@
#include <ewol/widget/ListFileSystem.hpp>
#include <etk/tool.hpp>
#include <etk/path/fileSystem.hpp>
#include <etk/algorithm.hpp>
#include <etk/typeInfo.hpp>
ETK_DECLARE_TYPE(ewol::widget::ListFileSystem);
@ -45,14 +45,14 @@ ewol::widget::ListFileSystem::ListFileSystem() :
#if defined(__TARGET_OS__Windows)
propertyPath.setDirectCheck("c:/");
#endif
m_colorProperty = ewol::resource::ColorFile::create("{ewol}THEME:COLOR:ListFileSystem.json");
m_colorProperty = ewol::resource::ColorFile::create("THEME_COLOR:///ListFileSystem.json?lib=ewol");
if (m_colorProperty != null) {
m_colorIdText = m_colorProperty->request("text");
m_colorIdBackground1 = m_colorProperty->request("background1");
m_colorIdBackground2 = m_colorProperty->request("background2");
m_colorIdBackgroundSelected = m_colorProperty->request("selected");
}
setMouseLimit(1);
setMouseLimit(2);
}
ewol::widget::ListFileSystem::~ListFileSystem() {
@ -67,6 +67,9 @@ etk::Color<> ewol::widget::ListFileSystem::getBasicBG() {
return m_colorProperty->get(m_colorIdBackground1);
}
static bool localSort(const etk::Path& _left, const etk::Path& _right) {
return _left.getString().toUpper() <= _right.getString().toUpper();
}
void ewol::widget::ListFileSystem::regenerateView() {
clearList();
@ -84,6 +87,9 @@ void ewol::widget::ListFileSystem::regenerateView() {
flags |= etk::path::LIST_FILE;
}
m_list = etk::path::list(*propertyPath, flags);
EWOL_ERROR("Lsit of element: " << m_list.size() );
// Sort the list:
etk::algorithm::quickSort(m_list, localSort);
// request a redraw ...
markToRedraw();
}
@ -173,48 +179,45 @@ bool ewol::widget::ListFileSystem::onItemEvent(const ewol::event::Input& _event,
offset = 2;
}
}
if (_event.getStatus() == gale::key::status::pressSingle) {
if ( _event.getStatus() == gale::key::status::pressSingle
|| _event.getStatus() == gale::key::status::pressDouble) {
EWOL_VERBOSE("Event on List : IdInput=" << _event.getId() << " _pos=" << _pos );
if (1 == _event.getId()) {
int32_t previousRaw = m_selectedLine;
if (_pos.y() > (int32_t)m_list.size()+offset ) {
m_selectedLine = -1;
} else {
m_selectedLine = _pos.y();
}
if (previousRaw != m_selectedLine) {
if( *propertyShowFolder == true
&& m_selectedLine == 0) {
// "." folder
signalFolderSelect.emit(".");
} else if ( *propertyShowFolder == true
&& m_selectedLine == 1) {
// ".." folder
signalFolderSelect.emit("..");
} else if( m_selectedLine-offset >= 0
&& m_selectedLine-offset < (int32_t)m_list.size() ) {
// generate event extern :
if(etk::path::isDirectory(m_list[m_selectedLine-offset])) {
signalFolderSelect.emit(m_list[m_selectedLine-offset].getFileName());
} else {
signalFileSelect.emit(m_list[m_selectedLine-offset].getFileName());
}
if( *propertyShowFolder == true
&& m_selectedLine == 0) {
// "." folder
if (_event.getStatus() == gale::key::status::pressSingle) {
signalFolderSelect.emit(*propertyPath);
} else {
signalFolderValidate.emit(*propertyPath);
}
} else {
if( *propertyShowFolder == true
&& m_selectedLine == 0) {
// "." folder
signalFolderValidate.emit(".");
} else if ( *propertyShowFolder == true
&& m_selectedLine == 1) {
// ".." folder
signalFolderValidate.emit("..");
} else if( m_selectedLine-offset >= 0
&& m_selectedLine-offset < (int32_t)m_list.size()) {
if(etk::path::isDirectory(m_list[m_selectedLine-offset])) {
signalFolderSelect.emit(m_list[m_selectedLine-offset].getFileName());
} else if ( *propertyShowFolder == true
&& m_selectedLine == 1) {
// ".." folder
if (_event.getStatus() == gale::key::status::pressSingle) {
signalFolderSelect.emit(propertyPath->getParent());
} else {
signalFolderValidate.emit(propertyPath->getParent());
}
} else if( m_selectedLine-offset >= 0
&& m_selectedLine-offset < (int32_t)m_list.size() ) {
// generate event extern:
if(etk::path::isDirectory(m_list[m_selectedLine-offset])) {
if (_event.getStatus() == gale::key::status::pressSingle) {
signalFolderSelect.emit(m_list[m_selectedLine-offset]);
} else {
signalFileSelect.emit(m_list[m_selectedLine-offset].getFileName());
signalFolderValidate.emit(m_list[m_selectedLine-offset]);
}
} else {
if (_event.getStatus() == gale::key::status::pressSingle) {
signalFileSelect.emit(m_list[m_selectedLine-offset]);
} else {
signalFileValidate.emit(m_list[m_selectedLine-offset]);
}
}
}
@ -227,6 +230,7 @@ bool ewol::widget::ListFileSystem::onItemEvent(const ewol::event::Input& _event,
}
void ewol::widget::ListFileSystem::onChangePropertyPath() {
EWOL_WARNING("Change Path: " << *propertyPath << " selected File=" << *propertyFile);;
regenerateView();
}

View File

@ -301,7 +301,7 @@ bool ewol::widget::Menu::loadXML(const exml::Element& _node) {
etk::String widgetName = pNode.getValue();
EWOL_INFO("Get node : " << pNode);
if (widgetName == "elem") {
// <elem title="_T{Title of the button}" image="DATA:List.svg" event="menu:exit">
// <elem title="_T{Title of the button}" image="DATA:///List.svg" event="menu:exit">
int32_t idMenu = addTitle(pNode.attributes["title"], pNode.attributes["image"], pNode.attributes["event"]);
for (const auto nodeIt2 : pNode.nodes) {
@ -312,7 +312,7 @@ bool ewol::widget::Menu::loadXML(const exml::Element& _node) {
}
etk::String widgetName2 = pNode2.getValue();
if (widgetName2 == "elem") {
// <elem title="_T{Title of the button}" image="DATA:List.svg" event="menu:exit">
// <elem title="_T{Title of the button}" image="DATA:///List.svg" event="menu:exit">
add(idMenu, pNode2.attributes["title"], pNode2.attributes["image"], pNode2.attributes["event"]);
} else if (widgetName2 == "separator") {
addSpacer(idMenu);

View File

@ -17,7 +17,7 @@ static const char* annimationIncrease = "increase";
ewol::widget::PopUp::PopUp() :
propertyShape(this, "shaper",
etk::Uri("THEME_GUI://PopUp.json?lib=ewol"),
etk::Uri("THEME_GUI:///PopUp.json?lib=ewol"),
"The shaper properties",
&ewol::widget::PopUp::onChangePropertyShape),
propertyLockExpand(this, "lock",

View File

@ -18,11 +18,11 @@ ewol::widget::Scroll::Scroll() :
"Limit the scroll maximum position [0..1]% represent the free space in the scoll when arrive at the end",
&ewol::widget::Scroll::onChangePropertyLimit),
propertyShapeVert(this, "shape-vert",
etk::Uri("THEME_GUI://WidgetScrolled.json?lib=ewol"),
etk::Uri("THEME_GUI:///WidgetScrolled.json?lib=ewol"),
"shape for the vertical display",
&ewol::widget::Scroll::onChangePropertyShapeVert),
propertyShapeHori(this, "shape-hori",
etk::Uri("THEME_GUI://WidgetScrolled.json?lib=ewol"),
etk::Uri("THEME_GUI:///WidgetScrolled.json?lib=ewol"),
"shape for the horizonal display",
&ewol::widget::Scroll::onChangePropertyShapeHori),
propertyHover(this, "hover",

View File

@ -28,7 +28,7 @@ ewol::widget::Select::Select() :
&ewol::widget::Select::onChangePropertyValue) {
addObjectType("ewol::widget::Select");
// override the basic parameter:
propertyShape.setDirectCheck(etk::Uri("THEME_GUI://Select.json?lib=ewol"));
propertyShape.setDirectCheck(etk::Uri("THEME_GUI:///Select.json?lib=ewol"));
propertySpinMode.setDirect(ewol::widget::spinPosition_noneRight);
propertySpinMode.changeDefault(ewol::widget::spinPosition_noneRight);
propertySpinMode.rename("none-none", "none");

View File

@ -38,7 +38,7 @@ ewol::widget::Spin::Spin() :
"fix-point mantis",
&ewol::widget::Spin::onChangePropertyMantis) {
addObjectType("ewol::widget::Spin");
propertyShape.setDirectCheck(etk::Uri("THEME_GUI://Spin.json?lib=ewol"));
propertyShape.setDirectCheck(etk::Uri("THEME_GUI:///Spin.json?lib=ewol"));
}
ewol::widget::Spin::~Spin() {

View File

@ -17,7 +17,7 @@ ETK_DECLARE_TYPE(ewol::widget::TreeView);
ewol::widget::TreeView::TreeView():
ewol::widget::List(),
propertyOffsetTreeView(this, "offsetTreeView",
30,
15,
"Offset indentation for each node",
&ewol::widget::TreeView::onChangePropertyOffsetTreeView),
propertyIconTreeViewSize(this, "iconTreeViewSize",
@ -34,6 +34,8 @@ ewol::widget::TreeView::TreeView():
void ewol::widget::TreeView::init() {
ewol::widget::List::init();
propertyFill.set(bvec2(true,false));
addComposeElemnent("image_ChevronRight", ememory::makeShared<ewol::compositing::Image>("THEME_GUI:///ChevronRight.svg?lib=ewol"));
addComposeElemnent("image_ChevronMore", ememory::makeShared<ewol::compositing::Image>("THEME_GUI:///ChevronMore.svg?lib=ewol"));
}
ewol::widget::TreeView::~TreeView() {
@ -41,7 +43,7 @@ ewol::widget::TreeView::~TreeView() {
}
vec2 ewol::widget::TreeView::calculateElementSize(const ivec2& _pos) {
ewol::compositing::Text tmpText;
auto tmpText = ememory::staticPointerCast<ewol::compositing::Text>(getComposeElemnent("text"));
etk::String myTextToWrite = getData(ListRole::Text, _pos).getSafeString();
float_t treeOffset = 0;
if (_pos.x() == 0) {
@ -65,9 +67,9 @@ vec2 ewol::widget::TreeView::calculateElementSize(const ivec2& _pos) {
}
vec3 textSize;
if (propertyTextIsDecorated.get() == true) {
textSize = tmpText.calculateSizeDecorated(myTextToWrite);
textSize = tmpText->calculateSizeDecorated(myTextToWrite);
} else {
textSize = tmpText.calculateSize(myTextToWrite);
textSize = tmpText->calculateSize(myTextToWrite);
}
ivec2 count = getMatrixSize();
return vec2(textSize.x() + treeOffset + iconSize,
@ -87,14 +89,13 @@ void ewol::widget::TreeView::drawElement(const ivec2& _pos, const vec2& _start,
iconName = getData(ListRole::Icon, _pos).getSafeString();
bool haveChild = getData(ListRole::HaveChild, _pos).getSafeBoolean();
if (haveChild == true) {
ewol::compositing::Image * tmpImage = null;
ememory::SharedPtr<ewol::compositing::Image> tmpImage = null;
if ( getData(ListRole::IsExpand, _pos).getSafeBoolean() == false) {
tmpImage = ETK_NEW(ewol::compositing::Image, "{ewol}THEME:GUI:ChevronRight.svg");
tmpImage = ememory::staticPointerCast<ewol::compositing::Image>(getComposeElemnent("image_ChevronRight"));
} else {
tmpImage = ETK_NEW(ewol::compositing::Image, "{ewol}THEME:GUI:ChevronMore.svg");
tmpImage = ememory::staticPointerCast<ewol::compositing::Image>(getComposeElemnent("image_ChevronMore"));
}
if (tmpImage != null) {
addOObject(tmpImage);
tmpImage->setColor(fg);
tmpImage->setPos(posStart);
tmpImage->print(vec2(propertyIconTreeViewSize.get(), propertyIconTreeViewSize.get()));
@ -108,9 +109,8 @@ void ewol::widget::TreeView::drawElement(const ivec2& _pos, const vec2& _start,
auto backgroundVariant = getData(ListRole::BgColor, _pos);
if (backgroundVariant.isColor() == true) {
etk::Color<> bg = backgroundVariant.getColor();
ewol::compositing::Drawing * BGOObjects = ETK_NEW(ewol::compositing::Drawing);
auto BGOObjects = ememory::staticPointerCast<ewol::compositing::Drawing>(getComposeElemnent("drawing"));
if (BGOObjects != null) {
addOObject(BGOObjects);
BGOObjects->setColor(bg);
BGOObjects->setPos(_start);
BGOObjects->rectangleWidth(_size);
@ -118,20 +118,20 @@ void ewol::widget::TreeView::drawElement(const ivec2& _pos, const vec2& _start,
}
posStart += vec2(m_paddingSizeX, m_paddingSizeY);
if (iconName != "") {
ewol::compositing::Image * tmpImage = ETK_NEW(ewol::compositing::Image, iconName);
auto tmpImage = ememory::staticPointerCast<ewol::compositing::Image>(getComposeElemnent(iconName));
if (tmpImage != null) {
addOObject(tmpImage);
tmpImage->setColor(fg);
tmpImage->setPos(posStart);
tmpImage->print(vec2(propertyIconTreeViewSize.get(), propertyIconTreeViewSize.get()));
} else {
EWOL_ERROR("can not get : " << iconName );
}
// move right
posStart.setX(posStart.x() + propertyIconTreeViewSize.get());
}
if (myTextToWrite != "") {
ewol::compositing::Text * tmpText = ETK_NEW(ewol::compositing::Text);
auto tmpText = ememory::staticPointerCast<ewol::compositing::Text>(getComposeElemnent("text"));
if (tmpText != null) {
addOObject(tmpText);
tmpText->setColor(fg);
tmpText->setPos(posStart);
if (propertyTextIsDecorated.get() == true) {

View File

@ -15,11 +15,11 @@ ETK_DECLARE_TYPE(ewol::widget::WidgetScrolled);
ewol::widget::WidgetScrolled::WidgetScrolled() :
propertyShapeVert(this, "shape-vert",
etk::Uri("THEME_GUI://WidgetScrolled.json?lib=ewol"),
etk::Uri("THEME_GUI:///WidgetScrolled.json?lib=ewol"),
"shape for the vertical display",
&ewol::widget::WidgetScrolled::onChangePropertyShapeVert),
propertyShapeHori(this, "shape-hori",
etk::Uri("THEME_GUI://WidgetScrolled.json?lib=ewol"),
etk::Uri("THEME_GUI:///WidgetScrolled.json?lib=ewol"),
"shape for the horizonal display",
&ewol::widget::WidgetScrolled::onChangePropertyShapeHori),
m_shaperH(),

View File

@ -20,7 +20,7 @@ ETK_DECLARE_TYPE(ewol::widget::Windows);
ewol::widget::Windows::Windows() :
propertyColorConfiguration(this,
"file-color",
etk::Uri("THEME_COLOR://Windows.json?lib=ewol"),
etk::Uri("THEME_COLOR:///Windows.json?lib=ewol"),
"File color of the Windows",
&ewol::widget::Windows::onChangePropertyColor),
propertyTitle(this,

View File

@ -59,7 +59,7 @@ ewol::widget::FileChooser::FileChooser() :
void ewol::widget::FileChooser::init() {
ewol::widget::Composer::init();
// Load file with replacing the "{ID}" with the local ID of the widget ==> obtain unique ID
loadFromFile("{ewol}DATA:ewol-gui-file-chooser.xml", getId());
loadFromFile("DATA:///ewol-gui-file-chooser.xml?lib=ewol", getId());
// Basic replacement of labels
propertySetOnWidgetNamed("[" + etk::toString(getId()) + "]file-shooser:title-label", "value", propertyLabelTitle);
propertySetOnWidgetNamed("[" + etk::toString(getId()) + "]file-shooser:validate-label", "value", propertyLabelValidate);
@ -96,7 +96,7 @@ void ewol::widget::FileChooser::onChangePropertyPath() {
}
void ewol::widget::FileChooser::onChangePropertyFile() {
propertySetOnWidgetNamed("[" + etk::toString(getId()) + "]file-shooser:entry-file", "value", propertyFile.getString());
propertySetOnWidgetNamed("[" + etk::toString(getId()) + "]file-shooser:entry-file", "value", propertyFile->getFileName());
//updateCurrentFolder();
}
@ -142,8 +142,8 @@ void ewol::widget::FileChooser::onCallbackHidenFileChangeChangeValue(const bool&
void ewol::widget::FileChooser::onCallbackListFolderSelectChange(const etk::Path& _value) {
// == > this is an internal event ...
EWOL_DEBUG(" old PATH: '" << *propertyPath << "' + '" << _value << "'");
propertyPath.setDirect(*propertyPath / _value);
EWOL_DEBUG(" old PATH: '" << *propertyPath << "' ==> '" << _value << "'");
propertyPath.setDirect(_value);
EWOL_DEBUG("new PATH: '" << *propertyPath << "'");
propertyFile.setDirect("");
updateCurrentFolder();
@ -161,8 +161,8 @@ void ewol::widget::FileChooser::onCallbackListFileSelectChange(const etk::Path&
void ewol::widget::FileChooser::onCallbackListFileValidate(const etk::Path& _value) {
// select the file == > generate a validate
propertyFile.set(_value);
EWOL_VERBOSE(" generate a fiel opening : '" << propertyPath << "' / '" << propertyFile << "'");
signalValidate.emit(getCompleateFileName());
EWOL_VERBOSE(" generate a fiel opening : '" << propertyFile << "'");
signalValidate.emit(_value);
autoDestroy();
}
@ -172,11 +172,11 @@ void ewol::widget::FileChooser::onCallbackEntryFileChangeValidate(const etk::Str
void ewol::widget::FileChooser::onCallbackListValidate() {
if (propertyFile.get() == "") {
EWOL_WARNING(" Validate : '" << propertyPath << "' / '" << propertyFile << "' ==> error No name ...");
EWOL_WARNING(" Validate : '" << *propertyFile << "' ==> error No name ...");
return;
}
EWOL_DEBUG(" generate a file opening : '" << propertyPath << "' / '" << propertyFile << "'");
signalValidate.emit(getCompleateFileName());
EWOL_DEBUG(" generate a file opening : '" << *propertyFile << "'");
signalValidate.emit(*propertyFile);
autoDestroy();
}
@ -195,7 +195,3 @@ void ewol::widget::FileChooser::updateCurrentFolder() {
propertySetOnWidgetNamed("[" + etk::toString(getId()) + "]file-shooser:entry-folder", "value", propertyPath.getString());
markToRedraw();
}
etk::Path ewol::widget::FileChooser::getCompleateFileName() {
return *propertyPath / *propertyFile;
}

View File

@ -80,7 +80,6 @@ namespace ewol {
DECLARE_WIDGET_FACTORY(FileChooser, "FileChooser");
virtual ~FileChooser();
private:
etk::Path getCompleateFileName();
void updateCurrentFolder();
public:
void onGetFocus() override;

View File

@ -74,7 +74,7 @@ void ewol::widget::Parameter::init() {
} else {
tmpButton->setSubWidget(ewol::widget::composerGenerateString(
"<sizer mode='hori'>\n"
" <image src='{ewol}THEME:GUI:Save.svg' expand='true' size='8,8mm'/>\n"
" <image src='THEME_GUI:///Save.svg?lib=ewol' expand='true' size='8,8mm'/>\n"
" <label>_T{Save}</label>\n"
"</sizer>\n"));
tmpButton->signalPressed.connect(sharedFromThis(), &ewol::widget::Parameter::onCallbackParameterSave);
@ -96,7 +96,7 @@ void ewol::widget::Parameter::init() {
} else {
tmpButton->setSubWidget(ewol::widget::composerGenerateString(
"<sizer mode='hori'>\n"
" <image src='{ewol}THEME:GUI:Remove.svg' expand='true' size='8,8mm'/>\n"
" <image src='THEME_GUI:///Remove.svg?lib=ewol' expand='true' size='8,8mm'/>\n"
" <label>_T{Close}</label>\n"
"</sizer>\n"));
tmpButton->signalPressed.connect(sharedFromThis(), &ewol::widget::Parameter::onCallbackMenuclosed);

View File

@ -82,13 +82,13 @@ fluorine::Variant appl::widget::BasicTree::getData(int32_t _role, const ivec2& _
return value.m_isExpand;
case ewol::widget::ListRole::Icon:
if (elem->countToRoot() == 0) {
return "{ewol}THEME:GUI:Home.svg";
return "THEME_GUI:///Home.svg?lib=ewol";
}
if (elem->countToRoot() == 1) {
return "{ewol}THEME:GUI:Folder.svg";
return "THEME_GUI:///Folder.svg?lib=ewol";
}
if (elem->countToRoot() == 2) {
return "{ewol}THEME:GUI:File.svg";
return "THEME_GUI:///File.svg?lib=ewol";
}
return "";
case ewol::widget::ListRole::FgColor:

View File

@ -17,7 +17,7 @@ appl::WidgetDisplay::WidgetDisplay() {
void appl::WidgetDisplay::init() {
ewol::Widget::init();
m_compositing.setSource("DATA:SnowFlake.svg", ivec2(128,128));
m_compositing.setSource("DATA:///SnowFlake.svg", ivec2(128,128));
getObjectManager().periodicCall.connect(sharedFromThis(), &appl::WidgetDisplay::periodicCall);
for (int32_t iii=0; iii<250 ; ++iii) {
m_elements.pushBack(appl::WidgetDisplay::Element());

View File

@ -38,7 +38,7 @@ void appl::MainWindows::init() {
propertyFill.set(bvec2(true, true));
propertyExpand.set(bvec2(true, true));
m_composer = ewol::widget::Composer::create();
m_composer->loadFromFile("DATA:gui.xml");
m_composer->loadFromFile("DATA:///gui.xml");
setSubWidget(m_composer);
externSubBind(m_composer, ewol::widget::Button, "appl-past", signalPressed, sharedFromThis(), &appl::MainWindows::onCallbackPast);
externSubBind(m_composer, ewol::widget::Button, "appl-copy", signalPressed, sharedFromThis(), &appl::MainWindows::onCallbackCopy);

View File

@ -45,7 +45,7 @@ namespace appl {
#endif
// set the application icon ...
_context.setIcon("DATA:icon.png");
_context.setIcon("DATA:///icon.png");
appl::widget::SizerColor::createManagerWidget(_context.getWidgetManager());

View File

@ -8,6 +8,8 @@
#include <appl/debug.hpp>
#include <appl/MainWindows.hpp>
#include <etk/theme/theme.hpp>
#include <ewol/widget/Button.hpp>
#include <ewol/widget/CheckBox.hpp>
#include <ewol/widget/Sizer.hpp>
@ -25,7 +27,6 @@
#include <ewol/widget/Spin.hpp>
#include <ewol/context/Context.hpp>
#include <appl/TestDistanceField.hpp>
#include <etk/os/FSNode.hpp>
#include <eproperty/Value.hpp>
appl::MainWindows::MainWindows() :
@ -43,7 +44,7 @@ void appl::MainWindows::init() {
APPL_WARNING("plop " << ETK_GET_TYPE_NAME(double));
APPL_WARNING("plop " << ETK_GET_TYPE_NAME(uint32_t));
m_composer = ewol::widget::Composer::create();
m_composer->loadFromFile("DATA:gui.xml");
m_composer->loadFromFile("DATA:///gui.xml");
setSubWidget(m_composer);
externSubBind(m_composer, ewol::widget::Button, "appl-theme-toggle", signalValue, sharedFromThis(), &appl::MainWindows::onCallbackThemeChange);
externSubBind(m_composer, ewol::widget::Button, "appl-previous-widget", signalPressed, sharedFromThis(), &appl::MainWindows::onCallbackWidgetChange, -1);
@ -128,7 +129,7 @@ void appl::MainWindows::onCallbackWidgetChange(int32_t _increment) {
etk::String tmpConstruct;
switch(m_idWidget) {
case 0:
tmpConstruct = "<image src='DATA:sphere.png'/>\n";
tmpConstruct = "<image src='DATA:///sphere.png'/>\n";
tmpDescription = "Test ewol::widget::Image";
break;
case 1:

View File

@ -5,8 +5,7 @@
*/
#include <etk/types.hpp>
#include <etk/types.hpp>
#include <etk/os/FSNode.hpp>
#include <etk/theme/theme.hpp>
#include <ewol/ewol.hpp>
#include <ewol/object/Object.hpp>
#include <ewol/context/Context.hpp>
@ -45,7 +44,7 @@ namespace appl {
#endif
// set the application icon ...
_context.setIcon("DATA:icon.png");
_context.setIcon("DATA:///icon.png");
appl::widget::SizerColor::createManagerWidget(_context.getWidgetManager());