[DEV] change idea std::u32string to std::string

This commit is contained in:
Edouard DUPIN 2013-11-12 21:58:13 +01:00
parent 410db2d5e0
commit aff6c5fd38
126 changed files with 607 additions and 622 deletions

2
external/egami vendored

@ -1 +1 @@
Subproject commit 1ab4e02e492599ec77c3452cfe6a2e97188a40c8
Subproject commit e2d2e514682f72cb35916d00048b2ccc460dd2c8

2
external/ejson vendored

@ -1 +1 @@
Subproject commit 43ddd2549c0638d3463be37d8f0c651437de7d7b
Subproject commit d24b545ba958fa34383020c68f3d7502c3e11332

2
external/esvg vendored

@ -1 +1 @@
Subproject commit 32b1966f8d42e374eaa8f2d5d9cae5d4f5d1db8b
Subproject commit 03efb063226894138e097b8456a194b9cf2fb13b

2
external/etk vendored

@ -1 +1 @@
Subproject commit b83c99e37152351adfd259d54281391256b6baf9
Subproject commit c8dc0b010030a0b04f8f3134df972bb9ad6d89df

2
external/exml vendored

@ -1 +1 @@
Subproject commit 23258089971f05411b725a24a8806dcd51e86754
Subproject commit 4d02dd677e3de90a3d4bb8b808e420798a8c7bd1

View File

@ -85,34 +85,34 @@ ewol::Dimension::Dimension(const vec2& _size, enum ewol::Dimension::distance _ty
set(_size, _type);
}
void ewol::Dimension::set(etk::UString _config) {
void ewol::Dimension::set(std::string _config) {
m_data.setValue(0,0);
m_type = ewol::Dimension::Pixel;
enum distance type = ewol::Dimension::Pixel;
if (_config.endWith("%",false) == true) {
if (end_with(_config, "%", false) == true) {
type = ewol::Dimension::Pourcent;
_config.remove(_config.size()-1, 1);
} else if (_config.endWith("px",false) == true) {
_config.erase(_config.size()-1, 1);
} else if (end_with(_config, "px",false) == true) {
type = ewol::Dimension::Pixel;
_config.remove(_config.size()-2, 2);
} else if (_config.endWith("ft",false) == true) {
_config.erase(_config.size()-2, 2);
} else if (end_with(_config, "ft",false) == true) {
type = ewol::Dimension::foot;
_config.remove(_config.size()-2, 2);
} else if (_config.endWith("in",false) == true) {
_config.erase(_config.size()-2, 2);
} else if (end_with(_config, "in",false) == true) {
type = ewol::Dimension::Inch;
_config.remove(_config.size()-2, 2);
} else if (_config.endWith("km",false) == true) {
_config.erase(_config.size()-2, 2);
} else if (end_with(_config, "km",false) == true) {
type = ewol::Dimension::Kilometer;
_config.remove(_config.size()-2, 2);
} else if (_config.endWith("mm",false) == true) {
_config.erase(_config.size()-2, 2);
} else if (end_with(_config, "mm",false) == true) {
type = ewol::Dimension::Millimeter;
_config.remove(_config.size()-2, 2);
} else if (_config.endWith("cm",false) == true) {
_config.erase(_config.size()-2, 2);
} else if (end_with(_config, "cm",false) == true) {
type = ewol::Dimension::Centimeter;
_config.remove(_config.size()-2, 2);
} else if (_config.endWith("m",false) == true) {
_config.erase(_config.size()-2, 2);
} else if (end_with(_config, "m",false) == true) {
type = ewol::Dimension::Meter;
_config.remove(_config.size()-1, 1);
_config.erase(_config.size()-1, 1);
} else {
EWOL_CRITICAL("Can not parse dimention : \"" << _config << "\"");
return;
@ -126,8 +126,8 @@ ewol::Dimension::~Dimension(void) {
// nothing to do ...
}
ewol::Dimension::operator etk::UString(void) const {
etk::UString str;
ewol::Dimension::operator std::string(void) const {
std::string str;
str = get(getType());
switch(getType()) {

View File

@ -48,7 +48,7 @@ namespace ewol {
* @brief Constructor
* @param[in] _config dimension configuration.
*/
Dimension(const etk::UString& _config) :
Dimension(const std::string& _config) :
m_data(0,0),
m_type(ewol::Dimension::Pixel) {
set(_config);
@ -70,7 +70,7 @@ namespace ewol {
/**
* @brief string cast :
*/
operator etk::UString(void) const;
operator std::string(void) const;
/**
* @brief get the current dimention in requested type
@ -90,7 +90,7 @@ namespace ewol {
* @brief set the current dimention in requested type
* @param[in] _config dimension configuration.
*/
void set(etk::UString _config);
void set(std::string _config);
public:
/**
* @brief get the current dimention in pixel

View File

@ -27,7 +27,7 @@ ewol::Light::~Light(void) {
}
void ewol::Light::link(ewol::Program* _prog, const etk::UString& _baseName) {
void ewol::Light::link(ewol::Program* _prog, const std::string& _baseName) {
if (NULL == _prog) {
return;
}

View File

@ -33,7 +33,7 @@ namespace ewol {
public:
Light(void);
~Light(void);
void link(ewol::Program* _prog, const etk::UString& _baseName);
void link(ewol::Program* _prog, const std::string& _baseName);
void draw(ewol::Program* _prog);
void setDirection(const vec3& val) {
m_direction = val;

View File

@ -20,7 +20,7 @@ ewol::MaterialGlId::MaterialGlId(void) :
}
void ewol::MaterialGlId::link(ewol::Program* _prog, const etk::UString& _baseName) {
void ewol::MaterialGlId::link(ewol::Program* _prog, const std::string& _baseName) {
if (NULL == _prog) {
return;
}
@ -55,7 +55,7 @@ void ewol::Material::draw(ewol::Program* _prog, const MaterialGlId& _glID) {
}
}
void ewol::Material::setTexture0(const etk::UString& _filename) {
void ewol::Material::setTexture0(const std::string& _filename) {
ivec2 tmpSize(256, 256);
// prevent overloard error :
ewol::TextureFile* tmpCopy = m_texture0;

View File

@ -25,7 +25,7 @@ namespace ewol {
int32_t m_GL_shininess;
int32_t m_GL_texture0;
MaterialGlId(void);
void link(ewol::Program* _prog, const etk::UString& _baseName);
void link(ewol::Program* _prog, const std::string& _baseName);
};
class Material {
private:
@ -53,7 +53,7 @@ namespace ewol {
void setShininess(float _val) {
m_shininess = _val;
}
void setTexture0(const etk::UString& _filename);
void setTexture0(const std::string& _filename);
void setImageSize(const ivec2& _newSize) { if (m_texture0 == NULL){return;} m_texture0->setImageSize(_newSize); };
// get the reference on this image to draw nomething on it ...

View File

@ -23,7 +23,7 @@ note: la copy dans le :
10 : bouton du milieux
*/
//!< Local copy of the clipboards
static etk::UString mesCopy[ewol::clipBoard::clipboardCount];
static std::string mesCopy[ewol::clipBoard::clipboardCount];
static const char* clipboardDescriptionString[ewol::clipBoard::clipboardCount+1] = {
"clipboard0",
@ -67,7 +67,7 @@ void ewol::clipBoard::unInit(void) {
}
void ewol::clipBoard::set(enum ewol::clipBoard::clipboardListe _clipboardID, const etk::UString& _data) {
void ewol::clipBoard::set(enum ewol::clipBoard::clipboardListe _clipboardID, const std::string& _data) {
// check if ID is correct
if(0 == _data.size()) {
EWOL_INFO("request a copy of nothing");
@ -107,7 +107,7 @@ void ewol::clipBoard::request(enum ewol::clipBoard::clipboardListe _clipboardID)
}
void ewol::clipBoard::setSystem(enum ewol::clipBoard::clipboardListe _clipboardID, const etk::UString& _data) {
void ewol::clipBoard::setSystem(enum ewol::clipBoard::clipboardListe _clipboardID, const std::string& _data) {
if(_clipboardID >= ewol::clipBoard::clipboardCount) {
EWOL_WARNING("request ClickBoard id error");
return;
@ -117,8 +117,8 @@ void ewol::clipBoard::setSystem(enum ewol::clipBoard::clipboardListe _clipboardI
}
const etk::UString& ewol::clipBoard::get(enum ewol::clipBoard::clipboardListe _clipboardID) {
static const etk::UString emptyString("");
const std::string& ewol::clipBoard::get(enum ewol::clipBoard::clipboardListe _clipboardID) {
static const std::string emptyString("");
if(_clipboardID >= ewol::clipBoard::clipboardCount) {
EWOL_WARNING("request ClickBoard id error");
return emptyString;

View File

@ -42,7 +42,7 @@ namespace ewol {
* @param[in] _clipboardID Select the specific ID of the clipboard
* @param[in] _data The string that might be send to the clipboard
*/
void set(enum ewol::clipBoard::clipboardListe _clipboardID, const etk::UString& _data);
void set(enum ewol::clipBoard::clipboardListe _clipboardID, const std::string& _data);
/**
* @brief Call system to request the current clipboard.
* @note Due to some system that manage the clipboard request asynchronous (like X11) and ewol managing the system with only one thread,
@ -57,7 +57,7 @@ namespace ewol {
* @param[in] _clipboardID selected clipboard ID
* @param[in] _data new buffer data
*/
void setSystem(enum ewol::clipBoard::clipboardListe _clipboardID,const etk::UString& _data);
void setSystem(enum ewol::clipBoard::clipboardListe _clipboardID,const std::string& _data);
/**
* @brief get the ewol internal buffer of the curent clipboard. The end user can use it when he receive the event in
* the widget : @ref onEventClipboard == > we can nothe this function is the only one which permit it.
@ -65,7 +65,7 @@ namespace ewol {
* @param[in] _clipboardID selected clipboard ID
* @return the requested buffer
*/
const etk::UString& get(enum ewol::clipBoard::clipboardListe _clipboardID);
const std::string& get(enum ewol::clipBoard::clipboardListe _clipboardID);
// internal section

View File

@ -17,25 +17,23 @@ void ewol::CommandLine::parse(int32_t _argc, const char* _argv[]) {
}
}
esize_t ewol::CommandLine::size(void) {
return m_listArgs.size();
}
const etk::UString& ewol::CommandLine::get(int32_t _id) {
static const etk::UString errorArg("");
const std::string& ewol::CommandLine::get(int32_t _id) {
static const std::string errorArg("");
if (_id<0 && _id >= m_listArgs.size()) {
return errorArg;
}
return m_listArgs[_id];
}
void ewol::CommandLine::add(const etk::UString& _newElement) {
void ewol::CommandLine::add(const std::string& _newElement) {
m_listArgs.push_back(_newElement);
}
void ewol::CommandLine::remove(esize_t _id) {
m_listArgs.remove(_id);
m_listArgs.erase(m_listArgs.begin()+_id);
}

View File

@ -15,7 +15,7 @@
namespace ewol {
class CommandLine {
private:
std::vector<etk::UString> m_listArgs; //!< list of all argument parsed
std::vector<std::string> m_listArgs; //!< list of all argument parsed
public:
/**
* @brief Parse the command line parameters
@ -30,12 +30,12 @@ namespace ewol {
* @brief get an element with a specific ID
* @return _id The cmdLine Id element
*/
const etk::UString& get(int32_t _id);
const std::string& get(int32_t _id);
/**
* @brief add one element at the Command line
* @param[in] _newElement String in the input that might be added.
*/
void add(const etk::UString& _newElement);
void add(const std::string& _newElement);
/**
* @brief remove an element
* @param[in] _id Id of the element

View File

@ -12,7 +12,7 @@
#undef __class__
#define __class__ "ewol::Image"
ewol::Image::Image(const etk::UString& _imageName) :
ewol::Image::Image(const std::string& _imageName) :
m_position(0.0, 0.0, 0.0),
m_clippingPosStart(0.0, 0.0, 0.0),
m_clippingPosStop(0.0, 0.0, 0.0),
@ -226,7 +226,7 @@ void ewol::Image::printPart(const vec2& _size,
m_coordColor.push_back(m_color);
}
void ewol::Image::setSource(const etk::UString& _newFile, const vec2& _size) {
void ewol::Image::setSource(const std::string& _newFile, const vec2& _size) {
clear();
// remove old one
ewol::TextureFile::release(m_resource);

View File

@ -45,7 +45,7 @@ namespace ewol {
* @brief generic constructor
* @param[in] _imageName Name of the file that might be loaded
*/
Image(const etk::UString& _imageName="");
Image(const std::string& _imageName="");
/**
* @brief generic destructor
*/
@ -126,8 +126,8 @@ namespace ewol {
* @param[in] _newFile New file of the Image
* @param[in] _size for the image when Verctorial image loading is requested
*/
void setSource(const etk::UString& _newFile, int32_t _size=32) { setSource(_newFile, vec2(_size,_size)); };
void setSource(const etk::UString& _newFile, const vec2& _size);
void setSource(const std::string& _newFile, int32_t _size=32) { setSource(_newFile, vec2(_size,_size)); };
void setSource(const std::string& _newFile, const vec2& _size);
/**
* @brief Sometimes the user declare an image but not allocate the ressources all the time, this is to know it ..
* @return the validity od the resources.

View File

@ -13,7 +13,7 @@
#undef __class__
#define __class__ "ewol::Shaper"
ewol::Shaper::Shaper(const etk::UString& _shaperName) :
ewol::Shaper::Shaper(const std::string& _shaperName) :
m_name(_shaperName),
m_config(NULL),
m_confIdPaddingX(-1),
@ -65,11 +65,11 @@ void ewol::Shaper::loadProgram(void) {
m_confProgramFile = m_config->request("program");
m_confImageFile = m_config->request("image");
}
etk::UString basicShaderFile = m_config->getString(m_confProgramFile);
std::string basicShaderFile = m_config->getString(m_confProgramFile);
if (basicShaderFile!="") {
// get the relative position of the current file ...
etk::FSNode file(m_name);
etk::UString tmpFilename = file.getRelativeFolder() + basicShaderFile;
std::string tmpFilename = file.getRelativeFolder() + basicShaderFile;
EWOL_DEBUG("Shaper try load shader : " << tmpFilename << " with base : " << basicShaderFile);
// get the shader resource :
m_GLPosition = 0;
@ -89,7 +89,7 @@ void ewol::Shaper::loadProgram(void) {
// for the texture ID :
m_GLtexID = m_GLprogram->getUniform("EW_texID");
}
etk::UString basicImageFile = m_config->getString(m_confImageFile);
std::string basicImageFile = m_config->getString(m_confImageFile);
if (basicImageFile != "") {
tmpFilename = file.getRelativeFolder() + basicImageFile;
ivec2 size(64,64);
@ -234,7 +234,7 @@ vec2 ewol::Shaper::getPadding(void) {
return padding;
}
void ewol::Shaper::setSource(const etk::UString& _newFile) {
void ewol::Shaper::setSource(const std::string& _newFile) {
clear();
unLoadProgram();
m_name = _newFile;

View File

@ -22,7 +22,7 @@ namespace ewol {
// TODO : Abstaraction between states (call by name and the system greate IDs
class Shaper : public ewol::Compositing {
private:
etk::UString m_name; //!< Name of the configuration of the shaper.
std::string m_name; //!< Name of the configuration of the shaper.
// External theme config:
ewol::ConfigFile* m_config; //!< pointer on the config file resources
int32_t m_confIdPaddingX; //!< ConfigFile padding property X
@ -68,7 +68,7 @@ namespace ewol {
* @brief generic constructor
* @param[in] _shaperName Name of the file that might be loaded
*/
Shaper(const etk::UString& _shaperName="");
Shaper(const std::string& _shaperName="");
/**
* @brief generic destructor
*/
@ -140,12 +140,12 @@ namespace ewol {
* @brief change the shaper Source
* @param[in] _newFile New file of the shaper
*/
void setSource(const etk::UString& _newFile);
void setSource(const std::string& _newFile);
/**
* @brief get the shaper file Source
* @return the shapper file name
*/
const etk::UString& getSource(void) const { return m_name; };
const std::string& getSource(void) const { return m_name; };
/**
* @brief Sometimes the user declare an image but not allocate the ressources all the time, this is to know it ..
* @return the validity od the resources.

View File

@ -12,7 +12,7 @@
#undef __class__
#define __class__ "ewol::Sprite"
ewol::Sprite::Sprite(const etk::UString& _imageName, const ivec2& _nbSprite) :
ewol::Sprite::Sprite(const std::string& _imageName, const ivec2& _nbSprite) :
ewol::Image(_imageName),
m_nbSprite(_nbSprite),
m_unitarySpriteSize(0,0) {

View File

@ -19,7 +19,7 @@ namespace ewol {
ivec2 m_nbSprite; //!< number of sprite in vertical and horizontal
vec2 m_unitarySpriteSize; //!< size of a unique sprite
public:
Sprite(const etk::UString& _imageName, const ivec2& _nbSprite);
Sprite(const std::string& _imageName, const ivec2& _nbSprite);
virtual ~Sprite() {};
void printSprite(const ivec2& _spriteID, const vec2& _size) { printSprite(_spriteID, vec3(_size.x(), _size.y(),0)); };
void printSprite(const ivec2& _spriteID, const vec3& _size);

View File

@ -14,7 +14,7 @@
#define __class__ "ewol::Text"
ewol::Text::Text(const etk::UString& _fontName, int32_t _fontSize) :
ewol::Text::Text(const std::string& _fontName, int32_t _fontSize) :
m_position(0.0, 0.0, 0.0),
m_clippingPosStart(0.0, 0.0, 0.0),
m_clippingPosStop(0.0, 0.0, 0.0),
@ -266,17 +266,17 @@ void ewol::Text::setClippingMode(bool _newMode) {
void ewol::Text::setFontSize(int32_t _fontSize) {
// get old size
etk::UString fontName = "";
std::string fontName = "";
if (m_font != NULL) {
fontName = m_font->getName();
// Remove the :XX for the size ...
int32_t pos = fontName.findForward(':');
fontName.remove(pos, fontName.size()-pos);
size_t pos = fontName.rfind(':');
fontName.erase(pos, fontName.size()-pos);
}
setFont(fontName, _fontSize);
}
void ewol::Text::setFontName(const etk::UString& _fontName) {
void ewol::Text::setFontName(const std::string& _fontName) {
// get old size
int32_t fontSize = -1;
if (m_font != NULL) {
@ -285,7 +285,7 @@ void ewol::Text::setFontName(const etk::UString& _fontName) {
setFont(_fontName, fontSize);
}
void ewol::Text::setFont(etk::UString _fontName, int32_t _fontSize) {
void ewol::Text::setFont(std::string _fontName, int32_t _fontSize) {
clear();
// remove old one
ewol::TexturedFont * previousFont = m_font;
@ -362,7 +362,7 @@ void ewol::Text::setDistanceFieldMode(bool _newMode) {
EWOL_TODO("The Distance field mode is not availlable for now ...");
}
void ewol::Text::print(const etk::UString& _text) {
void ewol::Text::print(const std::string& _text) {
std::vector<TextDecoration> decorationEmpty;
print(_text, decorationEmpty);
}
@ -389,21 +389,21 @@ void ewol::Text::parseHtmlNode(exml::Element* _element) {
EWOL_ERROR("Cast error ...");
continue;
}
if(elem->getValue().compareNoCase("br") == true) {
if(compare_no_case(elem->getValue(), "br") == true) {
htmlFlush();
EWOL_VERBOSE("XML flush & newLine");
forceLineReturn();
} else if (elem->getValue().compareNoCase("font") == true) {
} else if (compare_no_case(elem->getValue(), "font") == true) {
EWOL_VERBOSE("XML Font ...");
TextDecoration tmpDeco = m_htmlDecoTmp;
etk::UString colorValue = elem->getAttribute("color");
std::string colorValue = elem->getAttribute("color");
m_htmlDecoTmp.m_colorFg = colorValue;
colorValue = elem->getAttribute("colorBg");
m_htmlDecoTmp.m_colorBg = colorValue;
parseHtmlNode(elem);
m_htmlDecoTmp = tmpDeco;
} else if( elem->getValue().compareNoCase("b") == true
|| elem->getValue().compareNoCase("bold") == true) {
} else if( compare_no_case(elem->getValue(), "b") == true
|| compare_no_case(elem->getValue(), "bold") == true) {
EWOL_VERBOSE("XML bold ...");
TextDecoration tmpDeco = m_htmlDecoTmp;
if (m_htmlDecoTmp.m_mode == ewol::font::Regular) {
@ -413,8 +413,8 @@ void ewol::Text::parseHtmlNode(exml::Element* _element) {
}
parseHtmlNode(elem);
m_htmlDecoTmp = tmpDeco;
} else if( elem->getValue().compareNoCase("i") == true
|| elem->getValue().compareNoCase("italic") == true) {
} else if( compare_no_case(elem->getValue(), "i") == true
|| compare_no_case(elem->getValue(), "italic") == true) {
EWOL_VERBOSE("XML italic ...");
TextDecoration tmpDeco = m_htmlDecoTmp;
if (m_htmlDecoTmp.m_mode == ewol::font::Regular) {
@ -424,34 +424,34 @@ void ewol::Text::parseHtmlNode(exml::Element* _element) {
}
parseHtmlNode(elem);
m_htmlDecoTmp = tmpDeco;
} else if( elem->getValue().compareNoCase("u") == true
|| elem->getValue().compareNoCase("underline") == true) {
} else if( compare_no_case(elem->getValue(), "u") == true
|| compare_no_case(elem->getValue(), "underline") == true) {
EWOL_VERBOSE("XML underline ...");
parseHtmlNode(elem);
} else if( elem->getValue().compareNoCase("p") == true
|| elem->getValue().compareNoCase("paragraph") == true) {
} else if( compare_no_case(elem->getValue(), "p") == true
|| compare_no_case(elem->getValue(), "paragraph") == true) {
EWOL_VERBOSE("XML paragraph ...");
htmlFlush();
m_alignement = ewol::Text::alignLeft;
forceLineReturn();
parseHtmlNode(elem);
forceLineReturn();
} else if (elem->getValue().compareNoCase("center") == true) {
} else if (compare_no_case(elem->getValue(), "center") == true) {
EWOL_VERBOSE("XML center ...");
htmlFlush();
m_alignement = ewol::Text::alignCenter;
parseHtmlNode(elem);
} else if (elem->getValue().compareNoCase("left") == true) {
} else if (compare_no_case(elem->getValue(), "left") == true) {
EWOL_VERBOSE("XML left ...");
htmlFlush();
m_alignement = ewol::Text::alignLeft;
parseHtmlNode(elem);
} else if (elem->getValue().compareNoCase("right") == true) {
} else if (compare_no_case(elem->getValue(), "right") == true) {
EWOL_VERBOSE("XML right ...");
htmlFlush();
m_alignement = ewol::Text::alignRight;
parseHtmlNode(elem);
} else if (elem->getValue().compareNoCase("justify") == true) {
} else if (compare_no_case(elem->getValue(), "justify") == true) {
EWOL_VERBOSE("XML justify ...");
htmlFlush();
m_alignement = ewol::Text::alignJustify;
@ -462,15 +462,15 @@ void ewol::Text::parseHtmlNode(exml::Element* _element) {
}
}
void ewol::Text::printDecorated(const etk::UString& _text) {
etk::UString tmpData("<html>\n<body>\n");
void ewol::Text::printDecorated(const std::string& _text) {
std::string tmpData("<html>\n<body>\n");
tmpData+=_text;
tmpData+="\n</body>\n</html>\n";
//EWOL_DEBUG("plop : " << tmpData);
printHTML(tmpData);
}
void ewol::Text::printHTML(const etk::UString& _text) {
void ewol::Text::printHTML(const std::string& _text) {
exml::Document doc;
// reset parameter :
@ -498,7 +498,7 @@ void ewol::Text::printHTML(const etk::UString& _text) {
htmlFlush();
}
void ewol::Text::print(const etk::UString& _text, const std::vector<TextDecoration>& _decoration) {
void ewol::Text::print(const std::string& _text, const std::vector<TextDecoration>& _decoration) {
if (m_font == NULL) {
EWOL_ERROR("Font Id is not corectly defined");
return;
@ -564,7 +564,7 @@ void ewol::Text::print(const etk::UString& _text, const std::vector<TextDecorati
if (m_stopTextPos < m_position.x()) {
forceLineReturn();
}
float basicSpaceWidth = calculateSize(etk::UChar(' ')).x();
float basicSpaceWidth = calculateSize(char32_t(' ')).x();
int32_t currentId = 0;
int32_t stop;
int32_t space;
@ -688,7 +688,7 @@ void ewol::Text::print(const etk::UString& _text, const std::vector<TextDecorati
}
void ewol::Text::print(const etk::UChar& _charcode) {
void ewol::Text::print(const char32_t& _charcode) {
if (NULL == m_font) {
EWOL_ERROR("Font Id is not corectly defined");
return;
@ -711,7 +711,7 @@ void ewol::Text::print(const etk::UChar& _charcode) {
}
}
// 0x01 == 0x20 == ' ';
if (_charcode.get() != 0x01) {
if (_charcode != 0x01) {
/* Bitmap position
* xA xB
* yC *------*
@ -881,7 +881,7 @@ void ewol::Text::disableAlignement(void) {
m_alignement = ewol::Text::alignDisable;
}
vec3 ewol::Text::calculateSizeHTML(const etk::UString& _text) {
vec3 ewol::Text::calculateSizeHTML(const std::string& _text) {
// remove intermediate result
reset();
//EWOL_DEBUG(" 0 size for=\n" << text);
@ -912,18 +912,18 @@ vec3 ewol::Text::calculateSizeHTML(const etk::UString& _text) {
m_sizeDisplayStop.z()-m_sizeDisplayStart.z());
}
vec3 ewol::Text::calculateSizeDecorated(const etk::UString& _text) {
vec3 ewol::Text::calculateSizeDecorated(const std::string& _text) {
if (_text.size() == 0) {
return vec3(0,0,0);
}
etk::UString tmpData("<html><body>\n");
std::string tmpData("<html><body>\n");
tmpData+=_text;
tmpData+="\n</body></html>\n";
vec3 tmpVal = calculateSizeHTML(tmpData);
return tmpVal;
}
vec3 ewol::Text::calculateSize(const etk::UString& _text) {
vec3 ewol::Text::calculateSize(const std::string& _text) {
if (m_font == NULL) {
EWOL_ERROR("Font Id is not corectly defined");
return vec3(0,0,0);
@ -939,7 +939,7 @@ vec3 ewol::Text::calculateSize(const etk::UString& _text) {
return outputSize;
}
vec3 ewol::Text::calculateSize(const etk::UChar& _charcode) {
vec3 ewol::Text::calculateSize(const char32_t& _charcode) {
if (m_font == NULL) {
EWOL_ERROR("Font Id is not corectly defined");
return vec3(0,0,0);
@ -975,13 +975,13 @@ void ewol::Text::printCursor(bool _isInsertMode) {
}
bool ewol::Text::extrapolateLastId(const etk::UString& _text,
bool ewol::Text::extrapolateLastId(const std::string& _text,
const int32_t _start,
int32_t& _stop,
int32_t& _space,
int32_t& _freeSpace) {
// store previous :
etk::UChar storePrevious = m_previousCharcode;
char32_t storePrevious = m_previousCharcode;
_stop = _text.size();
_space = 0;
@ -1038,7 +1038,7 @@ bool ewol::Text::extrapolateLastId(const etk::UString& _text,
}
}
void ewol::Text::htmlAddData(const etk::UString& _data) {
void ewol::Text::htmlAddData(const std::string& _data) {
if( m_htmlCurrrentLine.size()>0
&& m_htmlCurrrentLine[m_htmlCurrrentLine.size()-1] != ' ') {
m_htmlCurrrentLine+=" ";

View File

@ -67,7 +67,7 @@ namespace ewol {
enum ewol::font::mode m_mode; //!< font display property : Regular/Bold/Italic/BoldItalic
bool m_kerning; //!< Kerning enable or disable on the next elements displayed
bool m_distanceField; //!< Texture in distance Field mode == > maybe move this in the font property.
etk::UChar m_previousCharcode; //!< we remember the previous charcode to perform the kerning. @ref Kerning
char32_t m_previousCharcode; //!< we remember the previous charcode to perform the kerning. @ref Kerning
private:
float m_startTextpos; //!< start position of the Alignement (when \n the text return at this position)
float m_stopTextPos; //!< end of the alignement (when a string is too hight it cut at the word previously this virtual line and the center is perform with this one)
@ -99,7 +99,7 @@ namespace ewol {
* @param[in] _fontName Name of the font that might be loaded
* @param[in] _fontSize size of the font that might be loaded
*/
Text(const etk::UString& _fontName="", int32_t _fontSize=-1);
Text(const std::string& _fontName="", int32_t _fontSize=-1);
/**
* @brief generic destructor
*/
@ -193,13 +193,13 @@ namespace ewol {
* @brief Specify the font name (this reset the internal element of the current text (system requirement)
* @param[in] _fontName Current name of the selected font
*/
void setFontName(const etk::UString& _fontName);
void setFontName(const std::string& _fontName);
/**
* @brief Specify the font property (this reset the internal element of the current text (system requirement)
* @param[in] fontName Current name of the selected font
* @param[in] fontSize New font size
*/
void setFont(etk::UString _fontName, int32_t _fontSize);
void setFont(std::string _fontName, int32_t _fontSize);
/**
* @brief Specify the font mode for the next @ref print
* @param[in] mode The font mode requested
@ -235,7 +235,7 @@ namespace ewol {
* @brief display a compleat string in the current element.
* @param[in] _text The string to display.
*/
void print(const etk::UString& _text);
void print(const std::string& _text);
/**
* @brief display a compleat string in the current element with the generic decoration specification. (basic html data)
* <pre>
@ -263,7 +263,7 @@ namespace ewol {
* @param[in] _text The string to display.
* @TODO : implementation not done ....
*/
void printDecorated(const etk::UString& _text);
void printDecorated(const std::string& _text);
/**
* @brief display a compleat string in the current element with the generic decoration specification. (basic html data)
* <pre>
@ -295,18 +295,18 @@ namespace ewol {
* @param[in] _text The string to display.
* @TODO : implementation not done ....
*/
void printHTML(const etk::UString& _text);
void printHTML(const std::string& _text);
/**
* @brief display a compleat string in the current element whith specific decorations (advence mode).
* @param[in] _text The string to display.
* @param[in] _decoration The text decoration for the text that might be display (if the vector is smaller, the last parameter is get)
*/
void print(const etk::UString& _text, const std::vector<TextDecoration>& _decoration);
void print(const std::string& _text, const std::vector<TextDecoration>& _decoration);
/**
* @brief display the current char in the current element (note that the kerning is availlable if the position is not changed)
* @param[in] _charcode Char that might be dispalyed
*/
void print(const etk::UChar& _charcode);
void print(const char32_t& _charcode);
/**
* @brief This generate the line return == > it return to the alignement position start and at the correct line position ==> it might be use to not know the line height
*/
@ -340,25 +340,25 @@ namespace ewol {
* @param[in] _text The string to calculate dimention.
* @return The theoric size used.
*/
vec3 calculateSizeHTML(const etk::UString& _text);
vec3 calculateSizeHTML(const std::string& _text);
/**
* @brief calculate a theoric text size
* @param[in] _text The string to calculate dimention.
* @return The theoric size used.
*/
vec3 calculateSizeDecorated(const etk::UString& _text);
vec3 calculateSizeDecorated(const std::string& _text);
/**
* @brief calculate a theoric text size
* @param[in] _text The string to calculate dimention.
* @return The theoric size used.
*/
vec3 calculateSize(const etk::UString& _text);
vec3 calculateSize(const std::string& _text);
/**
* @brief calculate a theoric charcode size
* @param[in] _charcode The µUnicode value to calculate dimention.
* @return The theoric size used.
*/
vec3 calculateSize(const etk::UChar& _charcode);
vec3 calculateSize(const char32_t& _charcode);
/**
* @brief draw a cursor at the specify position
* @param[in] _isInsertMode True if the insert mode is activated
@ -375,17 +375,17 @@ namespace ewol {
* @parma[out] _freespace This represent the number of pixel present in the right white space.
* @return true if the rifht has free space that can be use for jystify (return false if we find \n
*/
bool extrapolateLastId(const etk::UString& _text, const int32_t _start, int32_t& _stop, int32_t& _space, int32_t& _freeSpace);
bool extrapolateLastId(const std::string& _text, const int32_t _start, int32_t& _stop, int32_t& _space, int32_t& _freeSpace);
private:
// this section is reserved for HTML parsing and display:
etk::UString m_htmlCurrrentLine; //!< current line for HTML display
std::string m_htmlCurrrentLine; //!< current line for HTML display
std::vector<TextDecoration> m_htmlDecoration; //!< current decoration for the HTML display
TextDecoration m_htmlDecoTmp; //!< current decoration
/**
* @brief add a line with the current m_htmlDecoTmp decoration
* @param[in] _data The cuurent data to add.
*/
void htmlAddData(const etk::UString& _data);
void htmlAddData(const std::string& _data);
/**
* @brief draw the current line
*/

View File

@ -19,7 +19,7 @@
#define __class__ "ewol"
etk::UString ewol::getCompilationMode(void) {
std::string ewol::getCompilationMode(void) {
#ifdef MODE_RELEASE
return "Release";
#else
@ -27,7 +27,7 @@ etk::UString ewol::getCompilationMode(void) {
#endif
}
etk::UString ewol::getBoardType(void) {
std::string ewol::getBoardType(void) {
#ifdef __TARGET_OS__Linux
return "Linux";
#elif defined(__TARGET_OS__Android)
@ -43,13 +43,13 @@ etk::UString ewol::getBoardType(void) {
#endif
}
etk::UString ewol::getVersion(void) {
std::string ewol::getVersion(void) {
#define FIRST_YEAR (2011)
etk::UString tmpOutput = (date::getYear()-FIRST_YEAR);
std::string tmpOutput = std::to_string(date::getYear()-FIRST_YEAR);
tmpOutput += ".";
tmpOutput += date::getMonth();
tmpOutput += std::to_string(date::getMonth());
tmpOutput += ".";
tmpOutput += date::getDay();
tmpOutput += std::to_string(date::getDay());
return tmpOutput;
}

View File

@ -29,7 +29,7 @@ namespace ewol {
* @brief get EWOL version
* @return The string that describe ewol version
*/
etk::UString getVersion(void);
std::string getVersion(void);
/**
* @brief get current time in us...
* @return The current time
@ -40,12 +40,12 @@ namespace ewol {
* @brief get compilation mode (release/debug)
* @return the string of the mode of commpilation
*/
etk::UString getCompilationMode(void);
std::string getCompilationMode(void);
/**
* @brief get the board type (Android/Linux/MacOs/...)
* @return the string of the mode of commpilation
*/
etk::UString getBoardType(void);
std::string getBoardType(void);
};
#endif

View File

@ -15,9 +15,9 @@
#include <ewol/physicsShape/PhysicsSphere.h>
ewol::PhysicsShape* ewol::PhysicsShape::create(const etk::UString& _name) {
ewol::PhysicsShape* ewol::PhysicsShape::create(const std::string& _name) {
ewol::PhysicsShape* tmpp = NULL;
etk::UString name = _name.toLower();
std::string name = to_lower(_name);
if (name == "box") {
tmpp = new ewol::PhysicsBox();
} else if (name == "sphere") {

View File

@ -26,7 +26,7 @@ namespace ewol {
class PhysicsShape {
public:
static PhysicsShape* create(const etk::UString& _name);
static PhysicsShape* create(const std::string& _name);
public:
enum type {
unknow,

View File

@ -313,7 +313,7 @@ class AndroidContext : public ewol::eContext {
#endif
}
void setTitle(etk::UString& _title) {
void setTitle(std::string& _title) {
EWOL_DEBUG("C->java : send message to the java : \"" << _title << "\"");
if (m_javaApplicationType == appl_application) {
int status;
@ -385,7 +385,7 @@ class AndroidContext : public ewol::eContext {
ewol::eContext::OS_SetMouseState(_pointerID, _isDown, vec2(_pos.x(),m_currentHeight-_pos.y()) );
}
void ANDROID_SetKeyboard(etk::UChar _myChar, bool _isDown, bool _isARepeateKey=false) {
void ANDROID_SetKeyboard(char32_t _myChar, bool _isDown, bool _isARepeateKey=false) {
OS_SetKeyboard(m_guiKeyBoardSpecialKeyMode, _myChar, _isDown, _isARepeateKey);
}

View File

@ -25,7 +25,7 @@ ewol::ConfigFont::~ConfigFont(void) {
ewol::freeTypeUnInit();
}
void ewol::ConfigFont::set(const etk::UString& _fontName, int32_t _size) {
void ewol::ConfigFont::set(const std::string& _fontName, int32_t _size) {
m_name = _fontName;
m_size = _size;
EWOL_INFO("Set default Font : '" << _fontName << "' size=" << _size);

View File

@ -23,24 +23,24 @@ namespace ewol
ConfigFont(void);
~ConfigFont(void);
private:
etk::UString m_folder;
std::string m_folder;
public:
/**
* @brief Specify the default font folder for the Ewol search system (only needed when embended font)
* @param[in] _folder basic folder of the font (ex: DATA:fonts)
*/
void setFolder(const etk::UString& _folder) {
void setFolder(const std::string& _folder) {
m_folder = _folder;
};
/**
* @brief get the default font folder.
* @return The default font folder.
*/
const etk::UString& getFolder(void) {
const std::string& getFolder(void) {
return m_folder;
};
private:
etk::UString m_name;
std::string m_name;
int32_t m_size;
public:
/**
@ -48,12 +48,12 @@ namespace ewol
* @param[in] _fontName The font name requested (not case sensitive) ex "Arial" or multiple separate by ';' ex : "Arial;Helvetica".
* @param[in] _size The default size of the font default=10.
*/
void set(const etk::UString& _fontName, int32_t _size);
void set(const std::string& _fontName, int32_t _size);
/**
* @brief get the current default font name
* @raturn a reference on the font name string
*/
const etk::UString& getName(void) {
const std::string& getName(void) {
return m_name;
};
/**

View File

@ -16,17 +16,17 @@ namespace ewol {
class EConfig {
private:
const char* m_config; //!< config properties.
etk::UString m_data; //!< compositing additionnal message Value.
std::string m_data; //!< compositing additionnal message Value.
public:
EConfig(const char* _config,
const etk::UString& _data) :
const std::string& _data) :
m_config(_config),
m_data(_data)
{ };
void setConfig(const char* _config) { m_config = _config; };
inline const char* getConfig(void) const { return m_config; };
void setData(const etk::UString& _data) { m_data = _data; };
inline const etk::UString& getData(void) const { return m_data; };
void setData(const std::string& _data) { m_data = _data; };
inline const std::string& getData(void) const { return m_data; };
};
etk::CCout& operator <<(etk::CCout& _os, const ewol::EConfig& _obj);

View File

@ -17,11 +17,11 @@ namespace ewol {
private:
ewol::EObject* m_callerObject; //!< Caller class.
const char* m_event; //!< Event pointer == > unique Id define by the system ...
etk::UString m_data; //!< compositing additionnal message Value.
std::string m_data; //!< compositing additionnal message Value.
public:
EMessage(ewol::EObject* _caller,
const char* _message,
const etk::UString& _data) :
const std::string& _data) :
m_callerObject(_caller),
m_event(_message),
m_data(_data)
@ -30,8 +30,8 @@ namespace ewol {
inline ewol::EObject* getCaller(void) const { return m_callerObject; };
void setMessage(const char* _message) { m_event = _message; };
inline const char* getMessage(void) const { return m_event; };
void setData(const etk::UString& _data) { m_data = _data; };
inline const etk::UString& getData(void) const { return m_data; };
void setData(const std::string& _data) { m_data = _data; };
inline const std::string& getData(void) const { return m_data; };
};
etk::CCout& operator <<(etk::CCout& _os, const ewol::EMessage& _obj);
};

View File

@ -49,12 +49,12 @@ void ewol::EMultiCast::rm(ewol::EObject* _object) {
EWOL_DEBUG("SendMulticast RM listener :" << _object->getId());
m_messageList[iii].m_message = NULL;
m_messageList[iii].m_object = NULL;
m_messageList.erase(iii);
m_messageList.erase(m_messageList.begin()+iii);
}
}
}
void ewol::EMultiCast::send(ewol::EObject* _object, const char* const _message, const etk::UString& _data) {
void ewol::EMultiCast::send(ewol::EObject* _object, const char* const _message, const std::string& _data) {
EWOL_VERBOSE("SendMulticast message \"" << _message << "\" data=\"" << _data << "\" to :");
// send the message at all registered widget ...

View File

@ -32,10 +32,10 @@ namespace ewol {
public:
EMultiCast();
~EMultiCast(void);
void anonymousSend(const char* const _messageId, const etk::UString& _data) {
void anonymousSend(const char* const _messageId, const std::string& _data) {
send(NULL, _messageId, _data);
};
void send(ewol::EObject* _object, const char* const _message, const etk::UString& _data);
void send(ewol::EObject* _object, const char* const _message, const std::string& _data);
void rm(ewol::EObject* _object);
void add(ewol::EObject* _object, const char* const _message);
};

View File

@ -57,7 +57,7 @@ void ewol::EObject::addEventId(const char * _generateEventId) {
}
}
void ewol::EObject::generateEventId(const char * _generateEventId, const etk::UString& _data) {
void ewol::EObject::generateEventId(const char * _generateEventId, const std::string& _data) {
int32_t nbObject = getEObjectManager().getNumberObject();
// for every element registered ...
for (int32_t iii=0; iii<m_externEvent.size(); iii++) {
@ -82,7 +82,7 @@ void ewol::EObject::generateEventId(const char * _generateEventId, const etk::US
}
}
void ewol::EObject::sendMultiCast(const char* const _messageId, const etk::UString& _data) {
void ewol::EObject::sendMultiCast(const char* const _messageId, const std::string& _data) {
int32_t nbObject = getEObjectManager().getNumberObject();
getMultiCast().send(this, _messageId, _data);
if (nbObject > getEObjectManager().getNumberObject()) {
@ -97,7 +97,7 @@ void ewol::EObject::registerMultiCast(const char* const _messageId) {
void ewol::EObject::registerOnEvent(ewol::EObject * _destinationObject,
const char * _eventId,
const char * _eventIdgenerated,
const etk::UString& _overloadData) {
const std::string& _overloadData) {
if (NULL == _destinationObject) {
EWOL_ERROR("Input ERROR NULL pointer EObject ...");
return;
@ -159,9 +159,9 @@ void ewol::EObject::unRegisterOnEvent(ewol::EObject * _destinationObject,
continue;
}
if (_eventId == NULL) {
m_externEvent.remove(iii);
m_externEvent.erase(m_externEvent.begin()+iii);
} else if (m_externEvent[iii]->localEventId == _eventId) {
m_externEvent.remove(iii);
m_externEvent.erase(m_externEvent.begin()+iii);
}
}
}
@ -169,9 +169,9 @@ void ewol::EObject::unRegisterOnEvent(ewol::EObject * _destinationObject,
void ewol::EObject::onObjectRemove(ewol::EObject * _removeObject) {
for(int32_t iii=m_externEvent.size()-1; iii >= 0; iii--) {
if (NULL == m_externEvent[iii]) {
m_externEvent.erase(iii);
m_externEvent.erase(m_externEvent.begin()+iii);
} else if (m_externEvent[iii]->destEObject == _removeObject) {
m_externEvent.erase(iii);
m_externEvent.erase(m_externEvent.begin()+iii);
}
}
}
@ -206,7 +206,7 @@ bool ewol::EObject::loadXML(exml::Element* _node) {
if (m_listConfig[iii].getConfig() == NULL) {
continue;
}
etk::UString value = _node->getAttribute(m_listConfig[iii].getConfig());
std::string value = _node->getAttribute(m_listConfig[iii].getConfig());
// check existance :
if (value.size() == 0) {
continue;
@ -227,7 +227,7 @@ bool ewol::EObject::storeXML(exml::Element* _node) const {
if (m_listConfig[iii].getConfig() == NULL) {
continue;
}
etk::UString value = getConfig(m_listConfig[iii].getConfig());
std::string value = getConfig(m_listConfig[iii].getConfig());
if (NULL != m_listConfig[iii].getDefault() ) {
if (value == m_listConfig[iii].getDefault() ) {
// nothing to add on the XML :
@ -251,7 +251,7 @@ bool ewol::EObject::onSetConfig(const ewol::EConfig& _conf) {
return false;
}
bool ewol::EObject::onGetConfig(const char* _config, etk::UString& _result) const {
bool ewol::EObject::onGetConfig(const char* _config, std::string& _result) const {
if (_config == ewol::EObject::configName) {
_result = getName();
return true;
@ -259,7 +259,7 @@ bool ewol::EObject::onGetConfig(const char* _config, etk::UString& _result) cons
return false;
}
bool ewol::EObject::setConfig(const etk::UString& _config, const etk::UString& _value) {
bool ewol::EObject::setConfig(const std::string& _config, const std::string& _value) {
for(int32_t iii=0 ; iii<m_listConfig.size() ; iii++) {
if (NULL != m_listConfig[iii].getConfig()) {
if (_config == m_listConfig[iii].getConfig() ) {
@ -272,15 +272,15 @@ bool ewol::EObject::setConfig(const etk::UString& _config, const etk::UString& _
return false;
}
etk::UString ewol::EObject::getConfig(const char* _config) const {
etk::UString res="";
std::string ewol::EObject::getConfig(const char* _config) const {
std::string res="";
if (NULL != _config) {
(void)onGetConfig(_config, res);
}
return res;
}
etk::UString ewol::EObject::getConfig(const etk::UString& _config) const {
std::string ewol::EObject::getConfig(const std::string& _config) const {
for(int32_t iii=0 ; iii<m_listConfig.size() ; iii++) {
if (NULL != m_listConfig[iii].getConfig()) {
if (_config == m_listConfig[iii].getConfig() ) {
@ -293,7 +293,7 @@ etk::UString ewol::EObject::getConfig(const etk::UString& _config) const {
return "";
}
bool ewol::EObject::setConfigNamed(const etk::UString& _name, const ewol::EConfig& _conf) {
bool ewol::EObject::setConfigNamed(const std::string& _name, const ewol::EConfig& _conf) {
ewol::EObject* object = getEObjectManager().get(_name);
if (object == NULL) {
return false;
@ -301,7 +301,7 @@ bool ewol::EObject::setConfigNamed(const etk::UString& _name, const ewol::EConfi
return object->setConfig(_conf);
}
bool ewol::EObject::setConfigNamed(const etk::UString& _name, const etk::UString& _config, const etk::UString& _value) {
bool ewol::EObject::setConfigNamed(const std::string& _name, const std::string& _config, const std::string& _value) {
ewol::EObject* object = getEObjectManager().get(_name);
if (object == NULL) {
return false;

View File

@ -33,7 +33,7 @@ namespace ewol {
const char* localEventId; //!< local event Id generation
ewol::EObject* destEObject; //!< destination widget that might be call
const char* destEventId; //!< generated event ID on the distant widget
etk::UString overloadData; //!< sometimes the user prefer to receive some specific data on an event (instead of the one sed by the widget)
std::string overloadData; //!< sometimes the user prefer to receive some specific data on an event (instead of the one sed by the widget)
};
/**
* @brief Basic message classes for ewol system
@ -94,13 +94,13 @@ namespace ewol {
* @param[in] _generateEventId event Id that is curetly generated
* @param[in] _data data associated with the event
*/
void generateEventId(const char * _generateEventId, const etk::UString& _data = "");
void generateEventId(const char * _generateEventId, const std::string& _data = "");
/**
* @brief generate Multicast event on all EObject requested the event
* @param[in] _messageId Event Id that is generated
* @param[in] _data String that is send at all the destinations
*/
void sendMultiCast(const char* const _messageId, const etk::UString& _data = "");
void sendMultiCast(const char* const _messageId, const std::string& _data = "");
/**
* @brief Register of the arrival of a Multicast message
* @param[in] _messageId Event Id waiting for...
@ -117,7 +117,7 @@ namespace ewol {
void registerOnEvent(ewol::EObject * _destinationObject,
const char * _eventId,
const char * _eventIdgenerated = NULL,
const etk::UString& _overloadData="");
const std::string& _overloadData="");
/**
* @brief Un-Register an EObject over an other.
* @param[in] _destinationObject pointer on the object that might be call when an event is generated
@ -160,7 +160,7 @@ namespace ewol {
* @param[out] _result Result of the request.
* @return true if the config is set
*/
virtual bool onGetConfig(const char* _config, etk::UString& _result) const ;
virtual bool onGetConfig(const char* _config, std::string& _result) const ;
public:
/**
* @brief get all the configuration list
@ -173,29 +173,29 @@ namespace ewol {
* @return true if config set correctly...
*/
bool setConfig(const ewol::EConfig& _conf) { return onSetConfig(_conf); };
bool setConfig(const etk::UString& _config, const etk::UString& _value); // need a search ...
bool setConfigNamed(const etk::UString& _name, const etk::UString& _config, const etk::UString& _value); // need a search ...
bool setConfigNamed(const etk::UString& _name, const ewol::EConfig& _conf);
bool setConfig(const std::string& _config, const std::string& _value); // need a search ...
bool setConfigNamed(const std::string& _name, const std::string& _config, const std::string& _value); // need a search ...
bool setConfigNamed(const std::string& _name, const ewol::EConfig& _conf);
/**
* @brief Configuration get from the curent EObject (systrem mode)
* @param[in] _config Configuration name.
* @return the config properties
*/
etk::UString getConfig(const char* _config) const;
etk::UString getConfig(const etk::UString& _config) const; // need search
std::string getConfig(const char* _config) const;
std::string getConfig(const std::string& _config) const; // need search
protected:
etk::UString m_name; //!< name of the element ...
std::string m_name; //!< name of the element ...
public:
/**
* @brief get the eObject name
* @return The requested name
*/
const etk::UString& getName(void) const { return m_name; };
const std::string& getName(void) const { return m_name; };
/**
* @brief get the Widget name
* @param[in] _name The new name
*/
void setName(const etk::UString& _name) { m_name=_name; };
void setName(const std::string& _name) { m_name=_name; };
public:
/**
* @brief load properties with an XML node.

View File

@ -50,7 +50,7 @@ void ewol::EObjectManager::unInit(void) {
m_eObjectList[iii] = NULL;
}
} else {
m_eObjectList.erase(iii);
m_eObjectList.erase(m_eObjectList.begin()+iii);
}
}
}
@ -92,7 +92,7 @@ void ewol::EObjectManager::rm(ewol::EObject* _object) {
if (m_eObjectList[iii] == _object) {
// remove Element
m_eObjectList[iii] = NULL;
m_eObjectList.erase(iii);
m_eObjectList.erase(m_eObjectList.begin()+iii);
informOneObjectIsRemoved(_object);
return;
}
@ -117,7 +117,7 @@ void ewol::EObjectManager::autoRemove(ewol::EObject* _object) {
if (m_eObjectList[iii] == _object) {
// remove Element
m_eObjectList[iii] = NULL;
m_eObjectList.erase(iii);
m_eObjectList.erase(m_eObjectList.begin()+iii);
EWOL_DEBUG("Auto-Remove EObject : [" << _object->getId() << "] type=\"" << _object->getObjectType() << "\"");
informOneObjectIsRemoved(_object);
m_eObjectAutoRemoveList.push_back(_object);
@ -137,13 +137,13 @@ void ewol::EObjectManager::removeAllAutoRemove(void) {
delete(m_eObjectAutoRemoveList[0]);
m_eObjectAutoRemoveList[0] = NULL;
} else {
m_eObjectAutoRemoveList.erase(0);
m_eObjectAutoRemoveList.erase(m_eObjectAutoRemoveList.begin());
}
}
m_eObjectAutoRemoveList.clear();
}
ewol::EObject* ewol::EObjectManager::get(const etk::UString& _name) {
ewol::EObject* ewol::EObjectManager::get(const std::string& _name) {
if (_name == "") {
return NULL;
}

View File

@ -33,7 +33,7 @@ namespace ewol {
void autoRemove(ewol::EObject* _object);
void removeAllAutoRemove(void);
ewol::EObject* get(const etk::UString& _name);
ewol::EObject* get(const std::string& _name);
private:
void informOneObjectIsRemoved(ewol::EObject* _object);
private:

View File

@ -18,12 +18,12 @@ namespace ewol {
enum ewol::keyEvent::keyboard m_type; //!< type of hardware event
enum ewol::keyEvent::status m_status; //!< status of hardware event
ewol::SpecialKey m_specialKey; //!< input key status (prevent change in time..)
etk::UChar m_unicodeData; //!< Unicode data (in some case)
char32_t m_unicodeData; //!< Unicode data (in some case)
public:
EventEntry(enum ewol::keyEvent::keyboard _type,
enum ewol::keyEvent::status _status,
ewol::SpecialKey _specialKey,
etk::UChar _char) :
char32_t _char) :
m_type(_type),
m_status(_status),
m_specialKey(_specialKey),
@ -47,10 +47,10 @@ namespace ewol {
inline const ewol::SpecialKey& getSpecialKey(void) const {
return m_specialKey;
};
void setChar(etk::UChar _char) {
void setChar(char32_t _char) {
m_unicodeData = _char;
};
inline const etk::UChar& getChar(void) const {
inline const char32_t& getChar(void) const {
return m_unicodeData;
};
};
@ -61,7 +61,7 @@ namespace ewol {
EventEntrySystem(enum ewol::keyEvent::keyboard _type,
enum ewol::keyEvent::status _status,
ewol::SpecialKey _specialKey,
etk::UChar _char) :
char32_t _char) :
m_event(_type, _status, _specialKey, _char)
{ };
ewol::EventEntry m_event;

View File

@ -277,7 +277,7 @@ class WindowsContext : public ewol::eContext {
case WM_KEYUP:
buttonIsDown = false;
case WM_KEYDOWN: {
etk::UChar tmpChar = 0;
char32_t tmpChar = 0;
enum ewol::keyEvent::keyboard keyInput;
switch (_wParam) {
//case 80: // keypad

View File

@ -261,12 +261,12 @@ class X11Interface : public ewol::eContext {
&buf// **prop_return);
);
if (true == m_clipBoardRequestPrimary) {
etk::UString tmpppp((char*)buf);
std::string tmpppp((char*)buf);
ewol::clipBoard::setSystem(ewol::clipBoard::clipboardSelection, tmpppp);
// just transmit an event , we have the data in the system
OS_ClipBoardArrive(ewol::clipBoard::clipboardSelection);
} else {
etk::UString tmpppp((char*)buf);
std::string tmpppp((char*)buf);
ewol::clipBoard::setSystem(ewol::clipBoard::clipboardStd, tmpppp);
// just transmit an event , we have the data in the system
OS_ClipBoardArrive(ewol::clipBoard::clipboardStd);
@ -288,14 +288,13 @@ class X11Interface : public ewol::eContext {
}
#endif
etk::UString tmpData = "";
std::string tmpData = "";
if (req->selection == XAtomeSelection) {
tmpData = ewol::clipBoard::get(ewol::clipBoard::clipboardSelection);
} else if (req->selection == XAtomeClipBoard) {
tmpData = ewol::clipBoard::get(ewol::clipBoard::clipboardStd);
}
etk::Char tmpValueStoredTimeToSend = tmpData.c_str();
const char * magatTextToSend = tmpValueStoredTimeToSend;
const char * magatTextToSend = tmpData.c_str();
Atom listOfAtom[4];
if(strlen(magatTextToSend) == 0 ) {
respond.xselection.property= None;
@ -658,8 +657,7 @@ class X11Interface : public ewol::eContext {
}
if (count>0) {
// transform it in unicode
etk::UChar tmpChar = 0;
tmpChar.setUtf8(buf);
char32_t tmpChar = etk::setUtf8(buf);
//EWOL_INFO("event Key : " << event.xkey.keycode << " char=\"" << buf << "\"'len=" << strlen(buf) << " unicode=" << unicodeValue);
OS_SetKeyboard(m_guiKeyBoardMode, tmpChar, (event.type == KeyPress), thisIsAReapeateKey);
if (true == thisIsAReapeateKey) {
@ -1031,7 +1029,7 @@ class X11Interface : public ewol::eContext {
return true;
}
/****************************************************************************************/
void setIcon(const etk::UString& _inputFile) {
void setIcon(const std::string& _inputFile) {
egami::Image dataImage;
// load data
if (false == egami::load(dataImage, _inputFile)) {
@ -1205,11 +1203,10 @@ class X11Interface : public ewol::eContext {
return true;
}
/****************************************************************************************/
void setTitle(const etk::UString& _title) {
void setTitle(const std::string& _title) {
X11_INFO("X11: set Title (START)");
XTextProperty tp;
etk::Char tmpChar = _title.c_str();
tp.value = (unsigned char *)((const char*)tmpChar);
tp.value = (unsigned char *)_title.c_str();
tp.encoding = XA_WM_NAME;
tp.format = 8;
tp.nitems = strlen((const char*)tp.value);

View File

@ -98,12 +98,12 @@ void ewol::audio::music::fading(int32_t _timeMs) {
}
bool ewol::audio::music::listAdd(etk::UString _file) {
bool ewol::audio::music::listAdd(std::string _file) {
return false;
}
bool ewol::audio::music::listRm(etk::UString _file) {
bool ewol::audio::music::listRm(std::string _file) {
return false;
}
@ -146,7 +146,7 @@ bool ewol::audio::music::listStop(void) {
bool ewol::audio::music::play(etk::UString _file) {
bool ewol::audio::music::play(std::string _file) {
return false;
}
@ -218,7 +218,7 @@ void ewol::audio::music::getData(int16_t * _bufferInterlace, int32_t _nbSample,
//liste d'effet
class EffectsLoaded {
public :
EffectsLoaded(etk::UString _file)
EffectsLoaded(std::string _file)
{
m_file = _file;
m_requestedTime = 1;
@ -227,7 +227,7 @@ class EffectsLoaded {
// write an error ...
}
}
etk::UString m_file;
std::string m_file;
int32_t m_nbSamples;
int32_t m_requestedTime;
int16_t* m_data;
@ -279,7 +279,7 @@ std::vector<EffectsLoaded*> ListEffects;
std::vector<RequestPlay*> ListEffectsPlaying;
int32_t ewol::audio::effects::add(etk::UString _file) {
int32_t ewol::audio::effects::add(std::string _file) {
for (int32_t iii=0; iii<ListEffects.size(); iii++) {
if (NULL != ListEffects[iii]) {
if (ListEffects[iii]->m_file == _file) {

View File

@ -26,8 +26,8 @@ namespace ewol {
namespace music {
void fading(int32_t _timeMs);
// list playing system : is cyclic ...
bool listAdd(etk::UString _file);
bool listRm(etk::UString _file);
bool listAdd(std::string _file);
bool listRm(std::string _file);
bool listClean(void);
bool listPrevious(void);
bool listNext(void);
@ -36,7 +36,7 @@ namespace ewol {
bool listPlay(void); // List playing
bool listStop(void); // List stopping
bool play(etk::UString _file); // play specific file ... pause the list element;
bool play(std::string _file); // play specific file ... pause the list element;
bool stop(void);
// in db
@ -50,7 +50,7 @@ namespace ewol {
// note effect is loaded in memory (then don't create long effect) and unload only when requested
namespace effects {
// note : support file (Mono, 16bit, 48kHz) : .raw or .wav (no encodage) or .ogg (decoded with tremor lib)
int32_t add(etk::UString _file);
int32_t add(std::string _file);
void rm(int32_t _effectId);
void play(int32_t _effectId, float _xxx, float _yyy);

View File

@ -60,11 +60,11 @@ typedef struct {
#define COMPR_G721 (64)
#define COMPR_MPEG (80)
int16_t * ewol::audio::wav::loadData(etk::UString filename, int8_t nbChan, int32_t frequency, int32_t & nbSampleOut) {
int16_t * ewol::audio::wav::loadData(std::string filename, int8_t nbChan, int32_t frequency, int32_t & nbSampleOut) {
nbSampleOut = 0;
waveHeader myHeader;
memset(&myHeader, 0, sizeof(waveHeader));
etk::FSNode fileAccess(etk::UString("DATA:") + filename);
etk::FSNode fileAccess(std::string("DATA:") + filename);
// Start loading the XML :
EWOL_DEBUG("open file (WAV) \"" << fileAccess << "\"");

View File

@ -15,7 +15,7 @@
namespace ewol {
namespace audio {
namespace wav {
int16_t * loadData(etk::UString filename, int8_t nbChan, int32_t frequency, int32_t & nbSampleOut);
int16_t * loadData(std::string filename, int8_t nbChan, int32_t frequency, int32_t & nbSampleOut);
};
};
};

View File

@ -91,12 +91,12 @@ static int screen_height = 600;
* @param title New desired title
* @return ---
*/
void guiInterface::setTitle(etk::UString& title) {
void guiInterface::setTitle(std::string& title) {
// TODO : ...
}
void guiInterface::setIcon(etk::UString inputFile) {
void guiInterface::setIcon(std::string inputFile) {
// TODO : ...
}

View File

@ -363,7 +363,7 @@ void ewol::eContext::OS_SetMouseState(int _pointerID, bool _isDown, const vec2&
}
void ewol::eContext::OS_SetKeyboard(ewol::SpecialKey& _special,
etk::UChar _myChar,
char32_t _myChar,
bool _isDown,
bool _isARepeateKey) {
eSystemMessage data;
@ -568,7 +568,7 @@ void ewol::eContext::show(void) {
EWOL_INFO("show: NOT implemented ...");
}
void ewol::eContext::setTitle(const etk::UString& _title) {
void ewol::eContext::setTitle(const std::string& _title) {
EWOL_INFO("setTitle: NOT implemented ...");
}

View File

@ -55,7 +55,7 @@ class eSystemMessage {
// keyboard events :
bool repeateKey; //!< special flag for the repeating key on the PC interface
bool stateIsDown;
etk::UChar keyboardChar;
char32_t keyboardChar;
enum ewol::keyEvent::keyboard keyboardMove;
ewol::SpecialKey keyboardSpecial;
@ -150,7 +150,7 @@ namespace ewol {
virtual void OS_SetMouseState(int _pointerID, bool _isDown, const vec2& _pos);
virtual void OS_SetKeyboard(ewol::SpecialKey& _special,
etk::UChar _myChar,
char32_t _myChar,
bool _isDown,
bool _isARepeateKey=false);
virtual void OS_SetKeyboardMove(ewol::SpecialKey& _special,
@ -303,7 +303,7 @@ namespace ewol {
* @brief set the new title of the windows
* @param[in] title New desired title
*/
virtual void setTitle(const etk::UString& _title);
virtual void setTitle(const std::string& _title);
/**
* @brief force the screen orientation (availlable on portable elements ...
* @param[in] _orientation Selected orientation.
@ -324,7 +324,7 @@ namespace ewol {
* @brief set the Icon of the program
* @param[in] _inputFile new filename icon of the curent program.
*/
virtual void setIcon(const etk::UString& _inputFile) { };
virtual void setIcon(const std::string& _inputFile) { };
/**
* @brief get the curent time in micro-second
* @note : must be implemented in all system OS implementation

View File

@ -81,7 +81,7 @@ void ewol::openGL::pop(void) {
l_matrixCamera.identity();
return;
}
l_matrixList.popBack();
l_matrixList.pop_back();
l_matrixCamera.identity();
}

View File

@ -15,18 +15,15 @@
#define __class__ "ConfigFile"
void ewol::SimpleConfigElement::parse(const etk::UString& value) {
etk::Char tmp = value.c_str();
m_valueInt = 0;
m_valuefloat = 0;
sscanf(tmp, "%d", &m_valueInt);
sscanf(tmp, "%f", &m_valuefloat);
void ewol::SimpleConfigElement::parse(const std::string& value) {
m_valueInt = std::stoi(value);
m_valuefloat = std::stof(value);
m_value = value;
}
ewol::ConfigFile::ConfigFile(const etk::UString& _filename) :
ewol::ConfigFile::ConfigFile(const std::string& _filename) :
ewol::Resource(_filename) {
EWOL_DEBUG("SFP : load \"" << _filename << "\"");
reload();
@ -58,7 +55,7 @@ void ewol::ConfigFile::reload(void) {
EWOL_ERROR("File does not Exist : \"" << file << "\"");
return;
}
etk::UString fileExtention = file.fileGetExtention();
std::string fileExtention = file.fileGetExtention();
if (fileExtention != "conf") {
EWOL_ERROR("File does not have extention \".conf\" for program but : \"" << fileExtention << "\"");
return;
@ -80,25 +77,25 @@ void ewol::ConfigFile::reload(void) {
if (len == 0) {
continue;
}
etk::UString tmpData2(tmpData);
etk::UString tmppp("#");
if (true == tmpData2.startWith(tmppp)) {
std::string tmpData2(tmpData);
std::string tmppp("#");
if (start_with(tmpData2, tmppp) == true) {
// comment ...
continue;
}
tmppp="//";
if (true == tmpData2.startWith(tmppp)) {
if (start_with(tmpData2, tmppp) == true) {
// comment ...
continue;
}
// get parameters :
int32_t pos = tmpData2.findForward('=');
if (pos == -1){
size_t pos = tmpData2.find('=');
if (pos == 0){
//the element "=" is not find ...
continue;
}
etk::UString paramName = tmpData2.extract(0, pos);
etk::UString paramValue = tmpData2.extract(pos+1, 0x7FFFF);
std::string paramName = std::string(tmpData2, 0, pos);
std::string paramValue = std::string(tmpData2, pos+1, 0x7FFFF);
EWOL_DEBUG(" param name=\"" << paramName << "\" val=\"" << paramValue << "\"");
// check if the parameters existed :
bool findParam = false;
@ -127,7 +124,7 @@ void ewol::ConfigFile::reload(void) {
}
int32_t ewol::ConfigFile::request(const etk::UString& _paramName) {
int32_t ewol::ConfigFile::request(const std::string& _paramName) {
// check if the parameters existed :
for (int32_t iii=0; iii<m_list.size(); iii++){
if (NULL != m_list[iii]) {
@ -146,7 +143,7 @@ int32_t ewol::ConfigFile::request(const etk::UString& _paramName) {
}
ewol::ConfigFile* ewol::ConfigFile::keep(const etk::UString& _filename) {
ewol::ConfigFile* ewol::ConfigFile::keep(const std::string& _filename) {
EWOL_INFO("KEEP : SimpleConfig : file : \"" << _filename << "\"");
ewol::ConfigFile* object = static_cast<ewol::ConfigFile*>(getManager().localKeep(_filename));
if (NULL != object) {

View File

@ -16,36 +16,36 @@
namespace ewol {
class SimpleConfigElement {
public:
etk::UString m_paramName;
std::string m_paramName;
private:
etk::UString m_value;
std::string m_value;
int32_t m_valueInt;
float m_valuefloat;
public:
SimpleConfigElement(const etk::UString& _name) :
SimpleConfigElement(const std::string& _name) :
m_paramName(_name),
m_value(""),
m_valueInt(0),
m_valuefloat(0.0) { };
~SimpleConfigElement(void) { };
void parse(const etk::UString& value);
void parse(const std::string& value);
int32_t getInteger(void) { return m_valueInt; };
float getFloat(void) { return m_valuefloat; };
etk::UString& getString(void) { return m_value; };
std::string& getString(void) { return m_value; };
};
class ConfigFile : public ewol::Resource {
private:
std::vector<ewol::SimpleConfigElement*> m_list;
etk::UString m_errorString;
std::string m_errorString;
protected:
ConfigFile(const etk::UString& _filename);
ConfigFile(const std::string& _filename);
virtual ~ConfigFile(void);
public:
const char* getType(void) { return "ewol::SimpleConfigFile"; };
void reload(void);
int32_t request(const etk::UString& _paramName);
int32_t request(const std::string& _paramName);
int32_t getInteger(int32_t _id) {
if (_id<0) {
@ -59,7 +59,7 @@ namespace ewol {
}
return m_list[_id]->getFloat();
};
etk::UString& getString(int32_t _id) {
std::string& getString(int32_t _id) {
if (_id<0) {
return m_errorString;
}
@ -72,7 +72,7 @@ namespace ewol {
* @param[in] _filename Name of the configuration file.
* @return pointer on the resource or NULL if an error occured.
*/
static ewol::ConfigFile* keep(const etk::UString& _filename);
static ewol::ConfigFile* keep(const std::string& _filename);
/**
* @brief release the keeped resources
* @param[in,out] reference on the object pointer

View File

@ -52,7 +52,7 @@ void ewol::freeTypeUnInit(void) {
}
}
ewol::FontFreeType::FontFreeType(const etk::UString& _fontName) :
ewol::FontFreeType::FontFreeType(const std::string& _fontName) :
FontBase(_fontName) {
m_init = false;
m_FileBuffer = NULL;
@ -106,7 +106,7 @@ ewol::FontFreeType::~FontFreeType(void) {
FT_Done_Face( m_fftFace );
}
vec2 ewol::FontFreeType::getSize(int32_t _fontSize, const etk::UString& _unicodeString) {
vec2 ewol::FontFreeType::getSize(int32_t _fontSize, const std::string& _unicodeString) {
if(false == m_init) {
return vec2(0,0);
}
@ -135,7 +135,7 @@ bool ewol::FontFreeType::getGlyphProperty(int32_t _fontSize, ewol::GlyphProperty
// a small shortcut
FT_GlyphSlot slot = m_fftFace->glyph;
// retrieve glyph index from character code
int32_t glyph_index = FT_Get_Char_Index(m_fftFace, _property.m_UVal.get());
int32_t glyph_index = FT_Get_Char_Index(m_fftFace, _property.m_UVal);
// load glyph image into the slot (erase previous one)
error = FT_Load_Glyph(m_fftFace, // handle to face object
glyph_index, // glyph index
@ -342,7 +342,7 @@ void ewol::FontFreeType::display(void) {
//EWOL_INFO(" Current size = " << (int)m_fftFace->size);
}
ewol::FontBase* ewol::FontFreeType::keep(const etk::UString& _filename) {
ewol::FontBase* ewol::FontFreeType::keep(const std::string& _filename) {
EWOL_VERBOSE("KEEP : Font : file : \"" << _filename << "\"");
ewol::FontBase* object = static_cast<ewol::FontBase*>(getManager().localKeep(_filename));
if (NULL != object) {

View File

@ -27,7 +27,7 @@ namespace ewol {
bool m_init;
void display(void);
protected:
FontFreeType(const etk::UString& _fontName);
FontFreeType(const std::string& _fontName);
~FontFreeType(void);
public:
@ -40,7 +40,7 @@ namespace ewol {
ewol::GlyphProperty& _property,
int8_t _posInImage);
vec2 getSize(int32_t _fontSize, const etk::UString& _unicodeString);
vec2 getSize(int32_t _fontSize, const std::string& _unicodeString);
int32_t getHeight(int32_t _fontSize);
@ -52,7 +52,7 @@ namespace ewol {
* @param[in] _filename Name of the base font.
* @return pointer on the resource or NULL if an error occured.
*/
static ewol::FontBase* keep(const etk::UString& _filename);
static ewol::FontBase* keep(const std::string& _filename);
/**
* @brief release the keeped resources
* @param[in,out] reference on the object pointer

View File

@ -17,13 +17,13 @@
#undef __class__
#define __class__ "TextureFile"
ewol::TextureFile::TextureFile(const etk::UString& _genName) :
ewol::TextureFile::TextureFile(const std::string& _genName) :
Texture(_genName) {
}
ewol::TextureFile::TextureFile(etk::UString _genName, const etk::UString& _tmpfileName, const ivec2& _size) :
ewol::TextureFile::TextureFile(std::string _genName, const std::string& _tmpfileName, const ivec2& _size) :
Texture(_genName) {
if (false == egami::load(m_data, _tmpfileName, _size)) {
EWOL_ERROR("ERROR when loading the image : " << _tmpfileName);
@ -55,7 +55,7 @@ static int32_t nextP2(int32_t _value) {
ewol::TextureFile* ewol::TextureFile::keep(const etk::UString& _filename, ivec2 _size) {
ewol::TextureFile* ewol::TextureFile::keep(const std::string& _filename, ivec2 _size) {
EWOL_VERBOSE("KEEP: TextureFile: '" << _filename << "' size=" << _size);
if (_filename == "") {
ewol::TextureFile* object = new ewol::TextureFile("");
@ -74,8 +74,8 @@ ewol::TextureFile* ewol::TextureFile::keep(const etk::UString& _filename, ivec2
_size.setY(-1);
//EWOL_ERROR("Error Request the image size.y() =0 ???");
}
etk::UString TmpFilename = _filename;
if (false == _filename.endWith(".svg") ) {
std::string TmpFilename = _filename;
if (false == end_with(_filename, ".svg") ) {
_size = ivec2(-1,-1);
}
#ifdef __TARGET_OS__MacOs

View File

@ -20,8 +20,8 @@ namespace ewol {
private:
vec2 m_realImageSize;
private:
TextureFile(const etk::UString& _genName);
TextureFile(etk::UString _genName, const etk::UString& _fileName, const ivec2& _size);
TextureFile(const std::string& _genName);
TextureFile(std::string _genName, const std::string& _fileName, const ivec2& _size);
~TextureFile(void) { };
public:
virtual const char* getType(void) { return "ewol::TextureFile"; };
@ -34,7 +34,7 @@ namespace ewol {
* @param[in] _requested size of the image (usefull when loading .svg to automatic rescale)
* @return pointer on the resource or NULL if an error occured.
*/
static ewol::TextureFile* keep(const etk::UString& _filename, ivec2 _size=ivec2(-1,-1));
static ewol::TextureFile* keep(const std::string& _filename, ivec2 _size=ivec2(-1,-1));
/**
* @brief release the keeped resources
* @param[in,out] reference on the object pointer

View File

@ -14,7 +14,7 @@
#undef __class__
#define __class__ "Mesh"
ewol::Mesh::Mesh(const etk::UString& _fileName, const etk::UString& _shaderName) :
ewol::Mesh::Mesh(const std::string& _fileName, const std::string& _shaderName) :
ewol::Resource(_fileName),
m_normalMode(normalModeNone),
m_checkNormal(false),
@ -46,15 +46,15 @@ ewol::Mesh::Mesh(const etk::UString& _fileName, const etk::UString& _shaderName)
m_verticesVBO = ewol::VirtualBufferObject::keep(4);
// load the curent file :
etk::UString tmpName = _fileName.toLower();
std::string tmpName = to_lower(_fileName);
// select the corect loader :
if (true == tmpName.endWith(".obj") ) {
if (false == loadOBJ(_fileName)) {
if (end_with(tmpName, ".obj") == true) {
if (loadOBJ(_fileName) == false) {
EWOL_ERROR("Error To load OBJ file " << tmpName );
return;
}
} else if (true == tmpName.endWith(".emf") ) {
if (false == loadEMF(_fileName)) {
} else if (end_with(tmpName, ".emf") ) {
if (loadEMF(_fileName) == false) {
EWOL_ERROR("Error To load EMF file " << tmpName );
return;
}
@ -283,7 +283,7 @@ void ewol::Mesh::generateVBO(void) {
}
void ewol::Mesh::createViewBox(const etk::UString& _materialName,float _size) {
void ewol::Mesh::createViewBox(const std::string& _materialName,float _size) {
m_normalMode = ewol::Mesh::normalModeNone;
// This is the direct generation basis on the .obj system
/*
@ -376,7 +376,7 @@ void ewol::Mesh::createViewBox(const etk::UString& _materialName,float _size) {
}
bool ewol::Mesh::loadOBJ(const etk::UString& _fileName) {
bool ewol::Mesh::loadOBJ(const std::string& _fileName) {
m_normalMode = ewol::Mesh::normalModeNone;
#if 0
etk::FSNode fileName(_fileName);
@ -482,7 +482,7 @@ bool ewol::Mesh::loadOBJ(const etk::UString& _fileName) {
}
inputDataLine[strlen(inputDataLine)-1] = '\0';
}
etk::UString tmpVal(&inputDataLine[7]);
std::string tmpVal(&inputDataLine[7]);
setTexture(fileName.getRelativeFolder() + tmpVal);
} else if( inputDataLine[0] == 'm'
&& inputDataLine[1] == 't'
@ -625,7 +625,7 @@ enum emfModuleMode {
EMFModuleMaterial_END,
};
bool ewol::Mesh::loadEMF(const etk::UString& _fileName) {
bool ewol::Mesh::loadEMF(const std::string& _fileName) {
m_checkNormal = true;
m_normalMode = ewol::Mesh::normalModeNone;
etk::FSNode fileName(_fileName);
@ -654,10 +654,10 @@ bool ewol::Mesh::loadEMF(const etk::UString& _fileName) {
enum emfModuleMode currentMode = EMFModuleNone;
EWOL_VERBOSE("Start parsing Mesh file : " << fileName);
// mesh global param :
etk::UString currentMeshName = "";
std::string currentMeshName = "";
int32_t meshFaceMaterialID = -1;
// material global param :
etk::UString materialName = "";
std::string materialName = "";
ewol::Material* material = NULL;
// physical shape:
ewol::PhysicsShape* physics = NULL;
@ -992,7 +992,7 @@ bool ewol::Mesh::loadEMF(const etk::UString& _fileName) {
return true;
}
void ewol::Mesh::addMaterial(const etk::UString& _name, ewol::Material* _data) {
void ewol::Mesh::addMaterial(const std::string& _name, ewol::Material* _data) {
if (NULL == _data) {
EWOL_ERROR(" can not add material with null pointer");
return;
@ -1013,7 +1013,7 @@ void ewol::Mesh::setShape(void* _shape) {
m_pointerShape=_shape;
}
ewol::Mesh* ewol::Mesh::keep(const etk::UString& _meshName) {
ewol::Mesh* ewol::Mesh::keep(const std::string& _meshName) {
ewol::Mesh* object = static_cast<ewol::Mesh*>(getManager().localKeep(_meshName));
if (NULL != object) {
return object;

View File

@ -102,7 +102,7 @@ namespace ewol {
protected:
ewol::VirtualBufferObject* m_verticesVBO;
protected:
Mesh(const etk::UString& _fileName, const etk::UString& _shaderName="DATA:textured3D2.prog");
Mesh(const std::string& _fileName, const std::string& _shaderName="DATA:textured3D2.prog");
virtual ~Mesh(void);
public:
virtual const char* getType(void) { return "ewol::Mesh"; };
@ -112,12 +112,12 @@ namespace ewol {
void calculateNormaleFace(void);
void calculateNormaleEdge(void);
public :
void createViewBox(const etk::UString& _materialName,float _size=1.0);
void createViewBox(const std::string& _materialName,float _size=1.0);
private:
bool loadOBJ(const etk::UString& _fileName);
bool loadEMF(const etk::UString& _fileName);
bool loadOBJ(const std::string& _fileName);
bool loadEMF(const std::string& _fileName);
public:
void addMaterial(const etk::UString& _name, ewol::Material* _data);
void addMaterial(const std::string& _name, ewol::Material* _data);
public:
/**
* @brief set the check of normal position befor sending it to the openGl card
@ -154,7 +154,7 @@ namespace ewol {
* @param[in] _filename Name of the ewol mesh file.
* @return pointer on the resource or NULL if an error occured.
*/
static ewol::Mesh* keep(const etk::UString& _meshname);
static ewol::Mesh* keep(const std::string& _meshname);
/**
* @brief release the keeped resources
* @param[in,out] reference on the object pointer

View File

@ -19,7 +19,7 @@
#undef __class__
#define __class__ "Program"
ewol::Program::Program(const etk::UString& _filename) :
ewol::Program::Program(const std::string& _filename) :
ewol::Resource(_filename),
m_exist(false),
m_program(0),
@ -32,9 +32,9 @@ ewol::Program::Program(const etk::UString& _filename) :
etk::FSNode file(m_name);
if (false == file.exist()) {
EWOL_INFO("File does not Exist : \"" << file << "\" == > automatic load of framment and shader with same names... ");
etk::UString tmpFilename = m_name;
std::string tmpFilename = m_name;
// remove extention ...
tmpFilename.remove(tmpFilename.size()-4, 4);
tmpFilename.erase(tmpFilename.size()-4, 4);
ewol::Shader* tmpShader = ewol::Shader::keep(tmpFilename+"vert");
if (NULL == tmpShader) {
EWOL_CRITICAL("Error while getting a specific shader filename : " << tmpFilename);
@ -52,7 +52,7 @@ ewol::Program::Program(const etk::UString& _filename) :
m_shaderList.push_back(tmpShader);
}
} else {
etk::UString fileExtention = file.fileGetExtention();
std::string fileExtention = file.fileGetExtention();
if (fileExtention != "prog") {
EWOL_ERROR("File does not have extention \".prog\" for program but : \"" << fileExtention << "\"");
return;
@ -78,7 +78,7 @@ ewol::Program::Program(const etk::UString& _filename) :
continue;
}
// get it with relative position :
etk::UString tmpFilename = file.getRelativeFolder() + tmpData;
std::string tmpFilename = file.getRelativeFolder() + tmpData;
ewol::Shader* tmpShader = ewol::Shader::keep(tmpFilename);
if (NULL == tmpShader) {
EWOL_CRITICAL("Error while getting a specific shader filename : " << tmpFilename);
@ -115,7 +115,7 @@ static void checkGlError(const char* _op, int32_t _localLine) {
#define LOG_OGL_INTERNAL_BUFFER_LEN (8192)
static char l_bufferDisplayError[LOG_OGL_INTERNAL_BUFFER_LEN] = "";
int32_t ewol::Program::getAttribute(etk::UString _elementName) {
int32_t ewol::Program::getAttribute(std::string _elementName) {
// check if it exist previously :
for(int32_t iii=0; iii<m_elementList.size(); iii++) {
if (m_elementList[iii].m_name == _elementName) {
@ -136,7 +136,7 @@ int32_t ewol::Program::getAttribute(etk::UString _elementName) {
return m_elementList.size()-1;
}
int32_t ewol::Program::getUniform(etk::UString _elementName) {
int32_t ewol::Program::getUniform(std::string _elementName) {
// check if it exist previously :
for(int32_t iii=0; iii<m_elementList.size(); iii++) {
if (m_elementList[iii].m_name == _elementName) {
@ -773,7 +773,7 @@ void ewol::Program::unUse(void) {
ewol::Program* ewol::Program::keep(const etk::UString& _filename) {
ewol::Program* ewol::Program::keep(const std::string& _filename) {
EWOL_VERBOSE("KEEP : Program : file : \"" << _filename << "\"");
ewol::Program* object = static_cast<ewol::Program*>(getManager().localKeep(_filename));
if (NULL != object) {

View File

@ -25,7 +25,7 @@ namespace ewol {
*/
class progAttributeElement {
public :
etk::UString m_name; //!< Name of the element
std::string m_name; //!< Name of the element
GLint m_elementId; //!< openGl Id if this element == > can not exist ==> @ref m_isLinked
bool m_isAttribute; //!< true if it was an attribute element, otherwite it was an uniform
bool m_isLinked; //!< if this element does not exist this is false
@ -56,7 +56,7 @@ namespace ewol {
* @brief Contructor of an opengl Program.
* @param[in] filename Standard file name format. see @ref etk::FSNode
*/
Program(const etk::UString& filename);
Program(const std::string& filename);
/**
* @brief Destructor, remove the current Program.
*/
@ -73,7 +73,7 @@ namespace ewol {
* @param[in] _elementName Name of the requested attribute.
* @return An abstract ID of the current attribute (this value is all time availlable, even if the program will be reloaded)
*/
int32_t getAttribute(etk::UString _elementName);
int32_t getAttribute(std::string _elementName);
/**
* @brief Send attribute table to the spefified ID attribure (not send if does not really exist in the openGL program).
* @param[in] _idElem Id of the Attribute that might be sended.
@ -97,7 +97,7 @@ namespace ewol {
* @param[in] _elementName Name of the requested uniform.
* @return An abstract ID of the current uniform (this value is all time availlable, even if the program will be reloaded)
*/
int32_t getUniform(etk::UString _elementName);
int32_t getUniform(std::string _elementName);
/**
* @brief Send a uniform element to the spefified ID (not send if does not really exist in the openGL program)
* @param[in] _idElem Id of the uniform that might be sended.
@ -272,7 +272,7 @@ namespace ewol {
* @param[in] _filename Name of the openGL program.
* @return pointer on the resource or NULL if an error occured.
*/
static ewol::Program* keep(const etk::UString& _filename);
static ewol::Program* keep(const std::string& _filename);
/**
* @brief release the keeped resources
* @param[in,out] reference on the object pointer

View File

@ -29,7 +29,7 @@ namespace ewol {
private:
static uint32_t m_valBase;
protected:
etk::UString m_name;
std::string m_name;
uint32_t m_counter;
uint32_t m_uniqueId;
uint8_t m_resourceLevel;
@ -41,7 +41,7 @@ namespace ewol {
m_uniqueId = m_valBase;
m_valBase++;
};
Resource(const etk::UString& _filename) :
Resource(const std::string& _filename) :
m_name(_filename),
m_counter(1),
m_resourceLevel(MAX_RESOURCE_LEVEL-1) {
@ -49,11 +49,11 @@ namespace ewol {
m_valBase++;
};
virtual ~Resource(void) { };
virtual bool hasName(const etk::UString& _fileName) {
virtual bool hasName(const std::string& _fileName) {
EWOL_VERBOSE("G : check : " << _fileName << " ?= " << m_name << " = " << (_fileName == m_name) );
return _fileName == m_name;
};
virtual const etk::UString& getName(void) { return m_name; };
virtual const std::string& getName(void) { return m_name; };
void increment(void) { m_counter++; };
bool decrement(void) { m_counter--; return (m_counter == 0)?true:false; };
int32_t getCounter(void) { return m_counter; };

View File

@ -149,7 +149,7 @@ void ewol::ResourceManager::contextHasBeenDestroyed(void) {
}
// internal generic keeper ...
ewol::Resource* ewol::ResourceManager::localKeep(const etk::UString& _filename) {
ewol::Resource* ewol::ResourceManager::localKeep(const std::string& _filename) {
EWOL_VERBOSE("KEEP (DEFAULT) : file : \"" << _filename << "\"");
for (int32_t iii=0; iii<m_resourceList.size(); iii++) {
if (m_resourceList[iii] != NULL) {

View File

@ -66,7 +66,7 @@ namespace ewol {
void contextHasBeenDestroyed(void);
public:
// internal API to extent eResources in extern Soft
ewol::Resource* localKeep(const etk::UString& _filename);
ewol::Resource* localKeep(const std::string& _filename);
void localAdd(ewol::Resource* _object);
public:
/**

View File

@ -15,7 +15,7 @@
#undef __class__
#define __class__ "Shader"
ewol::Shader::Shader(const etk::UString& _filename) :
ewol::Shader::Shader(const std::string& _filename) :
ewol::Resource(_filename),
m_exist(false),
m_fileData(NULL),
@ -25,9 +25,9 @@ ewol::Shader::Shader(const etk::UString& _filename) :
EWOL_DEBUG("OGL : load SHADER \"" << _filename << "\"");
// load data from file "all the time ..."
if (true == m_name.endWith(".frag") ) {
if (end_with(m_name, ".frag") == true) {
m_type = GL_FRAGMENT_SHADER;
} else if (true == m_name.endWith(".vert") ) {
} else if (end_with(m_name, ".vert") == true) {
m_type = GL_VERTEX_SHADER;
} else {
EWOL_ERROR("File does not have extention \".vert\" for Vertex Shader or \".frag\" for Fragment Shader. but : \"" << m_name << "\"");
@ -86,7 +86,7 @@ void ewol::Shader::updateContext(void) {
}
EWOL_ERROR("Could not compile \"" << tmpShaderType << "\" name='" << m_name << "'");
EWOL_ERROR("Error " << l_bufferDisplayError);
std::vector<etk::UString> lines = etk::UString(m_fileData).split('\n');
std::vector<std::string> lines = string_split(m_fileData, '\n');
for (esize_t iii=0 ; iii<lines.size() ; iii++) {
EWOL_ERROR("file " << (iii+1) << "|" << lines[iii]);
}
@ -148,7 +148,7 @@ void ewol::Shader::reload(void) {
updateContext();
}
ewol::Shader* ewol::Shader::keep(const etk::UString& _filename) {
ewol::Shader* ewol::Shader::keep(const std::string& _filename) {
EWOL_VERBOSE("KEEP : Simpleshader : file : \"" << _filename << "\"");
ewol::Shader* object = static_cast<ewol::Shader*>(getManager().localKeep(_filename));
if (NULL != object) {

View File

@ -29,7 +29,7 @@ namespace ewol {
* @brief Contructor of an opengl Shader
* @param[in] filename Standard file name format. see @ref etk::FSNode
*/
Shader(const etk::UString& _filename);
Shader(const std::string& _filename);
/**
* @brief Destructor, remove the current Shader
*/
@ -74,7 +74,7 @@ namespace ewol {
* @param[in] _filename Name of the openGL Shader.
* @return pointer on the resource or NULL if an error occured.
*/
static ewol::Shader* keep(const etk::UString& _filename);
static ewol::Shader* keep(const std::string& _filename);
/**
* @brief release the keeped resources
* @param[in,out] reference on the object pointer

View File

@ -34,7 +34,7 @@ static int32_t nextP2(int32_t _value) {
}
ewol::Texture::Texture(const etk::UString& _filename) :
ewol::Texture::Texture(const std::string& _filename) :
ewol::Resource(_filename) {
m_loaded = false;
m_texId = 0;

View File

@ -37,7 +37,7 @@ namespace ewol {
vec2 getUsableSize(void) { return m_endPointSize; };
// Public API:
protected:
Texture(const etk::UString& _filename);
Texture(const std::string& _filename);
Texture(void);
~Texture(void);
public:

View File

@ -42,7 +42,7 @@ etk::CCout& ewol::operator <<(etk::CCout& _os, enum ewol::font::mode _obj) {
#undef __class__
#define __class__ "TexturedFont"
ewol::TexturedFont::TexturedFont(const etk::UString& _fontName) :
ewol::TexturedFont::TexturedFont(const std::string& _fontName) :
ewol::Texture(_fontName) {
m_font[0] = NULL;
m_font[1] = NULL;
@ -66,8 +66,7 @@ ewol::TexturedFont::TexturedFont(const etk::UString& _fontName) :
int32_t tmpSize = 0;
// extarct name and size :
etk::Char tmpChar = _fontName.c_str();
const char * tmpData = tmpChar;
const char * tmpData = _fontName.c_str();
const char * tmpPos = strchr(tmpData, ':');
if (tmpPos == NULL) {
@ -81,10 +80,10 @@ ewol::TexturedFont::TexturedFont(const etk::UString& _fontName) :
return;
}
}
etk::UString localName = _fontName.extract(0, (tmpPos - tmpData));
std::string localName(_fontName, 0, (tmpPos - tmpData));
m_size = tmpSize;
std::vector<etk::UString> folderList;
std::vector<std::string> folderList;
if (true == ewol::getContext().getFontDefault().getUseExternal()) {
#if defined(__TARGET_OS__Android)
folderList.push_back("/system/fonts");
@ -96,9 +95,9 @@ ewol::TexturedFont::TexturedFont(const etk::UString& _fontName) :
for (int32_t folderID=0; folderID<folderList.size() ; folderID++) {
etk::FSNode myFolder(folderList[folderID]);
// find the real Font name :
std::vector<etk::UString> output;
std::vector<std::string> output;
myFolder.folderGetRecursiveFiles(output);
std::vector<etk::UString> split = localName.split(';');
std::vector<std::string> split = string_split(localName, ';');
EWOL_INFO("try to find font named : " << split << " in: " << myFolder);
//EWOL_CRITICAL("parse string : " << split);
bool hasFindAFont = false;
@ -106,42 +105,42 @@ ewol::TexturedFont::TexturedFont(const etk::UString& _fontName) :
EWOL_INFO(" try with : '" << split[jjj] << "'");
for (int32_t iii=0; iii<output.size(); iii++) {
//EWOL_DEBUG(" file : " << output[iii]);
if( true == output[iii].endWith(split[jjj]+"-"+"bold"+".ttf", false)
|| true == output[iii].endWith(split[jjj]+"-"+"b"+".ttf", false)
|| true == output[iii].endWith(split[jjj]+"-"+"bd"+".ttf", false)
|| true == output[iii].endWith(split[jjj]+"bold"+".ttf", false)
|| true == output[iii].endWith(split[jjj]+"bd"+".ttf", false)
|| true == output[iii].endWith(split[jjj]+"b"+".ttf", false)) {
if( true == end_with(output[iii], split[jjj]+"-"+"bold"+".ttf", false)
|| true == end_with(output[iii], split[jjj]+"-"+"b"+".ttf", false)
|| true == end_with(output[iii], split[jjj]+"-"+"bd"+".ttf", false)
|| true == end_with(output[iii], split[jjj]+"bold"+".ttf", false)
|| true == end_with(output[iii], split[jjj]+"bd"+".ttf", false)
|| true == end_with(output[iii], split[jjj]+"b"+".ttf", false)) {
EWOL_INFO(" find Font [Bold] : " << output[iii]);
m_fileName[ewol::font::Bold] = output[iii];
hasFindAFont=true;
} else if( true == output[iii].endWith(split[jjj]+"-"+"oblique"+".ttf", false)
|| true == output[iii].endWith(split[jjj]+"-"+"italic"+".ttf", false)
|| true == output[iii].endWith(split[jjj]+"-"+"Light"+".ttf", false)
|| true == output[iii].endWith(split[jjj]+"-"+"i"+".ttf", false)
|| true == output[iii].endWith(split[jjj]+"oblique"+".ttf", false)
|| true == output[iii].endWith(split[jjj]+"italic"+".ttf", false)
|| true == output[iii].endWith(split[jjj]+"light"+".ttf", false)
|| true == output[iii].endWith(split[jjj]+"i"+".ttf", false)) {
} else if( true == end_with(output[iii], split[jjj]+"-"+"oblique"+".ttf", false)
|| true == end_with(output[iii], split[jjj]+"-"+"italic"+".ttf", false)
|| true == end_with(output[iii], split[jjj]+"-"+"Light"+".ttf", false)
|| true == end_with(output[iii], split[jjj]+"-"+"i"+".ttf", false)
|| true == end_with(output[iii], split[jjj]+"oblique"+".ttf", false)
|| true == end_with(output[iii], split[jjj]+"italic"+".ttf", false)
|| true == end_with(output[iii], split[jjj]+"light"+".ttf", false)
|| true == end_with(output[iii], split[jjj]+"i"+".ttf", false)) {
EWOL_INFO(" find Font [Italic] : " << output[iii]);
m_fileName[ewol::font::Italic] = output[iii];
hasFindAFont=true;
} else if( true == output[iii].endWith(split[jjj]+"-"+"bolditalic"+".ttf", false)
|| true == output[iii].endWith(split[jjj]+"-"+"boldoblique"+".ttf", false)
|| true == output[iii].endWith(split[jjj]+"-"+"bi"+".ttf", false)
|| true == output[iii].endWith(split[jjj]+"-"+"z"+".ttf", false)
|| true == output[iii].endWith(split[jjj]+"bolditalic"+".ttf", false)
|| true == output[iii].endWith(split[jjj]+"boldoblique"+".ttf", false)
|| true == output[iii].endWith(split[jjj]+"bi"+".ttf", false)
|| true == output[iii].endWith(split[jjj]+"z"+".ttf", false)) {
} else if( true == end_with(output[iii], split[jjj]+"-"+"bolditalic"+".ttf", false)
|| true == end_with(output[iii], split[jjj]+"-"+"boldoblique"+".ttf", false)
|| true == end_with(output[iii], split[jjj]+"-"+"bi"+".ttf", false)
|| true == end_with(output[iii], split[jjj]+"-"+"z"+".ttf", false)
|| true == end_with(output[iii], split[jjj]+"bolditalic"+".ttf", false)
|| true == end_with(output[iii], split[jjj]+"boldoblique"+".ttf", false)
|| true == end_with(output[iii], split[jjj]+"bi"+".ttf", false)
|| true == end_with(output[iii], split[jjj]+"z"+".ttf", false)) {
EWOL_INFO(" find Font [Bold-Italic] : " << output[iii]);
m_fileName[ewol::font::BoldItalic] = output[iii];
hasFindAFont=true;
} else if( true == output[iii].endWith(split[jjj]+"-"+"regular"+".ttf", false)
|| true == output[iii].endWith(split[jjj]+"-"+"r"+".ttf", false)
|| true == output[iii].endWith(split[jjj]+"regular"+".ttf", false)
|| true == output[iii].endWith(split[jjj]+"r"+".ttf", false)
|| true == output[iii].endWith(split[jjj]+".ttf", false)) {
} else if( true == end_with(output[iii], split[jjj]+"-"+"regular"+".ttf", false)
|| true == end_with(output[iii], split[jjj]+"-"+"r"+".ttf", false)
|| true == end_with(output[iii], split[jjj]+"regular"+".ttf", false)
|| true == end_with(output[iii], split[jjj]+"r"+".ttf", false)
|| true == end_with(output[iii], split[jjj]+".ttf", false)) {
EWOL_INFO(" find Font [Regular] : " << output[iii]);
m_fileName[ewol::font::Regular] = output[iii];
hasFindAFont=true;
@ -164,7 +163,7 @@ ewol::TexturedFont::TexturedFont(const etk::UString& _fontName) :
// try to find the reference mode :
enum ewol::font::mode refMode = ewol::font::Regular;
for(int32_t iii=3; iii >= 0; iii--) {
if (m_fileName[iii].isEmpty() == false) {
if (m_fileName[iii].size() != 0) {
refMode = (enum ewol::font::mode)iii;
}
}
@ -172,7 +171,7 @@ ewol::TexturedFont::TexturedFont(const etk::UString& _fontName) :
EWOL_DEBUG(" set reference mode : " << refMode);
// generate the wrapping on the preventing error
for(int32_t iii=3; iii >= 0; iii--) {
if (m_fileName[iii].isEmpty() == false) {
if (m_fileName[iii].size() != 0) {
m_modeWraping[iii] = (enum ewol::font::mode)iii;
} else {
m_modeWraping[iii] = refMode;
@ -180,7 +179,7 @@ ewol::TexturedFont::TexturedFont(const etk::UString& _fontName) :
}
for (int32_t iiiFontId=0; iiiFontId<4 ; iiiFontId++) {
if (m_fileName[iiiFontId].isEmpty() == true) {
if (m_fileName[iiiFontId].size() == 0) {
EWOL_DEBUG("can not load FONT [" << iiiFontId << "] name : \"" << m_fileName[iiiFontId] << "\" == > size=" << m_size );
m_font[iiiFontId] = NULL;
continue;
@ -204,16 +203,10 @@ ewol::TexturedFont::TexturedFont(const etk::UString& _fontName) :
m_data.clear(etk::Color<>(0x00000000));
}
// add error glyph
{
etk::UChar tmpchar;
tmpchar.set(0);
addGlyph(tmpchar);
}
addGlyph(0);
// by default we set only the first AINSI char availlable
for (int32_t iii=0x20; iii<0x7F; iii++) {
etk::UChar tmpchar;
tmpchar.set(iii);
addGlyph(tmpchar);
addGlyph(iii);
}
flush();
EWOL_DEBUG("Wrapping properties : ");
@ -229,7 +222,7 @@ ewol::TexturedFont::~TexturedFont(void) {
}
}
bool ewol::TexturedFont::addGlyph(const etk::UChar& _val) {
bool ewol::TexturedFont::addGlyph(const char32_t& _val) {
bool hasChange = false;
// for each font :
for (int32_t iii=0; iii<4 ; iii++) {
@ -279,7 +272,7 @@ bool ewol::TexturedFont::addGlyph(const etk::UChar& _val) {
// update the Bitmap position drawing :
m_lastGlyphPos[iii] += ivec2(tmpchar.m_sizeTexture.x()+1, 0);
} else {
EWOL_WARNING("Did not find char : '" << _val << "'=" << _val.get());
EWOL_WARNING("Did not find char : '" << _val << "'=" << _val);
tmpchar.setNotExist();
}
m_listElement[iii].push_back(tmpchar);
@ -297,11 +290,11 @@ bool ewol::TexturedFont::addGlyph(const etk::UChar& _val) {
return hasChange;
}
int32_t ewol::TexturedFont::getIndex(const etk::UChar& _charcode, const enum ewol::font::mode _displayMode) {
if (_charcode.get() < 0x20) {
int32_t ewol::TexturedFont::getIndex(const char32_t& _charcode, const enum ewol::font::mode _displayMode) {
if (_charcode < 0x20) {
return 0;
} else if (_charcode.get() < 0x80) {
return _charcode.get() - 0x1F;
} else if (_charcode < 0x80) {
return _charcode - 0x1F;
} else {
for (int32_t iii=0x80-0x20; iii < m_listElement[_displayMode].size(); iii++) {
//EWOL_DEBUG("search : '" << charcode << "' =?= '" << (m_listElement[displayMode])[iii].m_UVal << "'");
@ -323,7 +316,7 @@ int32_t ewol::TexturedFont::getIndex(const etk::UChar& _charcode, const enum ewo
return 0;
}
ewol::GlyphProperty* ewol::TexturedFont::getGlyphPointer(const etk::UChar& _charcode, const enum ewol::font::mode _displayMode) {
ewol::GlyphProperty* ewol::TexturedFont::getGlyphPointer(const char32_t& _charcode, const enum ewol::font::mode _displayMode) {
//EWOL_DEBUG("Get glyph property for mode: " << _displayMode << " == > wrapping index : " << m_modeWraping[_displayMode]);
int32_t index = getIndex(_charcode, _displayMode);
if( index < 0
@ -342,7 +335,7 @@ ewol::GlyphProperty* ewol::TexturedFont::getGlyphPointer(const etk::UChar& _char
return &((m_listElement[_displayMode])[index]);
}
ewol::TexturedFont* ewol::TexturedFont::keep(const etk::UString& _filename) {
ewol::TexturedFont* ewol::TexturedFont::keep(const std::string& _filename) {
EWOL_VERBOSE("KEEP : TexturedFont : file : '" << _filename << "'");
ewol::TexturedFont* object = static_cast<ewol::TexturedFont*>(getManager().localKeep(_filename));
if (NULL != object) {
@ -363,7 +356,7 @@ void ewol::TexturedFont::release(ewol::TexturedFont*& _object) {
if (NULL == _object) {
return;
}
etk::UString name = _object->getName();
std::string name = _object->getName();
int32_t count = _object->m_counter - 1;
ewol::Resource* object2 = static_cast<ewol::Resource*>(_object);
if (getManager().release(object2) == true) {

View File

@ -26,7 +26,7 @@ namespace ewol {
class TexturedFont : public ewol::Texture {
private:
etk::UString m_fileName[4];
std::string m_fileName[4];
int32_t m_size;
int32_t m_height[4];
// specific element to have the the know if the specify element is known...
@ -41,7 +41,7 @@ namespace ewol {
ivec2 m_lastGlyphPos[4];
int32_t m_lastRawHeigh[4];
protected:
TexturedFont(const etk::UString& _fontName);
TexturedFont(const std::string& _fontName);
~TexturedFont(void);
public:
const char* getType(void) {
@ -68,14 +68,14 @@ namespace ewol {
* @param[in] _displayMode Mode to display the currrent font
* @return The ID in the table (if it does not exist : return 0)
*/
int32_t getIndex(const etk::UChar& _charcode, const enum ewol::font::mode _displayMode);
int32_t getIndex(const char32_t& _charcode, const enum ewol::font::mode _displayMode);
/**
* @brief get the pointer on the coresponding glyph
* @param[in] _charcode The unicodeValue
* @param[in] _displayMode Mode to display the currrent font
* @return The pointer on the glyph == > never NULL
*/
ewol::GlyphProperty* getGlyphPointer(const etk::UChar& _charcode, const enum ewol::font::mode _displayMode);
ewol::GlyphProperty* getGlyphPointer(const char32_t& _charcode, const enum ewol::font::mode _displayMode);
/**
* @brief The wrapping mode is used to prevent the non existance of a specific mode.
* For exemple when a blod mode does not exist, this resend a regular mode.
@ -92,7 +92,7 @@ namespace ewol {
* @param[in] _filename Name of the texture font.
* @return pointer on the resource or NULL if an error occured.
*/
static ewol::TexturedFont* keep(const etk::UString& _filename);
static ewol::TexturedFont* keep(const std::string& _filename);
/**
* @brief release the keeped resources
* @param[in,out] reference on the object pointer
@ -104,7 +104,7 @@ namespace ewol {
* @param[in] _val Char value to add.
* @return true if the image size have change, false otherwise
*/
bool addGlyph(const etk::UChar& _val);
bool addGlyph(const char32_t& _val);
};

View File

@ -20,7 +20,7 @@
namespace ewol {
class FontBase : public ewol::Resource {
public:
FontBase(const etk::UString& _fontName) : ewol::Resource(_fontName) {};
FontBase(const std::string& _fontName) : ewol::Resource(_fontName) {};
virtual ~FontBase(void) { };
@ -35,7 +35,7 @@ namespace ewol {
ewol::GlyphProperty& _property,
int8_t _posInImage) = 0;
virtual vec2 getSize(int32_t _fontSize, const etk::UString& _unicodeString) = 0;
virtual vec2 getSize(int32_t _fontSize, const std::string& _unicodeString) = 0;
virtual int32_t getHeight(int32_t _fontSize) = 0;

View File

@ -50,7 +50,7 @@ namespace ewol {
class GlyphProperty {
public:
etk::UChar m_UVal; //!< Unicode value
char32_t m_UVal; //!< Unicode value
private:
bool m_exist;
public:
@ -74,7 +74,7 @@ namespace ewol {
m_texturePosSize(0,0) {
};
float kerningGet(const etk::UChar _charcode) {
float kerningGet(const char32_t _charcode) {
for(esize_t iii=0; iii<m_kerning.size(); iii++ ) {
if (m_kerning[iii].m_UVal == _charcode) {
return m_kerning[iii].m_value;
@ -82,7 +82,7 @@ namespace ewol {
}
return 0;
};
void kerningAdd(const etk::UChar _charcode, float _value)
void kerningAdd(const char32_t _charcode, float _value)
{
m_kerning.push_back(ewol::Kerning(_charcode, _value));
};

View File

@ -38,7 +38,7 @@ namespace ewol {
*/
class Kerning {
public:
etk::UChar m_UVal; //!< unicode value (the previous character that must be before)
char32_t m_UVal; //!< unicode value (the previous character that must be before)
float m_value; //!< kerning real offset
public:
/**
@ -54,7 +54,7 @@ namespace ewol {
* @param[in] _charcode The Unicode value of the coresponding character that might be before
* @param[in] _value The Kerning value of the offset (nb pixel number)
*/
Kerning(const etk::UChar _charcode, const float _value) :
Kerning(const char32_t _charcode, const float _value) :
m_UVal(_charcode),
m_value(_value) {

View File

@ -42,7 +42,7 @@ void widget::Button::init(ewol::WidgetManager& _widgetManager) {
_widgetManager.addWidgetCreator(__class__,&Create);
}
widget::Button::Button(const etk::UString& _shaperName) :
widget::Button::Button(const std::string& _shaperName) :
m_shaper(_shaperName),
m_value(false),
m_lock(widget::Button::lockNone),
@ -81,7 +81,7 @@ widget::Button::~Button(void) {
}
void widget::Button::setShaperName(const etk::UString& _shaperName) {
void widget::Button::setShaperName(const std::string& _shaperName) {
m_shaper.setSource(_shaperName);
markToRedraw();
}
@ -382,7 +382,7 @@ void widget::Button::periodicCall(const ewol::EventTime& _event) {
}
ewol::Widget* widget::Button::getWidgetNamed(const etk::UString& _widgetName) {
ewol::Widget* widget::Button::getWidgetNamed(const std::string& _widgetName) {
ewol::Widget* tmpUpperWidget = ewol::Widget::getWidgetNamed(_widgetName);
if (NULL!=tmpUpperWidget) {
return tmpUpperWidget;
@ -420,7 +420,7 @@ bool widget::Button::loadXML(exml::Element* _element) {
// trash here all that is not element
continue;
}
etk::UString widgetName = pNode->getValue();
std::string widgetName = pNode->getValue();
if (getWidgetManager().exist(widgetName) == false) {
EWOL_ERROR("(l "<<pNode->getPos()<<") Unknown basic node=\"" << widgetName << "\" not in : [" << getWidgetManager().list() << "]" );
continue;
@ -488,7 +488,7 @@ bool widget::Button::onSetConfig(const ewol::EConfig& _conf) {
return false;
}
bool widget::Button::onGetConfig(const char* _config, etk::UString& _result) const {
bool widget::Button::onGetConfig(const char* _config, std::string& _result) const {
if (true == ewol::Widget::onGetConfig(_config, _result)) {
return true;
}

View File

@ -52,7 +52,7 @@ namespace widget {
* @brief Constructor
* @param[in] _shaperName Shaper file properties
*/
Button(const etk::UString& _shaperName="THEME:GUI:widgetButton.conf");
Button(const std::string& _shaperName="THEME:GUI:widgetButton.conf");
/**
* @brief Destructor
*/
@ -61,7 +61,7 @@ namespace widget {
* @brief set the shaper name (use the contructer one this permit to not noad unused shaper)
* @param[in] _shaperName The new shaper filename
*/
void setShaperName(const etk::UString& _shaperName);
void setShaperName(const std::string& _shaperName);
protected:
ewol::Widget* m_subWidget[2]; //!< subwidget of the button
public:
@ -155,7 +155,7 @@ namespace widget {
protected: // Derived function
virtual void onDraw(void);
virtual bool onSetConfig(const ewol::EConfig& _conf);
virtual bool onGetConfig(const char* _config, etk::UString& _result) const;
virtual bool onGetConfig(const char* _config, std::string& _result) const;
public: // Derived function
virtual const char * const getObjectType(void) {
return "widget::Button";
@ -167,7 +167,7 @@ namespace widget {
virtual bool onEventInput(const ewol::EventInput& _event);
virtual bool onEventEntry(const ewol::EventEntry& _event);
virtual bool loadXML(exml::Element* _node);
virtual ewol::Widget* getWidgetNamed(const etk::UString& _widgetName);
virtual ewol::Widget* getWidgetNamed(const std::string& _widgetName);
private: // derived function
virtual void periodicCall(const ewol::EventTime& _event);
};

View File

@ -38,7 +38,7 @@ void widget::ButtonColor::init(ewol::WidgetManager& _widgetManager) {
_widgetManager.addWidgetCreator(__class__,&Create);
}
widget::ButtonColor::ButtonColor(etk::Color<> _baseColor, etk::UString _shaperName) :
widget::ButtonColor::ButtonColor(etk::Color<> _baseColor, std::string _shaperName) :
m_shaper(_shaperName),
m_textColorFg(_baseColor),
m_widgetContextMenu(NULL) {
@ -55,14 +55,14 @@ widget::ButtonColor::~ButtonColor(void) {
}
void widget::ButtonColor::setShaperName(etk::UString _shaperName) {
void widget::ButtonColor::setShaperName(std::string _shaperName) {
m_shaper.setSource(_shaperName);
}
void widget::ButtonColor::calculateMinMaxSize(void) {
vec2 padding = m_shaper.getPadding();
etk::UString label = m_textColorFg.getString();
std::string label = m_textColorFg.getString();
vec3 minSize = m_text.calculateSize(label);
m_minSize.setX(padding.x()*2 + minSize.x() + 7);
m_minSize.setY(padding.y()*2 + minSize.y() );
@ -84,7 +84,7 @@ void widget::ButtonColor::onRegenerateDisplay(void) {
vec2 padding = m_shaper.getPadding();
etk::UString label = m_textColorFg.getString();
std::string label = m_textColorFg.getString();
ivec2 localSize = m_minSize;

View File

@ -43,7 +43,7 @@ namespace widget {
* @param[in] _baseColor basic displayed color.
* @param[in] _shaperName The new shaper filename.
*/
ButtonColor(etk::Color<> _baseColor=etk::color::black, etk::UString _shaperName="THEME:GUI:widgetButton.conf");
ButtonColor(etk::Color<> _baseColor=etk::color::black, std::string _shaperName="THEME:GUI:widgetButton.conf");
/**
* @brief Main destructor.
*/
@ -52,7 +52,7 @@ namespace widget {
* @brief set the shaper name (use the contructer one this permit to not noad unused shaper).
* @param[in] _shaperName The new shaper filename.
*/
void setShaperName(etk::UString _shaperName);
void setShaperName(std::string _shaperName);
/**
* @brief get the current color of the color selection widget
* @return The current color

View File

@ -23,7 +23,7 @@ void widget::CheckBox::init(ewol::WidgetManager& _widgetManager) {
_widgetManager.addWidgetCreator(__class__,&Create);
}
widget::CheckBox::CheckBox(const etk::UString& _newLabel) {
widget::CheckBox::CheckBox(const std::string& _newLabel) {
m_label = _newLabel;
addEventId(ewolEventCheckBoxClicked);
m_textColorFg = etk::color::black;
@ -48,7 +48,7 @@ void widget::CheckBox::calculateMinMaxSize(void) {
}
void widget::CheckBox::setLabel(etk::UString _newLabel) {
void widget::CheckBox::setLabel(std::string _newLabel) {
m_label = _newLabel;
markToRedraw();
}

View File

@ -26,15 +26,15 @@ namespace widget {
public:
static void init(ewol::WidgetManager& _widgetManager);
public:
CheckBox(const etk::UString& newLabel = "No Label");
CheckBox(const std::string& newLabel = "No Label");
virtual ~CheckBox(void);
void setLabel(etk::UString newLabel);
void setLabel(std::string newLabel);
void setValue(bool val);
bool getValue(void);
private:
ewol::Text m_oObjectText;
ewol::Drawing m_oObjectDecoration;
etk::UString m_label;
std::string m_label;
bool m_value;
etk::Color<> m_textColorFg; //!< Text color
etk::Color<> m_textColorBg; //!< Background color

View File

@ -19,7 +19,7 @@ widget::Composer::Composer(void) {
// nothing to do ...
}
widget::Composer::Composer(enum composerMode _mode, const etk::UString& _fileName) {
widget::Composer::Composer(enum composerMode _mode, const std::string& _fileName) {
switch(_mode) {
case widget::Composer::None:
// nothing to do ...
@ -37,7 +37,7 @@ widget::Composer::~Composer(void) {
}
bool widget::Composer::loadFromFile(const etk::UString& _fileName) {
bool widget::Composer::loadFromFile(const std::string& _fileName) {
exml::Document doc;
if (doc.load(_fileName) == false) {
EWOL_ERROR(" can not load file XML : " << _fileName);
@ -62,7 +62,7 @@ bool widget::Composer::loadFromFile(const etk::UString& _fileName) {
return true;
}
bool widget::Composer::loadFromString(const etk::UString& _composerXmlString) {
bool widget::Composer::loadFromString(const std::string& _composerXmlString) {
exml::Document doc;
if (doc.parse(_composerXmlString) == false) {
EWOL_ERROR(" can not load file XML string...");
@ -88,18 +88,18 @@ bool widget::Composer::loadFromString(const etk::UString& _composerXmlString) {
}
void widget::Composer::registerOnEventNameWidget(const etk::UString& _subWidgetName,
void widget::Composer::registerOnEventNameWidget(const std::string& _subWidgetName,
const char * _eventId,
const char * _eventIdgenerated,
const etk::UString& _overloadData) {
const std::string& _overloadData) {
registerOnEventNameWidget(this, _subWidgetName, _eventId, _eventIdgenerated, _overloadData);
}
void widget::Composer::registerOnEventNameWidget(ewol::EObject * _destinationObject,
const etk::UString& _subWidgetName,
const std::string& _subWidgetName,
const char * _eventId,
const char * _eventIdgenerated,
const etk::UString& _overloadData) {
const std::string& _overloadData) {
ewol::Widget* tmpWidget = getWidgetNamed(_subWidgetName);
if (NULL != tmpWidget) {
//EWOL_DEBUG("Find widget named : \"" << _subWidgetName << "\" register event=\"" << _eventId << "\"");

View File

@ -37,7 +37,7 @@ namespace widget
* @param[in] _mode mode of parsing the string
* @param[in] _data file/directString data to generate compositing of the widget..
*/
Composer(enum composerMode _mode, const etk::UString& _data);
Composer(enum composerMode _mode, const std::string& _data);
/**
* @brief Destructor
*/
@ -48,14 +48,14 @@ namespace widget
* @return true == > all done OK
* @return false == > some error occured
*/
bool loadFromFile(const etk::UString& _fileName);
bool loadFromFile(const std::string& _fileName);
/**
* @brief load a composition with a file
* @param[in] _composerXmlString xml to parse directly
* @return true == > all done OK
* @return false == > some error occured
*/
bool loadFromString(const etk::UString& _composerXmlString);
bool loadFromString(const std::string& _composerXmlString);
/**
* @brief Register an Event an named widget. @see registerOnEvent
* @param[in] _subWidgetName Name of the subWidget.
@ -64,10 +64,10 @@ namespace widget
* @param[in] _overloadData When the user prever to receive a data specificly for this event ...
* @note : To used when herited from this object.
*/
void registerOnEventNameWidget(const etk::UString& _subWidgetName,
void registerOnEventNameWidget(const std::string& _subWidgetName,
const char * _eventId,
const char * _eventIdgenerated = NULL,
const etk::UString& _overloadData="");
const std::string& _overloadData="");
/**
* @brief Register an Event an named widget. @see registerOnEvent
* @param[in] _destinationObject pointer on the object that might be call when an event is generated
@ -78,10 +78,10 @@ namespace widget
* @note : To used when NOT herited from this object.
*/
void registerOnEventNameWidget(ewol::EObject * _destinationObject,
const etk::UString& _subWidgetName,
const std::string& _subWidgetName,
const char * _eventId,
const char * _eventIdgenerated = NULL,
const etk::UString& _overloadData="");
const std::string& _overloadData="");
public: // herited functions:
virtual const char * const getObjectType(void) {
return "widget::Composer";

View File

@ -65,7 +65,7 @@ void widget::Container::subWidgetRemoveDelayed(void) {
}
}
ewol::Widget* widget::Container::getWidgetNamed(const etk::UString& _widgetName) {
ewol::Widget* widget::Container::getWidgetNamed(const std::string& _widgetName) {
ewol::Widget* tmpUpperWidget = ewol::Widget::getWidgetNamed(_widgetName);
if (NULL!=tmpUpperWidget) {
return tmpUpperWidget;
@ -168,7 +168,7 @@ bool widget::Container::loadXML(exml::Element* _node) {
// trash here all that is not element
continue;
}
etk::UString widgetName = pNode->getValue();
std::string widgetName = pNode->getValue();
if (getWidgetManager().exist(widgetName) == false) {
EWOL_ERROR("(l "<<pNode->getPos()<<") Unknown basic node=\"" << widgetName << "\" not in : [" << getWidgetManager().list() << "]" );
continue;

View File

@ -57,7 +57,7 @@ namespace widget {
virtual void calculateSize(const vec2& _availlable);
virtual void calculateMinMaxSize(void);
virtual ewol::Widget* getWidgetAtPos(const vec2& _pos);
virtual ewol::Widget* getWidgetNamed(const etk::UString& _widgetName);
virtual ewol::Widget* getWidgetNamed(const std::string& _widgetName);
virtual const char * const getObjectType(void) {
return "widget::Container";
};

View File

@ -153,7 +153,7 @@ void widget::ContainerN::subWidgetRemoveAllDelayed(void) {
m_subWidget.clear();
}
ewol::Widget* widget::ContainerN::getWidgetNamed(const etk::UString& _widgetName) {
ewol::Widget* widget::ContainerN::getWidgetNamed(const std::string& _widgetName) {
ewol::Widget* tmpUpperWidget = ewol::Widget::getWidgetNamed(_widgetName);
if (NULL!=tmpUpperWidget) {
return tmpUpperWidget;
@ -275,7 +275,7 @@ bool widget::ContainerN::loadXML(exml::Element* _node) {
// remove previous element :
subWidgetRemoveAll();
etk::UString tmpAttributeValue = _node->getAttribute("lock");
std::string tmpAttributeValue = _node->getAttribute("lock");
if (tmpAttributeValue.size()!=0) {
m_lockExpand = tmpAttributeValue;
}
@ -291,7 +291,7 @@ bool widget::ContainerN::loadXML(exml::Element* _node) {
// trash here all that is not element
continue;
}
etk::UString widgetName = pNode->getValue();
std::string widgetName = pNode->getValue();
if (getWidgetManager().exist(widgetName) == false) {
EWOL_ERROR("[" << getId() << "] {" << getObjectType() << "} (l "<<pNode->getPos()<<") Unknown basic node=\"" << widgetName << "\" not in : [" << getWidgetManager().list() << "]" );
continue;

View File

@ -88,7 +88,7 @@ namespace widget {
virtual void calculateSize(const vec2& _availlable);
virtual void calculateMinMaxSize(void);
virtual ewol::Widget* getWidgetAtPos(const vec2& _pos);
virtual ewol::Widget* getWidgetNamed(const etk::UString& _widgetName);
virtual ewol::Widget* getWidgetNamed(const std::string& _widgetName);
virtual const char * const getObjectType(void) {
return "widget::ContainerN";
};

View File

@ -30,7 +30,7 @@ void widget::ContextMenu::init(ewol::WidgetManager& _widgetManager) {
widget::ContextMenu::ContextMenu(const etk::UString& _shaperName) :
widget::ContextMenu::ContextMenu(const std::string& _shaperName) :
m_shaper(_shaperName) {
// add basic configurations :
registerConfig(configArrowPosition, "vec2", NULL, "position of the arrow");
@ -55,7 +55,7 @@ widget::ContextMenu::~ContextMenu(void) {
}
void widget::ContextMenu::setShaperName(const etk::UString& _shaperName) {
void widget::ContextMenu::setShaperName(const std::string& _shaperName) {
m_shaper.setSource(_shaperName);
markToRedraw();
}
@ -276,7 +276,7 @@ bool widget::ContextMenu::onSetConfig(const ewol::EConfig& _conf) {
return false;
}
bool widget::ContextMenu::onGetConfig(const char* _config, etk::UString& _result) const {
bool widget::ContextMenu::onGetConfig(const char* _config, std::string& _result) const {
if (true == widget::Container::onGetConfig(_config, _result)) {
return true;
}

View File

@ -37,7 +37,7 @@ namespace widget {
static const char* const configArrowMode;
static const char* const configShaper;
public:
ContextMenu(const etk::UString& _shaperName="THEME:GUI:widgetContextMenu.conf");
ContextMenu(const std::string& _shaperName="THEME:GUI:widgetContextMenu.conf");
virtual ~ContextMenu(void);
private:
ewol::Shaper m_shaper; //!< Compositing theme.
@ -46,7 +46,7 @@ namespace widget {
* @brief set the shaper name (use the contructer one this permit to not noad unused shaper)
* @param[in] _shaperName The new shaper filename
*/
void setShaperName(const etk::UString& _shaperName);
void setShaperName(const std::string& _shaperName);
private:
// TODO : Rework the displayer ....
ewol::Drawing m_compositing;
@ -62,7 +62,7 @@ namespace widget {
protected: // Derived function
virtual void onDraw(void);
virtual bool onSetConfig(const ewol::EConfig& _conf);
virtual bool onGetConfig(const char* _config, etk::UString& _result) const;
virtual bool onGetConfig(const char* _config, std::string& _result) const;
public: // Derived function
virtual void onRegenerateDisplay(void);
virtual bool onEventInput(const ewol::EventInput& _event);

View File

@ -46,7 +46,7 @@ const char* const widget::Entry::configColorFg = "color";
const char* const widget::Entry::configColorBg = "background";
const char* const widget::Entry::configEmptyMessage = "emptytext";
widget::Entry::Entry(etk::UString _newData) :
widget::Entry::Entry(std::string _newData) :
m_shaper("THEME:GUI:widgetEntry.conf"),
m_data(""),
m_maxCharacter(0x7FFFFFFF),
@ -101,7 +101,7 @@ void widget::Entry::calculateMinMaxSize(void) {
ewol::Widget::calculateMinMaxSize();
// get generic padding
vec2 padding = m_shaper.getPadding();
int32_t minHeight = m_oObjectText.calculateSize(etk::UChar('A')).y();
int32_t minHeight = m_oObjectText.calculateSize(char32_t('A')).y();
vec2 minimumSizeBase(20, minHeight);
// add padding :
minimumSizeBase += padding*2.0f;
@ -111,8 +111,8 @@ void widget::Entry::calculateMinMaxSize(void) {
}
void widget::Entry::setValue(const etk::UString& _newData) {
etk::UString newData = _newData;
void widget::Entry::setValue(const std::string& _newData) {
std::string newData = _newData;
if (newData.size()>m_maxCharacter) {
newData = _newData.extract(0, m_maxCharacter);
EWOL_DEBUG("Limit entry set of data... " << _newData.extract(m_maxCharacter));
@ -153,7 +153,7 @@ void widget::Entry::onRegenerateDisplay(void) {
vec2 tmpSizeText = tmpSizeShaper - padding * 2.0f;
vec2 tmpOriginText = (m_size - tmpSizeText) / 2.0f;
// sometimes, the user define an height bigger than the real size needed == > in this case we need to center the text in the shaper ...
int32_t minHeight = m_oObjectText.calculateSize(etk::UChar('A')).y();
int32_t minHeight = m_oObjectText.calculateSize(char32_t('A')).y();
if (tmpSizeText.y()>minHeight) {
tmpOriginText += vec2(0,(tmpSizeText.y()-minHeight)/2.0f);
}
@ -191,7 +191,7 @@ void widget::Entry::updateCursorPosition(const vec2& _pos, bool _selection) {
vec2 relPos = relativePosition(_pos);
relPos.setX(relPos.x()-m_displayStartPosition - padding.x());
// try to find the new cursor position :
etk::UString tmpDisplay = m_data.extract(0, m_displayStartPosition);
std::string tmpDisplay = m_data.extract(0, m_displayStartPosition);
int32_t displayHidenSize = m_oObjectText.calculateSize(tmpDisplay).x();
//EWOL_DEBUG("hidenSize : " << displayHidenSize);
int32_t newCursorPosition = -1;
@ -253,7 +253,7 @@ void widget::Entry::copySelectionToClipBoard(enum ewol::clipBoard::clipboardList
pos1 = m_displayCursorPos;
}
// Copy
etk::UString tmpData = m_data.extract(pos1, pos2);
std::string tmpData = m_data.extract(pos1, pos2);
ewol::clipBoard::set(_clipboardID, tmpData);
}
@ -381,7 +381,7 @@ bool widget::Entry::onEventEntry(const ewol::EventEntry& _event) {
if (m_data.size() > m_maxCharacter) {
EWOL_INFO("Reject data for entry : '" << _event.getChar() << "'");
} else {
etk::UString newData = m_data;
std::string newData = m_data;
newData.add(m_displayCursorPos, _event.getChar());
setInternalValue(newData);
if (m_data == newData) {
@ -423,8 +423,8 @@ bool widget::Entry::onEventEntry(const ewol::EventEntry& _event) {
return false;
}
void widget::Entry::setInternalValue(const etk::UString& _newData) {
etk::UString previous = m_data;
void widget::Entry::setInternalValue(const std::string& _newData) {
std::string previous = m_data;
// check the RegExp :
if (_newData.size()>0) {
if (false == m_regExp.processOneElement(_newData,0,_newData.size()) ) {
@ -445,10 +445,10 @@ void widget::Entry::onEventClipboard(enum ewol::clipBoard::clipboardListe _clipb
// remove curent selected data ...
removeSelected();
// get current selection / Copy :
etk::UString tmpData = get(_clipboardID);
std::string tmpData = get(_clipboardID);
// add it on the current display :
if (tmpData.size() >= 0) {
etk::UString newData = m_data;
std::string newData = m_data;
newData.add(m_displayCursorPos, &tmpData[0]);
setInternalValue(newData);
if (m_data == newData) {
@ -514,7 +514,7 @@ void widget::Entry::updateTextPosition(void) {
m_displayStartPosition = 0;
} else {
// all can not be set :
etk::UString tmpDisplay = m_data.extract(0, m_displayCursorPos);
std::string tmpDisplay = m_data.extract(0, m_displayCursorPos);
int32_t pixelCursorPos = m_oObjectText.calculateSize(tmpDisplay).x();
// check if the Cussor is visible at 10px nearest the border :
int32_t tmp1 = pixelCursorPos+m_displayStartPosition;
@ -559,8 +559,8 @@ void widget::Entry::periodicCall(const ewol::EventTime& _event) {
markToRedraw();
}
void widget::Entry::setRegExp(const etk::UString& _expression) {
etk::UString previousRegExp = m_regExp.getRegExp();
void widget::Entry::setRegExp(const std::string& _expression) {
std::string previousRegExp = m_regExp.getRegExp();
EWOL_DEBUG("change input regExp \"" << previousRegExp << "\" == > \"" << _expression << "\"");
m_regExp.setRegExp(_expression);
if (m_regExp.getStatus() == false) {
@ -579,7 +579,7 @@ void widget::Entry::setColorTextSelected(const etk::Color<>& _color) {
markToRedraw();
}
void widget::Entry::setEmptyText(const etk::UString& _text) {
void widget::Entry::setEmptyText(const std::string& _text) {
m_textWhenNothing = _text;
markToRedraw();
}
@ -611,12 +611,12 @@ bool widget::Entry::onSetConfig(const ewol::EConfig& _conf) {
return false;
}
bool widget::Entry::onGetConfig(const char* _config, etk::UString& _result) const {
bool widget::Entry::onGetConfig(const char* _config, std::string& _result) const {
if (true == ewol::Widget::onGetConfig(_config, _result)) {
return true;
}
if (_config == configMaxChar) {
_result = etk::UString(getMaxChar());
_result = std::string(getMaxChar());
return true;
}
if (_config == configRegExp) {

View File

@ -52,31 +52,31 @@ namespace widget {
* @brief Contuctor
* @param[in] _newData The USting that might be set in the Entry box (no event generation!!)
*/
Entry(etk::UString _newData = "");
Entry(std::string _newData = "");
/**
* @brief Destuctor
*/
virtual ~Entry(void);
private:
etk::UString m_data; //!< sting that must be displayed
std::string m_data; //!< sting that must be displayed
protected:
/**
* @brief internal check the value with RegExp checking
* @param[in] _newData The new string to display
*/
void setInternalValue(const etk::UString& _newData);
void setInternalValue(const std::string& _newData);
public:
/**
* @brief set a new value on the entry.
* @param[in] _newData the new string to display.
*/
void setValue(const etk::UString& _newData);
void setValue(const std::string& _newData);
/**
* @brief get the current value in the entry
* @return The current display value
*/
etk::UString getValue(void) const {
std::string getValue(void) const {
return m_data;
};
@ -97,18 +97,18 @@ namespace widget {
};
private:
etk::RegExp<etk::UString> m_regExp; //!< regular expression to limit the input of an entry
etk::RegExp<std::string> m_regExp; //!< regular expression to limit the input of an entry
public:
/**
* @brief Limit the input entry at a regular expression... (by default it is "*")
* @param _expression New regular expression
*/
void setRegExp(const etk::UString& _expression);
void setRegExp(const std::string& _expression);
/**
* @brief get the regualar expression limitation
* @param The regExp string
*/
const etk::UString& getRegExp(void) const {
const std::string& getRegExp(void) const {
return m_regExp.getRegExp();
};
@ -180,18 +180,18 @@ namespace widget {
};
private:
etk::UString m_textWhenNothing; //!< Text to display when nothing in in the entry (decorated text...)
std::string m_textWhenNothing; //!< Text to display when nothing in in the entry (decorated text...)
public:
/**
* @brief set The text displayed when nothing is in the entry.
* @param _text Text to display when the entry box is empty (this text can be decorated).
*/
void setEmptyText(const etk::UString& _text);
void setEmptyText(const std::string& _text);
/**
* @brief get The text displayed when nothing is in the entry.
* @return Text display when nothing
*/
const etk::UString& getEmptyText(void) const {
const std::string& getEmptyText(void) const {
return m_textWhenNothing;
};
public: // Derived function
@ -211,7 +211,7 @@ namespace widget {
virtual void changeStatusIn(int32_t _newStatusId);
virtual void periodicCall(const ewol::EventTime& _event);
virtual bool onSetConfig(const ewol::EConfig& _conf);
virtual bool onGetConfig(const char* _config, etk::UString& _result) const;
virtual bool onGetConfig(const char* _config, std::string& _result) const;
};
};

View File

@ -32,7 +32,7 @@ const char * const widget::Image::configSize = "size";
const char * const widget::Image::configBorder = "border";
const char * const widget::Image::configSource = "src";
widget::Image::Image(const etk::UString& _file, const ewol::Dimension& _border) :
widget::Image::Image(const std::string& _file, const ewol::Dimension& _border) :
m_imageSize(vec2(0,0)),
m_keepRatio(true) {
addEventId(eventPressed);
@ -44,7 +44,7 @@ widget::Image::Image(const etk::UString& _file, const ewol::Dimension& _border)
}
void widget::Image::setFile(const etk::UString& _file) {
void widget::Image::setFile(const std::string& _file) {
EWOL_VERBOSE("Set Image : " << _file);
if (m_fileName != _file) {
// copy data :
@ -87,7 +87,7 @@ void widget::Image::setImageSize(const ewol::Dimension& _size) {
}
}
void widget::Image::set(const etk::UString& _file, const ewol::Dimension& _border) {
void widget::Image::set(const std::string& _file, const ewol::Dimension& _border) {
EWOL_VERBOSE("Set Image : " << _file << " border=" << _border);
// copy data :
if (m_border != _border) {
@ -192,7 +192,7 @@ bool widget::Image::loadXML(exml::Element* _node) {
ewol::Widget::loadXML(_node);
// get internal data :
etk::UString tmpAttributeValue = _node->getAttribute("ratio");
std::string tmpAttributeValue = _node->getAttribute("ratio");
if (tmpAttributeValue.size()!=0) {
if (tmpAttributeValue.compareNoCase("true") == true) {
m_keepRatio = true;
@ -247,7 +247,7 @@ bool widget::Image::onSetConfig(const ewol::EConfig& _conf) {
return false;
}
bool widget::Image::onGetConfig(const char* _config, etk::UString& _result) const {
bool widget::Image::onGetConfig(const char* _config, std::string& _result) const {
if (true == ewol::Widget::onGetConfig(_config, _result)) {
return true;
}

View File

@ -42,7 +42,7 @@ namespace widget {
/**
* @brief
*/
Image(const etk::UString& _file="",
Image(const std::string& _file="",
const ewol::Dimension& _border=ewol::Dimension(vec2(0,0),ewol::Dimension::Millimeter));
/**
* @brief
@ -53,20 +53,20 @@ namespace widget {
* @param[in] _file Filaneme of the new image
* @param[in] _border New border size to set
*/
void set(const etk::UString& _file, const ewol::Dimension& _border);
void set(const std::string& _file, const ewol::Dimension& _border);
protected:
etk::UString m_fileName; //!< file name of the image.
std::string m_fileName; //!< file name of the image.
public:
/**
* @brief set the new filename
* @param[in] _file Filaneme of the new image
*/
void setFile(const etk::UString& _file);
void setFile(const std::string& _file);
/**
* @brief get the file displayed
* @return the filename of the image
*/
const etk::UString& getFile(void) const {
const std::string& getFile(void) const {
return m_fileName;
};
protected:
@ -117,7 +117,7 @@ namespace widget {
protected: // Derived function
virtual void onDraw(void);
virtual bool onSetConfig(const ewol::EConfig& _conf);
virtual bool onGetConfig(const char* _config, etk::UString& _result) const;
virtual bool onGetConfig(const char* _config, std::string& _result) const;
public: // Derived function
virtual const char * const getObjectType(void) {
return "widget::Image";

View File

@ -17,8 +17,8 @@ extern const char * const ewolEventJoystickDisable = "ewol-joystick-disable";
extern const char * const ewolEventJoystickMove = "ewol-joystick-move";
static bool l_displayBackground(true);
static etk::UString l_background("");
static etk::UString l_foreground("");
static std::string l_background("");
static std::string l_foreground("");
static float l_ratio(1.0/7.0);
#undef __class__
@ -145,7 +145,7 @@ bool widget::Joystick::onEventInput(const ewol::EventInput& _event) {
if(ewol::keyEvent::statusDown == typeEvent) {
generateEventId(ewolEventJoystickEnable);
} else {
etk::UString tmp = etk::UString("distance=") + etk::UString(m_distance) + etk::UString("angle=") + etk::UString(m_angle+M_PI/2);
std::string tmp = std::string("distance=") + std::string(m_distance) + std::string("angle=") + std::string(m_angle+M_PI/2);
generateEventId(ewolEventJoystickMove, tmp);
}
//teta += M_PI/2;
@ -181,7 +181,7 @@ void widget::Joystick::ratio(float newRatio) {
}
void widget::Joystick::background(etk::UString imageNameInData, bool display) {
void widget::Joystick::background(std::string imageNameInData, bool display) {
// TODO : check if it existed
m_background = imageNameInData;
m_displayBackground = display;
@ -189,7 +189,7 @@ void widget::Joystick::background(etk::UString imageNameInData, bool display) {
}
void widget::Joystick::foreground(etk::UString imageNameInData) {
void widget::Joystick::foreground(std::string imageNameInData) {
// TODO : check if it existed
m_foreground = imageNameInData;
EWOL_INFO("Set default Joystick Foreground at " << m_foreground);

View File

@ -39,8 +39,8 @@ namespace widget {
private:
// generic property of the joystick:
bool m_displayBackground;
etk::UString m_background;
etk::UString m_foreground;
std::string m_background;
std::string m_foreground;
float m_ratio;
public:
Joystick(void);
@ -62,12 +62,12 @@ namespace widget {
* @param[in] _imageNameInData the new rbackground that might be set
* @param[in] _display
*/
void background(etk::UString _imageNameInData, bool _display=true);
void background(std::string _imageNameInData, bool _display=true);
/**
* @brief set the Foreground of the widget joystick
* @param[in] _imageNameInData the new Foreground that might be set
*/
void foreground(etk::UString _imageNameInData);
void foreground(std::string _imageNameInData);
/**
* @brief get the property of the joystick
* @param[out] _distance distance to the center

View File

@ -25,7 +25,7 @@ void widget::Label::init(ewol::WidgetManager& _widgetManager) {
_widgetManager.addWidgetCreator(__class__,&create);
}
widget::Label::Label(etk::UString _newLabel) {
widget::Label::Label(std::string _newLabel) {
m_label = _newLabel;
addEventId(eventPressed);
setCanHaveFocus(false);
@ -46,13 +46,13 @@ void widget::Label::calculateMinMaxSize(void) {
//EWOL_ERROR("[" << getId() << "] {" << getObjectType() << "} Result min size : " << m_minSize);
}
void widget::Label::setLabel(const etk::UString& _newLabel) {
void widget::Label::setLabel(const std::string& _newLabel) {
m_label = _newLabel;
markToRedraw();
requestUpdateSize();
}
etk::UString widget::Label::getLabel(void) {
std::string widget::Label::getLabel(void) {
return m_label;
}
@ -67,7 +67,7 @@ void widget::Label::onRegenerateDisplay(void) {
vec2 tmpMax = m_userMaxSize.getPixel();
// to know the size of one line :
vec3 minSize = m_text.calculateSize(etk::UChar('A'));
vec3 minSize = m_text.calculateSize(char32_t('A'));
if (tmpMax.x() <= 999999) {
m_text.setTextAlignement(0, tmpMax.x()-2*paddingSize, ewol::Text::alignLeft);
}

View File

@ -29,13 +29,13 @@ namespace widget {
static void init(ewol::WidgetManager& _widgetManager);
private:
ewol::Text m_text; //!< Compositing text element.
etk::UString m_label; //!< decorated text to display.
std::string m_label; //!< decorated text to display.
public:
/**
* @brief Constructor
* @param[in] _newLabel The displayed decorated text.
*/
Label(etk::UString _newLabel="---");
Label(std::string _newLabel="---");
/**
* @brief destructor
*/
@ -46,16 +46,16 @@ namespace widget {
* @brief change the label displayed
* @param[in] _newLabel The displayed decorated text.
*/
void setLabel(const etk::UString& _newLabel);
inline void setValue(const etk::UString& _newLabel) {
void setLabel(const std::string& _newLabel);
inline void setValue(const std::string& _newLabel) {
setLabel(_newLabel);
};
/**
* @brief get the current displayed label
* @return The displayed decorated text.
*/
etk::UString getLabel(void);
inline etk::UString getValue(void) {
std::string getLabel(void);
inline std::string getValue(void) {
return getLabel();
};
protected: // Derived function

View File

@ -167,7 +167,7 @@ void widget::List::onRegenerateDisplay(void) {
m_nbVisibleRaw = 0;
for(int32_t iii=startRaw; iii<nbRaw && displayPositionY >= 0; iii++) {
m_nbVisibleRaw++;
etk::UString myTextToWrite;
std::string myTextToWrite;
etk::Color<> fg;
etk::Color<> bg;
getElement(jjj, iii, myTextToWrite, fg, bg);
@ -175,7 +175,7 @@ void widget::List::onRegenerateDisplay(void) {
ewol::Text * tmpText = new ewol::Text();
if (NULL != tmpText) {
// get font size :
int32_t tmpFontHeight = tmpText->calculateSize(etk::UChar('A')).y();
int32_t tmpFontHeight = tmpText->calculateSize(char32_t('A')).y();
displayPositionY-=(tmpFontHeight+m_paddingSizeY);
BGOObjects->setColor(bg);

View File

@ -28,7 +28,7 @@ namespace widget {
};
virtual ~List(void);
virtual void calculateMinMaxSize(void);
void setLabel(etk::UString _newLabel);
void setLabel(std::string _newLabel);
// drawing capabilities ....
private:
std::vector<ewol::Compositing*> m_listOObject; //!< generic element to display...
@ -51,14 +51,14 @@ namespace widget {
virtual uint32_t getNuberOfColomn(void) {
return 1;
};
virtual bool getTitle(int32_t _colomn, etk::UString& _myTitle, etk::Color<> &_fg, etk::Color<> &_bg) {
virtual bool getTitle(int32_t _colomn, std::string& _myTitle, etk::Color<> &_fg, etk::Color<> &_bg) {
_myTitle = "";
return false;
};
virtual uint32_t getNuberOfRaw(void) {
return 0;
};
virtual bool getElement(int32_t _colomn, int32_t _raw, etk::UString &_myTextToWrite, etk::Color<> &_fg, etk::Color<> &_bg) {
virtual bool getElement(int32_t _colomn, int32_t _raw, std::string &_myTextToWrite, etk::Color<> &_fg, etk::Color<> &_bg) {
_myTextToWrite = "";
_bg = 0xFFFFFFFF;
_fg = 0x000000FF;

View File

@ -92,17 +92,17 @@ void widget::ListFileSystem::setShowFolder(bool _state) {
regenerateView();
}
void widget::ListFileSystem::setFolder(etk::UString _newFolder) {
void widget::ListFileSystem::setFolder(std::string _newFolder) {
m_folder = _newFolder;
regenerateView();
}
etk::UString widget::ListFileSystem::getFolder(void) {
std::string widget::ListFileSystem::getFolder(void) {
return m_folder;
}
etk::UString widget::ListFileSystem::getSelect(void) {
etk::UString tmpVal = "";
std::string widget::ListFileSystem::getSelect(void) {
std::string tmpVal = "";
if (m_selectedLine >= 0) {
if (m_list[m_selectedLine] != NULL) {
tmpVal = m_list[m_selectedLine]->getNameFile();
@ -112,7 +112,7 @@ etk::UString widget::ListFileSystem::getSelect(void) {
}
// select the specific file
void widget::ListFileSystem::setSelect( etk::UString _data) {
void widget::ListFileSystem::setSelect( std::string _data) {
// remove selected line
m_selectedLine = -1;
// search the coresponding file :
@ -132,7 +132,7 @@ uint32_t widget::ListFileSystem::getNuberOfColomn(void) {
return 1;
}
bool widget::ListFileSystem::getTitle(int32_t _colomn, etk::UString &_myTitle, etk::Color<>& _fg, etk::Color<>& _bg) {
bool widget::ListFileSystem::getTitle(int32_t _colomn, std::string &_myTitle, etk::Color<>& _fg, etk::Color<>& _bg) {
_myTitle = "title";
return true;
}
@ -145,7 +145,7 @@ uint32_t widget::ListFileSystem::getNuberOfRaw(void) {
return m_list.size() + offset;
}
bool widget::ListFileSystem::getElement(int32_t _colomn, int32_t _raw, etk::UString& _myTextToWrite, etk::Color<>& _fg, etk::Color<>& _bg) {
bool widget::ListFileSystem::getElement(int32_t _colomn, int32_t _raw, std::string& _myTextToWrite, etk::Color<>& _fg, etk::Color<>& _bg) {
int32_t offset = 0;
if (true == m_showFolder) {
offset = 2;

View File

@ -24,7 +24,7 @@ namespace widget {
class ListFileSystem : public widget::List {
private:
std::vector<etk::FSNode *> m_list;
etk::UString m_folder;
std::string m_folder;
int32_t m_selectedLine;
bool m_showFile;
bool m_showTemporaryFile;
@ -36,20 +36,20 @@ namespace widget {
// Derived function
virtual etk::Color<> getBasicBG(void);
uint32_t getNuberOfColomn(void);
bool getTitle(int32_t _colomn, etk::UString& _myTitle, etk::Color<>& _fg, etk::Color<>& _bg);
bool getTitle(int32_t _colomn, std::string& _myTitle, etk::Color<>& _fg, etk::Color<>& _bg);
uint32_t getNuberOfRaw(void);
bool getElement(int32_t _colomn, int32_t _raw, etk::UString& _myTextToWrite, etk::Color<>& _fg, etk::Color<>& _bg);
bool getElement(int32_t _colomn, int32_t _raw, std::string& _myTextToWrite, etk::Color<>& _fg, etk::Color<>& _bg);
bool onItemEvent(int32_t _IdInput, enum ewol::keyEvent::status _typeEvent, int32_t _colomn, int32_t _raw, float _x, float _y);
const char * const getObjectType(void) {
return "widget::ListFileSystem";
};
public:
// extern API :
void setFolder(etk::UString _newFolder);
etk::UString getFolder(void);
void setFolder(std::string _newFolder);
std::string getFolder(void);
// select the specific file
void setSelect(etk::UString _data);
etk::UString getSelect(void);
void setSelect(std::string _data);
std::string getSelect(void);
// regenerate the view ....
void regenerateView(void);
void setShowFiles(bool _state);

View File

@ -55,18 +55,18 @@ void widget::Menu::clear(void) {
m_listElement.clear();
}
int32_t widget::Menu::addTitle(etk::UString _label,
etk::UString _image,
int32_t widget::Menu::addTitle(std::string _label,
std::string _image,
const char * _generateEvent,
const etk::UString _message) {
const std::string _message) {
return add(-1, _label, _image, _generateEvent, _message);
}
int32_t widget::Menu::add(int32_t _parent,
etk::UString _label,
etk::UString _image,
std::string _label,
std::string _image,
const char *_generateEvent,
const etk::UString _message) {
const std::string _message) {
widget::MenuElement *tmpObject = new widget::MenuElement();
if (NULL == tmpObject) {
EWOL_ERROR("Allocation problem");
@ -75,7 +75,7 @@ int32_t widget::Menu::add(int32_t _parent,
tmpObject->m_localId = m_staticId++;
tmpObject->m_parentId = _parent;
tmpObject->m_widgetPointer = NULL;
tmpObject->m_label = etk::UString("<left>") + _label + "</left>";
tmpObject->m_label = std::string("<left>") + _label + "</left>";
tmpObject->m_image = _image;
tmpObject->m_generateEvent = _generateEvent;
tmpObject->m_message = _message;
@ -90,7 +90,7 @@ int32_t widget::Menu::add(int32_t _parent,
if (tmpObject->m_image.size()!=0) {
myButton->setSubWidget(
new widget::Composer(widget::Composer::String,
etk::UString("<composer>\n") +
std::string("<composer>\n") +
" <sizer mode=\"hori\">\n"
" <image src=\"" + tmpObject->m_image + "\" size=\"8,8mm\"/>\n"
" <label>" + tmpObject->m_label + "</label>\n"
@ -197,7 +197,7 @@ void widget::Menu::onReceiveMessage(const ewol::EMessage& _msg) {
if (m_listElement[jjj]->m_image.size()!=0) {
myButton->setSubWidget(
new widget::Composer(widget::Composer::String,
etk::UString("<composer expand=\"true,false\" fill=\"true,true\">\n") +
std::string("<composer expand=\"true,false\" fill=\"true,true\">\n") +
" <sizer mode=\"hori\" expand=\"true,false\" fill=\"true,true\" lock=\"true\">\n"
" <image src=\"" + m_listElement[jjj]->m_image + "\" size=\"8,8mm\"/>\n"
" <label exand=\"true,true\" fill=\"true,true\"><![CDATA[" + m_listElement[jjj]->m_label + " ]]></label>\n"
@ -207,14 +207,14 @@ void widget::Menu::onReceiveMessage(const ewol::EMessage& _msg) {
if (true == menuHaveImage) {
myButton->setSubWidget(
new widget::Composer(widget::Composer::String,
etk::UString("<composer expand=\"true,false\" fill=\"true,true\">\n") +
std::string("<composer expand=\"true,false\" fill=\"true,true\">\n") +
" <sizer mode=\"hori\" expand=\"true,false\" fill=\"true,true\" lock=\"true\">\n"
" <spacer min-size=\"8,0mm\"/>\n"
" <label exand=\"true,true\" fill=\"true,true\"><![CDATA[" + m_listElement[jjj]->m_label + "]]></label>\n"
" </sizer>\n"
"</composer>\n"));
} else {
widget::Label* tmpLabel = new widget::Label(etk::UString("<left>") + m_listElement[jjj]->m_label + "</left>\n");
widget::Label* tmpLabel = new widget::Label(std::string("<left>") + m_listElement[jjj]->m_label + "</left>\n");
if (NULL != tmpLabel) {
tmpLabel->setExpand(bvec2(true,false));
tmpLabel->setFill(bvec2(true,true));

View File

@ -23,10 +23,10 @@ namespace widget {
int32_t m_localId;
int32_t m_parentId;
ewol::EObject* m_widgetPointer;
etk::UString m_label;
etk::UString m_image;
std::string m_label;
std::string m_image;
const char *m_generateEvent;
etk::UString m_message;
std::string m_message;
};
/**
* @ingroup ewolWidgetGroup
@ -50,8 +50,8 @@ namespace widget {
widget::ContextMenu* m_widgetContextMenu;
public:
void clear(void);
int32_t addTitle(etk::UString _label, etk::UString _image="", const char * _generateEvent = NULL, const etk::UString _message = "");
int32_t add(int32_t parent, etk::UString _label, etk::UString _image="", const char * _generateEvent = NULL, const etk::UString _message = "");
int32_t addTitle(std::string _label, std::string _image="", const char * _generateEvent = NULL, const std::string _message = "");
int32_t add(int32_t parent, std::string _label, std::string _image="", const char * _generateEvent = NULL, const std::string _message = "");
void addSpacer(void);
// Derived function
virtual void onReceiveMessage(const ewol::EMessage& _msg);

View File

@ -18,7 +18,7 @@ extern const char * const ewolEventMeshPressed = "ewol-mesh-Pressed";
widget::Mesh::Mesh(const etk::UString& _filename) :
widget::Mesh::Mesh(const std::string& _filename) :
m_meshName(_filename),
m_object(NULL),
m_position(0,0,0),
@ -92,7 +92,7 @@ bool widget::Mesh::onEventInput(const ewol::EventInput& _event) {
return false;
}
void widget::Mesh::setFile(const etk::UString& _filename) {
void widget::Mesh::setFile(const std::string& _filename) {
if( _filename!=""
&& m_meshName != _filename ) {
ewol::Mesh::release(m_object);

Some files were not shown because too many files have changed in this diff Show More