[DEV] update etk null
This commit is contained in:
parent
678fe13631
commit
7e9d2e5f74
@ -87,7 +87,7 @@ Find a global Object (ouside an Object)
|
||||
#include <ewol/context/Context.hpp>
|
||||
|
||||
ewol::ObjectShared tmpObject = ewol::getContext().getEObjectManager().getObjectNamed("obj Name");
|
||||
if (tmpObject == nullptr) {
|
||||
if (tmpObject == null) {
|
||||
APPL_ERROR("The Object does not exist");
|
||||
}
|
||||
```
|
||||
@ -97,7 +97,7 @@ Find a global Object (inside an Object)
|
||||
|
||||
```{.cpp}
|
||||
ewol::ObjectShared tmpObject = getObjectNamed("obj Name");
|
||||
if (tmpObject == nullptr) {
|
||||
if (tmpObject == null) {
|
||||
APPL_ERROR("The Object does not exist");
|
||||
}
|
||||
```
|
||||
|
@ -54,7 +54,7 @@ namespace appl {
|
||||
void init() {
|
||||
ewol::Object::init();
|
||||
m_button = ewol::widget::Button::create();
|
||||
if (m_button == nullptr) {
|
||||
if (m_button == null) {
|
||||
APPL_ERROR("Can not create button...");
|
||||
return;
|
||||
}
|
||||
|
@ -57,7 +57,7 @@ namespace appl {
|
||||
public:
|
||||
void onChangePropertyFile() {
|
||||
m_config = ewol::resource::ConfigFile::create(*propertyConfig);
|
||||
if (m_config != nullptr) {
|
||||
if (m_config != null) {
|
||||
m_configValId = m_config->request("exampleConfigName");
|
||||
}
|
||||
}
|
||||
|
@ -32,7 +32,7 @@ First create the widget:
|
||||
|
||||
```{.cpp}
|
||||
ewol::widget::ButtonShared tmpWidget = ewol::widget::Button::create();
|
||||
if (tmpWidget == nullptr) {
|
||||
if (tmpWidget == null) {
|
||||
APPL_CRITICAL("The widget can not be created");
|
||||
}
|
||||
```
|
||||
@ -60,7 +60,7 @@ We can configure the wiget before the init() is called.
|
||||
"name", etk::String("my name"),
|
||||
"expand", bvec2(true,false),
|
||||
"fill", bvec2(true,true));
|
||||
if (tmpWidget == nullptr) {
|
||||
if (tmpWidget == null) {
|
||||
APPL_CRITICAL("The widget can not be created");
|
||||
}
|
||||
```
|
||||
@ -78,7 +78,7 @@ Call generic factory system (compositing)
|
||||
```{.cpp}
|
||||
#include <ewol::widget::Composer.hpp>
|
||||
ewol::widget::WidgetShared tmpWidget = ewol::widget::composerGenerateString("<button name='my name' expand='true,false' fill='true,true'/>");
|
||||
if (tmpWidget == nullptr) {
|
||||
if (tmpWidget == null) {
|
||||
APPL_CRITICAL("The widget can not be created");
|
||||
}
|
||||
```
|
||||
@ -99,7 +99,7 @@ File ```gui.xml```
|
||||
```{.cpp}
|
||||
#include <ewol::widget::Composer.hpp>
|
||||
ewol::widget::WidgetShared tmpWidget = ewol::widget::composerGenerateFile("DATA:gui.xml");
|
||||
if (tmpWidget == nullptr) {
|
||||
if (tmpWidget == null) {
|
||||
APPL_CRITICAL("The widget can not be created");
|
||||
}
|
||||
```
|
||||
|
@ -18,19 +18,19 @@ const int32_t ewol::compositing::Area::m_vboIdColor(2);
|
||||
ewol::compositing::Area::Area(const ivec2& _size) :
|
||||
m_position(0.0, 0.0, 0.0),
|
||||
m_color(etk::color::white),
|
||||
m_GLprogram(nullptr),
|
||||
m_GLprogram(null),
|
||||
m_GLPosition(-1),
|
||||
m_GLMatrix(-1),
|
||||
m_GLColor(-1),
|
||||
m_GLtexture(-1),
|
||||
m_GLtexID(-1),
|
||||
m_resource(nullptr) {
|
||||
m_resource(null) {
|
||||
m_resource = ewol::resource::Texture::create();
|
||||
m_resource->setImageSize(_size);
|
||||
m_resource->flush();
|
||||
// Create the VBO:
|
||||
m_VBO = gale::resource::VirtualBufferObject::create(NB_VBO);
|
||||
if (m_VBO == nullptr) {
|
||||
if (m_VBO == null) {
|
||||
EWOL_ERROR("can not instanciate VBO ...");
|
||||
return;
|
||||
}
|
||||
@ -47,7 +47,7 @@ void ewol::compositing::Area::loadProgram() {
|
||||
// get the shader resource :
|
||||
m_GLPosition = 0;
|
||||
m_GLprogram = gale::resource::Program::create(etk::String("{ewol}DATA:textured3D.prog"));
|
||||
if (m_GLprogram != nullptr) {
|
||||
if (m_GLprogram != null) {
|
||||
m_GLPosition = m_GLprogram->getAttribute("EW_coord3d");
|
||||
m_GLColor = m_GLprogram->getAttribute("EW_color");
|
||||
m_GLtexture = m_GLprogram->getAttribute("EW_texture2d");
|
||||
@ -61,11 +61,11 @@ void ewol::compositing::Area::draw(bool _disableDepthTest) {
|
||||
//EWOL_WARNING("Nothink to draw...");
|
||||
return;
|
||||
}
|
||||
if (m_resource == nullptr) {
|
||||
if (m_resource == null) {
|
||||
// this is a normale case ... the user can choice to have no image ...
|
||||
return;
|
||||
}
|
||||
if (m_GLprogram == nullptr) {
|
||||
if (m_GLprogram == null) {
|
||||
EWOL_ERROR("No shader ...");
|
||||
return;
|
||||
}
|
||||
|
@ -229,7 +229,7 @@ ewol::compositing::Drawing::Drawing() :
|
||||
m_clippingEnable(false),
|
||||
m_color(etk::color::black),
|
||||
m_colorBg(etk::color::none),
|
||||
m_GLprogram(nullptr),
|
||||
m_GLprogram(null),
|
||||
m_GLPosition(-1),
|
||||
m_GLMatrix(-1),
|
||||
m_GLMatrixPosition(-1),
|
||||
@ -243,7 +243,7 @@ ewol::compositing::Drawing::Drawing() :
|
||||
}
|
||||
// Create the VBO:
|
||||
m_VBO = gale::resource::VirtualBufferObject::create(NB_VBO);
|
||||
if (m_VBO == nullptr) {
|
||||
if (m_VBO == null) {
|
||||
EWOL_ERROR("can not instanciate VBO ...");
|
||||
return;
|
||||
}
|
||||
@ -301,7 +301,7 @@ void ewol::compositing::Drawing::loadProgram() {
|
||||
// oad the new ...
|
||||
m_GLprogram = gale::resource::Program::create("{ewol}DATA:color3.prog");
|
||||
// get the shader resource :
|
||||
if (m_GLprogram != nullptr) {
|
||||
if (m_GLprogram != null) {
|
||||
m_GLPosition = m_GLprogram->getAttribute("EW_coord3d");
|
||||
m_GLColor = m_GLprogram->getAttribute("EW_color");
|
||||
m_GLMatrix = m_GLprogram->getUniform("EW_MatrixTransformation");
|
||||
@ -315,7 +315,7 @@ void ewol::compositing::Drawing::draw(bool _disableDepthTest) {
|
||||
//EWOL_WARNING("Nothink to draw...");
|
||||
return;
|
||||
}
|
||||
if (m_GLprogram == nullptr) {
|
||||
if (m_GLprogram == null) {
|
||||
EWOL_ERROR("No shader ...");
|
||||
return;
|
||||
}
|
||||
|
@ -28,18 +28,18 @@ ewol::compositing::Image::Image(const etk::String& _imageName,
|
||||
m_clippingEnable(false),
|
||||
m_color(etk::color::white),
|
||||
m_angle(0.0),
|
||||
m_GLprogram(nullptr),
|
||||
m_GLprogram(null),
|
||||
m_GLPosition(-1),
|
||||
m_GLMatrix(-1),
|
||||
m_GLColor(-1),
|
||||
m_GLtexture(-1),
|
||||
m_GLtexID(-1),
|
||||
m_distanceFieldMode(_df),
|
||||
m_resource(nullptr),
|
||||
m_resourceDF(nullptr) {
|
||||
m_resource(null),
|
||||
m_resourceDF(null) {
|
||||
// Create the VBO:
|
||||
m_VBO = gale::resource::VirtualBufferObject::create(NB_VBO);
|
||||
if (m_VBO == nullptr) {
|
||||
if (m_VBO == null) {
|
||||
EWOL_ERROR("can not instanciate VBO ...");
|
||||
return;
|
||||
}
|
||||
@ -62,7 +62,7 @@ void ewol::compositing::Image::loadProgram() {
|
||||
} else {
|
||||
m_GLprogram = gale::resource::Program::create("{ewol}DATA:textured3D.prog");
|
||||
}
|
||||
if (m_GLprogram != nullptr) {
|
||||
if (m_GLprogram != null) {
|
||||
m_GLPosition = m_GLprogram->getAttribute("EW_coord3d");
|
||||
m_GLColor = m_GLprogram->getAttribute("EW_color");
|
||||
m_GLtexture = m_GLprogram->getAttribute("EW_texture2d");
|
||||
@ -76,13 +76,13 @@ void ewol::compositing::Image::draw(bool _disableDepthTest) {
|
||||
//EWOL_WARNING("Nothink to draw...");
|
||||
return;
|
||||
}
|
||||
if ( m_resource == nullptr
|
||||
&& m_resourceDF == nullptr
|
||||
&& m_resourceImage == nullptr) {
|
||||
if ( m_resource == null
|
||||
&& m_resourceDF == null
|
||||
&& m_resourceImage == null) {
|
||||
// this is a normale case ... the user can choice to have no image ...
|
||||
return;
|
||||
}
|
||||
if (m_GLprogram == nullptr) {
|
||||
if (m_GLprogram == null) {
|
||||
EWOL_ERROR("No shader ...");
|
||||
return;
|
||||
}
|
||||
@ -97,9 +97,9 @@ void ewol::compositing::Image::draw(bool _disableDepthTest) {
|
||||
m_GLprogram->use();
|
||||
m_GLprogram->uniformMatrix(m_GLMatrix, tmpMatrix);
|
||||
// TextureID
|
||||
if (m_resourceImage != nullptr) {
|
||||
if (m_resourceImage != null) {
|
||||
m_GLprogram->setTexture0(m_GLtexID, m_resourceImage->getRendererId());
|
||||
} else if (m_resource != nullptr) {
|
||||
} else if (m_resource != null) {
|
||||
if (m_distanceFieldMode == true) {
|
||||
EWOL_ERROR("FONT type error Request distance field and display normal ...");
|
||||
}
|
||||
@ -172,7 +172,7 @@ void ewol::compositing::Image::print(const vec2& _size) {
|
||||
void ewol::compositing::Image::printPart(const vec2& _size,
|
||||
vec2 _sourcePosStart,
|
||||
vec2 _sourcePosStop) {
|
||||
if (m_resource == nullptr) {
|
||||
if (m_resource == null) {
|
||||
return;
|
||||
}
|
||||
vec2 openGLSize = vec2(m_resource->getOpenGlSize().x(), m_resource->getOpenGlSize().y());
|
||||
@ -292,28 +292,28 @@ void ewol::compositing::Image::setSource(const etk::String& _newFile, const vec2
|
||||
// link to new one
|
||||
if (m_distanceFieldMode == false) {
|
||||
m_resource = ewol::resource::TextureFile::create(m_filename, tmpSize);
|
||||
if (m_resource == nullptr) {
|
||||
if (m_resource == null) {
|
||||
EWOL_ERROR("Can not get Image resource");
|
||||
}
|
||||
} else {
|
||||
m_resourceDF = ewol::resource::ImageDF::create(m_filename, tmpSize);
|
||||
if (m_resourceDF == nullptr) {
|
||||
if (m_resourceDF == null) {
|
||||
EWOL_ERROR("Can not get Image resource DF");
|
||||
}
|
||||
}
|
||||
}
|
||||
if ( m_resource == nullptr
|
||||
&& m_resourceDF == nullptr
|
||||
&& m_resourceImage == nullptr) {
|
||||
if (resource != nullptr) {
|
||||
if ( m_resource == null
|
||||
&& m_resourceDF == null
|
||||
&& m_resourceImage == null) {
|
||||
if (resource != null) {
|
||||
EWOL_WARNING("Retrive previous resource");
|
||||
m_resource = resource;
|
||||
}
|
||||
if (resourceDF != nullptr) {
|
||||
if (resourceDF != null) {
|
||||
EWOL_WARNING("Retrive previous resource (DF)");
|
||||
m_resourceDF = resourceDF;
|
||||
}
|
||||
if (resourceTex != nullptr) {
|
||||
if (resourceTex != null) {
|
||||
EWOL_WARNING("Retrive previous resource (image)");
|
||||
m_resourceImage = resourceTex;
|
||||
}
|
||||
@ -328,24 +328,24 @@ void ewol::compositing::Image::setSource(egami::Image _image) {
|
||||
}
|
||||
|
||||
bool ewol::compositing::Image::hasSources() {
|
||||
return m_resource != nullptr
|
||||
|| m_resourceDF != nullptr;
|
||||
return m_resource != null
|
||||
|| m_resourceDF != null;
|
||||
}
|
||||
|
||||
|
||||
vec2 ewol::compositing::Image::getRealSize() {
|
||||
if ( m_resource == nullptr
|
||||
&& m_resourceDF == nullptr
|
||||
&& m_resourceImage == nullptr) {
|
||||
if ( m_resource == null
|
||||
&& m_resourceDF == null
|
||||
&& m_resourceImage == null) {
|
||||
return vec2(0,0);
|
||||
}
|
||||
if (m_resource != nullptr) {
|
||||
if (m_resource != null) {
|
||||
return m_resource->getRealSize();
|
||||
}
|
||||
if (m_resourceDF != nullptr) {
|
||||
if (m_resourceDF != null) {
|
||||
return m_resourceDF->getRealSize();
|
||||
}
|
||||
if (m_resourceImage != nullptr) {
|
||||
if (m_resourceImage != null) {
|
||||
return m_resourceImage->getUsableSize();
|
||||
}
|
||||
return vec2(0,0);
|
||||
|
@ -17,21 +17,21 @@ const int32_t ewol::compositing::Shaper::m_vboIdPos(1);
|
||||
|
||||
ewol::compositing::Shaper::Shaper(const etk::String& _shaperName) :
|
||||
m_name(_shaperName),
|
||||
m_config(nullptr),
|
||||
m_config(null),
|
||||
m_confIdMode(-1),
|
||||
m_confIdDisplayOutside(-1),
|
||||
m_confIdChangeTime(-1),
|
||||
m_confProgramFile(-1),
|
||||
m_confColorFile(-1),
|
||||
m_confImageFile(-1),
|
||||
m_GLprogram(nullptr),
|
||||
m_GLprogram(null),
|
||||
m_GLPosition(-1),
|
||||
m_GLMatrix(-1),
|
||||
m_GLStateActivate(-1),
|
||||
m_GLStateOld(-1),
|
||||
m_GLStateNew(-1),
|
||||
m_GLStateTransition(-1),
|
||||
m_resourceTexture(nullptr),
|
||||
m_resourceTexture(null),
|
||||
m_nextStatusRequested(-1),
|
||||
m_propertyOrigin(0,0),
|
||||
m_propertySize(0,0),
|
||||
@ -49,7 +49,7 @@ ewol::compositing::Shaper::Shaper(const etk::String& _shaperName) :
|
||||
}
|
||||
// Create the VBO:
|
||||
m_VBO = gale::resource::VirtualBufferObject::create(NB_VBO);
|
||||
if (m_VBO == nullptr) {
|
||||
if (m_VBO == null) {
|
||||
EWOL_ERROR("can not instanciate VBO ...");
|
||||
return;
|
||||
}
|
||||
@ -88,7 +88,7 @@ void ewol::compositing::Shaper::loadProgram() {
|
||||
return;
|
||||
}
|
||||
m_config = ewol::resource::ConfigFile::create(m_name);
|
||||
if (m_config != nullptr) {
|
||||
if (m_config != null) {
|
||||
m_confIdMode = m_config->request("mode");
|
||||
m_confIdDisplayOutside = m_config->request("display-outside");
|
||||
m_confIdPaddingOut[shaperPosLeft] = m_config->request("padding-out-left");
|
||||
@ -122,7 +122,7 @@ void ewol::compositing::Shaper::loadProgram() {
|
||||
// get the shader resource :
|
||||
m_GLPosition = 0;
|
||||
m_GLprogram = gale::resource::Program::create(tmpFilename);
|
||||
if (m_GLprogram != nullptr) {
|
||||
if (m_GLprogram != null) {
|
||||
m_GLPosition = m_GLprogram->getAttribute("EW_coord2d");
|
||||
m_GLMatrix = m_GLprogram->getUniform("EW_MatrixTransformation");
|
||||
// Widget property == > for the Vertex shader
|
||||
@ -162,8 +162,8 @@ void ewol::compositing::Shaper::loadProgram() {
|
||||
EWOL_DEBUG("Shaper try load colorFile : '" << tmpFilename << "'");
|
||||
}
|
||||
m_colorProperty = ewol::resource::ColorFile::create(tmpFilename);
|
||||
if ( m_GLprogram != nullptr
|
||||
&& m_colorProperty != nullptr) {
|
||||
if ( m_GLprogram != null
|
||||
&& m_colorProperty != null) {
|
||||
etk::Vector<etk::String> listColor = m_colorProperty->getColors();
|
||||
for (auto tmpColor : listColor) {
|
||||
int32_t glId = m_GLprogram->getUniform(tmpColor);
|
||||
@ -175,11 +175,11 @@ void ewol::compositing::Shaper::loadProgram() {
|
||||
}
|
||||
|
||||
void ewol::compositing::Shaper::draw(bool _disableDepthTest) {
|
||||
if (m_config == nullptr) {
|
||||
if (m_config == null) {
|
||||
// this is a normale case ... the user can choice to have no config basic file ...
|
||||
return;
|
||||
}
|
||||
if (m_GLprogram == nullptr) {
|
||||
if (m_GLprogram == null) {
|
||||
EWOL_ERROR("No shader ...");
|
||||
return;
|
||||
}
|
||||
@ -203,7 +203,7 @@ void ewol::compositing::Shaper::draw(bool _disableDepthTest) {
|
||||
for (auto element : m_listAssiciatedId) {
|
||||
m_GLprogram->uniform(element.x(), m_colorProperty->get(element.y()));
|
||||
}
|
||||
if (m_resourceTexture != nullptr) {
|
||||
if (m_resourceTexture != null) {
|
||||
// TextureID
|
||||
m_GLprogram->setTexture0(m_GLtexID, m_resourceTexture->getRendererId());
|
||||
}
|
||||
@ -272,7 +272,7 @@ bool ewol::compositing::Shaper::periodicCall(const ewol::event::Time& _event) {
|
||||
}
|
||||
}
|
||||
float timeRelativity = 0.0f;
|
||||
if (m_config != nullptr) {
|
||||
if (m_config != null) {
|
||||
timeRelativity = m_config->getNumber(m_confIdChangeTime) / 1000.0;
|
||||
}
|
||||
m_stateTransition += _event.getDeltaCall() / timeRelativity;
|
||||
@ -493,7 +493,7 @@ void ewol::compositing::Shaper::setShape(const vec2& _origin, const vec2& _size,
|
||||
*/
|
||||
int32_t mode = 0;
|
||||
bool displayOutside = false;
|
||||
if (m_config != nullptr) {
|
||||
if (m_config != null) {
|
||||
mode = m_config->getNumber(m_confIdMode);
|
||||
displayOutside = m_config->getBoolean(m_confIdDisplayOutside);
|
||||
}
|
||||
@ -595,7 +595,7 @@ ewol::Padding ewol::compositing::Shaper::getPadding() {
|
||||
|
||||
ewol::Padding ewol::compositing::Shaper::getPaddingIn() {
|
||||
ewol::Padding padding(0,0,0,0);
|
||||
if (m_config != nullptr) {
|
||||
if (m_config != null) {
|
||||
padding.setValue(m_config->getNumber(m_confIdPaddingIn[shaperPosLeft]),
|
||||
m_config->getNumber(m_confIdPaddingIn[shaperPosTop]),
|
||||
m_config->getNumber(m_confIdPaddingIn[shaperPosRight]),
|
||||
@ -606,7 +606,7 @@ ewol::Padding ewol::compositing::Shaper::getPaddingIn() {
|
||||
|
||||
ewol::Padding ewol::compositing::Shaper::getPaddingOut() {
|
||||
ewol::Padding padding(0,0,0,0);
|
||||
if (m_config != nullptr) {
|
||||
if (m_config != null) {
|
||||
padding.setValue(m_config->getNumber(m_confIdPaddingOut[shaperPosLeft]),
|
||||
m_config->getNumber(m_confIdPaddingOut[shaperPosTop]),
|
||||
m_config->getNumber(m_confIdPaddingOut[shaperPosRight]),
|
||||
@ -617,7 +617,7 @@ ewol::Padding ewol::compositing::Shaper::getPaddingOut() {
|
||||
|
||||
ewol::Padding ewol::compositing::Shaper::getBorder() {
|
||||
ewol::Padding padding(0,0,0,0);
|
||||
if (m_config != nullptr) {
|
||||
if (m_config != null) {
|
||||
padding.setValue(m_config->getNumber(m_confIdBorder[shaperPosLeft]),
|
||||
m_config->getNumber(m_confIdBorder[shaperPosTop]),
|
||||
m_config->getNumber(m_confIdBorder[shaperPosRight]),
|
||||
@ -634,30 +634,30 @@ void ewol::compositing::Shaper::setSource(const etk::String& _newFile) {
|
||||
}
|
||||
|
||||
bool ewol::compositing::Shaper::hasSources() {
|
||||
return m_GLprogram!=nullptr;
|
||||
return m_GLprogram!=null;
|
||||
}
|
||||
|
||||
|
||||
const etk::Color<float>& ewol::compositing::Shaper::getColor(int32_t _id) {
|
||||
static const etk::Color<float> errorValue(0,0,0,0);
|
||||
if (m_colorProperty == nullptr) {
|
||||
EWOL_WARNING("nullptr of m_colorProperty ==> return #0000 for id " << _id);
|
||||
if (m_colorProperty == null) {
|
||||
EWOL_WARNING("null of m_colorProperty ==> return #0000 for id " << _id);
|
||||
return errorValue;
|
||||
}
|
||||
return m_colorProperty->get(_id);
|
||||
}
|
||||
|
||||
int32_t ewol::compositing::Shaper::requestColor(const etk::String& _name) {
|
||||
if (m_colorProperty == nullptr) {
|
||||
EWOL_WARNING("nullptr of m_colorProperty ==> return -1 for name " << _name);
|
||||
if (m_colorProperty == null) {
|
||||
EWOL_WARNING("null of m_colorProperty ==> return -1 for name " << _name);
|
||||
return -1;
|
||||
}
|
||||
return m_colorProperty->request(_name);
|
||||
}
|
||||
|
||||
int32_t ewol::compositing::Shaper::requestConfig(const etk::String& _name) {
|
||||
if (m_config == nullptr) {
|
||||
EWOL_WARNING("nullptr of m_config ==> return -1 for name " << _name);
|
||||
if (m_config == null) {
|
||||
EWOL_WARNING("null of m_config ==> return -1 for name " << _name);
|
||||
return -1;
|
||||
}
|
||||
return m_config->request(_name);
|
||||
@ -665,8 +665,8 @@ int32_t ewol::compositing::Shaper::requestConfig(const etk::String& _name) {
|
||||
|
||||
double ewol::compositing::Shaper::getConfigNumber(int32_t _id) {
|
||||
if ( _id == -1
|
||||
|| m_config == nullptr) {
|
||||
EWOL_WARNING("nullptr of m_config ==> return 0.0 for id " << _id);
|
||||
|| m_config == null) {
|
||||
EWOL_WARNING("null of m_config ==> return 0.0 for id " << _id);
|
||||
return 0.0;
|
||||
}
|
||||
return m_config->getNumber(_id);
|
||||
|
@ -13,7 +13,7 @@
|
||||
ETK_DECLARE_TYPE(ewol::compositing::Text);
|
||||
|
||||
ewol::compositing::Text::Text(const etk::String& _fontName, int32_t _fontSize) :
|
||||
m_font(nullptr) {
|
||||
m_font(null) {
|
||||
setFont(_fontName, _fontSize);
|
||||
}
|
||||
|
||||
@ -27,16 +27,16 @@ void ewol::compositing::Text::drawMT(const mat4& _transformationMatrix, bool _en
|
||||
m_vectorialDraw.draw();
|
||||
|
||||
if ( m_VBO->bufferSize(m_vboIdCoord) <= 0
|
||||
|| m_font == nullptr) {
|
||||
|| m_font == null) {
|
||||
// TODO : set it back ...
|
||||
//EWOL_WARNING("Nothink to draw...");
|
||||
return;
|
||||
}
|
||||
if (m_font == nullptr) {
|
||||
if (m_font == null) {
|
||||
EWOL_WARNING("no font...");
|
||||
return;
|
||||
}
|
||||
if (m_GLprogram == nullptr) {
|
||||
if (m_GLprogram == null) {
|
||||
EWOL_ERROR("No shader ...");
|
||||
return;
|
||||
}
|
||||
@ -72,15 +72,15 @@ void ewol::compositing::Text::drawD(bool _disableDepthTest) {
|
||||
m_vectorialDraw.draw(_disableDepthTest);
|
||||
|
||||
if ( m_VBO->bufferSize(m_vboIdCoord) <= 0
|
||||
|| m_font == nullptr) {
|
||||
|| m_font == null) {
|
||||
//EWOL_WARNING("Nothink to draw...");
|
||||
return;
|
||||
}
|
||||
if (m_font == nullptr) {
|
||||
if (m_font == null) {
|
||||
EWOL_WARNING("no font...");
|
||||
return;
|
||||
}
|
||||
if (m_GLprogram == nullptr) {
|
||||
if (m_GLprogram == null) {
|
||||
EWOL_ERROR("No shader ...");
|
||||
return;
|
||||
}
|
||||
@ -104,23 +104,23 @@ void ewol::compositing::Text::drawD(bool _disableDepthTest) {
|
||||
}
|
||||
|
||||
float ewol::compositing::Text::getSize() {
|
||||
if (m_font == nullptr) {
|
||||
if (m_font == null) {
|
||||
EWOL_WARNING("no font...");
|
||||
return 1.0f;
|
||||
}
|
||||
return m_font->getFontSize();
|
||||
}
|
||||
float ewol::compositing::Text::getHeight() {
|
||||
if (m_font == nullptr) {
|
||||
if (m_font == null) {
|
||||
EWOL_WARNING("no font...");
|
||||
return 10.0f;
|
||||
}
|
||||
return m_font->getHeight(m_mode);
|
||||
}
|
||||
ewol::GlyphProperty * ewol::compositing::Text::getGlyphPointer(char32_t _charcode) {
|
||||
if (m_font == nullptr) {
|
||||
if (m_font == null) {
|
||||
EWOL_WARNING("no font...");
|
||||
return nullptr;
|
||||
return null;
|
||||
}
|
||||
return m_font->getGlyphPointer(_charcode, m_mode);
|
||||
}
|
||||
@ -128,7 +128,7 @@ ewol::GlyphProperty * ewol::compositing::Text::getGlyphPointer(char32_t _charcod
|
||||
void ewol::compositing::Text::setFontSize(int32_t _fontSize) {
|
||||
// get old size
|
||||
etk::String fontName = "";
|
||||
if (m_font != nullptr) {
|
||||
if (m_font != null) {
|
||||
fontName = m_font->getName();
|
||||
// Remove the :XX for the size ...
|
||||
size_t pos = fontName.rfind(':');
|
||||
@ -140,7 +140,7 @@ void ewol::compositing::Text::setFontSize(int32_t _fontSize) {
|
||||
void ewol::compositing::Text::setFontName(const etk::String& _fontName) {
|
||||
// get old size
|
||||
int32_t fontSize = -1;
|
||||
if (m_font != nullptr) {
|
||||
if (m_font != null) {
|
||||
fontSize = m_font->getFontSize();
|
||||
}
|
||||
setFont(_fontName, fontSize);
|
||||
@ -161,14 +161,14 @@ void ewol::compositing::Text::setFont(etk::String _fontName, int32_t _fontSize)
|
||||
EWOL_VERBOSE("plop : " << _fontName << " size=" << _fontSize << " result :" << _fontName);
|
||||
// link to new one
|
||||
m_font = ewol::resource::TexturedFont::create(_fontName);
|
||||
if (m_font == nullptr) {
|
||||
if (m_font == null) {
|
||||
EWOL_ERROR("Can not get font resource");
|
||||
m_font = previousFont;
|
||||
}
|
||||
}
|
||||
|
||||
void ewol::compositing::Text::setFontMode(enum ewol::font::mode _mode) {
|
||||
if (m_font != nullptr) {
|
||||
if (m_font != null) {
|
||||
m_mode = m_font->getWrappingMode(_mode);
|
||||
}
|
||||
}
|
||||
@ -176,7 +176,7 @@ void ewol::compositing::Text::setFontMode(enum ewol::font::mode _mode) {
|
||||
void ewol::compositing::Text::printChar(const char32_t& _charcode) {
|
||||
// get a pointer on the glyph property :
|
||||
ewol::GlyphProperty* myGlyph = getGlyphPointer(_charcode);
|
||||
if (nullptr == myGlyph) {
|
||||
if (null == myGlyph) {
|
||||
EWOL_ERROR(" font does not really existed ...");
|
||||
return;
|
||||
}
|
||||
@ -346,8 +346,8 @@ vec3 ewol::compositing::Text::calculateSizeChar(const char32_t& _charcode) {
|
||||
// get a pointer on the glyph property :
|
||||
ewol::GlyphProperty * myGlyph = getGlyphPointer(_charcode);
|
||||
int32_t fontHeigh = getHeight();
|
||||
if (myGlyph == nullptr) {
|
||||
if (m_font == nullptr) {
|
||||
if (myGlyph == null) {
|
||||
if (m_font == null) {
|
||||
EWOL_WARNING("no Glyph... in no font");
|
||||
} else {
|
||||
EWOL_WARNING("no Glyph... in font : " << m_font->getName());
|
||||
|
@ -35,7 +35,7 @@ ewol::compositing::TextBase::TextBase(const etk::String& _shaderName, bool _load
|
||||
m_startTextpos(0),
|
||||
m_stopTextPos(0),
|
||||
m_alignement(alignDisable),
|
||||
m_GLprogram(nullptr),
|
||||
m_GLprogram(null),
|
||||
m_GLPosition(-1),
|
||||
m_GLMatrix(-1),
|
||||
m_GLColor(-1),
|
||||
@ -48,7 +48,7 @@ ewol::compositing::TextBase::TextBase(const etk::String& _shaderName, bool _load
|
||||
}
|
||||
// Create the VBO:
|
||||
m_VBO = gale::resource::VirtualBufferObject::create(NB_VBO);
|
||||
if (m_VBO == nullptr) {
|
||||
if (m_VBO == null) {
|
||||
EWOL_ERROR("can not instanciate VBO ...");
|
||||
return;
|
||||
}
|
||||
@ -66,7 +66,7 @@ void ewol::compositing::TextBase::loadProgram(const etk::String& _shaderName) {
|
||||
m_GLPosition = 0;
|
||||
ememory::SharedPtr<gale::resource::Program> old = m_GLprogram;
|
||||
m_GLprogram = gale::resource::Program::create(_shaderName);
|
||||
if (m_GLprogram != nullptr) {
|
||||
if (m_GLprogram != null) {
|
||||
m_GLPosition = m_GLprogram->getAttribute("EW_coord3d");
|
||||
m_GLColor = m_GLprogram->getAttribute("EW_color");
|
||||
m_GLtexture = m_GLprogram->getAttribute("EW_texture2d");
|
||||
@ -77,7 +77,7 @@ void ewol::compositing::TextBase::loadProgram(const etk::String& _shaderName) {
|
||||
} else {
|
||||
EWOL_ERROR("Can not load the program => create previous one...");
|
||||
m_GLprogram = old;
|
||||
old = nullptr;
|
||||
old = null;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -13,7 +13,7 @@ ETK_DECLARE_TYPE(ewol::compositing::TextDF);
|
||||
|
||||
ewol::compositing::TextDF::TextDF(const etk::String& _fontName, int32_t _fontSize) :
|
||||
ewol::compositing::TextBase("", false),
|
||||
m_fontDF(nullptr),
|
||||
m_fontDF(null),
|
||||
m_GLglyphLevel(-1),
|
||||
m_size(12.0) {
|
||||
setFont(_fontName, _fontSize);
|
||||
@ -26,7 +26,7 @@ ewol::compositing::TextDF::~TextDF() {
|
||||
|
||||
void ewol::compositing::TextDF::updateSizeToRender(const vec2& _size) {
|
||||
float minSize = etk::min(_size.x(), _size.y());
|
||||
if (m_fontDF != nullptr) {
|
||||
if (m_fontDF != null) {
|
||||
setFontSize(m_fontDF->getSize(minSize));
|
||||
}
|
||||
}
|
||||
@ -35,15 +35,15 @@ void ewol::compositing::TextDF::drawMT(const mat4& _transformationMatrix, bool _
|
||||
// draw BG in any case:
|
||||
m_vectorialDraw.draw();
|
||||
if ( m_VBO->bufferSize(m_vboIdCoord) <= 0
|
||||
|| m_fontDF == nullptr) {
|
||||
|| m_fontDF == null) {
|
||||
//EWOL_WARNING("Nothink to draw...");
|
||||
return;
|
||||
}
|
||||
if (m_fontDF == nullptr) {
|
||||
if (m_fontDF == null) {
|
||||
EWOL_WARNING("no font...");
|
||||
return;
|
||||
}
|
||||
if (m_GLprogram == nullptr) {
|
||||
if (m_GLprogram == null) {
|
||||
EWOL_ERROR("No shader ...");
|
||||
return;
|
||||
}
|
||||
@ -78,16 +78,16 @@ void ewol::compositing::TextDF::drawD(bool _disableDepthTest) {
|
||||
m_vectorialDraw.draw();
|
||||
|
||||
if ( m_VBO->bufferSize(m_vboIdCoord) <= 0
|
||||
|| m_fontDF == nullptr) {
|
||||
|| m_fontDF == null) {
|
||||
// TODO : Set it back
|
||||
//EWOL_WARNING("Nothink to draw...");
|
||||
return;
|
||||
}
|
||||
if (m_fontDF == nullptr) {
|
||||
if (m_fontDF == null) {
|
||||
EWOL_WARNING("no font...");
|
||||
return;
|
||||
}
|
||||
if (m_GLprogram == nullptr) {
|
||||
if (m_GLprogram == null) {
|
||||
EWOL_ERROR("No shader ...");
|
||||
return;
|
||||
}
|
||||
@ -110,14 +110,14 @@ void ewol::compositing::TextDF::drawD(bool _disableDepthTest) {
|
||||
|
||||
void ewol::compositing::TextDF::loadProgram(const etk::String& _shaderName) {
|
||||
ewol::compositing::TextBase::loadProgram(_shaderName);
|
||||
if (m_GLprogram != nullptr) {
|
||||
if (m_GLprogram != null) {
|
||||
m_GLglyphLevel = m_GLprogram->getAttribute("EW_glyphLevel");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
float ewol::compositing::TextDF::getHeight() {
|
||||
if (m_fontDF == nullptr) {
|
||||
if (m_fontDF == null) {
|
||||
EWOL_WARNING("no font...");
|
||||
return 1;
|
||||
}
|
||||
@ -125,9 +125,9 @@ float ewol::compositing::TextDF::getHeight() {
|
||||
}
|
||||
|
||||
ewol::GlyphProperty * ewol::compositing::TextDF::getGlyphPointer(char32_t _charcode) {
|
||||
if (m_fontDF == nullptr) {
|
||||
if (m_fontDF == null) {
|
||||
EWOL_WARNING("no font...");
|
||||
return nullptr;
|
||||
return null;
|
||||
}
|
||||
return m_fontDF->getGlyphPointer(_charcode);
|
||||
}
|
||||
@ -155,7 +155,7 @@ void ewol::compositing::TextDF::setFontName(const etk::String& _fontName) {
|
||||
EWOL_VERBOSE("Set font name: '" << fontName << "'");
|
||||
// link to new one
|
||||
m_fontDF = ewol::resource::DistanceFieldFont::create(fontName);
|
||||
if (m_fontDF == nullptr) {
|
||||
if (m_fontDF == null) {
|
||||
EWOL_ERROR("Can not get find resource");
|
||||
m_fontDF = previousFont;
|
||||
}
|
||||
@ -177,7 +177,7 @@ void ewol::compositing::TextDF::setFontMode(enum ewol::font::mode _mode) {
|
||||
void ewol::compositing::TextDF::printChar(const char32_t& _charcode) {
|
||||
// get a pointer on the glyph property :
|
||||
ewol::GlyphProperty* myGlyph = getGlyphPointer(_charcode);
|
||||
if (nullptr == myGlyph) {
|
||||
if (null == myGlyph) {
|
||||
EWOL_ERROR(" font does not really existed ...");
|
||||
return;
|
||||
}
|
||||
|
@ -32,11 +32,11 @@
|
||||
#include <etk/typeInfo.hpp>
|
||||
ETK_DECLARE_TYPE(ewol::Context);
|
||||
|
||||
static ewol::Context* l_curentInterface=nullptr;
|
||||
static ewol::Context* l_curentInterface=null;
|
||||
ewol::Context& ewol::getContext() {
|
||||
gale::Context& context = gale::getContext();
|
||||
ememory::SharedPtr<gale::Application> appl = context.getApplication();
|
||||
if (appl == nullptr) {
|
||||
if (appl == null) {
|
||||
EWOL_CRITICAL("[CRITICAL] try acces at an empty GALE application (can not get Context)");
|
||||
// ???
|
||||
}
|
||||
@ -104,7 +104,7 @@ void ewol::Context::onCreate(gale::Context& _context) {
|
||||
#endif
|
||||
*/
|
||||
ememory::SharedPtr<ewol::context::Application> appl = m_application;
|
||||
if (appl == nullptr) {
|
||||
if (appl == null) {
|
||||
EWOL_ERROR(" == > Create without application");
|
||||
return;
|
||||
}
|
||||
@ -115,7 +115,7 @@ void ewol::Context::onCreate(gale::Context& _context) {
|
||||
void ewol::Context::onStart(gale::Context& _context) {
|
||||
EWOL_INFO(" == > Ewol system start (BEGIN)");
|
||||
ememory::SharedPtr<ewol::context::Application> appl = m_application;
|
||||
if (appl == nullptr) {
|
||||
if (appl == null) {
|
||||
// TODO : Request exit of the application .... with error ...
|
||||
return;
|
||||
}
|
||||
@ -126,7 +126,7 @@ void ewol::Context::onStart(gale::Context& _context) {
|
||||
void ewol::Context::onResume(gale::Context& _context) {
|
||||
EWOL_INFO(" == > Ewol system resume (BEGIN)");
|
||||
ememory::SharedPtr<ewol::context::Application> appl = m_application;
|
||||
if (appl == nullptr) {
|
||||
if (appl == null) {
|
||||
return;
|
||||
}
|
||||
appl->onResume(*this);
|
||||
@ -137,7 +137,7 @@ void ewol::Context::onRegenerateDisplay(gale::Context& _context) {
|
||||
//EWOL_INFO("REGENERATE_DISPLAY");
|
||||
// check if the user selected a windows
|
||||
ewol::widget::WindowsShared window = m_windowsCurrent;
|
||||
if (window == nullptr) {
|
||||
if (window == null) {
|
||||
EWOL_DEBUG("No windows ...");
|
||||
return;
|
||||
}
|
||||
@ -155,7 +155,7 @@ void ewol::Context::onDraw(gale::Context& _context) {
|
||||
m_objectManager.cleanInternalRemoved();
|
||||
// real draw...
|
||||
ewol::widget::WindowsShared window = m_windowsCurrent;
|
||||
if (window == nullptr) {
|
||||
if (window == null) {
|
||||
return;
|
||||
}
|
||||
window->sysDraw();
|
||||
@ -164,7 +164,7 @@ void ewol::Context::onDraw(gale::Context& _context) {
|
||||
void ewol::Context::onPause(gale::Context& _context) {
|
||||
EWOL_INFO(" == > Ewol system pause (BEGIN)");
|
||||
ememory::SharedPtr<ewol::context::Application> appl = m_application;
|
||||
if (appl == nullptr) {
|
||||
if (appl == null) {
|
||||
return;
|
||||
}
|
||||
appl->onPause(*this);
|
||||
@ -174,7 +174,7 @@ void ewol::Context::onPause(gale::Context& _context) {
|
||||
void ewol::Context::onStop(gale::Context& _context) {
|
||||
EWOL_INFO(" == > Ewol system stop (BEGIN)");
|
||||
ememory::SharedPtr<ewol::context::Application> appl = m_application;
|
||||
if (appl == nullptr) {
|
||||
if (appl == null) {
|
||||
return;
|
||||
}
|
||||
appl->onStop(*this);
|
||||
@ -188,7 +188,7 @@ void ewol::Context::onDestroy(gale::Context& _context) {
|
||||
// clean all widget and sub widget with their resources:
|
||||
m_objectManager.cleanInternalRemoved();
|
||||
ememory::SharedPtr<ewol::context::Application> appl = m_application;
|
||||
if (appl != nullptr) {
|
||||
if (appl != null) {
|
||||
// call application to uninit
|
||||
appl->onDestroy(*this);
|
||||
m_application.reset();
|
||||
@ -205,7 +205,7 @@ void ewol::Context::onDestroy(gale::Context& _context) {
|
||||
void ewol::Context::onKillDemand(gale::Context& _context) {
|
||||
EWOL_INFO(" == > User demand a destroy (BEGIN)");
|
||||
ememory::SharedPtr<ewol::context::Application> appl = m_application;
|
||||
if (appl == nullptr) {
|
||||
if (appl == null) {
|
||||
exit(0);
|
||||
return;
|
||||
}
|
||||
@ -243,7 +243,7 @@ void ewol::Context::onKeyboard(const gale::key::Special& _special,
|
||||
EWOL_VERBOSE("event {" << _special << "} " << _type << " " << _value << " " << _state);
|
||||
// store the keyboard special key status for mouse event...
|
||||
m_input.setLastKeyboardSpecial(_special);
|
||||
if (m_windowsCurrent == nullptr) {
|
||||
if (m_windowsCurrent == null) {
|
||||
// No windows ...
|
||||
return;
|
||||
}
|
||||
@ -259,7 +259,7 @@ void ewol::Context::onKeyboard(const gale::key::Special& _special,
|
||||
}
|
||||
// get the current focused Widget :
|
||||
ewol::WidgetShared tmpWidget = m_widgetManager.focusGet();
|
||||
if (tmpWidget == nullptr) {
|
||||
if (tmpWidget == null) {
|
||||
// no Widget ...
|
||||
return;
|
||||
}
|
||||
@ -311,7 +311,7 @@ void ewol::Context::processEvents() {
|
||||
|
||||
void ewol::Context::onClipboardEvent(enum gale::context::clipBoard::clipboardListe _clipboardId) {
|
||||
ewol::WidgetShared tmpWidget = m_widgetManager.focusGet();
|
||||
if (tmpWidget != nullptr) {
|
||||
if (tmpWidget != null) {
|
||||
tmpWidget->onEventClipboard(_clipboardId);
|
||||
}
|
||||
}
|
||||
@ -322,9 +322,9 @@ ewol::Context::Context(ewol::context::Application* _application) :
|
||||
m_application(_application),
|
||||
m_objectManager(*this),
|
||||
m_input(*this),
|
||||
m_windowsCurrent(nullptr),
|
||||
m_windowsCurrent(null),
|
||||
m_initStepId(0) {
|
||||
if (m_application == nullptr) {
|
||||
if (m_application == null) {
|
||||
EWOL_CRITICAL("Can not start context with no Application ==> rtfm ...");
|
||||
}
|
||||
}
|
||||
@ -349,14 +349,14 @@ void ewol::Context::resetIOEvent() {
|
||||
void ewol::Context::setWindows(const ewol::widget::WindowsShared& _windows) {
|
||||
EWOL_INFO("set New windows");
|
||||
// remove current focus :
|
||||
m_widgetManager.focusSetDefault(nullptr);
|
||||
m_widgetManager.focusSetDefault(null);
|
||||
m_widgetManager.focusRelease();
|
||||
// set the new pointer as windows system
|
||||
m_windowsCurrent = _windows;
|
||||
// set the new default focus:
|
||||
m_widgetManager.focusSetDefault(_windows);
|
||||
// display the title of the Windows:
|
||||
if (m_windowsCurrent != nullptr) {
|
||||
if (m_windowsCurrent != null) {
|
||||
setTitle(m_windowsCurrent->propertyTitle.get());
|
||||
}
|
||||
// request all the widget redrawing
|
||||
@ -372,7 +372,7 @@ void ewol::Context::onResize(const ivec2& _size) {
|
||||
}
|
||||
|
||||
void ewol::Context::forceRedrawAll() {
|
||||
if (m_windowsCurrent == nullptr) {
|
||||
if (m_windowsCurrent == null) {
|
||||
return;
|
||||
}
|
||||
ivec2 size = getSize();
|
||||
|
@ -40,7 +40,7 @@ bool ewol::context::InputManager::localEventInput(enum gale::key::type _type,
|
||||
int32_t _IdInput,
|
||||
enum gale::key::status _status,
|
||||
vec2 _pos) {
|
||||
if (_destWidget != nullptr) {
|
||||
if (_destWidget != null) {
|
||||
if ( _type == gale::key::type::mouse
|
||||
|| _type == gale::key::type::finger) {
|
||||
// create the system Event :
|
||||
@ -57,7 +57,7 @@ bool ewol::context::InputManager::localEventInput(enum gale::key::type _type,
|
||||
void ewol::context::InputManager::abortElement(InputPoperty *_eventTable,
|
||||
int32_t _idInput,
|
||||
enum gale::key::type _type) {
|
||||
if (_eventTable == nullptr) {
|
||||
if (_eventTable == null) {
|
||||
return;
|
||||
}
|
||||
if (_eventTable[_idInput].isUsed == true) {
|
||||
@ -71,7 +71,7 @@ void ewol::context::InputManager::abortElement(InputPoperty *_eventTable,
|
||||
|
||||
void ewol::context::InputManager::cleanElement(InputPoperty *_eventTable,
|
||||
int32_t _idInput) {
|
||||
if (_eventTable == nullptr) {
|
||||
if (_eventTable == null) {
|
||||
return;
|
||||
}
|
||||
//EWOL_INFO("CleanElement[" << idInput << "] = @" << (int64_t)eventTable);
|
||||
@ -89,8 +89,8 @@ void ewol::context::InputManager::cleanElement(InputPoperty *_eventTable,
|
||||
}
|
||||
|
||||
void ewol::context::InputManager::transfertEvent(ewol::WidgetShared _source, ewol::WidgetShared _destination) {
|
||||
if( _source == nullptr
|
||||
|| _destination == nullptr) {
|
||||
if( _source == null
|
||||
|| _destination == null) {
|
||||
// prevent errors ...
|
||||
return;
|
||||
}
|
||||
@ -121,7 +121,7 @@ void ewol::context::InputManager::transfertEvent(ewol::WidgetShared _source, ewo
|
||||
}
|
||||
|
||||
void ewol::context::InputManager::grabPointer(ewol::WidgetShared _widget) {
|
||||
if(_widget == nullptr) {
|
||||
if(_widget == null) {
|
||||
return;
|
||||
}
|
||||
m_grabWidget = _widget;
|
||||
@ -194,7 +194,7 @@ void ewol::context::InputManager::motion(enum gale::key::type _type,
|
||||
// reject pointer == > out of IDs...
|
||||
return;
|
||||
}
|
||||
InputPoperty *eventTable = nullptr;
|
||||
InputPoperty *eventTable = null;
|
||||
if (_type == gale::key::type::mouse) {
|
||||
eventTable = m_eventMouseSaved;
|
||||
} else if (_type == gale::key::type::finger) {
|
||||
@ -215,11 +215,11 @@ void ewol::context::InputManager::motion(enum gale::key::type _type,
|
||||
// this event is all time on the good widget ... and manage the enter and leave ...
|
||||
// NOTE : the "layer widget" force us to get the widget at the specific position all the time :
|
||||
ewol::WidgetShared tmpWidget;
|
||||
if (m_grabWidget.lock() != nullptr) {
|
||||
if (m_grabWidget.lock() != null) {
|
||||
// grab all events ...
|
||||
tmpWidget = m_grabWidget.lock();
|
||||
} else {
|
||||
if (tmpWindows != nullptr) {
|
||||
if (tmpWindows != null) {
|
||||
tmpWidget = tmpWindows->getWidgetAtPos(_pos);
|
||||
}
|
||||
}
|
||||
@ -243,7 +243,7 @@ void ewol::context::InputManager::motion(enum gale::key::type _type,
|
||||
eventTable[_pointerID].isInside = true;
|
||||
// get destination widget :
|
||||
eventTable[_pointerID].curentWidgetEvent = tmpWidget;
|
||||
if (tmpWidget == nullptr) {
|
||||
if (tmpWidget == null) {
|
||||
eventTable[_pointerID].isInside = false;
|
||||
} else {
|
||||
eventTable[_pointerID].origin = tmpWidget->getOrigin();
|
||||
@ -325,7 +325,7 @@ void ewol::context::InputManager::state(enum gale::key::type _type,
|
||||
}
|
||||
EVENT_DEBUG("event pointerId=" << _pointerID);
|
||||
// convert position in open-GL coordonates ...
|
||||
InputPoperty *eventTable = nullptr;
|
||||
InputPoperty *eventTable = null;
|
||||
InputLimit localLimit;
|
||||
if (_type == gale::key::type::mouse) {
|
||||
eventTable = m_eventMouseSaved;
|
||||
@ -383,14 +383,14 @@ void ewol::context::InputManager::state(enum gale::key::type _type,
|
||||
eventTable[_pointerID].isInside = true;
|
||||
ewol::WidgetShared tmpWidget = m_grabWidget.lock();
|
||||
// get destination widget :
|
||||
if(tmpWindows != nullptr) {
|
||||
if ( tmpWidget != nullptr
|
||||
if(tmpWindows != null) {
|
||||
if ( tmpWidget != null
|
||||
&& _type == gale::key::type::mouse) {
|
||||
eventTable[_pointerID].curentWidgetEvent = tmpWidget;
|
||||
} else {
|
||||
tmpWidget = tmpWindows->getWidgetAtPos(_pos);
|
||||
eventTable[_pointerID].curentWidgetEvent = tmpWidget;
|
||||
if (tmpWidget != nullptr) {
|
||||
if (tmpWidget != null) {
|
||||
EVENT_DEBUG("Get widget at pos=" << _pos << " type: " << tmpWidget->getObjectType());
|
||||
} else {
|
||||
EVENT_DEBUG("Get widget at pos=" << _pos << " NO WIDGET");
|
||||
@ -400,7 +400,7 @@ void ewol::context::InputManager::state(enum gale::key::type _type,
|
||||
eventTable[_pointerID].curentWidgetEvent.reset();
|
||||
}
|
||||
tmpWidget = eventTable[_pointerID].curentWidgetEvent.lock();
|
||||
if (tmpWidget != nullptr) {
|
||||
if (tmpWidget != null) {
|
||||
eventTable[_pointerID].origin = tmpWidget->getOrigin();
|
||||
eventTable[_pointerID].size = tmpWidget->getSize();
|
||||
eventTable[_pointerID].destinationInputId = localGetDestinationId(_type, tmpWidget, _pointerID);
|
||||
@ -430,7 +430,7 @@ void ewol::context::InputManager::state(enum gale::key::type _type,
|
||||
eventTable[_pointerID].isUsed = false;
|
||||
// revove the widget ...
|
||||
eventTable[_pointerID].curentWidgetEvent.reset();
|
||||
} else if (tmpWidget == nullptr) {
|
||||
} else if (tmpWidget == null) {
|
||||
// The widget has been removed:
|
||||
EVENT_DEBUG(" Object Removed ...");
|
||||
// Mark it un-used :
|
||||
@ -457,14 +457,14 @@ void ewol::context::InputManager::state(enum gale::key::type _type,
|
||||
// save start time
|
||||
eventTable[_pointerID].lastTimeEvent = currentTime;
|
||||
int32_t nbClickMax = 0;
|
||||
if(tmpWidget != nullptr) {
|
||||
if(tmpWidget != null) {
|
||||
nbClickMax = tmpWidget->getMouseLimit();
|
||||
if (nbClickMax>5) {
|
||||
nbClickMax = 5;
|
||||
}
|
||||
}
|
||||
// in grab mode the single to quinte event are not generated ....
|
||||
if( ( m_grabWidget.lock() == nullptr
|
||||
if( ( m_grabWidget.lock() == null
|
||||
|| _type != gale::key::type::mouse )
|
||||
&& eventTable[_pointerID].nbClickEvent < nbClickMax) {
|
||||
// generate event SINGLE :
|
||||
|
@ -21,7 +21,7 @@ namespace ewol {
|
||||
* @param[in] _argv Standard argv
|
||||
* @return normal error int for the application error management
|
||||
*/
|
||||
int32_t run(ewol::context::Application* _application, int32_t _argc = 0, const char* _argv[] = nullptr);
|
||||
int32_t run(ewol::context::Application* _application, int32_t _argc = 0, const char* _argv[] = null);
|
||||
/**
|
||||
* @brief get EWOL version
|
||||
* @return The string that describe ewol version
|
||||
|
@ -43,7 +43,7 @@ void ewol::object::Manager::displayListObject() {
|
||||
EWOL_INFO("List loaded object : ");
|
||||
for (auto &it : m_eObjectList) {
|
||||
ewol::ObjectShared element = it.lock();
|
||||
if (element != nullptr) {
|
||||
if (element != null) {
|
||||
EWOL_INFO(" [" << element->getId() << "] ref=" << element.useCount()-1 << " name='" << element->propertyName.get() << "' type=" << element->getObjectType());
|
||||
}
|
||||
}
|
||||
@ -58,7 +58,7 @@ void ewol::object::Manager::unInit() {
|
||||
}
|
||||
for (auto &it : m_eObjectList) {
|
||||
ewol::ObjectShared element = it.lock();
|
||||
if (element != nullptr) {
|
||||
if (element != null) {
|
||||
//it->removeObject();
|
||||
}
|
||||
}
|
||||
@ -70,7 +70,7 @@ void ewol::object::Manager::unInit() {
|
||||
|
||||
void ewol::object::Manager::add(const ewol::ObjectShared& _object) {
|
||||
ethread::RecursiveLock lock(m_mutex);
|
||||
if (_object == nullptr) {
|
||||
if (_object == null) {
|
||||
EWOL_ERROR("try to add an inexistant Object in manager");
|
||||
}
|
||||
m_eObjectList.pushBack(_object);
|
||||
@ -102,16 +102,16 @@ void ewol::object::Manager::cleanInternalRemoved() {
|
||||
ewol::ObjectShared ewol::object::Manager::get(const etk::String& _name) {
|
||||
ethread::RecursiveLock lock(m_mutex);
|
||||
if (_name == "") {
|
||||
return nullptr;
|
||||
return null;
|
||||
}
|
||||
for (auto &it : m_eObjectList) {
|
||||
ewol::ObjectShared element = it.lock();
|
||||
if ( element != nullptr
|
||||
if ( element != null
|
||||
&& element->propertyName.get() == _name) {
|
||||
return element;
|
||||
}
|
||||
}
|
||||
return nullptr;
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
|
@ -62,7 +62,7 @@ namespace ewol {
|
||||
/**
|
||||
* @brief retrive an object with his name
|
||||
* @param[in] _name Name of the object
|
||||
* @return the requested object or nullptr
|
||||
* @return the requested object or null
|
||||
*/
|
||||
ewol::ObjectShared getObjectNamed(const etk::String& _name);
|
||||
private:
|
||||
|
@ -21,7 +21,7 @@ void ewol::Object::autoDestroy() {
|
||||
EWOL_VERBOSE("Destroy object: [" << getId() << "] type:" << getObjectType());
|
||||
ewol::ObjectShared parent = m_parent.lock();
|
||||
// TODO : set a signal to do this ...
|
||||
if (parent != nullptr) {
|
||||
if (parent != null) {
|
||||
EWOL_VERBOSE("Destroy object: Call parrent");
|
||||
parent->requestDestroyFromChild(sharedFromThis());
|
||||
}
|
||||
@ -86,7 +86,7 @@ const char * const ewol::Object::getObjectType() const {
|
||||
}
|
||||
|
||||
void ewol::Object::addObjectType(const char* _type) {
|
||||
if (_type == nullptr) {
|
||||
if (_type == null) {
|
||||
EWOL_ERROR(" try to add a type with no value...");
|
||||
return;
|
||||
}
|
||||
@ -148,7 +148,7 @@ bool ewol::Object::storeXML(exml::Element& _node) const {
|
||||
|
||||
bool ewol::Object::propertySetOnWidgetNamed(const etk::String& _objectName, const etk::String& _config, const etk::String& _value) {
|
||||
ewol::ObjectShared object = getObjectManager().get(_objectName);
|
||||
if (object == nullptr) {
|
||||
if (object == null) {
|
||||
return false;
|
||||
}
|
||||
return object->properties.set(_config, _value);
|
||||
@ -172,13 +172,13 @@ ewol::ObjectShared ewol::Object::getSubObjectNamed(const etk::String& _objectNam
|
||||
if (_objectName == propertyName.get()) {
|
||||
return sharedFromThis();
|
||||
}
|
||||
return nullptr;
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
bool ewol::propertySetOnObjectNamed(const etk::String& _objectName, const etk::String& _config, const etk::String& _value) {
|
||||
ewol::ObjectShared object = ewol::getContext().getEObjectManager().get(_objectName);
|
||||
if (object == nullptr) {
|
||||
if (object == null) {
|
||||
return false;
|
||||
}
|
||||
return object->properties.set(_config, _value);
|
||||
|
@ -35,19 +35,19 @@ template<class TYPE_OBJECT> static void baseInit(const ememory::SharedPtr<TYPE_O
|
||||
}
|
||||
|
||||
template<class TYPE_OBJECT, class TYPE_VAL, class ... TYPE> static void baseInit(const ememory::SharedPtr<TYPE_OBJECT>& _object, const etk::String& _name, const TYPE_VAL& _val, TYPE&& ... _all ) {
|
||||
eproperty::Property* prop(nullptr);
|
||||
eproperty::PropertyType<TYPE_VAL>* propType(nullptr);
|
||||
if (_object == nullptr) {
|
||||
eproperty::Property* prop(null);
|
||||
eproperty::PropertyType<TYPE_VAL>* propType(null);
|
||||
if (_object == null) {
|
||||
EWOL_ERROR("EMPTY pointer");
|
||||
return;
|
||||
}
|
||||
prop = _object->properties.getRaw(_name);
|
||||
if (prop == nullptr) {
|
||||
if (prop == null) {
|
||||
EWOL_ERROR("property does not exit ... '" << _name << "'");
|
||||
goto exit_on_error;
|
||||
}
|
||||
propType = dynamic_cast<eproperty::PropertyType<TYPE_VAL>*>(prop);
|
||||
if (propType == nullptr) {
|
||||
if (propType == null) {
|
||||
EWOL_ERROR("property does not cast in requested type ... '" << _name << "' require type : " << /*typeid(_val).name()*/ "?TODO?" << "' instead of '" << prop->getType() << "'");
|
||||
goto exit_on_error;
|
||||
}
|
||||
@ -63,9 +63,9 @@ exit_on_error:
|
||||
#define DECLARE_FACTORY(className) \
|
||||
template<class ... EWOL_FACTORY_CREATE_TYPE> static ememory::SharedPtr<className> create(const EWOL_FACTORY_CREATE_TYPE& ... _all) { \
|
||||
ememory::SharedPtr<className> object(ETK_NEW(className)); \
|
||||
if (object == nullptr) { \
|
||||
if (object == null) { \
|
||||
EWOL_ERROR("Factory error"); \
|
||||
return nullptr; \
|
||||
return null; \
|
||||
} \
|
||||
baseInit(object, _all... ); \
|
||||
object->init(); \
|
||||
@ -76,9 +76,9 @@ exit_on_error:
|
||||
} \
|
||||
static ememory::SharedPtr<className> createXml(const exml::Element& _node) { \
|
||||
ememory::SharedPtr<className> object(ETK_NEW(className)); \
|
||||
if (object == nullptr) { \
|
||||
if (object == null) { \
|
||||
EWOL_ERROR("Factory error"); \
|
||||
return nullptr; \
|
||||
return null; \
|
||||
} \
|
||||
object->loadXMLAttributes(_node); \
|
||||
object->init(); \
|
||||
@ -92,20 +92,20 @@ exit_on_error:
|
||||
template<class ... EWOL_FACTORY_CREATE_TYPE> static ememory::SharedPtr<className> create(const EWOL_FACTORY_CREATE_TYPE& ... _all) { \
|
||||
ememory::SharedPtr<className> object; \
|
||||
ememory::SharedPtr<ewol::Object> object2 = getObjectNamed(uniqueName); \
|
||||
if (object2 != nullptr) { \
|
||||
if (object2 != null) { \
|
||||
object = ememory::dynamicPointerCast<className>(object2); \
|
||||
if (object == nullptr) { \
|
||||
if (object == null) { \
|
||||
EWOL_CRITICAL("Request object element: '" << uniqueName << "' With the wrong type (dynamic cast error)"); \
|
||||
return nullptr; \
|
||||
return null; \
|
||||
} \
|
||||
} \
|
||||
if (object != nullptr) { \
|
||||
if (object != null) { \
|
||||
return object; \
|
||||
} \
|
||||
object = ememory::SharedPtr<className>(ETK_NEW(className)); \
|
||||
if (object == nullptr) { \
|
||||
if (object == null) { \
|
||||
EWOL_ERROR("Factory error"); \
|
||||
return nullptr; \
|
||||
return null; \
|
||||
} \
|
||||
baseInit(object, "name", etk::String(uniqueName), _all... ); \
|
||||
object->init(); \
|
||||
@ -287,13 +287,13 @@ namespace ewol {
|
||||
/**
|
||||
* @brief Retrive an object with his name (in the global list)
|
||||
* @param[in] _name Name of the object
|
||||
* @return the requested object or nullptr
|
||||
* @return the requested object or null
|
||||
*/
|
||||
static ewol::ObjectShared getObjectNamed(const etk::String& _objectName);
|
||||
/**
|
||||
* @brief Retrive an object with his name (in the global list)
|
||||
* @param[in] _name Name of the object
|
||||
* @return the requested object or nullptr
|
||||
* @return the requested object or null
|
||||
*/
|
||||
virtual ewol::ObjectShared getSubObjectNamed(const etk::String& _objectName);
|
||||
protected:
|
||||
@ -303,7 +303,7 @@ namespace ewol {
|
||||
*/
|
||||
#define subBind(_type, _name, _event, _shared_ptr, _func, ...) do {\
|
||||
ememory::SharedPtr<_type> myObject = ememory::dynamicPointerCast<_type>(getSubObjectNamed(_name)); \
|
||||
if (myObject != nullptr) { \
|
||||
if (myObject != null) { \
|
||||
myObject->_event.connect(_shared_ptr, _func, ##__VA_ARGS__); \
|
||||
} else { \
|
||||
EWOL_ERROR("object named='" << _name << "' not exit or can not be cast in : " << #_type); \
|
||||
@ -318,7 +318,7 @@ namespace ewol {
|
||||
*/
|
||||
#define globalBind(_type, _name, _event, _obj, _func, ...) do {\
|
||||
ememory::SharedPtr<_type> myObject = ememory::dynamicPointerCast<_type>(ewol::getContext().getEObjectManager().getObjectNamed(_name)); \
|
||||
if (myObject != nullptr) { \
|
||||
if (myObject != null) { \
|
||||
myObject->_event.connect(_obj, _func, ##__VA_ARGS__); \
|
||||
} else { \
|
||||
EWOL_ERROR("object named='" << _name << "' not exit or can not be cast in : " << #_type); \
|
||||
@ -330,7 +330,7 @@ namespace ewol {
|
||||
*/
|
||||
#define externSubBind(_object, _type, _name, _event, _obj, _func, ...) do {\
|
||||
ememory::SharedPtr<_type> myObject = ememory::dynamicPointerCast<_type>(_object->getObjectNamed(_name)); \
|
||||
if (myObject != nullptr) { \
|
||||
if (myObject != null) { \
|
||||
myObject->_event.connect(_obj, _func, ##__VA_ARGS__); \
|
||||
} else { \
|
||||
EWOL_ERROR("object named='" << _name << "' not exit or can not be cast in : " << #_type); \
|
||||
|
@ -16,7 +16,7 @@
|
||||
ETK_DECLARE_TYPE(ewol::resource::Colored3DObject);
|
||||
|
||||
ewol::resource::Colored3DObject::Colored3DObject() :
|
||||
m_GLprogram(nullptr) {
|
||||
m_GLprogram(null) {
|
||||
addResourceType("ewol::Colored3DObject");
|
||||
}
|
||||
|
||||
@ -25,7 +25,7 @@ void ewol::resource::Colored3DObject::init() {
|
||||
// get the shader resource :
|
||||
m_GLPosition = 0;
|
||||
m_GLprogram = gale::resource::Program::create("{ewol}DATA:simple3D.prog");
|
||||
if (m_GLprogram != nullptr) {
|
||||
if (m_GLprogram != null) {
|
||||
m_GLPosition = m_GLprogram->getAttribute("EW_coord3d");
|
||||
m_GLColor = m_GLprogram->getUniform("EW_color");
|
||||
m_GLMatrix = m_GLprogram->getUniform("EW_MatrixTransformation");
|
||||
@ -44,7 +44,7 @@ void ewol::resource::Colored3DObject::draw(const etk::Vector<vec3>& _vertices,
|
||||
if (_vertices.size() <= 0) {
|
||||
return;
|
||||
}
|
||||
if (m_GLprogram == nullptr) {
|
||||
if (m_GLprogram == null) {
|
||||
EWOL_ERROR("No shader ...");
|
||||
return;
|
||||
}
|
||||
@ -87,7 +87,7 @@ void ewol::resource::Colored3DObject::draw(const etk::Vector<vec3>& _vertices,
|
||||
if (_vertices.size() <= 0) {
|
||||
return;
|
||||
}
|
||||
if (m_GLprogram == nullptr) {
|
||||
if (m_GLprogram == null) {
|
||||
EWOL_ERROR("No shader ...");
|
||||
return;
|
||||
}
|
||||
@ -127,7 +127,7 @@ void ewol::resource::Colored3DObject::drawLine(etk::Vector<vec3>& _vertices,
|
||||
if (_vertices.size() <= 0) {
|
||||
return;
|
||||
}
|
||||
if (m_GLprogram == nullptr) {
|
||||
if (m_GLprogram == null) {
|
||||
EWOL_ERROR("No shader ...");
|
||||
return;
|
||||
}
|
||||
|
@ -36,7 +36,7 @@ namespace ewol {
|
||||
* @brief keep the resource pointer.
|
||||
* @note Never free this pointer by your own...
|
||||
* @param[in] _filename Name of the configuration file.
|
||||
* @return pointer on the resource or nullptr if an error occured.
|
||||
* @return pointer on the resource or null if an error occured.
|
||||
*/
|
||||
static ememory::SharedPtr<ewol::resource::ConfigFile> keep(const etk::String& _filename);
|
||||
};
|
||||
|
@ -28,7 +28,7 @@ ewol::resource::DistanceFieldFont::DistanceFieldFont() :
|
||||
m_borderSize(10),
|
||||
m_textureBorderSize(0,0) {
|
||||
addResourceType("ewol::resource::DistanceFieldFont");
|
||||
m_font = nullptr;
|
||||
m_font = null;
|
||||
m_lastGlyphPos.setValue(1,1);
|
||||
m_lastRawHeigh = 0;
|
||||
m_sizeRatio = 1.0f;
|
||||
@ -92,18 +92,18 @@ void ewol::resource::DistanceFieldFont::init(const etk::String& _fontName) {
|
||||
|
||||
if (m_fileName.size() == 0) {
|
||||
EWOL_ERROR("can not load FONT name : '" << m_fileName << "'" );
|
||||
m_font = nullptr;
|
||||
m_font = null;
|
||||
return;
|
||||
}
|
||||
EWOL_INFO("Load FONT name : '" << m_fileName << "'");
|
||||
m_font = ewol::resource::FontFreeType::create(m_fileName);
|
||||
if (m_font == nullptr) {
|
||||
if (m_font == null) {
|
||||
EWOL_ERROR("Pb Loading FONT name : '" << m_fileName << "'" );
|
||||
}
|
||||
|
||||
// set the bassic charset:
|
||||
m_listElement.clear();
|
||||
if (m_font == nullptr) {
|
||||
if (m_font == null) {
|
||||
return;
|
||||
}
|
||||
if (importFromFile() == true) {
|
||||
@ -222,7 +222,7 @@ void ewol::resource::DistanceFieldFont::generateDistanceField(const egami::Image
|
||||
bool ewol::resource::DistanceFieldFont::addGlyph(const char32_t& _val) {
|
||||
ethread::RecursiveLock lock(m_mutex);
|
||||
bool hasChange = false;
|
||||
if (m_font == nullptr) {
|
||||
if (m_font == null) {
|
||||
return false;
|
||||
}
|
||||
// add the curent "char"
|
||||
@ -337,7 +337,7 @@ ewol::GlyphProperty* ewol::resource::DistanceFieldFont::getGlyphPointer(const ch
|
||||
if (m_listElement.size() > 0) {
|
||||
return &((m_listElement)[0]);
|
||||
}
|
||||
return nullptr;
|
||||
return null;
|
||||
}
|
||||
//EWOL_ERROR(" index=" << index);
|
||||
//EWOL_ERROR(" m_UVal=" << m_listElement[_displayMode][index].m_UVal);
|
||||
@ -396,7 +396,7 @@ bool ewol::resource::DistanceFieldFont::importFromFile() {
|
||||
m_textureBorderSize = doc["m_textureBorderSize"].toString().get("0,0");
|
||||
ejson::Array tmpList = doc["m_listElement"].toArray();
|
||||
if (tmpList.exist() == false) {
|
||||
EWOL_ERROR("nullptr pointer array");
|
||||
EWOL_ERROR("null pointer array");
|
||||
return false;
|
||||
}
|
||||
m_listElement.clear();
|
||||
|
@ -58,7 +58,7 @@ namespace ewol {
|
||||
/**
|
||||
* @brief get the pointer on the coresponding glyph
|
||||
* @param[in] _charcode The unicodeValue
|
||||
* @return The pointer on the glyph == > never nullptr
|
||||
* @return The pointer on the glyph == > never null
|
||||
*/
|
||||
ewol::GlyphProperty* getGlyphPointer(const char32_t& _charcode);
|
||||
public:
|
||||
@ -66,7 +66,7 @@ namespace ewol {
|
||||
* @brief keep the resource pointer.
|
||||
* @note Never free this pointer by your own...
|
||||
* @param[in] _filename Name of the texture font.
|
||||
* @return pointer on the resource or nullptr if an error occured.
|
||||
* @return pointer on the resource or null if an error occured.
|
||||
*/
|
||||
static ememory::SharedPtr<ewol::resource::DistanceFieldFont> keep(const etk::String& _filename);
|
||||
private:
|
||||
|
@ -44,7 +44,7 @@ void ewol::resource::freeTypeUnInit() {
|
||||
return;
|
||||
}
|
||||
int32_t error = FT_Done_FreeType( library );
|
||||
library = nullptr;
|
||||
library = null;
|
||||
if(0 != error) {
|
||||
EWOL_CRITICAL(" when Un-loading FreeType Librairy ...");
|
||||
}
|
||||
|
@ -157,9 +157,9 @@ ememory::SharedPtr<ewol::resource::ImageDF> ewol::resource::ImageDF::create(cons
|
||||
EWOL_VERBOSE("KEEP: TextureFile: '" << _filename << "' size=" << _size);
|
||||
if (_filename == "") {
|
||||
ememory::SharedPtr<ewol::resource::ImageDF> object(ETK_NEW(ewol::resource::ImageDF));
|
||||
if (object == nullptr) {
|
||||
if (object == null) {
|
||||
EWOL_ERROR("allocation error of a resource : ??TEX??");
|
||||
return nullptr;
|
||||
return null;
|
||||
}
|
||||
object->init();
|
||||
getManager().localAdd(object);
|
||||
@ -194,24 +194,24 @@ ememory::SharedPtr<ewol::resource::ImageDF> ewol::resource::ImageDF::create(cons
|
||||
}
|
||||
|
||||
EWOL_VERBOSE("KEEP: TextureFile: '" << TmpFilename << "' new size=" << _size);
|
||||
ememory::SharedPtr<ewol::resource::ImageDF> object = nullptr;
|
||||
ememory::SharedPtr<ewol::resource::ImageDF> object = null;
|
||||
ememory::SharedPtr<gale::Resource> object2 = getManager().localKeep("DF__" + TmpFilename);
|
||||
if (object2 != nullptr) {
|
||||
if (object2 != null) {
|
||||
object = ememory::dynamicPointerCast<ewol::resource::ImageDF>(object2);
|
||||
if (object == nullptr) {
|
||||
if (object == null) {
|
||||
EWOL_CRITICAL("Request resource file : '" << TmpFilename << "' With the wrong type (dynamic cast error)");
|
||||
return nullptr;
|
||||
return null;
|
||||
}
|
||||
}
|
||||
if (object != nullptr) {
|
||||
if (object != null) {
|
||||
return object;
|
||||
}
|
||||
EWOL_INFO("CREATE: ImageDF: '" << TmpFilename << "' size=" << _size);
|
||||
// need to crate a new one ...
|
||||
object = ememory::SharedPtr<ewol::resource::ImageDF>(ETK_NEW(ewol::resource::ImageDF));
|
||||
if (object == nullptr) {
|
||||
if (object == null) {
|
||||
EWOL_ERROR("allocation error of a resource : " << _filename);
|
||||
return nullptr;
|
||||
return null;
|
||||
}
|
||||
object->init("DF__" + TmpFilename, _filename, _size);
|
||||
getManager().localAdd(object);
|
||||
|
@ -38,7 +38,7 @@ namespace ewol {
|
||||
* @note Never free this pointer by your own...
|
||||
* @param[in] _filename Name of the image file.
|
||||
* @param[in] _requested size of the image (usefull when loading .svg to automatic rescale)
|
||||
* @return pointer on the resource or nullptr if an error occured.
|
||||
* @return pointer on the resource or null if an error occured.
|
||||
*/
|
||||
static ememory::SharedPtr<ewol::resource::ImageDF> create(const etk::String& _filename, ivec2 _size=ivec2(-1,-1));
|
||||
};
|
||||
|
@ -62,9 +62,9 @@ ememory::SharedPtr<ewol::resource::TextureFile> ewol::resource::TextureFile::cre
|
||||
EWOL_VERBOSE("KEEP: TextureFile: '" << _filename << "' size=" << _size << " sizeRegister=" << _sizeRegister);
|
||||
if (_filename == "") {
|
||||
ememory::SharedPtr<ewol::resource::TextureFile> object(ETK_NEW(ewol::resource::TextureFile));
|
||||
if (object == nullptr) {
|
||||
if (object == null) {
|
||||
EWOL_ERROR("allocation error of a resource : ??TEX??");
|
||||
return nullptr;
|
||||
return null;
|
||||
}
|
||||
object->init();
|
||||
getManager().localAdd(object);
|
||||
@ -96,24 +96,24 @@ ememory::SharedPtr<ewol::resource::TextureFile> ewol::resource::TextureFile::cre
|
||||
}
|
||||
|
||||
EWOL_VERBOSE("KEEP: TextureFile: '" << tmpFilename << "' new size=" << _size);
|
||||
ememory::SharedPtr<ewol::resource::TextureFile> object = nullptr;
|
||||
ememory::SharedPtr<ewol::resource::TextureFile> object = null;
|
||||
ememory::SharedPtr<gale::Resource> object2 = getManager().localKeep(tmpFilename);
|
||||
if (object2 != nullptr) {
|
||||
if (object2 != null) {
|
||||
object = ememory::dynamicPointerCast<ewol::resource::TextureFile>(object2);
|
||||
if (object == nullptr) {
|
||||
if (object == null) {
|
||||
EWOL_CRITICAL("Request resource file : '" << tmpFilename << "' With the wrong type (dynamic cast error)");
|
||||
return nullptr;
|
||||
return null;
|
||||
}
|
||||
}
|
||||
if (object != nullptr) {
|
||||
if (object != null) {
|
||||
return object;
|
||||
}
|
||||
EWOL_INFO("CREATE: TextureFile: '" << tmpFilename << "' size=" << _size);
|
||||
// need to crate a new one ...
|
||||
object = ememory::SharedPtr<ewol::resource::TextureFile>(ETK_NEW(ewol::resource::TextureFile));
|
||||
if (object == nullptr) {
|
||||
if (object == null) {
|
||||
EWOL_ERROR("allocation error of a resource : " << _filename);
|
||||
return nullptr;
|
||||
return null;
|
||||
}
|
||||
object->init(tmpFilename, _filename, _size);
|
||||
getManager().localAdd(object);
|
||||
|
@ -36,7 +36,7 @@ namespace ewol {
|
||||
* @param[in] _filename Name of the image file.
|
||||
* @param[in] _requested size of the image (usefull when loading .svg to automatic rescale)
|
||||
* @param[in] _sizeRegister size register in named (When you preaload the images the size write here will be )
|
||||
* @return pointer on the resource or nullptr if an error occured.
|
||||
* @return pointer on the resource or null if an error occured.
|
||||
*/
|
||||
static ememory::SharedPtr<ewol::resource::TextureFile> create(const etk::String& _filename,
|
||||
ivec2 _size=ewol::resource::TextureFile::sizeAuto,
|
||||
|
@ -49,10 +49,10 @@ void ewol::resource::TexturedFont::init(const etk::String& _fontName) {
|
||||
ewol::resource::Texture::init(_fontName);
|
||||
EWOL_DEBUG("Load font : '" << _fontName << "'" );
|
||||
|
||||
m_font[0] = nullptr;
|
||||
m_font[1] = nullptr;
|
||||
m_font[2] = nullptr;
|
||||
m_font[3] = nullptr;
|
||||
m_font[0] = null;
|
||||
m_font[1] = null;
|
||||
m_font[2] = null;
|
||||
m_font[3] = null;
|
||||
|
||||
m_modeWraping[0] = ewol::font::Regular;
|
||||
m_modeWraping[1] = ewol::font::Regular;
|
||||
@ -74,7 +74,7 @@ void ewol::resource::TexturedFont::init(const etk::String& _fontName) {
|
||||
const char * tmpData = _fontName.c_str();
|
||||
const char * tmpPos = strchr(tmpData, ':');
|
||||
|
||||
if (tmpPos == nullptr) {
|
||||
if (tmpPos == null) {
|
||||
m_size = 1;
|
||||
EWOL_CRITICAL("Can not parse the font name : '" << _fontName << "' ??? ':' " );
|
||||
return;
|
||||
@ -194,19 +194,19 @@ void ewol::resource::TexturedFont::init(const etk::String& _fontName) {
|
||||
for (int32_t iiiFontId=0; iiiFontId<4 ; iiiFontId++) {
|
||||
if (m_fileName[iiiFontId].size() == 0) {
|
||||
EWOL_DEBUG("can not load FONT [" << iiiFontId << "] name : \"" << m_fileName[iiiFontId] << "\" == > size=" << m_size );
|
||||
m_font[iiiFontId] = nullptr;
|
||||
m_font[iiiFontId] = null;
|
||||
continue;
|
||||
}
|
||||
EWOL_INFO("Load FONT [" << iiiFontId << "] name : \"" << m_fileName[iiiFontId] << "\" == > size=" << m_size);
|
||||
m_font[iiiFontId] = ewol::resource::FontFreeType::create(m_fileName[iiiFontId]);
|
||||
if (m_font[iiiFontId] == nullptr) {
|
||||
if (m_font[iiiFontId] == null) {
|
||||
EWOL_DEBUG("error in loading FONT [" << iiiFontId << "] name : \"" << m_fileName[iiiFontId] << "\" == > size=" << m_size );
|
||||
}
|
||||
}
|
||||
for (int32_t iiiFontId=0; iiiFontId<4 ; iiiFontId++) {
|
||||
// set the bassic charset:
|
||||
m_listElement[iiiFontId].clear();
|
||||
if (m_font[iiiFontId] == nullptr) {
|
||||
if (m_font[iiiFontId] == null) {
|
||||
continue;
|
||||
}
|
||||
m_height[iiiFontId] = m_font[iiiFontId]->getHeight(m_size);
|
||||
@ -239,7 +239,7 @@ bool ewol::resource::TexturedFont::addGlyph(const char32_t& _val) {
|
||||
bool hasChange = false;
|
||||
// for each font :
|
||||
for (int32_t iii=0; iii<4 ; iii++) {
|
||||
if (m_font[iii] == nullptr) {
|
||||
if (m_font[iii] == null) {
|
||||
continue;
|
||||
}
|
||||
// add the curent "char"
|
||||
|
@ -73,7 +73,7 @@ namespace ewol {
|
||||
* @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 nullptr
|
||||
* @return The pointer on the glyph == > never null
|
||||
*/
|
||||
ewol::GlyphProperty* getGlyphPointer(const char32_t& _charcode, const enum ewol::font::mode _displayMode);
|
||||
/**
|
||||
|
@ -15,7 +15,7 @@
|
||||
|
||||
void ewol::tools::message::create(enum ewol::tools::message::type _type, const etk::String& _message) {
|
||||
ewol::widget::StdPopUpShared tmpPopUp = widget::StdPopUp::create();
|
||||
if (tmpPopUp == nullptr) {
|
||||
if (tmpPopUp == null) {
|
||||
EWOL_ERROR("Can not create a simple pop-up");
|
||||
return;
|
||||
}
|
||||
@ -39,7 +39,7 @@ void ewol::tools::message::create(enum ewol::tools::message::type _type, const e
|
||||
// get windows:
|
||||
ewol::Context& context = ewol::getContext();
|
||||
ewol::widget::WindowsShared windows = context.getWindows();
|
||||
if (windows == nullptr) {
|
||||
if (windows == null) {
|
||||
EWOL_ERROR("can not get the current windows ... ==> can not display message : " << _message);
|
||||
return;
|
||||
}
|
||||
|
@ -219,12 +219,12 @@ void ewol::widget::Button::onChangePropertyValue() {
|
||||
}
|
||||
if (*propertyEnableSingle == true) {
|
||||
if ( m_idWidgetDisplayed == 0
|
||||
&& m_subWidget[0] == nullptr
|
||||
&& m_subWidget[1] != nullptr) {
|
||||
&& m_subWidget[0] == null
|
||||
&& m_subWidget[1] != null) {
|
||||
m_idWidgetDisplayed = 1;
|
||||
} else if ( m_idWidgetDisplayed == 1
|
||||
&& m_subWidget[1] == nullptr
|
||||
&& m_subWidget[0] != nullptr) {
|
||||
&& m_subWidget[1] == null
|
||||
&& m_subWidget[0] != null) {
|
||||
m_idWidgetDisplayed = 0;
|
||||
}
|
||||
}
|
||||
@ -257,12 +257,12 @@ void ewol::widget::Button::onChangePropertyToggleMode() {
|
||||
}
|
||||
if (*propertyEnableSingle == true) {
|
||||
if ( m_idWidgetDisplayed == 0
|
||||
&& m_subWidget[0] == nullptr
|
||||
&& m_subWidget[1] != nullptr) {
|
||||
&& m_subWidget[0] == null
|
||||
&& m_subWidget[1] != null) {
|
||||
m_idWidgetDisplayed = 1;
|
||||
} else if ( m_idWidgetDisplayed == 1
|
||||
&& m_subWidget[1] == nullptr
|
||||
&& m_subWidget[0] != nullptr) {
|
||||
&& m_subWidget[1] == null
|
||||
&& m_subWidget[0] != null) {
|
||||
m_idWidgetDisplayed = 0;
|
||||
}
|
||||
}
|
||||
@ -273,15 +273,15 @@ void ewol::widget::Button::onChangePropertyToggleMode() {
|
||||
void ewol::widget::Button::onChangePropertyEnableSingle() {
|
||||
if (*propertyEnableSingle == true) {
|
||||
if ( m_idWidgetDisplayed == 0
|
||||
&& m_subWidget[0] == nullptr
|
||||
&& m_subWidget[1] != nullptr) {
|
||||
&& m_subWidget[0] == null
|
||||
&& m_subWidget[1] != null) {
|
||||
m_idWidgetDisplayed = 1;
|
||||
} else if ( m_idWidgetDisplayed == 1
|
||||
&& m_subWidget[1] == nullptr
|
||||
&& m_subWidget[0] != nullptr) {
|
||||
&& m_subWidget[1] == null
|
||||
&& m_subWidget[0] != null) {
|
||||
m_idWidgetDisplayed = 0;
|
||||
} else if ( m_subWidget[0] == nullptr
|
||||
&& m_subWidget[1] == nullptr) {
|
||||
} else if ( m_subWidget[0] == null
|
||||
&& m_subWidget[1] == null) {
|
||||
m_idWidgetDisplayed = 0;
|
||||
}
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ ewol::widget::ButtonColor::ButtonColor() :
|
||||
signalChange(this, "change", "Button color change value"),
|
||||
propertyValue(this, "color", etk::color::black, "Current color", &ewol::widget::ButtonColor::onChangePropertyValue),
|
||||
propertyShape(this, "shape", "{ewol}THEME:GUI:Button.json", "shape of the widget", &ewol::widget::ButtonColor::onChangePropertyShape),
|
||||
m_widgetContextMenu(nullptr) {
|
||||
m_widgetContextMenu(null) {
|
||||
addObjectType("ewol::widget::ButtonColor");
|
||||
changeStatusIn(STATUS_UP);
|
||||
// Limit event at 1:
|
||||
@ -160,7 +160,7 @@ bool ewol::widget::ButtonColor::onEventInput(const ewol::event::Input& _event) {
|
||||
m_mouseHover = false;
|
||||
// create a context menu :
|
||||
m_widgetContextMenu = ewol::widget::ContextMenu::create();
|
||||
if (m_widgetContextMenu == nullptr) {
|
||||
if (m_widgetContextMenu == null) {
|
||||
EWOL_ERROR("Allocation Error");
|
||||
return true;
|
||||
}
|
||||
@ -174,7 +174,7 @@ bool ewol::widget::ButtonColor::onEventInput(const ewol::event::Input& _event) {
|
||||
m_widgetContextMenu->setSubWidget(myColorChooser);
|
||||
myColorChooser->signalChange.connect(sharedFromThis(), &ewol::widget::ButtonColor::onCallbackColorChange);
|
||||
ewol::widget::WindowsShared currentWindows = getWindows();
|
||||
if (currentWindows == nullptr) {
|
||||
if (currentWindows == null) {
|
||||
EWOL_ERROR("Can not get the curent Windows...");
|
||||
m_widgetContextMenu.reset();
|
||||
} else {
|
||||
|
@ -28,7 +28,7 @@ ewol::WidgetShared ewol::widget::composerGenerateFile(const etk::String& _fileNa
|
||||
ewol::WidgetShared ewol::widget::composerGenerateString(const etk::String& _data, uint64_t _id) {
|
||||
ewol::widget::Manager& widgetManager = ewol::getContext().getWidgetManager();
|
||||
if (_data == "") {
|
||||
return nullptr;
|
||||
return null;
|
||||
}
|
||||
exml::Document doc;
|
||||
etk::String tmpData = _data;
|
||||
@ -38,12 +38,12 @@ ewol::WidgetShared ewol::widget::composerGenerateString(const etk::String& _data
|
||||
}
|
||||
if (doc.parse(tmpData) == false) {
|
||||
EWOL_ERROR(" can not load file XML string...");
|
||||
return nullptr;
|
||||
return null;
|
||||
}
|
||||
exml::Element root = doc.toElement();
|
||||
if (root.nodes.size() == 0) {
|
||||
EWOL_ERROR(" (l ?) No node in the XML file/string.");
|
||||
return nullptr;
|
||||
return null;
|
||||
}
|
||||
if (root.nodes.size() > 1) {
|
||||
EWOL_WARNING(" (l ?) More than 1 node in the XML file/string. (JUST parse the first)");
|
||||
@ -51,18 +51,18 @@ ewol::WidgetShared ewol::widget::composerGenerateString(const etk::String& _data
|
||||
exml::Element pNode = root.nodes[0].toElement();
|
||||
if (pNode.exist() == false) {
|
||||
EWOL_ERROR(" (l ?) No node in the XML file/string. {2}");
|
||||
return nullptr;
|
||||
return null;
|
||||
}
|
||||
etk::String widgetName = pNode.getValue();
|
||||
if (widgetManager.exist(widgetName) == false) {
|
||||
EWOL_ERROR("(l " << pNode.getPos() << ") Unknown basic node='" << widgetName << "' not in : [" << widgetManager.list() << "]" );
|
||||
return nullptr;
|
||||
return null;
|
||||
}
|
||||
EWOL_DEBUG("try to create subwidget : '" << widgetName << "'");
|
||||
ewol::WidgetShared tmpWidget = widgetManager.create(widgetName);
|
||||
if (tmpWidget == nullptr) {
|
||||
if (tmpWidget == null) {
|
||||
EWOL_ERROR ("(l " << pNode.getPos() << ") Can not create the widget : '" << widgetName << "'");
|
||||
return nullptr;
|
||||
return null;
|
||||
}
|
||||
if (tmpWidget->loadXML(pNode) == false) {
|
||||
EWOL_ERROR ("(l " << pNode.getPos() << ") can not load widget properties : '" << widgetName << "'");
|
||||
@ -105,7 +105,7 @@ bool ewol::widget::Composer::loadFromString(const etk::String& _composerXmlStrin
|
||||
}
|
||||
// call upper class to parse his elements ...
|
||||
ewol::widget::Container::loadXML(root);
|
||||
if (m_subWidget == nullptr) {
|
||||
if (m_subWidget == null) {
|
||||
EWOL_WARNING("Load data from composer and have no under Widget after loading");
|
||||
if (_composerXmlString.size() != 0) {
|
||||
EWOL_ERROR("Error Loading XML data : " << _composerXmlString);
|
||||
|
@ -26,12 +26,12 @@ ewol::WidgetShared ewol::widget::Container::getSubWidget() {
|
||||
}
|
||||
|
||||
void ewol::widget::Container::setSubWidget(ewol::WidgetShared _newWidget) {
|
||||
if (_newWidget == nullptr) {
|
||||
if (_newWidget == null) {
|
||||
return;
|
||||
}
|
||||
subWidgetRemove();
|
||||
m_subWidget = _newWidget;
|
||||
if (m_subWidget != nullptr) {
|
||||
if (m_subWidget != null) {
|
||||
m_subWidget->setParent(sharedFromThis());
|
||||
}
|
||||
markToRedraw();
|
||||
@ -47,7 +47,7 @@ void ewol::widget::Container::subWidgetReplace(const ewol::WidgetShared& _oldWid
|
||||
m_subWidget->removeParent();
|
||||
m_subWidget.reset();
|
||||
m_subWidget = _newWidget;
|
||||
if (m_subWidget != nullptr) {
|
||||
if (m_subWidget != null) {
|
||||
m_subWidget->setParent(sharedFromThis());
|
||||
}
|
||||
markToRedraw();
|
||||
@ -55,7 +55,7 @@ void ewol::widget::Container::subWidgetReplace(const ewol::WidgetShared& _oldWid
|
||||
}
|
||||
|
||||
void ewol::widget::Container::subWidgetRemove() {
|
||||
if (m_subWidget != nullptr) {
|
||||
if (m_subWidget != null) {
|
||||
m_subWidget->removeParent();
|
||||
m_subWidget.reset();
|
||||
markToRedraw();
|
||||
@ -64,7 +64,7 @@ void ewol::widget::Container::subWidgetRemove() {
|
||||
}
|
||||
|
||||
void ewol::widget::Container::subWidgetUnLink() {
|
||||
if (m_subWidget != nullptr) {
|
||||
if (m_subWidget != null) {
|
||||
m_subWidget->removeParent();
|
||||
}
|
||||
m_subWidget.reset();
|
||||
@ -72,13 +72,13 @@ void ewol::widget::Container::subWidgetUnLink() {
|
||||
|
||||
ewol::ObjectShared ewol::widget::Container::getSubObjectNamed(const etk::String& _objectName) {
|
||||
ewol::ObjectShared tmpObject = ewol::Widget::getSubObjectNamed(_objectName);
|
||||
if (tmpObject != nullptr) {
|
||||
if (tmpObject != null) {
|
||||
return tmpObject;
|
||||
}
|
||||
if (m_subWidget != nullptr) {
|
||||
if (m_subWidget != null) {
|
||||
return m_subWidget->getSubObjectNamed(_objectName);
|
||||
}
|
||||
return nullptr;
|
||||
return null;
|
||||
}
|
||||
|
||||
void ewol::widget::Container::systemDraw(const ewol::DrawProperty& _displayProp) {
|
||||
@ -87,13 +87,13 @@ void ewol::widget::Container::systemDraw(const ewol::DrawProperty& _displayProp)
|
||||
return;
|
||||
}
|
||||
ewol::Widget::systemDraw(_displayProp);
|
||||
if (m_subWidget != nullptr) {
|
||||
if (m_subWidget != null) {
|
||||
ewol::DrawProperty prop = _displayProp;
|
||||
prop.limit(m_origin, m_size);
|
||||
//EWOL_INFO("Draw : [" << propertyName << "] t=" << getObjectType() << " o=" << m_origin << " s=" << m_size);
|
||||
m_subWidget->systemDraw(prop);
|
||||
} else {
|
||||
EWOL_INFO("[" << getId() << "] ++++++ : [nullptr]");
|
||||
EWOL_INFO("[" << getId() << "] ++++++ : [null]");
|
||||
}
|
||||
}
|
||||
|
||||
@ -102,7 +102,7 @@ void ewol::widget::Container::onChangeSize() {
|
||||
if (*propertyHide == true) {
|
||||
return;
|
||||
}
|
||||
if (m_subWidget == nullptr) {
|
||||
if (m_subWidget == null) {
|
||||
return;
|
||||
}
|
||||
vec2 origin = m_origin+m_offset;
|
||||
@ -118,7 +118,7 @@ void ewol::widget::Container::calculateMinMaxSize() {
|
||||
// call main class
|
||||
ewol::Widget::calculateMinMaxSize();
|
||||
// call sub classes
|
||||
if (m_subWidget != nullptr) {
|
||||
if (m_subWidget != null) {
|
||||
m_subWidget->calculateMinMaxSize();
|
||||
vec2 min = m_subWidget->getCalculateMinSize();
|
||||
m_minSize.setMax(min);
|
||||
@ -127,18 +127,18 @@ void ewol::widget::Container::calculateMinMaxSize() {
|
||||
}
|
||||
|
||||
void ewol::widget::Container::onRegenerateDisplay() {
|
||||
if (m_subWidget != nullptr) {
|
||||
if (m_subWidget != null) {
|
||||
m_subWidget->onRegenerateDisplay();
|
||||
}
|
||||
}
|
||||
|
||||
ewol::WidgetShared ewol::widget::Container::getWidgetAtPos(const vec2& _pos) {
|
||||
if (propertyHide.get() == false) {
|
||||
if (m_subWidget != nullptr) {
|
||||
if (m_subWidget != null) {
|
||||
return m_subWidget->getWidgetAtPos(_pos);
|
||||
}
|
||||
}
|
||||
return nullptr;
|
||||
return null;
|
||||
};
|
||||
|
||||
bool ewol::widget::Container::loadXML(const exml::Element& _node) {
|
||||
@ -162,13 +162,13 @@ bool ewol::widget::Container::loadXML(const exml::Element& _node) {
|
||||
EWOL_ERROR("(l " << pNode.getPos() << ") Unknown basic node='" << widgetName << "' not in : [" << getWidgetManager().list() << "]" );
|
||||
continue;
|
||||
}
|
||||
if (getSubWidget() != nullptr) {
|
||||
if (getSubWidget() != null) {
|
||||
EWOL_ERROR("(l " << pNode.getPos() << ") Can only have one subWidget ??? node='" << widgetName << "'" );
|
||||
continue;
|
||||
}
|
||||
EWOL_DEBUG("try to create subwidget : '" << widgetName << "'");
|
||||
ewol::WidgetShared tmpWidget = getWidgetManager().create(widgetName, pNode);
|
||||
if (tmpWidget == nullptr) {
|
||||
if (tmpWidget == null) {
|
||||
EWOL_ERROR ("(l " << pNode.getPos() << ") Can not create the widget : '" << widgetName << "'");
|
||||
continue;
|
||||
}
|
||||
@ -180,7 +180,7 @@ bool ewol::widget::Container::loadXML(const exml::Element& _node) {
|
||||
}
|
||||
}
|
||||
if ( _node.nodes.size() != 0
|
||||
&& m_subWidget == nullptr) {
|
||||
&& m_subWidget == null) {
|
||||
EWOL_WARNING("Load container with no data inside");
|
||||
}
|
||||
return true;
|
||||
@ -198,7 +198,7 @@ void ewol::widget::Container::requestDestroyFromChild(const ewol::ObjectShared&
|
||||
if (m_subWidget != _child) {
|
||||
return;
|
||||
}
|
||||
if (m_subWidget == nullptr) {
|
||||
if (m_subWidget == null) {
|
||||
return;
|
||||
}
|
||||
m_subWidget->removeParent();
|
||||
@ -209,7 +209,7 @@ void ewol::widget::Container::requestDestroyFromChild(const ewol::ObjectShared&
|
||||
void ewol::widget::Container::drawWidgetTree(int32_t _level) {
|
||||
ewol::Widget::drawWidgetTree(_level);
|
||||
_level++;
|
||||
if (m_subWidget != nullptr) {
|
||||
if (m_subWidget != null) {
|
||||
m_subWidget->drawWidgetTree(_level);
|
||||
}
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ ewol::widget::Container2::~Container2() {
|
||||
void ewol::widget::Container2::setSubWidget(ewol::WidgetShared _newWidget, int32_t _idWidget) {
|
||||
subWidgetRemove(_idWidget);
|
||||
m_subWidget[_idWidget] = _newWidget;
|
||||
if (m_subWidget[_idWidget] != nullptr) {
|
||||
if (m_subWidget[_idWidget] != null) {
|
||||
EWOL_VERBOSE("Add widget : " << _idWidget);
|
||||
m_subWidget[_idWidget]->setParent(sharedFromThis());
|
||||
}
|
||||
@ -43,7 +43,7 @@ void ewol::widget::Container2::subWidgetReplace(const ewol::WidgetShared& _oldWi
|
||||
m_subWidget[iii]->removeParent();
|
||||
m_subWidget[iii].reset();
|
||||
m_subWidget[iii] = _newWidget;
|
||||
if (m_subWidget[iii] != nullptr) {
|
||||
if (m_subWidget[iii] != null) {
|
||||
m_subWidget[iii]->setParent(sharedFromThis());
|
||||
}
|
||||
haveChange = true;
|
||||
@ -58,7 +58,7 @@ void ewol::widget::Container2::subWidgetReplace(const ewol::WidgetShared& _oldWi
|
||||
|
||||
|
||||
void ewol::widget::Container2::subWidgetRemove(int32_t _idWidget) {
|
||||
if (m_subWidget[_idWidget] != nullptr) {
|
||||
if (m_subWidget[_idWidget] != null) {
|
||||
EWOL_VERBOSE("Remove widget : " << _idWidget);
|
||||
m_subWidget[_idWidget]->removeParent();
|
||||
m_subWidget[_idWidget].reset();
|
||||
@ -68,7 +68,7 @@ void ewol::widget::Container2::subWidgetRemove(int32_t _idWidget) {
|
||||
}
|
||||
|
||||
void ewol::widget::Container2::subWidgetUnLink(int32_t _idWidget) {
|
||||
if (m_subWidget[_idWidget] != nullptr) {
|
||||
if (m_subWidget[_idWidget] != null) {
|
||||
m_subWidget[_idWidget]->removeParent();
|
||||
EWOL_VERBOSE("Unlink widget : " << _idWidget);
|
||||
}
|
||||
@ -77,19 +77,19 @@ void ewol::widget::Container2::subWidgetUnLink(int32_t _idWidget) {
|
||||
|
||||
ewol::ObjectShared ewol::widget::Container2::getSubObjectNamed(const etk::String& _widgetName) {
|
||||
ewol::ObjectShared tmpObject = ewol::Widget::getSubObjectNamed(_widgetName);
|
||||
if (tmpObject != nullptr) {
|
||||
if (tmpObject != null) {
|
||||
return tmpObject;
|
||||
}
|
||||
if (m_subWidget[0] != nullptr) {
|
||||
if (m_subWidget[0] != null) {
|
||||
tmpObject = m_subWidget[0]->getSubObjectNamed(_widgetName);
|
||||
if (tmpObject != nullptr) {
|
||||
if (tmpObject != null) {
|
||||
return tmpObject;
|
||||
}
|
||||
}
|
||||
if (m_subWidget[1] != nullptr) {
|
||||
if (m_subWidget[1] != null) {
|
||||
return m_subWidget[1]->getSubObjectNamed(_widgetName);
|
||||
}
|
||||
return nullptr;
|
||||
return null;
|
||||
}
|
||||
|
||||
void ewol::widget::Container2::systemDraw(const ewol::DrawProperty& _displayProp) {
|
||||
@ -98,7 +98,7 @@ void ewol::widget::Container2::systemDraw(const ewol::DrawProperty& _displayProp
|
||||
return;
|
||||
}
|
||||
ewol::Widget::systemDraw(_displayProp);
|
||||
if (m_subWidget[m_idWidgetDisplayed] != nullptr) {
|
||||
if (m_subWidget[m_idWidgetDisplayed] != null) {
|
||||
//EWOL_INFO("Draw : [" << propertyName << "] t=" << getObjectType() << " o=" << m_origin << " s=" << m_size);
|
||||
m_subWidget[m_idWidgetDisplayed]->systemDraw(_displayProp);
|
||||
}
|
||||
@ -119,7 +119,7 @@ ewol::Padding ewol::widget::Container2::onChangeSizePadded(const ewol::Padding&
|
||||
vec2 origin = delta + vec2(_padding.xLeft(), _padding.yButtom());
|
||||
subElementSize -= vec2(_padding.x(), _padding.y());
|
||||
for (size_t iii = 0; iii < 2; ++iii) {
|
||||
if (m_subWidget[iii] != nullptr) {
|
||||
if (m_subWidget[iii] != null) {
|
||||
vec2 origin2 = origin+m_offset;
|
||||
vec2 minSize = m_subWidget[iii]->getCalculateMinSize();
|
||||
//bvec2 expand = m_subWidget[iii]->propertyExpand.get();
|
||||
@ -143,7 +143,7 @@ void ewol::widget::Container2::calculateMinMaxSizePadded(const ewol::Padding& _p
|
||||
m_minSize = vec2(0,0);
|
||||
// call sub classes
|
||||
for (size_t iii = 0; iii < 2; ++iii) {
|
||||
if (m_subWidget[iii] != nullptr) {
|
||||
if (m_subWidget[iii] != null) {
|
||||
m_subWidget[iii]->calculateMinMaxSize();
|
||||
vec2 min = m_subWidget[iii]->getCalculateMinSize();
|
||||
m_minSize.setMax(min);
|
||||
@ -157,18 +157,18 @@ void ewol::widget::Container2::calculateMinMaxSizePadded(const ewol::Padding& _p
|
||||
}
|
||||
|
||||
void ewol::widget::Container2::onRegenerateDisplay() {
|
||||
if (m_subWidget[m_idWidgetDisplayed] != nullptr) {
|
||||
if (m_subWidget[m_idWidgetDisplayed] != null) {
|
||||
m_subWidget[m_idWidgetDisplayed]->onRegenerateDisplay();
|
||||
}
|
||||
}
|
||||
/*
|
||||
ewol::WidgetShared ewol::widget::Container2::getWidgetAtPos(const vec2& _pos) {
|
||||
if (isHide() == false) {
|
||||
if (m_subWidget[m_idWidgetDisplayed] != nullptr) {
|
||||
if (m_subWidget[m_idWidgetDisplayed] != null) {
|
||||
return m_subWidget[m_idWidgetDisplayed]->getWidgetAtPos(_pos);
|
||||
}
|
||||
}
|
||||
return nullptr;
|
||||
return null;
|
||||
}
|
||||
*/
|
||||
|
||||
@ -195,16 +195,16 @@ bool ewol::widget::Container2::loadXML(const exml::Element& _node) {
|
||||
continue;
|
||||
}
|
||||
bool toogleMode=false;
|
||||
if (getSubWidget() != nullptr) {
|
||||
if (getSubWidget() != null) {
|
||||
toogleMode=true;
|
||||
if (getSubWidgetToggle() != nullptr) {
|
||||
if (getSubWidgetToggle() != null) {
|
||||
EWOL_ERROR("(l " << pNode.getPos() << ") Can only have one subWidget ??? node='" << widgetName << "'" );
|
||||
continue;
|
||||
}
|
||||
}
|
||||
EWOL_DEBUG("try to create subwidget : '" << widgetName << "'");
|
||||
ewol::WidgetShared tmpWidget = getWidgetManager().create(widgetName, pNode);
|
||||
if (tmpWidget == nullptr) {
|
||||
if (tmpWidget == null) {
|
||||
EWOL_ERROR ("(l " << pNode.getPos() << ") Can not create the widget: '" << widgetName << "'");
|
||||
continue;
|
||||
}
|
||||
@ -232,7 +232,7 @@ void ewol::widget::Container2::setOffset(const vec2& _newVal) {
|
||||
|
||||
void ewol::widget::Container2::requestDestroyFromChild(const ewol::ObjectShared& _child) {
|
||||
if (m_subWidget[0] == _child) {
|
||||
if (m_subWidget[0] == nullptr) {
|
||||
if (m_subWidget[0] == null) {
|
||||
return;
|
||||
}
|
||||
m_subWidget[0]->removeParent();
|
||||
@ -240,7 +240,7 @@ void ewol::widget::Container2::requestDestroyFromChild(const ewol::ObjectShared&
|
||||
markToRedraw();
|
||||
}
|
||||
if (m_subWidget[1] == _child) {
|
||||
if (m_subWidget[1] == nullptr) {
|
||||
if (m_subWidget[1] == null) {
|
||||
return;
|
||||
}
|
||||
m_subWidget[1]->removeParent();
|
||||
@ -252,10 +252,10 @@ void ewol::widget::Container2::requestDestroyFromChild(const ewol::ObjectShared&
|
||||
void ewol::widget::Container2::drawWidgetTree(int32_t _level) {
|
||||
ewol::Widget::drawWidgetTree(_level);
|
||||
_level++;
|
||||
if (m_subWidget[0] != nullptr) {
|
||||
if (m_subWidget[0] != null) {
|
||||
m_subWidget[0]->drawWidgetTree(_level);
|
||||
}
|
||||
if (m_subWidget[1] != nullptr) {
|
||||
if (m_subWidget[1] != null) {
|
||||
m_subWidget[1]->drawWidgetTree(_level);
|
||||
}
|
||||
}
|
||||
|
@ -143,7 +143,7 @@ namespace ewol {
|
||||
* @return the id of the widget displayable
|
||||
*/
|
||||
int32_t convertId(int32_t _id) {
|
||||
if (m_subWidget[_id] == nullptr) {
|
||||
if (m_subWidget[_id] == null) {
|
||||
return (_id+1)%2;
|
||||
}
|
||||
return _id;
|
||||
|
@ -57,7 +57,7 @@ void ewol::widget::ContainerN::subWidgetReplace(ewol::WidgetShared _oldWidget,
|
||||
}
|
||||
it->removeParent();
|
||||
it.reset();
|
||||
if (_newWidget != nullptr) {
|
||||
if (_newWidget != null) {
|
||||
_newWidget->setParent(sharedFromThis());
|
||||
}
|
||||
it = _newWidget;
|
||||
@ -72,7 +72,7 @@ void ewol::widget::ContainerN::subWidgetReplace(ewol::WidgetShared _oldWidget,
|
||||
}
|
||||
|
||||
int32_t ewol::widget::ContainerN::subWidgetAdd(ewol::WidgetShared _newWidget) {
|
||||
if (_newWidget == nullptr) {
|
||||
if (_newWidget == null) {
|
||||
EWOL_ERROR("[" << getId() << "] {" << getObjectType() << "} Try to add An empty Widget ... ");
|
||||
return -1;
|
||||
}
|
||||
@ -85,11 +85,11 @@ int32_t ewol::widget::ContainerN::subWidgetAdd(ewol::WidgetShared _newWidget) {
|
||||
}
|
||||
|
||||
int32_t ewol::widget::ContainerN::subWidgetAddStart(ewol::WidgetShared _newWidget) {
|
||||
if (_newWidget == nullptr) {
|
||||
if (_newWidget == null) {
|
||||
EWOL_ERROR("[" << getId() << "] {" << getObjectType() << "} Try to add start An empty Widget ... ");
|
||||
return -1;
|
||||
}
|
||||
if (_newWidget != nullptr) {
|
||||
if (_newWidget != null) {
|
||||
_newWidget->setParent(sharedFromThis());
|
||||
}
|
||||
m_subWidget.insert(m_subWidget.begin(), _newWidget);
|
||||
@ -99,7 +99,7 @@ int32_t ewol::widget::ContainerN::subWidgetAddStart(ewol::WidgetShared _newWidge
|
||||
}
|
||||
|
||||
void ewol::widget::ContainerN::subWidgetRemove(ewol::WidgetShared _newWidget) {
|
||||
if (_newWidget == nullptr) {
|
||||
if (_newWidget == null) {
|
||||
return;
|
||||
}
|
||||
size_t errorControl = m_subWidget.size();
|
||||
@ -119,7 +119,7 @@ void ewol::widget::ContainerN::subWidgetRemove(ewol::WidgetShared _newWidget) {
|
||||
}
|
||||
|
||||
void ewol::widget::ContainerN::subWidgetUnLink(ewol::WidgetShared _newWidget) {
|
||||
if (_newWidget == nullptr) {
|
||||
if (_newWidget == null) {
|
||||
return;
|
||||
}
|
||||
auto it(m_subWidget.begin());
|
||||
@ -139,7 +139,7 @@ void ewol::widget::ContainerN::subWidgetUnLink(ewol::WidgetShared _newWidget) {
|
||||
|
||||
void ewol::widget::ContainerN::subWidgetRemoveAll() {
|
||||
for(auto &it : m_subWidget) {
|
||||
if (it != nullptr) {
|
||||
if (it != null) {
|
||||
it->removeParent();
|
||||
}
|
||||
it.reset();
|
||||
@ -153,18 +153,18 @@ void ewol::widget::ContainerN::subWidgetRemoveAllDelayed() {
|
||||
|
||||
ewol::ObjectShared ewol::widget::ContainerN::getSubObjectNamed(const etk::String& _objectName) {
|
||||
ewol::ObjectShared tmpObject = ewol::Widget::getSubObjectNamed(_objectName);
|
||||
if (tmpObject != nullptr) {
|
||||
if (tmpObject != null) {
|
||||
return tmpObject;
|
||||
}
|
||||
for (auto &it : m_subWidget) {
|
||||
if (it != nullptr) {
|
||||
if (it != null) {
|
||||
tmpObject = it->getSubObjectNamed(_objectName);
|
||||
if (tmpObject != nullptr) {
|
||||
if (tmpObject != null) {
|
||||
return tmpObject;
|
||||
}
|
||||
}
|
||||
}
|
||||
return nullptr;
|
||||
return null;
|
||||
}
|
||||
|
||||
void ewol::widget::ContainerN::systemDraw(const ewol::DrawProperty& _displayProp) {
|
||||
@ -178,7 +178,7 @@ void ewol::widget::ContainerN::systemDraw(const ewol::DrawProperty& _displayProp
|
||||
ewol::DrawProperty prop = _displayProp;
|
||||
prop.limit(m_origin, m_size);
|
||||
for (int64_t iii = m_subWidget.size()-1; iii>=0; --iii) {
|
||||
if (m_subWidget[iii] != nullptr) {
|
||||
if (m_subWidget[iii] != null) {
|
||||
//EWOL_INFO(" ***** : [" << (*it)->propertyName << "] t=" << (*it)->getObjectType() << " o=" << (*it)->m_origin << " s=" << (*it)->m_size);
|
||||
m_subWidget[iii]->systemDraw(prop);
|
||||
}
|
||||
@ -187,7 +187,7 @@ void ewol::widget::ContainerN::systemDraw(const ewol::DrawProperty& _displayProp
|
||||
|
||||
void ewol::widget::ContainerN::onChangeSize() {
|
||||
for (auto &it : m_subWidget) {
|
||||
if (it == nullptr) {
|
||||
if (it == null) {
|
||||
continue;
|
||||
}
|
||||
it->setOrigin(m_origin+m_offset);
|
||||
@ -202,7 +202,7 @@ void ewol::widget::ContainerN::calculateMinMaxSize() {
|
||||
m_maxSize.setValue(ULTIMATE_MAX_SIZE,ULTIMATE_MAX_SIZE);
|
||||
//EWOL_ERROR("[" << getId() << "] {" << getObjectType() << "} set min size : " << m_minSize);
|
||||
for (auto &it : m_subWidget) {
|
||||
if (it != nullptr) {
|
||||
if (it != null) {
|
||||
it->calculateMinMaxSize();
|
||||
bvec2 subExpendProp = it->canExpand();
|
||||
if (true == subExpendProp.x()) {
|
||||
@ -221,7 +221,7 @@ void ewol::widget::ContainerN::calculateMinMaxSize() {
|
||||
|
||||
void ewol::widget::ContainerN::onRegenerateDisplay() {
|
||||
for (auto &it : m_subWidget) {
|
||||
if (it != nullptr) {
|
||||
if (it != null) {
|
||||
it->onRegenerateDisplay();
|
||||
}
|
||||
}
|
||||
@ -229,18 +229,18 @@ void ewol::widget::ContainerN::onRegenerateDisplay() {
|
||||
|
||||
ewol::WidgetShared ewol::widget::ContainerN::getWidgetAtPos(const vec2& _pos) {
|
||||
if (*propertyHide == true) {
|
||||
return nullptr;
|
||||
return null;
|
||||
}
|
||||
// for all element in the sizer ...
|
||||
for (auto &it : m_subWidget) {
|
||||
if (it != nullptr) {
|
||||
if (it != null) {
|
||||
vec2 tmpSize = it->getSize();
|
||||
vec2 tmpOrigin = it->getOrigin();
|
||||
if( (tmpOrigin.x() <= _pos.x() && tmpOrigin.x() + tmpSize.x() >= _pos.x())
|
||||
&& (tmpOrigin.y() <= _pos.y() && tmpOrigin.y() + tmpSize.y() >= _pos.y()) )
|
||||
{
|
||||
ewol::WidgetShared tmpWidget = it->getWidgetAtPos(_pos);
|
||||
if (tmpWidget != nullptr) {
|
||||
if (tmpWidget != null) {
|
||||
return tmpWidget;
|
||||
}
|
||||
// stop searching
|
||||
@ -248,7 +248,7 @@ ewol::WidgetShared ewol::widget::ContainerN::getWidgetAtPos(const vec2& _pos) {
|
||||
}
|
||||
}
|
||||
}
|
||||
return nullptr;
|
||||
return null;
|
||||
};
|
||||
|
||||
bool ewol::widget::ContainerN::loadXML(const exml::Element& _node) {
|
||||
@ -284,7 +284,7 @@ bool ewol::widget::ContainerN::loadXML(const exml::Element& _node) {
|
||||
}
|
||||
EWOL_DEBUG("[" << getId() << "] {" << getObjectType() << "} load new element : '" << widgetName << "'");
|
||||
ewol::WidgetShared subWidget = getWidgetManager().create(widgetName, pNode);
|
||||
if (subWidget == nullptr) {
|
||||
if (subWidget == null) {
|
||||
EWOL_ERROR ("[" << getId() << "] {" << getObjectType() << "} (l " << pNode.getPos() << ") Can not create the widget : '" << widgetName << "'");
|
||||
continue;
|
||||
}
|
||||
@ -315,7 +315,7 @@ void ewol::widget::ContainerN::requestDestroyFromChild(const ewol::ObjectShared&
|
||||
auto it = m_subWidget.begin();
|
||||
while (it != m_subWidget.end()) {
|
||||
if (*it == _child) {
|
||||
if (*it == nullptr) {
|
||||
if (*it == null) {
|
||||
m_subWidget.erase(it);
|
||||
it = m_subWidget.begin();
|
||||
continue;
|
||||
@ -335,7 +335,7 @@ void ewol::widget::ContainerN::drawWidgetTree(int32_t _level) {
|
||||
ewol::Widget::drawWidgetTree(_level);
|
||||
_level++;
|
||||
for (auto &it: m_subWidget) {
|
||||
if (it != nullptr) {
|
||||
if (it != null) {
|
||||
it->drawWidgetTree(_level);
|
||||
}
|
||||
}
|
||||
|
@ -60,7 +60,7 @@ void ewol::widget::ContextMenu::onChangeSize() {
|
||||
// pop-up fill all the display :
|
||||
ewol::Padding padding = m_shaper.getPadding();
|
||||
EWOL_VERBOSE("our origin=" << m_origin << " size=" << m_size);
|
||||
if (m_subWidget == nullptr) {
|
||||
if (m_subWidget == null) {
|
||||
return;
|
||||
}
|
||||
vec2 subWidgetSize(0,0);
|
||||
@ -149,7 +149,7 @@ void ewol::widget::ContextMenu::onRegenerateDisplay() {
|
||||
m_shaper.clear();
|
||||
ewol::Padding padding = m_shaper.getPadding();
|
||||
|
||||
if (m_subWidget == nullptr) {
|
||||
if (m_subWidget == null) {
|
||||
return;
|
||||
}
|
||||
vec2 tmpSize = m_subWidget->getSize();
|
||||
@ -207,7 +207,7 @@ void ewol::widget::ContextMenu::onRegenerateDisplay() {
|
||||
|
||||
bool ewol::widget::ContextMenu::onEventInput(const ewol::event::Input& _event) {
|
||||
if (_event.getId() > 0) {
|
||||
if (ewol::widget::Container::getWidgetAtPos(_event.getPos()) != nullptr) {
|
||||
if (ewol::widget::Container::getWidgetAtPos(_event.getPos()) != null) {
|
||||
return false;
|
||||
}
|
||||
if( _event.getStatus() == gale::key::status::down
|
||||
@ -226,7 +226,7 @@ bool ewol::widget::ContextMenu::onEventInput(const ewol::event::Input& _event) {
|
||||
|
||||
ewol::WidgetShared ewol::widget::ContextMenu::getWidgetAtPos(const vec2& _pos) {
|
||||
ewol::WidgetShared val = ewol::widget::Container::getWidgetAtPos(_pos);
|
||||
if (val != nullptr) {
|
||||
if (val != null) {
|
||||
return val;
|
||||
}
|
||||
return ememory::dynamicPointerCast<ewol::Widget>(sharedFromThis());
|
||||
|
@ -13,7 +13,7 @@ ETK_DECLARE_TYPE(ewol::widget::Gird);
|
||||
|
||||
ewol::widget::Gird::Gird() :
|
||||
m_sizeRow(0),
|
||||
m_tmpWidget(nullptr),
|
||||
m_tmpWidget(null),
|
||||
m_gavityButtom(true),
|
||||
m_borderSize(0,0) {
|
||||
addObjectType("ewol::widget::Gird");
|
||||
@ -44,7 +44,7 @@ void ewol::widget::Gird::onChangeSize() {
|
||||
m_size -= m_borderSize*2;
|
||||
|
||||
for (size_t iii=0; iii<m_subWidget.size(); iii++) {
|
||||
if (m_subWidget[iii].widget != nullptr) {
|
||||
if (m_subWidget[iii].widget != null) {
|
||||
//calculate the origin :
|
||||
vec2 tmpOrigin = m_origin + m_borderSize;
|
||||
if (false == m_gavityButtom) {
|
||||
@ -94,7 +94,7 @@ void ewol::widget::Gird::calculateMinMaxSize() {
|
||||
// change of line :
|
||||
lastLineID = m_subWidget[iii].row;
|
||||
}
|
||||
if (m_subWidget[iii].widget != nullptr) {
|
||||
if (m_subWidget[iii].widget != null) {
|
||||
m_subWidget[iii].widget->calculateMinMaxSize();
|
||||
vec2 tmpSize = m_subWidget[iii].widget->getCalculateMinSize();
|
||||
EWOL_DEBUG(" [" << iii << "] subWidgetMinSize=" << tmpSize);
|
||||
@ -130,7 +130,7 @@ void ewol::widget::Gird::setColNumber(int32_t _colNumber) {
|
||||
for (int64_t iii=m_subWidget.size(); iii >= 0; iii--) {
|
||||
if (m_subWidget[iii].col > (_colNumber-1)) {
|
||||
// out of bounds : must remove it ...
|
||||
if (m_subWidget[iii].widget != nullptr) {
|
||||
if (m_subWidget[iii].widget != null) {
|
||||
m_subWidget[iii].widget.reset();
|
||||
// no remove, this element is removed with the function onObjectRemove == > it does not exist anymore ...
|
||||
if (errorControl == m_subWidget.size()) {
|
||||
@ -189,7 +189,7 @@ void ewol::widget::Gird::subWidgetRemoveAll() {
|
||||
|
||||
|
||||
void ewol::widget::Gird::subWidgetAdd(int32_t _colId, int32_t _rowId, ewol::WidgetShared _newWidget) {
|
||||
if (_newWidget == nullptr) {
|
||||
if (_newWidget == null) {
|
||||
return;
|
||||
}
|
||||
GirdProperties prop;
|
||||
@ -216,11 +216,11 @@ void ewol::widget::Gird::subWidgetAdd(int32_t _colId, int32_t _rowId, ewol::Widg
|
||||
// The element already exist == > replace it ...
|
||||
m_tmpWidget = m_subWidget[iii].widget;
|
||||
m_subWidget[iii].widget = _newWidget;
|
||||
if (m_tmpWidget != nullptr) {
|
||||
if (m_tmpWidget != null) {
|
||||
m_tmpWidget.reset();
|
||||
if (m_tmpWidget != nullptr) {
|
||||
if (m_tmpWidget != null) {
|
||||
EWOL_CRITICAL("[" << getId() << "] Error while replacing a widget ... == > never call when free");
|
||||
m_tmpWidget = nullptr;
|
||||
m_tmpWidget = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -259,7 +259,7 @@ void ewol::widget::Gird::subWidgetRemove(int32_t _colId, int32_t _rowId) {
|
||||
}
|
||||
|
||||
void ewol::widget::Gird::subWidgetUnLink(ewol::WidgetShared _newWidget) {
|
||||
if (_newWidget == nullptr) {
|
||||
if (_newWidget == null) {
|
||||
return;
|
||||
}
|
||||
for (size_t iii=0; iii<m_subWidget.size(); iii++) {
|
||||
@ -290,7 +290,7 @@ void ewol::widget::Gird::subWidgetUnLink(int32_t _colId, int32_t _rowId) {
|
||||
void ewol::widget::Gird::systemDraw(const ewol::DrawProperty& _displayProp) {
|
||||
ewol::Widget::systemDraw(_displayProp);
|
||||
for (auto &it : m_subWidget) {
|
||||
if (it.widget != nullptr) {
|
||||
if (it.widget != null) {
|
||||
it.widget->systemDraw(_displayProp);
|
||||
}
|
||||
}
|
||||
@ -298,7 +298,7 @@ void ewol::widget::Gird::systemDraw(const ewol::DrawProperty& _displayProp) {
|
||||
|
||||
void ewol::widget::Gird::onRegenerateDisplay() {
|
||||
for (auto &it : m_subWidget) {
|
||||
if (it.widget != nullptr) {
|
||||
if (it.widget != null) {
|
||||
it.widget->onRegenerateDisplay();
|
||||
}
|
||||
}
|
||||
@ -306,11 +306,11 @@ void ewol::widget::Gird::onRegenerateDisplay() {
|
||||
|
||||
ewol::WidgetShared ewol::widget::Gird::getWidgetAtPos(const vec2& _pos) {
|
||||
if (*propertyHide == true) {
|
||||
return nullptr;
|
||||
return null;
|
||||
}
|
||||
// for all element in the sizer ...
|
||||
for (auto &it : m_subWidget) {
|
||||
if (it.widget == nullptr) {
|
||||
if (it.widget == null) {
|
||||
continue;
|
||||
}
|
||||
vec2 tmpSize = it.widget->getSize();
|
||||
@ -318,13 +318,13 @@ ewol::WidgetShared ewol::widget::Gird::getWidgetAtPos(const vec2& _pos) {
|
||||
if( (tmpOrigin.x() <= _pos.x() && tmpOrigin.x() + tmpSize.x() >= _pos.x())
|
||||
&& (tmpOrigin.y() <= _pos.y() && tmpOrigin.y() + tmpSize.y() >= _pos.y()) ) {
|
||||
ewol::WidgetShared tmpWidget = it.widget->getWidgetAtPos(_pos);
|
||||
if (tmpWidget != nullptr) {
|
||||
if (tmpWidget != null) {
|
||||
return tmpWidget;
|
||||
}
|
||||
// stop searching
|
||||
break;
|
||||
}
|
||||
}
|
||||
return nullptr;
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -24,12 +24,12 @@ ewol::widget::Image::Image() :
|
||||
propertyDistanceFieldMode(this, "distance-field", false, "Distance field mode", &ewol::widget::Image::onChangePropertyDistanceFieldMode),
|
||||
propertySmooth(this, "smooth", true, "Smooth display of the image", &ewol::widget::Image::onChangePropertySmooth),
|
||||
propertyUseThemeColor(this, "use-theme-color", false, "use the theme color to display images", &ewol::widget::Image::onChangePropertyUseThemeColor),
|
||||
m_colorProperty(nullptr),
|
||||
m_colorProperty(null),
|
||||
m_colorId(-1) {
|
||||
addObjectType("ewol::widget::Image");
|
||||
m_imageRenderSize = vec2(0,0);
|
||||
m_colorProperty = ewol::resource::ColorFile::create("{ewol}THEME:COLOR:Image.json");
|
||||
if (m_colorProperty != nullptr) {
|
||||
if (m_colorProperty != null) {
|
||||
m_colorId = m_colorProperty->request("foreground");
|
||||
}
|
||||
}
|
||||
@ -68,7 +68,7 @@ void ewol::widget::Image::onRegenerateDisplay() {
|
||||
// remove data of the previous composition :
|
||||
m_compositing.clear();
|
||||
if ( *propertyUseThemeColor == true
|
||||
&& m_colorProperty != nullptr) {
|
||||
&& m_colorProperty != null) {
|
||||
m_compositing.setColor(m_colorProperty->get(m_colorId));
|
||||
}
|
||||
// Calculate the new position and size:
|
||||
|
@ -52,9 +52,9 @@ void ewol::widget::Joystick::onRegenerateDisplay() {
|
||||
// clean the object list ...
|
||||
|
||||
/*
|
||||
ewol::OObject2DColored * tmpOObjects = nullptr;
|
||||
ewol::OObject2DTextured * tmpOOtexBg = nullptr;
|
||||
ewol::OObject2DTextured * tmpOOtexFg = nullptr;
|
||||
ewol::OObject2DColored * tmpOObjects = null;
|
||||
ewol::OObject2DTextured * tmpOOtexBg = null;
|
||||
ewol::OObject2DTextured * tmpOOtexFg = null;
|
||||
// set background
|
||||
if (true == m_displayBackground) {
|
||||
if (m_background == "") {
|
||||
@ -69,7 +69,7 @@ void ewol::widget::Joystick::onRegenerateDisplay() {
|
||||
// set cursor point
|
||||
float sizeElement = m_size.x*m_ratio;
|
||||
if (m_foreground == "") {
|
||||
if (nullptr == tmpOObjects) {
|
||||
if (null == tmpOObjects) {
|
||||
tmpOObjects = ne w ewol::OObject2DColored;
|
||||
}
|
||||
tmpOObjects->setColor(m_colorFg);
|
||||
@ -81,13 +81,13 @@ void ewol::widget::Joystick::onRegenerateDisplay() {
|
||||
((m_displayPos.y+1.0)/2.0)*(m_size.y-2*sizeElement), sizeElement*2, sizeElement*2);
|
||||
}
|
||||
// add all needed objects ...
|
||||
if (nullptr != tmpOObjects) {
|
||||
if (null != tmpOObjects) {
|
||||
addOObject(tmpOObjects);
|
||||
}
|
||||
if (nullptr != tmpOOtexBg) {
|
||||
if (null != tmpOOtexBg) {
|
||||
addOObject(tmpOOtexBg);
|
||||
}
|
||||
if (nullptr != tmpOOtexFg) {
|
||||
if (null != tmpOOtexFg) {
|
||||
addOObject(tmpOOtexFg);
|
||||
}
|
||||
*/
|
||||
|
@ -24,12 +24,12 @@ ewol::widget::Label::Label() :
|
||||
"displayed value string",
|
||||
&ewol::widget::Label::onChangePropertyValue),
|
||||
m_value(U""),
|
||||
m_colorProperty(nullptr),
|
||||
m_colorProperty(null),
|
||||
m_colorDefaultFgText(-1),
|
||||
m_colorDefaultBgText(-1){
|
||||
addObjectType("ewol::widget::Label");
|
||||
m_colorProperty = ewol::resource::ColorFile::create("{ewol}THEME:COLOR:Label.json");
|
||||
if (m_colorProperty != nullptr) {
|
||||
if (m_colorProperty != null) {
|
||||
m_colorDefaultFgText = m_colorProperty->request("foreground");
|
||||
m_colorDefaultBgText = m_colorProperty->request("background");
|
||||
}
|
||||
@ -115,7 +115,7 @@ void ewol::widget::Label::onRegenerateDisplay() {
|
||||
|
||||
// clean the element
|
||||
m_text.reset();
|
||||
if (m_colorProperty != nullptr) {
|
||||
if (m_colorProperty != null) {
|
||||
m_text.setDefaultColorFg(m_colorProperty->get(m_colorDefaultFgText));
|
||||
m_text.setDefaultColorBg(m_colorProperty->get(m_colorDefaultBgText));
|
||||
}
|
||||
|
@ -20,11 +20,11 @@ ewol::widget::Layer::~Layer() {
|
||||
|
||||
ewol::WidgetShared ewol::widget::Layer::getWidgetAtPos(const vec2& _pos) {
|
||||
if (*propertyHide == true) {
|
||||
return nullptr;
|
||||
return null;
|
||||
}
|
||||
// for all element in the sizer ...
|
||||
for (auto &it : m_subWidget) {
|
||||
if (it == nullptr) {
|
||||
if (it == null) {
|
||||
continue;
|
||||
}
|
||||
vec2 tmpSize = it->getSize();
|
||||
@ -32,12 +32,12 @@ ewol::WidgetShared ewol::widget::Layer::getWidgetAtPos(const vec2& _pos) {
|
||||
if( (tmpOrigin.x() <= _pos.x() && tmpOrigin.x() + tmpSize.x() >= _pos.x())
|
||||
&& (tmpOrigin.y() <= _pos.y() && tmpOrigin.y() + tmpSize.y() >= _pos.y()) ) {
|
||||
ewol::WidgetShared tmpWidget = it->getWidgetAtPos(_pos);
|
||||
if (tmpWidget != nullptr) {
|
||||
if (tmpWidget != null) {
|
||||
return tmpWidget;
|
||||
}
|
||||
// parse the next layer ...
|
||||
}
|
||||
}
|
||||
return nullptr;
|
||||
return null;
|
||||
};
|
||||
|
||||
|
@ -29,7 +29,7 @@ ewol::widget::List::~List() {
|
||||
//clean all the object
|
||||
for (size_t iii=0; iii<m_listOObject.size(); iii++) {
|
||||
ETK_DELETE(ewol::Compositing, m_listOObject[iii]);
|
||||
m_listOObject[iii] = nullptr;
|
||||
m_listOObject[iii] = null;
|
||||
}
|
||||
m_listOObject.clear();
|
||||
}
|
||||
@ -71,7 +71,7 @@ void ewol::widget::List::calculateMinMaxSize() {
|
||||
}
|
||||
|
||||
void ewol::widget::List::addOObject(ewol::Compositing* _newObject, int32_t _pos) {
|
||||
if (_newObject == nullptr) {
|
||||
if (_newObject == null) {
|
||||
EWOL_ERROR("Try to add an empty object in the Widget generic display system");
|
||||
return;
|
||||
}
|
||||
@ -86,14 +86,14 @@ void ewol::widget::List::addOObject(ewol::Compositing* _newObject, int32_t _pos)
|
||||
void ewol::widget::List::clearOObjectList() {
|
||||
for (size_t iii=0; iii<m_listOObject.size(); iii++) {
|
||||
ETK_DELETE(ewol::Compositing, m_listOObject[iii]);
|
||||
m_listOObject[iii] = nullptr;
|
||||
m_listOObject[iii] = null;
|
||||
}
|
||||
m_listOObject.clear();
|
||||
}
|
||||
|
||||
void ewol::widget::List::onDraw() {
|
||||
for (size_t iii=0; iii<m_listOObject.size(); iii++) {
|
||||
if (m_listOObject[iii] != nullptr) {
|
||||
if (m_listOObject[iii] != null) {
|
||||
m_listOObject[iii]->draw();
|
||||
}
|
||||
}
|
||||
@ -171,7 +171,7 @@ void ewol::widget::List::onRegenerateDisplay() {
|
||||
getElement(jjj, iii, myTextToWrite, fg, bg);
|
||||
|
||||
ewol::compositing::Text * tmpText = ETK_NEW(ewol::compositing::Text);
|
||||
if (nullptr != tmpText) {
|
||||
if (null != tmpText) {
|
||||
// get font size :
|
||||
int32_t tmpFontHeight = tmpText->calculateSize(char32_t('A')).y();
|
||||
displayPositionY-=(tmpFontHeight+m_paddingSizeY);
|
||||
|
@ -46,7 +46,7 @@ ewol::widget::ListFileSystem::ListFileSystem() :
|
||||
propertyPath.setDirectCheck("c:/");
|
||||
#endif
|
||||
m_colorProperty = ewol::resource::ColorFile::create("{ewol}THEME:COLOR:ListFileSystem.json");
|
||||
if (m_colorProperty != nullptr) {
|
||||
if (m_colorProperty != null) {
|
||||
m_colorIdText = m_colorProperty->request("text");
|
||||
m_colorIdBackground1 = m_colorProperty->request("background1");
|
||||
m_colorIdBackground2 = m_colorProperty->request("background2");
|
||||
@ -61,9 +61,9 @@ ewol::widget::ListFileSystem::~ListFileSystem() {
|
||||
|
||||
void ewol::widget::ListFileSystem::clearList() {
|
||||
for (auto &it : m_list) {
|
||||
if (it != nullptr) {
|
||||
if (it != null) {
|
||||
ETK_DELETE(etk::FSNode, it);
|
||||
it = nullptr;
|
||||
it = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -88,7 +88,7 @@ void ewol::widget::ListFileSystem::regenerateView() {
|
||||
etk::String ewol::widget::ListFileSystem::getSelect() const {
|
||||
etk::String tmpVal = "";
|
||||
if (m_selectedLine >= 0) {
|
||||
if (m_list[m_selectedLine] != nullptr) {
|
||||
if (m_list[m_selectedLine] != null) {
|
||||
tmpVal = m_list[m_selectedLine]->getNameFile();
|
||||
}
|
||||
}
|
||||
@ -101,7 +101,7 @@ void ewol::widget::ListFileSystem::setSelect(const etk::String& _data) {
|
||||
m_selectedLine = -1;
|
||||
// search the coresponding file :
|
||||
for (size_t iii=0; iii<m_list.size(); ++iii) {
|
||||
if (m_list[iii] != nullptr) {
|
||||
if (m_list[iii] != null) {
|
||||
if (m_list[iii]->getNameFile() == _data) {
|
||||
// we find the line :
|
||||
m_selectedLine = iii;
|
||||
@ -150,7 +150,7 @@ bool ewol::widget::ListFileSystem::getElement(int32_t _colomn, int32_t _raw, etk
|
||||
}
|
||||
if( _raw-offset >= 0
|
||||
&& _raw-offset < (int32_t)m_list.size()
|
||||
&& m_list[_raw-offset] != nullptr) {
|
||||
&& m_list[_raw-offset] != null) {
|
||||
_myTextToWrite = m_list[_raw-offset]->getNameFile();
|
||||
EWOL_VERBOSE("get filename for : '" << *m_list[_raw-offset] << ":'" << _myTextToWrite << "'");
|
||||
}
|
||||
@ -201,7 +201,7 @@ bool ewol::widget::ListFileSystem::onItemEvent(int32_t _IdInput,
|
||||
signalFolderSelect.emit("..");
|
||||
} else if( m_selectedLine-offset >= 0
|
||||
&& m_selectedLine-offset < (int32_t)m_list.size()
|
||||
&& nullptr != m_list[m_selectedLine-offset] ) {
|
||||
&& null != m_list[m_selectedLine-offset] ) {
|
||||
// generate event extern :
|
||||
switch(m_list[m_selectedLine-offset]->getNodeType()) {
|
||||
case etk::typeNode_file :
|
||||
@ -226,7 +226,7 @@ bool ewol::widget::ListFileSystem::onItemEvent(int32_t _IdInput,
|
||||
signalFolderValidate.emit("..");
|
||||
} else if( m_selectedLine-offset >= 0
|
||||
&& m_selectedLine-offset < (int32_t)m_list.size()
|
||||
&& nullptr != m_list[m_selectedLine-offset] ) {
|
||||
&& null != m_list[m_selectedLine-offset] ) {
|
||||
switch(m_list[m_selectedLine-offset]->getNodeType()) {
|
||||
case etk::typeNode_file :
|
||||
signalFileValidate.emit(m_list[m_selectedLine-offset]->getNameFile());
|
||||
|
@ -65,7 +65,7 @@ ewol::widget::Manager::Manager() :
|
||||
ewol::widget::Manager::~Manager() {
|
||||
EWOL_DEBUG(" == > Un-Init Widget-Manager");
|
||||
EWOL_INFO("Realease all FOCUS");
|
||||
focusSetDefault(nullptr);
|
||||
focusSetDefault(null);
|
||||
focusRelease();
|
||||
|
||||
m_creatorList.clear();
|
||||
@ -76,7 +76,7 @@ ewol::widget::Manager::~Manager() {
|
||||
* *************************************************************************/
|
||||
|
||||
void ewol::widget::Manager::focusKeep(ewol::WidgetShared _newWidget) {
|
||||
if (_newWidget == nullptr) {
|
||||
if (_newWidget == null) {
|
||||
// nothing to do ...
|
||||
return;
|
||||
}
|
||||
@ -87,7 +87,7 @@ void ewol::widget::Manager::focusKeep(ewol::WidgetShared _newWidget) {
|
||||
// nothing to do ...
|
||||
return;
|
||||
}
|
||||
if (focusWidgetCurrent != nullptr) {
|
||||
if (focusWidgetCurrent != null) {
|
||||
EWOL_DEBUG("Rm focus on WidgetID=" << focusWidgetCurrent->getId() );
|
||||
focusWidgetCurrent->rmFocus();
|
||||
focusWidgetCurrent.reset();
|
||||
@ -97,14 +97,14 @@ void ewol::widget::Manager::focusKeep(ewol::WidgetShared _newWidget) {
|
||||
return;
|
||||
}
|
||||
m_focusWidgetCurrent = _newWidget;
|
||||
if (_newWidget != nullptr) {
|
||||
if (_newWidget != null) {
|
||||
EWOL_DEBUG("Set focus on WidgetID=" << _newWidget->getId() );
|
||||
_newWidget->setFocus();
|
||||
}
|
||||
}
|
||||
|
||||
void ewol::widget::Manager::focusSetDefault(ewol::WidgetShared _newWidget) {
|
||||
if( _newWidget != nullptr
|
||||
if( _newWidget != null
|
||||
&& _newWidget->propertyCanFocus.get() == false) {
|
||||
EWOL_VERBOSE("Widget can not have focus, id=" << _newWidget->getId() );
|
||||
return;
|
||||
@ -112,12 +112,12 @@ void ewol::widget::Manager::focusSetDefault(ewol::WidgetShared _newWidget) {
|
||||
ewol::WidgetShared focusWidgetDefault = m_focusWidgetDefault.lock();
|
||||
ewol::WidgetShared focusWidgetCurrent = m_focusWidgetCurrent.lock();
|
||||
if (focusWidgetDefault == focusWidgetCurrent) {
|
||||
if (focusWidgetCurrent != nullptr) {
|
||||
if (focusWidgetCurrent != null) {
|
||||
EWOL_DEBUG("Rm focus on WidgetID=" << focusWidgetCurrent->getId() );
|
||||
focusWidgetCurrent->rmFocus();
|
||||
}
|
||||
m_focusWidgetCurrent = _newWidget;
|
||||
if (_newWidget != nullptr) {
|
||||
if (_newWidget != null) {
|
||||
EWOL_DEBUG("Set focus on WidgetID=" << _newWidget->getId() );
|
||||
_newWidget->setFocus();
|
||||
}
|
||||
@ -132,13 +132,13 @@ void ewol::widget::Manager::focusRelease() {
|
||||
// nothink to do ...
|
||||
return;
|
||||
}
|
||||
if (focusWidgetCurrent != nullptr) {
|
||||
if (focusWidgetCurrent != null) {
|
||||
EWOL_DEBUG("Rm focus on WidgetID=" << focusWidgetCurrent->getId() );
|
||||
focusWidgetCurrent->rmFocus();
|
||||
}
|
||||
m_focusWidgetCurrent = m_focusWidgetDefault;
|
||||
focusWidgetCurrent = m_focusWidgetCurrent.lock();
|
||||
if (focusWidgetCurrent != nullptr) {
|
||||
if (focusWidgetCurrent != null) {
|
||||
EWOL_DEBUG("Set focus on WidgetID=" << focusWidgetCurrent->getId() );
|
||||
focusWidgetCurrent->setFocus();
|
||||
}
|
||||
@ -157,7 +157,7 @@ void ewol::widget::Manager::markDrawingIsNeeded() {
|
||||
return;
|
||||
}
|
||||
m_haveRedraw = true;
|
||||
if (m_funcRedrawNeeded != nullptr) {
|
||||
if (m_funcRedrawNeeded != null) {
|
||||
m_funcRedrawNeeded();
|
||||
}
|
||||
}
|
||||
@ -172,8 +172,8 @@ bool ewol::widget::Manager::isDrawingNeeded() {
|
||||
void ewol::widget::Manager::addWidgetCreator(const etk::String& _name,
|
||||
ewol::widget::Manager::widgetCreatorFunction _pointer,
|
||||
ewol::widget::Manager::widgetCreatorFunctionXml _pointerXml) {
|
||||
if ( _pointer == nullptr
|
||||
|| _pointerXml == nullptr) {
|
||||
if ( _pointer == null
|
||||
|| _pointerXml == null) {
|
||||
return;
|
||||
}
|
||||
//Keep name in lower case :
|
||||
@ -207,24 +207,24 @@ ewol::WidgetShared ewol::widget::Manager::create(const etk::String& _name) {
|
||||
etk::String nameLower = etk::toLower(_name);
|
||||
auto it = m_creatorList.find(nameLower);
|
||||
if (it != m_creatorList.end()) {
|
||||
if (it->second != nullptr) {
|
||||
if (it->second != null) {
|
||||
return it->second();
|
||||
}
|
||||
}
|
||||
EWOL_WARNING("try to create an UnExistant widget : " << nameLower);
|
||||
return nullptr;
|
||||
return null;
|
||||
}
|
||||
|
||||
ewol::WidgetShared ewol::widget::Manager::create(const etk::String& _name, const exml::Element& _node) {
|
||||
etk::String nameLower = etk::toLower(_name);
|
||||
auto it = m_creatorListXml.find(nameLower);
|
||||
if (it != m_creatorListXml.end()) {
|
||||
if (it->second != nullptr) {
|
||||
if (it->second != null) {
|
||||
return it->second(_node);
|
||||
}
|
||||
}
|
||||
EWOL_WARNING("try to create an UnExistant widget : " << nameLower);
|
||||
return nullptr;
|
||||
return null;
|
||||
}
|
||||
|
||||
bool ewol::widget::Manager::exist(const etk::String& _name) {
|
||||
|
@ -62,14 +62,14 @@ namespace ewol {
|
||||
/**
|
||||
* @brief Create a widget with his name.
|
||||
* @param[in] _name Name of the widget to create.
|
||||
* @return The widget created (nullptr if it does not exist).
|
||||
* @return The widget created (null if it does not exist).
|
||||
*/
|
||||
ewol::WidgetShared create(const etk::String& _name);
|
||||
/**
|
||||
* @brief Create a widget with his name.
|
||||
* @param[in] _name Name of the widget to create.
|
||||
* @param[in] _node Reference on the XML node.
|
||||
* @return The widget created (nullptr if it does not exist).
|
||||
* @return The widget created (null if it does not exist).
|
||||
*/
|
||||
ewol::WidgetShared create(const etk::String& _name, const exml::Element& _node);
|
||||
/**
|
||||
|
@ -83,7 +83,7 @@ int32_t ewol::widget::Menu::add(int32_t _parent,
|
||||
tmpObject.m_message = _message;
|
||||
if (tmpObject.m_parentId == -1) {
|
||||
ewol::widget::ButtonShared myButton = ewol::widget::Button::create();
|
||||
if (myButton == nullptr) {
|
||||
if (myButton == null) {
|
||||
EWOL_ERROR("Allocation button error");
|
||||
return tmpObject.m_localId;
|
||||
}
|
||||
@ -126,7 +126,7 @@ int32_t ewol::widget::Menu::addSpacer(int32_t _parent) {
|
||||
tmpObject.m_message = "";
|
||||
if (tmpObject.m_parentId == -1) {
|
||||
ewol::widget::SpacerShared mySpacer = ewol::widget::Spacer::create();
|
||||
if (mySpacer == nullptr) {
|
||||
if (mySpacer == null) {
|
||||
EWOL_ERROR("Allocation spacer error");
|
||||
return tmpObject.m_localId;
|
||||
}
|
||||
@ -144,7 +144,7 @@ int32_t ewol::widget::Menu::addSpacer(int32_t _parent) {
|
||||
|
||||
void ewol::widget::Menu::onButtonPressed(ewol::widget::ButtonWeak _button) {
|
||||
ewol::widget::ButtonShared caller = _button.lock();
|
||||
if (caller == nullptr) {
|
||||
if (caller == null) {
|
||||
return;
|
||||
}
|
||||
for (auto &it : m_listElement) {
|
||||
@ -157,7 +157,7 @@ void ewol::widget::Menu::onButtonPressed(ewol::widget::ButtonWeak _button) {
|
||||
// Send a multicast event ...
|
||||
signalSelect.emit(it.m_message);
|
||||
ewol::widget::ContextMenuShared tmpContext = m_widgetContextMenu.lock();
|
||||
if (tmpContext != nullptr) {
|
||||
if (tmpContext != null) {
|
||||
EWOL_DEBUG("Mark the menu to remove ...");
|
||||
tmpContext->destroy();
|
||||
}
|
||||
@ -178,14 +178,14 @@ void ewol::widget::Menu::onButtonPressed(ewol::widget::ButtonWeak _button) {
|
||||
// create a context menu:
|
||||
ewol::widget::ContextMenuShared tmpContext = ewol::widget::ContextMenu::create();
|
||||
m_widgetContextMenu = tmpContext;
|
||||
if (tmpContext == nullptr) {
|
||||
if (tmpContext == null) {
|
||||
EWOL_ERROR("Allocation Error");
|
||||
return;
|
||||
}
|
||||
// get the button widget:
|
||||
vec2 newPosition;
|
||||
ewol::WidgetShared eventFromWidget = ememory::dynamicPointerCast<ewol::Widget>(caller);
|
||||
if (eventFromWidget != nullptr) {
|
||||
if (eventFromWidget != null) {
|
||||
vec2 tmpOri = eventFromWidget->getOrigin();
|
||||
vec2 tmpSize = eventFromWidget->getSize();
|
||||
// calculate the correct position
|
||||
@ -196,7 +196,7 @@ void ewol::widget::Menu::onButtonPressed(ewol::widget::ButtonWeak _button) {
|
||||
ewol::widget::SizerShared mySizer;
|
||||
ewol::widget::ButtonShared myButton;
|
||||
mySizer = ewol::widget::Sizer::create();
|
||||
if (mySizer != nullptr) {
|
||||
if (mySizer != null) {
|
||||
mySizer->propertyMode.set(widget::Sizer::modeVert);
|
||||
mySizer->propertyLockExpand.set(vec2(true,true));
|
||||
mySizer->propertyFill.set(vec2(true,true));
|
||||
@ -218,7 +218,7 @@ void ewol::widget::Menu::onButtonPressed(ewol::widget::ButtonWeak _button) {
|
||||
}
|
||||
if (m_listElement[iii].m_message == "" && m_listElement[iii].m_label == "") {
|
||||
ewol::widget::SpacerShared mySpacer = ewol::widget::Spacer::create();
|
||||
if (mySpacer == nullptr) {
|
||||
if (mySpacer == null) {
|
||||
EWOL_ERROR("Allocation spacer error");
|
||||
continue;
|
||||
}
|
||||
@ -231,7 +231,7 @@ void ewol::widget::Menu::onButtonPressed(ewol::widget::ButtonWeak _button) {
|
||||
mySizer->subWidgetAdd(mySpacer);
|
||||
} else {
|
||||
myButton = ewol::widget::Button::create();
|
||||
if (myButton == nullptr) {
|
||||
if (myButton == null) {
|
||||
EWOL_ERROR("Allocation Error");
|
||||
continue;
|
||||
}
|
||||
@ -263,7 +263,7 @@ void ewol::widget::Menu::onButtonPressed(ewol::widget::ButtonWeak _button) {
|
||||
);
|
||||
} else {
|
||||
ewol::widget::LabelShared tmpLabel = widget::Label::create();
|
||||
if (tmpLabel != nullptr) {
|
||||
if (tmpLabel != null) {
|
||||
tmpLabel->propertyValue.set(etk::String("<left>") + m_listElement[iii].m_label + "</left>\n");
|
||||
tmpLabel->propertyExpand.set(bvec2(true,false));
|
||||
tmpLabel->propertyFill.set(bvec2(true,true));
|
||||
@ -276,7 +276,7 @@ void ewol::widget::Menu::onButtonPressed(ewol::widget::ButtonWeak _button) {
|
||||
}
|
||||
}
|
||||
ewol::widget::WindowsShared currentWindows = getWindows();
|
||||
if (currentWindows == nullptr) {
|
||||
if (currentWindows == null) {
|
||||
EWOL_ERROR("Can not get the curent Windows...");
|
||||
} else {
|
||||
currentWindows->popUpWidgetPush(tmpContext);
|
||||
|
@ -44,7 +44,7 @@ ewol::widget::PopUp::~PopUp() {
|
||||
|
||||
void ewol::widget::PopUp::onChangeSize() {
|
||||
markToRedraw();
|
||||
if (m_subWidget == nullptr) {
|
||||
if (m_subWidget == null) {
|
||||
return;
|
||||
}
|
||||
ewol::Padding padding = m_shaper.getPadding();
|
||||
@ -83,7 +83,7 @@ void ewol::widget::PopUp::systemDraw(const ewol::DrawProperty& _displayProp) {
|
||||
return;
|
||||
}
|
||||
ewol::Widget::systemDraw(_displayProp);
|
||||
if (m_subWidget == nullptr) {
|
||||
if (m_subWidget == null) {
|
||||
return;
|
||||
}
|
||||
if( m_shaper.getNextDisplayedStatus() == -1
|
||||
@ -111,7 +111,7 @@ void ewol::widget::PopUp::onRegenerateDisplay() {
|
||||
if (fill.y() == true) {
|
||||
tmpSize.setY(m_size.y()-padding.y());
|
||||
}
|
||||
if (m_subWidget != nullptr) {
|
||||
if (m_subWidget != null) {
|
||||
vec2 tmpSize = m_subWidget->getSize();
|
||||
}
|
||||
tmpSize.setMax(m_minSize);
|
||||
@ -122,14 +122,14 @@ void ewol::widget::PopUp::onRegenerateDisplay() {
|
||||
vec2ClipInt32(tmpSize + vec2(padding.x(), padding.y())));
|
||||
}
|
||||
// SUBwIDGET GENERATION ...
|
||||
if (m_subWidget != nullptr) {
|
||||
if (m_subWidget != null) {
|
||||
m_subWidget->onRegenerateDisplay();
|
||||
}
|
||||
}
|
||||
|
||||
ewol::WidgetShared ewol::widget::PopUp::getWidgetAtPos(const vec2& _pos) {
|
||||
ewol::WidgetShared val = ewol::widget::Container::getWidgetAtPos(_pos);
|
||||
if (val != nullptr) {
|
||||
if (val != null) {
|
||||
return val;
|
||||
}
|
||||
return ememory::dynamicPointerCast<ewol::Widget>(sharedFromThis());
|
||||
@ -158,7 +158,7 @@ bool ewol::widget::PopUp::onEventInput(const ewol::event::Input& _event) {
|
||||
}
|
||||
ewol::Padding padding = m_shaper.getPadding();
|
||||
vec2 tmpSize(0,0);
|
||||
if (m_subWidget != nullptr) {
|
||||
if (m_subWidget != null) {
|
||||
vec2 tmpSize = m_subWidget->getSize();
|
||||
}
|
||||
tmpSize.setMax(m_minSize);
|
||||
|
@ -66,7 +66,7 @@ void ewol::widget::Scroll::onChangeSize() {
|
||||
if (*propertyHide == true) {
|
||||
return;
|
||||
}
|
||||
if (m_subWidget == nullptr) {
|
||||
if (m_subWidget == null) {
|
||||
return;
|
||||
}
|
||||
// remove the bar if hover
|
||||
@ -108,7 +108,7 @@ void ewol::widget::Scroll::calculateMinMaxSize() {
|
||||
// Note: No call of container ==> normal case ...
|
||||
ewol::Widget::calculateMinMaxSize();
|
||||
// call sub classes
|
||||
if (m_subWidget != nullptr) {
|
||||
if (m_subWidget != null) {
|
||||
m_subWidget->calculateMinMaxSize();
|
||||
}
|
||||
}
|
||||
@ -117,7 +117,7 @@ void ewol::widget::Scroll::systemDraw(const ewol::DrawProperty& _displayProp) {
|
||||
if (*propertyHide == true) {
|
||||
return;
|
||||
}
|
||||
if (m_subWidget != nullptr) {
|
||||
if (m_subWidget != null) {
|
||||
ewol::DrawProperty prop = _displayProp;
|
||||
prop.limit(m_origin, m_size);
|
||||
m_subWidget->systemDraw(prop);
|
||||
@ -156,7 +156,7 @@ void ewol::widget::Scroll::onRegenerateDisplay() {
|
||||
ewol::Padding paddingHori = m_shaperH.getPadding();
|
||||
vec2 scrollOffset(0,0);
|
||||
vec2 scrollSize(0,0);
|
||||
if (m_subWidget != nullptr) {
|
||||
if (m_subWidget != null) {
|
||||
scrollOffset = m_subWidget->getOffset();
|
||||
scrollSize = m_subWidget->getSize();
|
||||
}
|
||||
@ -192,7 +192,7 @@ bool ewol::widget::Scroll::onEventInput(const ewol::event::Input& _event) {
|
||||
vec2 relativePos = relativePosition(_event.getPos());
|
||||
vec2 scrollOffset(0,0);
|
||||
vec2 scrollSize(0,0);
|
||||
if (m_subWidget != nullptr) {
|
||||
if (m_subWidget != null) {
|
||||
scrollOffset = m_subWidget->getOffset();
|
||||
scrollSize = m_subWidget->getSize();
|
||||
}
|
||||
@ -216,7 +216,7 @@ bool ewol::widget::Scroll::onEventInput(const ewol::event::Input& _event) {
|
||||
scrollOffset.setY((int32_t)(scrollSize.y() * (relativePos.y()-SCROLL_BAR_SPACE) / (m_size.y()-SCROLL_BAR_SPACE*2)));
|
||||
scrollOffset.setY(etk::avg(0.0f, scrollOffset.y(), (scrollSize.y() - m_size.y()*propertyLimit->y())));
|
||||
markToRedraw();
|
||||
if (m_subWidget != nullptr) {
|
||||
if (m_subWidget != null) {
|
||||
m_subWidget->setOffset(scrollOffset);
|
||||
}
|
||||
return true;
|
||||
@ -233,7 +233,7 @@ bool ewol::widget::Scroll::onEventInput(const ewol::event::Input& _event) {
|
||||
scrollOffset.setX((int32_t)(scrollSize.x() * (relativePos.x()-SCROLL_BAR_SPACE) / (m_size.x()-SCROLL_BAR_SPACE*2)));
|
||||
scrollOffset.setY(etk::avg(0.0f, scrollOffset.x(), (scrollSize.x() - m_size.x()*propertyLimit->x())));
|
||||
markToRedraw();
|
||||
if (m_subWidget != nullptr) {
|
||||
if (m_subWidget != null) {
|
||||
m_subWidget->setOffset(scrollOffset);
|
||||
}
|
||||
return true;
|
||||
@ -247,7 +247,7 @@ bool ewol::widget::Scroll::onEventInput(const ewol::event::Input& _event) {
|
||||
scrollOffset.setY(scrollOffset.y()-m_pixelScrolling);
|
||||
scrollOffset.setY(etk::avg(0.0f, scrollOffset.y(), (scrollSize.y() - m_size.y()*propertyLimit->y())));
|
||||
markToRedraw();
|
||||
if (m_subWidget != nullptr) {
|
||||
if (m_subWidget != null) {
|
||||
m_subWidget->setOffset(scrollOffset);
|
||||
}
|
||||
return true;
|
||||
@ -259,7 +259,7 @@ bool ewol::widget::Scroll::onEventInput(const ewol::event::Input& _event) {
|
||||
scrollOffset.setY(scrollOffset.y()+m_pixelScrolling);
|
||||
scrollOffset.setY(etk::avg(0.0f, scrollOffset.y(), (scrollSize.y() - m_size.y()*propertyLimit->y())));
|
||||
markToRedraw();
|
||||
if (m_subWidget != nullptr) {
|
||||
if (m_subWidget != null) {
|
||||
m_subWidget->setOffset(scrollOffset);
|
||||
}
|
||||
return true;
|
||||
@ -328,7 +328,7 @@ bool ewol::widget::Scroll::onEventInput(const ewol::event::Input& _event) {
|
||||
markToRedraw();
|
||||
}
|
||||
scrollOffset.setY(etk::avg(0.0f, scrollOffset.y(), (scrollSize.y() - m_size.y()*propertyLimit->y())));
|
||||
if (m_subWidget != nullptr) {
|
||||
if (m_subWidget != null) {
|
||||
m_subWidget->setOffset(scrollOffset);
|
||||
}
|
||||
return true;
|
||||
@ -338,7 +338,7 @@ bool ewol::widget::Scroll::onEventInput(const ewol::event::Input& _event) {
|
||||
scrollOffset.setX((int32_t)(scrollSize.x() * (relativePos.x()-SCROLL_BAR_SPACE) / (m_size.x()-SCROLL_BAR_SPACE*2)));
|
||||
scrollOffset.setX(etk::avg(0.0f, scrollOffset.x(), (scrollSize.x() - m_size.x()*propertyLimit->x() )));
|
||||
markToRedraw();
|
||||
if (m_subWidget != nullptr) {
|
||||
if (m_subWidget != null) {
|
||||
m_subWidget->setOffset(scrollOffset);
|
||||
}
|
||||
return true;
|
||||
@ -348,7 +348,7 @@ bool ewol::widget::Scroll::onEventInput(const ewol::event::Input& _event) {
|
||||
scrollOffset.setY((int32_t)(scrollSize.y() * (relativePos.y()-SCROLL_BAR_SPACE) / (m_size.y()-SCROLL_BAR_SPACE*2)));
|
||||
scrollOffset.setY(etk::avg(0.0f, scrollOffset.y(), (scrollSize.y() - m_size.y()*propertyLimit->x())));
|
||||
markToRedraw();
|
||||
if (m_subWidget != nullptr) {
|
||||
if (m_subWidget != null) {
|
||||
m_subWidget->setOffset(scrollOffset);
|
||||
}
|
||||
return true;
|
||||
@ -400,7 +400,7 @@ bool ewol::widget::Scroll::onEventInput(const ewol::event::Input& _event) {
|
||||
m_highSpeedStartPos = relativePos;
|
||||
EWOL_VERBOSE("SCROOL == > MOVE " << scrollOffset);
|
||||
markToRedraw();
|
||||
if (m_subWidget != nullptr) {
|
||||
if (m_subWidget != null) {
|
||||
m_subWidget->setOffset(scrollOffset);
|
||||
}
|
||||
return true;
|
||||
@ -422,7 +422,7 @@ bool ewol::widget::Scroll::onEventInput(const ewol::event::Input& _event) {
|
||||
|
||||
ewol::WidgetShared ewol::widget::Scroll::getWidgetAtPos(const vec2& _pos) {
|
||||
ewol::WidgetShared tmpWidget = ewol::widget::Container::getWidgetAtPos(_pos);
|
||||
if (tmpWidget != nullptr) {
|
||||
if (tmpWidget != null) {
|
||||
return tmpWidget;
|
||||
}
|
||||
return ememory::dynamicPointerCast<ewol::Widget>(sharedFromThis());;
|
||||
|
@ -45,7 +45,7 @@ ewol::widget::Select::~Select() {
|
||||
|
||||
void ewol::widget::Select::onChangePropertyValue() {
|
||||
markToRedraw();
|
||||
if (m_widgetEntry == nullptr) {
|
||||
if (m_widgetEntry == null) {
|
||||
EWOL_ERROR("Can not acces at entry ...");
|
||||
return;
|
||||
}
|
||||
@ -63,7 +63,7 @@ void ewol::widget::Select::onChangePropertyValue() {
|
||||
}
|
||||
|
||||
void ewol::widget::Select::optionSelectDefault() {
|
||||
if (m_widgetEntry == nullptr) {
|
||||
if (m_widgetEntry == null) {
|
||||
EWOL_ERROR("Can not acces at entry ...");
|
||||
return;
|
||||
}
|
||||
@ -140,11 +140,11 @@ bool ewol::widget::Select::loadXML(const exml::Element& _node) {
|
||||
void ewol::widget::Select::updateGui() {
|
||||
ewol::widget::SpinBase::updateGui();
|
||||
|
||||
if ( m_widgetEntry != nullptr
|
||||
if ( m_widgetEntry != null
|
||||
&& m_connectionEntry.isConnected() == false) {
|
||||
|
||||
}
|
||||
if ( m_widgetButtonUp != nullptr
|
||||
if ( m_widgetButtonUp != null
|
||||
&& m_connectionButton.isConnected() == false) {
|
||||
m_connectionButton = m_widgetButtonUp->signalPressed.connect(this, &ewol::widget::Select::onCallbackOpenMenu);
|
||||
}
|
||||
@ -159,7 +159,7 @@ void ewol::widget::Select::onCallbackLabelPressed(int32_t _value) {
|
||||
void ewol::widget::Select::onCallbackOpenMenu() {
|
||||
// create a context menu:
|
||||
ewol::widget::ContextMenuShared tmpContext = ewol::widget::ContextMenu::create();
|
||||
if (tmpContext == nullptr) {
|
||||
if (tmpContext == null) {
|
||||
EWOL_ERROR("Allocation Error");
|
||||
return;
|
||||
}
|
||||
@ -167,7 +167,7 @@ void ewol::widget::Select::onCallbackOpenMenu() {
|
||||
tmpContext->setPositionMarkAuto(m_origin, m_size);
|
||||
ewol::widget::SizerShared mySizer;
|
||||
mySizer = ewol::widget::Sizer::create();
|
||||
if (mySizer == nullptr) {
|
||||
if (mySizer == null) {
|
||||
EWOL_ERROR("Allocation Error or sizer");
|
||||
return;
|
||||
}
|
||||
@ -178,7 +178,7 @@ void ewol::widget::Select::onCallbackOpenMenu() {
|
||||
tmpContext->setSubWidget(mySizer);
|
||||
for (auto &it : m_listElement) {
|
||||
ewol::widget::LabelShared myLabel = ewol::widget::Label::create();
|
||||
if (myLabel == nullptr) {
|
||||
if (myLabel == null) {
|
||||
EWOL_ERROR("Allocation Error");
|
||||
continue;
|
||||
}
|
||||
@ -196,7 +196,7 @@ void ewol::widget::Select::onCallbackOpenMenu() {
|
||||
mySizer->subWidgetAddStart(myLabel);
|
||||
}
|
||||
ewol::widget::WindowsShared currentWindows = getWindows();
|
||||
if (currentWindows == nullptr) {
|
||||
if (currentWindows == null) {
|
||||
EWOL_ERROR("Can not get the curent Windows...");
|
||||
} else {
|
||||
currentWindows->popUpWidgetPush(tmpContext);
|
||||
|
@ -50,7 +50,7 @@ void ewol::widget::Sizer::onChangeSize() {
|
||||
vec2 minSize(0.0f, 0.0f);
|
||||
ivec2 nbWidgetExpand(0,0);
|
||||
for (auto &it : m_subWidget) {
|
||||
if (it == nullptr) {
|
||||
if (it == null) {
|
||||
continue;
|
||||
}
|
||||
vec2 tmpSize = it->getCalculateMinSize();
|
||||
@ -79,7 +79,7 @@ void ewol::widget::Sizer::onChangeSize() {
|
||||
}
|
||||
// -3- Configure all at the min size ...
|
||||
for (auto &it : m_subWidget) {
|
||||
if (it == nullptr) {
|
||||
if (it == null) {
|
||||
continue;
|
||||
}
|
||||
it->setSize(it->getCalculateMinSize());
|
||||
@ -94,7 +94,7 @@ void ewol::widget::Sizer::onChangeSize() {
|
||||
}
|
||||
// -4.1- Update every subWidget size
|
||||
for (auto &it : m_subWidget) {
|
||||
if (it == nullptr) {
|
||||
if (it == null) {
|
||||
continue;
|
||||
}
|
||||
vec2 tmpSizeMin = it->getSize();
|
||||
@ -144,7 +144,7 @@ void ewol::widget::Sizer::onChangeSize() {
|
||||
}
|
||||
// -5- Update the expand in the second size if vert ==> X and if hori ==> Y
|
||||
for (auto &it : m_subWidget) {
|
||||
if (it == nullptr) {
|
||||
if (it == null) {
|
||||
continue;
|
||||
}
|
||||
// Now update his size his size in X and the curent sizer size in Y:
|
||||
@ -166,7 +166,7 @@ void ewol::widget::Sizer::onChangeSize() {
|
||||
}
|
||||
// -6- Force size at the entire number:
|
||||
for (auto &it : m_subWidget) {
|
||||
if (it == nullptr) {
|
||||
if (it == null) {
|
||||
continue;
|
||||
}
|
||||
it->setSize(vec2ClipInt32(it->getSize()));
|
||||
@ -174,7 +174,7 @@ void ewol::widget::Sizer::onChangeSize() {
|
||||
// -7- get under Size
|
||||
vec2 underSize(0,0);
|
||||
for (auto &it : m_subWidget) {
|
||||
if (it == nullptr) {
|
||||
if (it == null) {
|
||||
continue;
|
||||
}
|
||||
vec2 size = it->getSize();
|
||||
@ -192,7 +192,7 @@ void ewol::widget::Sizer::onChangeSize() {
|
||||
vec2 tmpOrigin = m_origin + tmpBorderSize + ewol::gravityGenerateDelta(propertyGravity, deltas);
|
||||
// -9- Set sub widget origin:
|
||||
for (auto &it : m_subWidget) {
|
||||
if (it == nullptr) {
|
||||
if (it == null) {
|
||||
continue;
|
||||
}
|
||||
vec2 origin;
|
||||
@ -211,7 +211,7 @@ void ewol::widget::Sizer::onChangeSize() {
|
||||
}
|
||||
// -10- Update all subSize at every element:
|
||||
for (auto &it : m_subWidget) {
|
||||
if (it == nullptr) {
|
||||
if (it == null) {
|
||||
continue;
|
||||
}
|
||||
it->onChangeSize();
|
||||
@ -226,7 +226,7 @@ void ewol::widget::Sizer::calculateMinMaxSize() {
|
||||
vec2 tmpBorderSize = propertyBorderSize->getPixel();
|
||||
EWOL_VERBOSE("[" << getId() << "] {" << getObjectType() << "} set min size : " << m_minSize);
|
||||
for (auto &it : m_subWidget) {
|
||||
if (it == nullptr) {
|
||||
if (it == null) {
|
||||
continue;
|
||||
}
|
||||
it->calculateMinMaxSize();
|
||||
|
@ -38,7 +38,7 @@ namespace ewol {
|
||||
ewol::compositing::Drawing m_draw; //!< Compositing drawing element
|
||||
public:
|
||||
ewol::WidgetShared getWidgetAtPos(const vec2& _pos) override {
|
||||
return nullptr;
|
||||
return null;
|
||||
};
|
||||
void onRegenerateDisplay() override;
|
||||
void onDraw() override;
|
||||
|
@ -47,7 +47,7 @@ ewol::widget::Spin::~Spin() {
|
||||
|
||||
void ewol::widget::Spin::onChangePropertyValue() {
|
||||
markToRedraw();
|
||||
if (m_widgetEntry == nullptr) {
|
||||
if (m_widgetEntry == null) {
|
||||
EWOL_ERROR("Can not acces at entry ...");
|
||||
return;
|
||||
}
|
||||
@ -74,15 +74,15 @@ void ewol::widget::Spin::updateGui() {
|
||||
EWOL_WARNING("updateGui [START]");
|
||||
ewol::widget::SpinBase::updateGui();
|
||||
|
||||
if ( m_widgetEntry != nullptr
|
||||
if ( m_widgetEntry != null
|
||||
&& m_connectionEntry.isConnected() == false) {
|
||||
|
||||
}
|
||||
if ( m_widgetButtonUp != nullptr
|
||||
if ( m_widgetButtonUp != null
|
||||
&& m_connectionButtonUp.isConnected() == false) {
|
||||
m_connectionButtonUp = m_widgetButtonUp->signalPressed.connect(this, &ewol::widget::Spin::onCallbackUp);
|
||||
}
|
||||
if ( m_widgetButtonDown != nullptr
|
||||
if ( m_widgetButtonDown != null
|
||||
&& m_connectionButtonDown.isConnected() == false) {
|
||||
m_connectionButtonDown = m_widgetButtonDown->signalPressed.connect(this, &ewol::widget::Spin::onCallbackDown);
|
||||
}
|
||||
|
@ -56,7 +56,7 @@ void ewol::widget::WSlider::onChangeSize() {
|
||||
auto it = m_subWidget.begin();
|
||||
it+= m_windowsDestination;
|
||||
if ( it != m_subWidget.end()
|
||||
&& *it != nullptr) {
|
||||
&& *it != null) {
|
||||
(*it)->setOrigin(m_origin+m_offset);
|
||||
(*it)->setSize(m_size);
|
||||
(*it)->onChangeSize();
|
||||
@ -69,7 +69,7 @@ void ewol::widget::WSlider::onChangeSize() {
|
||||
auto it = m_subWidget.begin();
|
||||
it += m_windowsSources;
|
||||
if ( it != m_subWidget.end()
|
||||
&& *it != nullptr) {
|
||||
&& *it != null) {
|
||||
if (*propertyTransitionMode == sladingTransitionHori) {
|
||||
(*it)->setOrigin( vec2(m_origin.x() + factor*(m_size.x()*m_slidingProgress),
|
||||
m_origin.y())
|
||||
@ -85,7 +85,7 @@ void ewol::widget::WSlider::onChangeSize() {
|
||||
it = m_subWidget.begin();
|
||||
it += m_windowsDestination;
|
||||
if ( it != m_subWidget.end()
|
||||
&& *it != nullptr) {
|
||||
&& *it != null) {
|
||||
if (*propertyTransitionMode == sladingTransitionHori) {
|
||||
(*it)->setOrigin( vec2(m_origin.x() + factor*(m_size.x()*m_slidingProgress - m_size.x()),
|
||||
m_origin.y())
|
||||
@ -120,7 +120,7 @@ void ewol::widget::WSlider::subWidgetSelectSet(int32_t _id) {
|
||||
// search element in the list :
|
||||
for (auto &it : m_subWidget) {
|
||||
elementID ++;
|
||||
if (it != nullptr) {
|
||||
if (it != null) {
|
||||
if (it->getId() == _id) {
|
||||
if (it->propertyName.get() != "") {
|
||||
// change the internal event parameter (in case...) ==> no event generation
|
||||
@ -142,13 +142,13 @@ void ewol::widget::WSlider::subWidgetSelectSet(int32_t _id) {
|
||||
}
|
||||
|
||||
void ewol::widget::WSlider::subWidgetSelectSet(const ewol::WidgetShared& _widgetPointer) {
|
||||
if (_widgetPointer == nullptr) {
|
||||
EWOL_ERROR("Can not change to a widget nullptr");
|
||||
if (_widgetPointer == null) {
|
||||
EWOL_ERROR("Can not change to a widget null");
|
||||
return;
|
||||
}
|
||||
int32_t iii = 0;
|
||||
for (auto &it : m_subWidget) {
|
||||
if ( it != nullptr
|
||||
if ( it != null
|
||||
&& it == _widgetPointer) {
|
||||
subWidgetSelectSetVectorId(iii);
|
||||
if (_widgetPointer->propertyName.get() != "") {
|
||||
@ -172,7 +172,7 @@ void ewol::widget::WSlider::subWidgetSelectSet(const etk::String& _widgetName) {
|
||||
EWOL_VERBOSE("Select a new sub-widget to dosplay : '" << _widgetName << "'");
|
||||
int32_t iii = 0;
|
||||
for (auto &it : m_subWidget) {
|
||||
if ( it != nullptr
|
||||
if ( it != null
|
||||
&& it->propertyName.get() == _widgetName) {
|
||||
subWidgetSelectSetVectorId(iii);
|
||||
// change the internal event parameter (in case...) ==> no event generation
|
||||
@ -234,7 +234,7 @@ void ewol::widget::WSlider::systemDraw(const ewol::DrawProperty& _displayProp) {
|
||||
auto it = m_subWidget.begin();
|
||||
it += m_windowsDestination;
|
||||
if ( it != m_subWidget.end()
|
||||
&& *it != nullptr) {
|
||||
&& *it != null) {
|
||||
//EWOL_INFO("Draw : [" << propertyName << "] t=" << getObjectType() << "o=" << m_origin << " s=" << m_size);
|
||||
(*it)->systemDraw(prop);
|
||||
}
|
||||
@ -244,14 +244,14 @@ void ewol::widget::WSlider::systemDraw(const ewol::DrawProperty& _displayProp) {
|
||||
auto it = m_subWidget.begin();
|
||||
it += m_windowsSources;
|
||||
if ( it != m_subWidget.end()
|
||||
&& *it != nullptr) {
|
||||
&& *it != null) {
|
||||
(*it)->systemDraw(prop);
|
||||
}
|
||||
// draw Destination :
|
||||
it = m_subWidget.begin();
|
||||
it += m_windowsDestination;
|
||||
if ( it != m_subWidget.end()
|
||||
&& *it != nullptr) {
|
||||
&& *it != null) {
|
||||
(*it)->systemDraw(prop);
|
||||
}
|
||||
}
|
||||
@ -262,20 +262,20 @@ void ewol::widget::WSlider::onRegenerateDisplay() {
|
||||
auto it = m_subWidget.begin();
|
||||
it += m_windowsDestination;
|
||||
if ( it != m_subWidget.end()
|
||||
&& *it != nullptr) {
|
||||
&& *it != null) {
|
||||
(*it)->onRegenerateDisplay();
|
||||
}
|
||||
} else {
|
||||
auto it = m_subWidget.begin();
|
||||
it += m_windowsSources;
|
||||
if ( it != m_subWidget.end()
|
||||
&& *it != nullptr) {
|
||||
&& *it != null) {
|
||||
(*it)->onRegenerateDisplay();
|
||||
}
|
||||
it = m_subWidget.begin();
|
||||
it += m_windowsDestination;
|
||||
if ( it != m_subWidget.end()
|
||||
&& *it != nullptr) {
|
||||
&& *it != null) {
|
||||
(*it)->onRegenerateDisplay();
|
||||
}
|
||||
}
|
||||
@ -295,59 +295,59 @@ void ewol::widget::WSlider::onChangePropertyTransitionMode() {
|
||||
|
||||
ewol::WidgetShared ewol::widget::WSlider::getWidgetAtPos(const vec2& _pos) {
|
||||
if (*propertyHide == true) {
|
||||
return nullptr;
|
||||
return null;
|
||||
}
|
||||
if (m_windowsDestination == m_windowsSources) {
|
||||
auto it = m_subWidget.begin();
|
||||
it += m_windowsDestination;
|
||||
if ( it != m_subWidget.end()
|
||||
&& *it != nullptr) {
|
||||
&& *it != null) {
|
||||
vec2 tmpSize = (*it)->getSize();
|
||||
vec2 tmpOrigin = (*it)->getOrigin();
|
||||
if( (tmpOrigin.x() <= _pos.x() && tmpOrigin.x() + tmpSize.x() >= _pos.x())
|
||||
&& (tmpOrigin.y() <= _pos.y() && tmpOrigin.y() + tmpSize.y() >= _pos.y()) )
|
||||
{
|
||||
ewol::WidgetShared tmpWidget = (*it)->getWidgetAtPos(_pos);
|
||||
if (tmpWidget != nullptr) {
|
||||
if (tmpWidget != null) {
|
||||
return tmpWidget;
|
||||
}
|
||||
return nullptr;
|
||||
return null;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
auto it = m_subWidget.begin();
|
||||
it += m_windowsDestination;
|
||||
if ( it != m_subWidget.end()
|
||||
&& *it != nullptr) {
|
||||
&& *it != null) {
|
||||
vec2 tmpSize = (*it)->getSize();
|
||||
vec2 tmpOrigin = (*it)->getOrigin();
|
||||
if( (tmpOrigin.x() <= _pos.x() && tmpOrigin.x() + tmpSize.x() >= _pos.x())
|
||||
&& (tmpOrigin.y() <= _pos.y() && tmpOrigin.y() + tmpSize.y() >= _pos.y()) )
|
||||
{
|
||||
ewol::WidgetShared tmpWidget = (*it)->getWidgetAtPos(_pos);
|
||||
if (tmpWidget != nullptr) {
|
||||
if (tmpWidget != null) {
|
||||
return tmpWidget;
|
||||
}
|
||||
return nullptr;
|
||||
return null;
|
||||
}
|
||||
}
|
||||
it = m_subWidget.begin();
|
||||
it += m_windowsSources;
|
||||
if ( it != m_subWidget.end()
|
||||
&& *it != nullptr) {
|
||||
&& *it != null) {
|
||||
vec2 tmpSize = (*it)->getSize();
|
||||
vec2 tmpOrigin = (*it)->getOrigin();
|
||||
if( (tmpOrigin.x() <= _pos.x() && tmpOrigin.x() + tmpSize.x() >= _pos.x())
|
||||
&& (tmpOrigin.y() <= _pos.y() && tmpOrigin.y() + tmpSize.y() >= _pos.y()) )
|
||||
{
|
||||
ewol::WidgetShared tmpWidget = (*it)->getWidgetAtPos(_pos);
|
||||
if (tmpWidget != nullptr) {
|
||||
if (tmpWidget != null) {
|
||||
return tmpWidget;
|
||||
}
|
||||
return nullptr;
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
return nullptr;
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -527,7 +527,7 @@ bool ewol::Widget::loadXML(const exml::Element& _node) {
|
||||
|
||||
bool ewol::Widget::systemEventEntry(ewol::event::EntrySystem& _event) {
|
||||
ewol::WidgetShared up = ememory::dynamicPointerCast<ewol::Widget>(m_parent.lock());
|
||||
if (up != nullptr) {
|
||||
if (up != null) {
|
||||
if (up->systemEventEntry(_event) == true) {
|
||||
return true;
|
||||
}
|
||||
@ -537,7 +537,7 @@ bool ewol::Widget::systemEventEntry(ewol::event::EntrySystem& _event) {
|
||||
|
||||
bool ewol::Widget::systemEventInput(ewol::event::InputSystem& _event) {
|
||||
ewol::WidgetShared up = ememory::dynamicPointerCast<ewol::Widget>(m_parent.lock());
|
||||
if (up != nullptr) {
|
||||
if (up != null) {
|
||||
if (up->systemEventInput(_event) == true) {
|
||||
return true;
|
||||
}
|
||||
|
@ -330,7 +330,7 @@ namespace ewol {
|
||||
/**
|
||||
* @brief get the widget at the specific windows absolute position
|
||||
* @param[in] _pos gAbsolute position of the requested widget knowledge
|
||||
* @return nullptr No widget found
|
||||
* @return null No widget found
|
||||
* @return pointer on the widget found
|
||||
* @note : INTERNAL EWOL SYSTEM
|
||||
*/
|
||||
@ -338,7 +338,7 @@ namespace ewol {
|
||||
if (propertyHide.get() == false) {
|
||||
return ememory::dynamicPointerCast<ewol::Widget>(sharedFromThis());
|
||||
}
|
||||
return nullptr;
|
||||
return null;
|
||||
};
|
||||
|
||||
// event section:
|
||||
|
@ -20,7 +20,7 @@ ETK_DECLARE_TYPE(ewol::widget::Windows);
|
||||
ewol::widget::Windows::Windows() :
|
||||
propertyColorConfiguration(this, "file-color", "{ewol}THEME:COLOR:Windows.json", "color file link on the theme", &ewol::widget::Windows::onChangePropertyColor),
|
||||
propertyTitle(this, "title", "No title", "Title of the windows", &ewol::widget::Windows::onChangePropertyTitle),
|
||||
m_resourceColor(nullptr),
|
||||
m_resourceColor(null),
|
||||
m_colorBg(-1) {
|
||||
addObjectType("ewol::widget::Windows");
|
||||
propertyCanFocus.setDirectCheck(true);
|
||||
@ -40,7 +40,7 @@ ewol::widget::Windows::~Windows() {
|
||||
|
||||
void ewol::widget::Windows::onChangeSize() {
|
||||
ewol::Widget::onChangeSize();
|
||||
if (m_subWidget != nullptr) {
|
||||
if (m_subWidget != null) {
|
||||
m_subWidget->calculateMinMaxSize();
|
||||
// TODO : do it better ... and manage gravity ...
|
||||
m_subWidget->setSize(m_size);
|
||||
@ -48,7 +48,7 @@ void ewol::widget::Windows::onChangeSize() {
|
||||
m_subWidget->onChangeSize();
|
||||
}
|
||||
for (auto &it : m_popUpWidgetList) {
|
||||
if(it != nullptr) {
|
||||
if(it != null) {
|
||||
it->calculateMinMaxSize();
|
||||
it->setSize(m_size);
|
||||
it->setOrigin(vec2(0.0f, 0.0f));
|
||||
@ -65,7 +65,7 @@ ewol::WidgetShared ewol::widget::Windows::getWidgetAtPos(const vec2& _pos) {
|
||||
if (m_popUpWidgetList.size() != 0) {
|
||||
return m_popUpWidgetList.back()->getWidgetAtPos(_pos);
|
||||
// otherwise in the normal windows
|
||||
} else if (m_subWidget != nullptr) {
|
||||
} else if (m_subWidget != null) {
|
||||
return m_subWidget->getWidgetAtPos(_pos);
|
||||
}
|
||||
// otherwise the event go to this widget ...
|
||||
@ -101,11 +101,11 @@ void ewol::widget::Windows::sysDraw() {
|
||||
}
|
||||
|
||||
void ewol::widget::Windows::onRegenerateDisplay() {
|
||||
if (m_subWidget != nullptr) {
|
||||
if (m_subWidget != null) {
|
||||
m_subWidget->onRegenerateDisplay();
|
||||
}
|
||||
for (auto &it : m_popUpWidgetList) {
|
||||
if (it != nullptr) {
|
||||
if (it != null) {
|
||||
it->onRegenerateDisplay();
|
||||
}
|
||||
}
|
||||
@ -120,7 +120,7 @@ void ewol::widget::Windows::systemDraw(const ewol::DrawProperty& _displayProp) {
|
||||
#endif
|
||||
// clear the screen with transparency ...
|
||||
etk::Color<float> colorBg(0.5, 0.5, 0.5, 0.5);
|
||||
if (m_resourceColor != nullptr) {
|
||||
if (m_resourceColor != null) {
|
||||
colorBg = m_resourceColor->get(m_colorBg);
|
||||
}
|
||||
gale::openGL::clearColor(colorBg);
|
||||
@ -133,7 +133,7 @@ void ewol::widget::Windows::systemDraw(const ewol::DrawProperty& _displayProp) {
|
||||
#endif
|
||||
//EWOL_WARNING(" WINDOWS draw on " << m_currentDrawId);
|
||||
// first display the windows on the display
|
||||
if (m_subWidget != nullptr) {
|
||||
if (m_subWidget != null) {
|
||||
m_subWidget->systemDraw(_displayProp);
|
||||
//EWOL_DEBUG("Draw Windows");
|
||||
}
|
||||
@ -144,7 +144,7 @@ void ewol::widget::Windows::systemDraw(const ewol::DrawProperty& _displayProp) {
|
||||
#endif
|
||||
// second display the pop-up
|
||||
for (auto &it : m_popUpWidgetList) {
|
||||
if (it != nullptr) {
|
||||
if (it != null) {
|
||||
it->systemDraw(_displayProp);
|
||||
//EWOL_DEBUG("Draw Pop-up");
|
||||
}
|
||||
@ -156,12 +156,12 @@ void ewol::widget::Windows::systemDraw(const ewol::DrawProperty& _displayProp) {
|
||||
}
|
||||
|
||||
void ewol::widget::Windows::setSubWidget(ewol::WidgetShared _widget) {
|
||||
if (m_subWidget != nullptr) {
|
||||
if (m_subWidget != null) {
|
||||
EWOL_INFO("Remove current main windows Widget...");
|
||||
m_subWidget->removeParent();
|
||||
m_subWidget.reset();
|
||||
}
|
||||
if (_widget != nullptr) {
|
||||
if (_widget != null) {
|
||||
m_subWidget = _widget;
|
||||
m_subWidget->setParent(sharedFromThis());
|
||||
}
|
||||
@ -171,7 +171,7 @@ void ewol::widget::Windows::setSubWidget(ewol::WidgetShared _widget) {
|
||||
}
|
||||
|
||||
void ewol::widget::Windows::popUpWidgetPush(ewol::WidgetShared _widget) {
|
||||
if (_widget == nullptr) {
|
||||
if (_widget == null) {
|
||||
// nothing to do an error appear :
|
||||
EWOL_ERROR("can not set widget pop-up (null pointer)");
|
||||
return;
|
||||
@ -195,7 +195,7 @@ void ewol::widget::Windows::popUpWidgetPop() {
|
||||
|
||||
void ewol::widget::Windows::onChangePropertyColor() {
|
||||
m_resourceColor = ewol::resource::ColorFile::create(*propertyColorConfiguration);
|
||||
if (m_resourceColor != nullptr) {
|
||||
if (m_resourceColor != null) {
|
||||
m_colorBg = m_resourceColor->request("background");
|
||||
} else {
|
||||
EWOL_WARNING("Can not open the default color configuration file for the windows: " << *propertyColorConfiguration);
|
||||
@ -217,7 +217,7 @@ void ewol::widget::Windows::requestDestroyFromChild(const ewol::ObjectShared& _c
|
||||
while (it != m_popUpWidgetList.end()) {
|
||||
if (*it == _child) {
|
||||
EWOL_VERBOSE(" Find it ...");
|
||||
if (*it == nullptr) {
|
||||
if (*it == null) {
|
||||
m_popUpWidgetList.erase(it);
|
||||
it = m_popUpWidgetList.begin();
|
||||
continue;
|
||||
@ -233,7 +233,7 @@ void ewol::widget::Windows::requestDestroyFromChild(const ewol::ObjectShared& _c
|
||||
}
|
||||
if (m_subWidget == _child) {
|
||||
EWOL_VERBOSE(" Find it ... 2");
|
||||
if (m_subWidget == nullptr) {
|
||||
if (m_subWidget == null) {
|
||||
return;
|
||||
}
|
||||
m_subWidget->removeParent();
|
||||
@ -244,37 +244,37 @@ void ewol::widget::Windows::requestDestroyFromChild(const ewol::ObjectShared& _c
|
||||
|
||||
ewol::ObjectShared ewol::widget::Windows::getSubObjectNamed(const etk::String& _objectName) {
|
||||
ewol::ObjectShared tmpObject = ewol::Widget::getSubObjectNamed(_objectName);
|
||||
if (tmpObject != nullptr) {
|
||||
if (tmpObject != null) {
|
||||
return tmpObject;
|
||||
}
|
||||
// check direct subwidget
|
||||
if (m_subWidget != nullptr) {
|
||||
if (m_subWidget != null) {
|
||||
tmpObject = m_subWidget->getSubObjectNamed(_objectName);
|
||||
if (tmpObject != nullptr) {
|
||||
if (tmpObject != null) {
|
||||
return tmpObject;
|
||||
}
|
||||
}
|
||||
// get all subwidget "pop-up"
|
||||
for (auto &it : m_popUpWidgetList) {
|
||||
if (it != nullptr) {
|
||||
if (it != null) {
|
||||
tmpObject = it->getSubObjectNamed(_objectName);
|
||||
if (tmpObject != nullptr) {
|
||||
if (tmpObject != null) {
|
||||
return tmpObject;
|
||||
}
|
||||
}
|
||||
}
|
||||
// not find ...
|
||||
return nullptr;
|
||||
return null;
|
||||
}
|
||||
|
||||
void ewol::widget::Windows::drawWidgetTree(int32_t _level) {
|
||||
ewol::Widget::drawWidgetTree(_level);
|
||||
_level++;
|
||||
if (m_subWidget != nullptr) {
|
||||
if (m_subWidget != null) {
|
||||
m_subWidget->drawWidgetTree(_level);
|
||||
}
|
||||
for (auto &it: m_popUpWidgetList) {
|
||||
if (it != nullptr) {
|
||||
if (it != null) {
|
||||
it->drawWidgetTree(_level);
|
||||
}
|
||||
}
|
||||
|
@ -83,26 +83,26 @@ ewol::widget::ColorChooser::~ColorChooser() {
|
||||
|
||||
|
||||
void ewol::widget::ColorChooser::onChangePropertyValue() {
|
||||
if (m_widgetRed != nullptr) {
|
||||
if (m_widgetRed != null) {
|
||||
m_widgetRed->propertyValue.set(propertyValue->r());
|
||||
}
|
||||
if (m_widgetGreen != nullptr) {
|
||||
if (m_widgetGreen != null) {
|
||||
m_widgetGreen->propertyValue.set(propertyValue->g());
|
||||
}
|
||||
if (m_widgetBlue != nullptr) {
|
||||
if (m_widgetBlue != null) {
|
||||
m_widgetBlue->propertyValue.set(propertyValue->b());
|
||||
}
|
||||
if (m_widgetAlpha != nullptr) {
|
||||
if (m_widgetAlpha != null) {
|
||||
m_widgetAlpha->propertyValue.set(propertyValue->a());
|
||||
}
|
||||
if (m_widgetColorBar != nullptr) {
|
||||
if (m_widgetColorBar != null) {
|
||||
m_widgetColorBar->propertyValue.set(propertyValue);
|
||||
}
|
||||
}
|
||||
|
||||
void ewol::widget::ColorChooser::onCallbackColorChangeRed(const float& _newColor) {
|
||||
propertyValue.getDirect().setR(_newColor);
|
||||
if (m_widgetColorBar != nullptr) {
|
||||
if (m_widgetColorBar != null) {
|
||||
m_widgetColorBar->propertyValue.set(propertyValue);
|
||||
}
|
||||
signalChange.emit(propertyValue);
|
||||
@ -110,7 +110,7 @@ void ewol::widget::ColorChooser::onCallbackColorChangeRed(const float& _newColor
|
||||
|
||||
void ewol::widget::ColorChooser::onCallbackColorChangeGreen(const float& _newColor) {
|
||||
propertyValue.getDirect().setG(_newColor);
|
||||
if (m_widgetColorBar != nullptr) {
|
||||
if (m_widgetColorBar != null) {
|
||||
m_widgetColorBar->propertyValue.set(propertyValue);
|
||||
}
|
||||
signalChange.emit(propertyValue);
|
||||
@ -118,7 +118,7 @@ void ewol::widget::ColorChooser::onCallbackColorChangeGreen(const float& _newCol
|
||||
|
||||
void ewol::widget::ColorChooser::onCallbackColorChangeBlue(const float& _newColor) {
|
||||
propertyValue.getDirect().setB(_newColor);
|
||||
if (m_widgetColorBar != nullptr) {
|
||||
if (m_widgetColorBar != null) {
|
||||
m_widgetColorBar->propertyValue.set(propertyValue);
|
||||
}
|
||||
signalChange.emit(propertyValue);
|
||||
@ -126,7 +126,7 @@ void ewol::widget::ColorChooser::onCallbackColorChangeBlue(const float& _newColo
|
||||
|
||||
void ewol::widget::ColorChooser::onCallbackColorChangeAlpha(const float& _newColor) {
|
||||
propertyValue.getDirect().setA(_newColor);
|
||||
if (m_widgetColorBar != nullptr) {
|
||||
if (m_widgetColorBar != null) {
|
||||
m_widgetColorBar->propertyValue.set(propertyValue);
|
||||
}
|
||||
signalChange.emit(propertyValue);
|
||||
@ -137,16 +137,16 @@ void ewol::widget::ColorChooser::onCallbackColorChange(const etk::Color<>& _newC
|
||||
uint8_t tmpAlpha = propertyValue->a();
|
||||
propertyValue.getDirect() = _newColor;
|
||||
propertyValue.getDirect().setA(tmpAlpha);
|
||||
if (m_widgetRed != nullptr) {
|
||||
if (m_widgetRed != null) {
|
||||
m_widgetRed->propertyValue.set(propertyValue->r());
|
||||
}
|
||||
if (m_widgetGreen != nullptr) {
|
||||
if (m_widgetGreen != null) {
|
||||
m_widgetGreen->propertyValue.set(propertyValue->g());
|
||||
}
|
||||
if (m_widgetBlue != nullptr) {
|
||||
if (m_widgetBlue != null) {
|
||||
m_widgetBlue->propertyValue.set(propertyValue->b());
|
||||
}
|
||||
if (m_widgetAlpha != nullptr) {
|
||||
if (m_widgetAlpha != null) {
|
||||
m_widgetAlpha->propertyValue.set(propertyValue->a());
|
||||
}
|
||||
signalChange.emit(propertyValue);
|
||||
|
@ -28,7 +28,7 @@ namespace ewol {
|
||||
* The first step is to create the file chooser pop-up : (never in the constructor!!!)
|
||||
* [code style=c++]
|
||||
* ewol::widget::FileChooserShared tmpWidget = ewol::widget::FileChooser::create();
|
||||
* if (tmpWidget == nullptr) {
|
||||
* if (tmpWidget == null) {
|
||||
* APPL_ERROR("Can not open File chooser !!! ");
|
||||
* return -1;
|
||||
* }
|
||||
@ -44,7 +44,7 @@ namespace ewol {
|
||||
* //tmpWidget->propertyPath.set("/home/me");
|
||||
* // add the widget as windows pop-up ...
|
||||
* ewol::widget::WindowsShared tmpWindows = getWindows();
|
||||
* if (tmpWindows == nullptr) {
|
||||
* if (tmpWindows == null) {
|
||||
* APPL_ERROR("Can not get the current windows !!! ");
|
||||
* return -1;
|
||||
* }
|
||||
|
@ -33,9 +33,9 @@ ewol::widget::Parameter::Parameter() :
|
||||
void ewol::widget::Parameter::init() {
|
||||
ewol::widget::PopUp::init();
|
||||
|
||||
ewol::widget::SizerShared mySizerVert = nullptr;
|
||||
ewol::widget::SizerShared mySizerHori = nullptr;
|
||||
ewol::widget::SpacerShared mySpacer = nullptr;
|
||||
ewol::widget::SizerShared mySizerVert = null;
|
||||
ewol::widget::SizerShared mySizerHori = null;
|
||||
ewol::widget::SpacerShared mySpacer = null;
|
||||
#ifdef __TARGET_OS__Android
|
||||
propertyMinSize.set(gale::Dimension(vec2(90, 90), gale::distance::pourcent));
|
||||
#else
|
||||
@ -43,7 +43,7 @@ void ewol::widget::Parameter::init() {
|
||||
#endif
|
||||
|
||||
mySizerVert = ewol::widget::Sizer::create();
|
||||
if (mySizerVert == nullptr) {
|
||||
if (mySizerVert == null) {
|
||||
EWOL_ERROR("Can not allocate widget == > display might be in error");
|
||||
} else {
|
||||
EWOL_INFO("add widget");
|
||||
@ -54,14 +54,14 @@ void ewol::widget::Parameter::init() {
|
||||
setSubWidget(mySizerVert);
|
||||
|
||||
mySizerHori = ewol::widget::Sizer::create();
|
||||
if (mySizerHori == nullptr) {
|
||||
if (mySizerHori == null) {
|
||||
EWOL_ERROR("Can not allocate widget == > display might be in error");
|
||||
} else {
|
||||
mySizerHori->propertyMode.set(widget::Sizer::modeHori);
|
||||
mySizerVert->subWidgetAdd(mySizerHori);
|
||||
|
||||
mySpacer = ewol::widget::Spacer::create();
|
||||
if (mySpacer == nullptr) {
|
||||
if (mySpacer == null) {
|
||||
EWOL_ERROR("Can not allocate widget == > display might be in error");
|
||||
} else {
|
||||
mySpacer->propertyExpand.set(bvec2(true,false));
|
||||
@ -69,7 +69,7 @@ void ewol::widget::Parameter::init() {
|
||||
}
|
||||
|
||||
ewol::widget::ButtonShared tmpButton = widget::Button::create();
|
||||
if (tmpButton == nullptr) {
|
||||
if (tmpButton == null) {
|
||||
EWOL_ERROR("Can not allocate widget == > display might be in error");
|
||||
} else {
|
||||
tmpButton->setSubWidget(ewol::widget::composerGenerateString(
|
||||
@ -82,7 +82,7 @@ void ewol::widget::Parameter::init() {
|
||||
}
|
||||
|
||||
mySpacer = ewol::widget::Spacer::create();
|
||||
if (mySpacer == nullptr) {
|
||||
if (mySpacer == null) {
|
||||
EWOL_ERROR("Can not allocate widget == > display might be in error");
|
||||
} else {
|
||||
mySpacer->propertyExpand.set(bvec2(false,false));
|
||||
@ -91,7 +91,7 @@ void ewol::widget::Parameter::init() {
|
||||
}
|
||||
|
||||
tmpButton = ewol::widget::Button::create();
|
||||
if (tmpButton == nullptr) {
|
||||
if (tmpButton == null) {
|
||||
EWOL_ERROR("Can not allocate widget == > display might be in error");
|
||||
} else {
|
||||
tmpButton->setSubWidget(ewol::widget::composerGenerateString(
|
||||
@ -105,14 +105,14 @@ void ewol::widget::Parameter::init() {
|
||||
}
|
||||
|
||||
mySizerHori = ewol::widget::Sizer::create();
|
||||
if (mySizerHori == nullptr) {
|
||||
if (mySizerHori == null) {
|
||||
EWOL_ERROR("Can not allocate widget == > display might be in error");
|
||||
} else {
|
||||
mySizerHori->propertyMode.set(widget::Sizer::modeHori);
|
||||
mySizerVert->subWidgetAdd(mySizerHori);
|
||||
|
||||
m_paramList = ewol::widget::ParameterList::create();
|
||||
if (m_paramList == nullptr) {
|
||||
if (m_paramList == null) {
|
||||
EWOL_ERROR("Can not allocate widget == > display might be in error");
|
||||
} else {
|
||||
|
||||
@ -122,7 +122,7 @@ void ewol::widget::Parameter::init() {
|
||||
mySizerHori->subWidgetAdd(m_paramList);
|
||||
}
|
||||
mySpacer = ewol::widget::Spacer::create();
|
||||
if (mySpacer == nullptr) {
|
||||
if (mySpacer == null) {
|
||||
EWOL_ERROR("Can not allocate widget == > display might be in error");
|
||||
} else {
|
||||
mySpacer->propertyFill.set(bvec2(false,true));
|
||||
@ -132,14 +132,14 @@ void ewol::widget::Parameter::init() {
|
||||
}
|
||||
|
||||
ewol::widget::SizerShared mySizerVert2 = widget::Sizer::create();
|
||||
if (mySizerVert2 == nullptr) {
|
||||
if (mySizerVert2 == null) {
|
||||
EWOL_ERROR("Can not allocate widget == > display might be in error");
|
||||
} else {
|
||||
mySizerVert2->propertyMode.set(widget::Sizer::modeVert);
|
||||
mySizerHori->subWidgetAdd(mySizerVert2);
|
||||
|
||||
mySpacer = ewol::widget::Spacer::create();
|
||||
if (mySpacer == nullptr) {
|
||||
if (mySpacer == null) {
|
||||
EWOL_ERROR("Can not allocate widget == > display might be in error");
|
||||
} else {
|
||||
mySpacer->propertyExpand.set(bvec2(true,false));
|
||||
@ -149,7 +149,7 @@ void ewol::widget::Parameter::init() {
|
||||
}
|
||||
|
||||
m_wSlider = ewol::widget::WSlider::create();
|
||||
if (m_wSlider == nullptr) {
|
||||
if (m_wSlider == null) {
|
||||
EWOL_ERROR("Can not allocate widget == > display might be in error");
|
||||
} else {
|
||||
m_wSlider->propertyTransitionSpeed.set(0.5);
|
||||
@ -161,7 +161,7 @@ void ewol::widget::Parameter::init() {
|
||||
}
|
||||
|
||||
mySpacer = ewol::widget::Spacer::create();
|
||||
if (mySpacer == nullptr) {
|
||||
if (mySpacer == null) {
|
||||
EWOL_ERROR("Can not allocate widget == > display might be in error");
|
||||
} else {
|
||||
mySpacer->propertyExpand.set(bvec2(true,false));
|
||||
@ -171,7 +171,7 @@ void ewol::widget::Parameter::init() {
|
||||
}
|
||||
|
||||
m_widgetTitle = ewol::widget::Label::create();
|
||||
if (m_widgetTitle == nullptr) {
|
||||
if (m_widgetTitle == null) {
|
||||
EWOL_ERROR("Can not allocate widget == > display might be in error");
|
||||
} else {
|
||||
m_widgetTitle->propertyValue.set(propertyLabelTitle);
|
||||
@ -187,7 +187,7 @@ ewol::widget::Parameter::~Parameter() {
|
||||
}
|
||||
|
||||
void ewol::widget::Parameter::onChangePropertyLabelTitle() {
|
||||
if (m_widgetTitle != nullptr) {
|
||||
if (m_widgetTitle != null) {
|
||||
m_widgetTitle->propertyValue.set(propertyLabelTitle);
|
||||
}
|
||||
}
|
||||
@ -203,22 +203,22 @@ void ewol::widget::Parameter::onCallbackParameterSave() {
|
||||
EWOL_TODO("Save Parameter !!! ");
|
||||
}
|
||||
void ewol::widget::Parameter::onCallbackMenuSelected(const int32_t& _value) {
|
||||
if (m_wSlider != nullptr) {
|
||||
if (m_wSlider != null) {
|
||||
EWOL_DEBUG("event on the parameter : Menu-select select ID=" << _value << "");
|
||||
m_wSlider->subWidgetSelectSet(_value);
|
||||
}
|
||||
}
|
||||
|
||||
void ewol::widget::Parameter::menuAdd(etk::String _label, etk::String _image, ewol::WidgetShared _associateWidget) {
|
||||
if (m_paramList != nullptr) {
|
||||
if (m_paramList != null) {
|
||||
m_paramList->menuAdd(_label, m_currentIdList, _image);
|
||||
if (m_wSlider != nullptr) {
|
||||
if (_associateWidget != nullptr) {
|
||||
if (m_wSlider != null) {
|
||||
if (_associateWidget != null) {
|
||||
m_wSlider->subWidgetAdd(_associateWidget);
|
||||
} else {
|
||||
EWOL_DEBUG("Associate an empty widget on it ...");
|
||||
ewol::widget::LabelShared myLabel = widget::Label::create();
|
||||
if (myLabel == nullptr) {
|
||||
if (myLabel == null) {
|
||||
EWOL_ERROR("Can not allocate widget == > display might be in error");
|
||||
} else {
|
||||
myLabel->propertyValue.set(etk::String("No widget for : ") + _label);
|
||||
@ -234,21 +234,21 @@ void ewol::widget::Parameter::menuAdd(etk::String _label, etk::String _image, ew
|
||||
}
|
||||
}
|
||||
void ewol::widget::Parameter::menuAddGroup(etk::String _label) {
|
||||
if (m_paramList != nullptr) {
|
||||
if (m_paramList != null) {
|
||||
m_paramList->menuSeparator();
|
||||
m_paramList->menuAddGroup(_label);
|
||||
}
|
||||
}
|
||||
|
||||
void ewol::widget::Parameter::menuClear() {
|
||||
if (m_paramList != nullptr) {
|
||||
if (m_paramList != null) {
|
||||
m_paramList->menuClear();
|
||||
m_currentIdList = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void ewol::widget::Parameter::menuSeparator() {
|
||||
if (m_paramList != nullptr) {
|
||||
if (m_paramList != null) {
|
||||
m_paramList->menuSeparator();
|
||||
}
|
||||
}
|
||||
|
@ -51,7 +51,7 @@ void ewol::widget::ParameterList::calculateMinMaxSize() {
|
||||
}
|
||||
|
||||
void ewol::widget::ParameterList::addOObject(const ememory::SharedPtr<ewol::Compositing>& _newObject, int32_t _pos) {
|
||||
if (_newObject == nullptr) {
|
||||
if (_newObject == null) {
|
||||
EWOL_ERROR("Try to add an empty object in the Widget generic display system");
|
||||
return;
|
||||
}
|
||||
@ -68,7 +68,7 @@ void ewol::widget::ParameterList::clearOObjectList() {
|
||||
|
||||
void ewol::widget::ParameterList::onDraw() {
|
||||
for (auto &it : m_listOObject) {
|
||||
if (it != nullptr) {
|
||||
if (it != null) {
|
||||
it->draw();
|
||||
}
|
||||
}
|
||||
@ -112,7 +112,7 @@ void ewol::widget::ParameterList::onRegenerateDisplay() {
|
||||
|
||||
// set background color :
|
||||
ememory::SharedPtr<ewol::compositing::Drawing> tmpDraw = ememory::makeShared<ewol::compositing::Drawing>();
|
||||
if (tmpDraw == nullptr) {
|
||||
if (tmpDraw == null) {
|
||||
return;
|
||||
}
|
||||
tmpDraw->setColor(etk::Color<>(0xFF, 0xFF, 0xFF, 0xFF));
|
||||
@ -135,7 +135,7 @@ void ewol::widget::ParameterList::onRegenerateDisplay() {
|
||||
for (int32_t iii=startRaw; iii<nbRaw && iii<(int32_t)(startRaw+displayableRaw); iii++) {
|
||||
etk::String myTextToWrite = "???";
|
||||
etk::Color<> fg(0x00, 0x00, 0x00, 0xFF);
|
||||
if (m_list[iii] != nullptr) {
|
||||
if (m_list[iii] != null) {
|
||||
myTextToWrite = TRANSLATE(m_list[iii]->m_label);
|
||||
}
|
||||
|
||||
@ -181,7 +181,7 @@ bool ewol::widget::ParameterList::onEventInput(const ewol::event::Input& _event)
|
||||
int32_t rawID = (relativePos.y()+m_originScrooled.y()) / (minHeight + 2*m_paddingSizeY);
|
||||
// generate an event on a rawId if the element request change and Select it ...
|
||||
if (rawID >= 0 && (size_t)rawID < m_list.size()) {
|
||||
if (m_list[rawID]!=nullptr) {
|
||||
if (m_list[rawID]!=null) {
|
||||
if (m_list[rawID]->m_refId >= 0) {
|
||||
signalSelect.emit(m_list[rawID]->m_refId);
|
||||
m_idSelected = rawID;
|
||||
@ -204,7 +204,7 @@ void ewol::widget::ParameterList::onLostFocus() {
|
||||
|
||||
void ewol::widget::ParameterList::menuAdd(etk::String& _label, int32_t _refId, etk::String& _image) {
|
||||
ememory::SharedPtr<ewol::widget::elementPL> tmpEmement = ememory::makeShared<widget::elementPL>(_label, _refId, _image, false);
|
||||
if (tmpEmement == nullptr) {
|
||||
if (tmpEmement == null) {
|
||||
EWOL_ERROR("Can not allocacte menu parameter");
|
||||
return;
|
||||
}
|
||||
@ -218,7 +218,7 @@ void ewol::widget::ParameterList::menuAdd(etk::String& _label, int32_t _refId, e
|
||||
void ewol::widget::ParameterList::menuAddGroup(etk::String& _label) {
|
||||
etk::String image = "";
|
||||
ememory::SharedPtr<ewol::widget::elementPL> tmpEmement = ememory::makeShared<widget::elementPL>(_label, -1, image, true);
|
||||
if (tmpEmement == nullptr) {
|
||||
if (tmpEmement == null) {
|
||||
EWOL_ERROR("Can not allocacte menu parameter");
|
||||
return;
|
||||
}
|
||||
|
@ -55,7 +55,7 @@ void ewol::widget::SpinBase::onChangePropertySpinMode() {
|
||||
|
||||
void ewol::widget::SpinBase::onChangePropertyShape() {
|
||||
m_config = ewol::resource::ConfigFile::create(propertyShape);
|
||||
if (m_config != nullptr) {
|
||||
if (m_config != null) {
|
||||
m_confIdEntryShaper = m_config->request("entry-shaper");
|
||||
m_confIdUpShaper = m_config->request("up-shaper");
|
||||
m_confIdDownShaper = m_config->request("down-shaper");
|
||||
@ -71,26 +71,26 @@ void ewol::widget::SpinBase::updateGui() {
|
||||
subWidgetRemoveAll();
|
||||
markToRedraw();
|
||||
requestUpdateSize();
|
||||
if (m_widgetEntry == nullptr) {
|
||||
if (m_widgetEntry == null) {
|
||||
etk::String shaper;
|
||||
if (m_config != nullptr) {
|
||||
if (m_config != null) {
|
||||
shaper = m_config->getString(m_confIdEntryShaper);
|
||||
EWOL_VERBOSE("shaper entry : " << shaper);
|
||||
}
|
||||
m_widgetEntry = ewol::widget::Entry::create("shape", shaper);
|
||||
if (m_widgetEntry != nullptr) {
|
||||
if (m_widgetEntry != null) {
|
||||
m_widgetEntry->propertyExpand.set(bvec2(true,false));
|
||||
m_widgetEntry->propertyFill.set(bvec2(true,true));
|
||||
}
|
||||
}
|
||||
if (m_widgetButtonDown == nullptr) {
|
||||
if (m_widgetButtonDown == null) {
|
||||
etk::String shaper;
|
||||
if (m_config != nullptr) {
|
||||
if (m_config != null) {
|
||||
shaper = m_config->getString(m_confIdDownShaper);
|
||||
EWOL_VERBOSE("shaper button DOWN : " << shaper);
|
||||
}
|
||||
m_widgetButtonDown = ewol::widget::Button::create("shape", shaper);
|
||||
if (m_widgetButtonDown != nullptr) {
|
||||
if (m_widgetButtonDown != null) {
|
||||
m_widgetButtonDown->propertyExpand.set(bvec2(false,false));
|
||||
m_widgetButtonDown->propertyFill.set(bvec2(true,true));
|
||||
etk::String data = m_config->getString(m_confIdDownData);
|
||||
@ -98,14 +98,14 @@ void ewol::widget::SpinBase::updateGui() {
|
||||
m_widgetButtonDown->setSubWidget(widget);
|
||||
}
|
||||
}
|
||||
if (m_widgetButtonUp == nullptr) {
|
||||
if (m_widgetButtonUp == null) {
|
||||
etk::String shaper;
|
||||
if (m_config != nullptr) {
|
||||
if (m_config != null) {
|
||||
shaper = m_config->getString(m_confIdUpShaper);
|
||||
EWOL_VERBOSE("shaper button UP : " << shaper);
|
||||
}
|
||||
m_widgetButtonUp = ewol::widget::Button::create("shape", shaper);
|
||||
if (m_widgetButtonUp != nullptr) {
|
||||
if (m_widgetButtonUp != null) {
|
||||
m_widgetButtonUp->propertyExpand.set(bvec2(false,false));
|
||||
m_widgetButtonUp->propertyFill.set(bvec2(true,true));
|
||||
etk::String data = m_config->getString(m_confIdUpData);
|
||||
|
@ -23,9 +23,9 @@ ewol::widget::StdPopUp::StdPopUp() :
|
||||
"No Label",
|
||||
"Comment of the pop-up",
|
||||
&ewol::widget::StdPopUp::onChangePropertyComment),
|
||||
m_title(nullptr),
|
||||
m_comment(nullptr),
|
||||
m_subBar(nullptr) {
|
||||
m_title(null),
|
||||
m_comment(null),
|
||||
m_subBar(null) {
|
||||
addObjectType("ewol::widget::StdPopUp");
|
||||
}
|
||||
|
||||
@ -87,7 +87,7 @@ ewol::widget::StdPopUp::~StdPopUp() {
|
||||
}
|
||||
|
||||
void ewol::widget::StdPopUp::onChangePropertyTitle() {
|
||||
if (m_title == nullptr) {
|
||||
if (m_title == null) {
|
||||
return;
|
||||
}
|
||||
m_title->propertyValue.set(*propertyTitle);
|
||||
@ -95,7 +95,7 @@ void ewol::widget::StdPopUp::onChangePropertyTitle() {
|
||||
}
|
||||
|
||||
void ewol::widget::StdPopUp::onChangePropertyComment() {
|
||||
if (m_comment == nullptr) {
|
||||
if (m_comment == null) {
|
||||
return;
|
||||
}
|
||||
m_comment->propertyValue.set(*propertyComment);
|
||||
@ -103,19 +103,19 @@ void ewol::widget::StdPopUp::onChangePropertyComment() {
|
||||
}
|
||||
|
||||
ewol::widget::ButtonShared ewol::widget::StdPopUp::addButton(const etk::String& _text, bool _autoExit) {
|
||||
if (m_subBar == nullptr) {
|
||||
if (m_subBar == null) {
|
||||
EWOL_ERROR("button-bar does not existed ...");
|
||||
return nullptr;
|
||||
return null;
|
||||
}
|
||||
ewol::widget::ButtonShared myButton = widget::Button::create();
|
||||
if (myButton == nullptr) {
|
||||
if (myButton == null) {
|
||||
EWOL_ERROR("Can not allocate new button ...");
|
||||
return nullptr;
|
||||
return null;
|
||||
}
|
||||
ewol::widget::LabelShared myLabel = ewol::widget::Label::create();
|
||||
if (myLabel == nullptr) {
|
||||
if (myLabel == null) {
|
||||
EWOL_ERROR("Can not allocate new label ...");
|
||||
return nullptr;
|
||||
return null;
|
||||
}
|
||||
myLabel->propertyValue.set(_text);
|
||||
myButton->setSubWidget(myLabel);
|
||||
|
@ -13,7 +13,7 @@
|
||||
#include <etk/tool.hpp>
|
||||
|
||||
appl::Windows::Windows() :
|
||||
m_composer(nullptr) {
|
||||
m_composer(null) {
|
||||
addObjectType("appl::Windows");
|
||||
propertyTitle.setDirectCheck(etk::String("sample ") + PROJECT_NAME);
|
||||
}
|
||||
@ -38,7 +38,7 @@ void appl::Windows::init() {
|
||||
composition += "</sizer>\n";
|
||||
|
||||
m_composer = ewol::widget::Composer::create();
|
||||
if (m_composer == nullptr) {
|
||||
if (m_composer == null) {
|
||||
APPL_CRITICAL(" An error occured ... in the windows creatrion ...");
|
||||
return;
|
||||
}
|
||||
@ -54,14 +54,14 @@ void appl::Windows::onCallbackChangeValues() {
|
||||
tmp.pushBack(etk::tool::frand(-1.0, 1.0));
|
||||
}
|
||||
ememory::SharedPtr<appl::widget::VectorDisplay> tmpDisp = ememory::dynamicPointerCast<appl::widget::VectorDisplay>(getSubObjectNamed("displayer"));
|
||||
if (tmpDisp != nullptr) {
|
||||
if (tmpDisp != null) {
|
||||
tmpDisp->setValue(tmp);
|
||||
}
|
||||
}
|
||||
|
||||
void appl::Windows::onCallbackAutoMode() {
|
||||
ememory::SharedPtr<appl::widget::VectorDisplay> tmpDisp = ememory::dynamicPointerCast<appl::widget::VectorDisplay>(getSubObjectNamed("displayer"));
|
||||
if (tmpDisp != nullptr) {
|
||||
if (tmpDisp != null) {
|
||||
tmpDisp->ToggleAuto();
|
||||
}
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ void appl::Windows::init() {
|
||||
//! [ewol_sample_HW_windows_init]
|
||||
//! [ewol_sample_HW_windows_label]
|
||||
ewol::widget::LabelShared tmpWidget = ewol::widget::Label::create();
|
||||
if (tmpWidget == nullptr) {
|
||||
if (tmpWidget == null) {
|
||||
APPL_ERROR("Can not allocate widget ==> display might be in error");
|
||||
} else {
|
||||
tmpWidget->propertyValue.set("Hello <font color='blue'>World</font>");
|
||||
|
@ -17,7 +17,7 @@ appl::Windows::Windows() {
|
||||
void appl::Windows::init() {
|
||||
ewol::widget::Windows::init();
|
||||
appl::WidgetDisplayShared tmpWidget = appl::WidgetDisplay::create();
|
||||
if (tmpWidget == nullptr) {
|
||||
if (tmpWidget == null) {
|
||||
APPL_ERROR("Can not allocate widget ==> display might be in error");
|
||||
} else {
|
||||
setSubWidget(tmpWidget);
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
TEST(TestEwolApplication, Creation) {
|
||||
ewol::context::Application* tmpAppl = ETK_NEW(ewol::context::Application);
|
||||
EXPECT_NE(tmpAppl, nullptr);
|
||||
EXPECT_NE(tmpAppl, null);
|
||||
ETK_DELETE(ewol::context::Application, tmpAppl);
|
||||
}
|
||||
|
||||
|
@ -28,7 +28,7 @@ namespace appl {
|
||||
TEST(TestEwolWindows, Creation) {
|
||||
/*
|
||||
ememory::SharedPtr<appl::Windows> tmpWindows = appl::Windows::create();
|
||||
EXPECT_NE(tmpWindows, nullptr);
|
||||
EXPECT_NE(tmpWindows, null);
|
||||
tmpWindows.reset();
|
||||
*/
|
||||
}
|
||||
|
@ -40,7 +40,7 @@ namespace appl {
|
||||
void forceFocusCall(const ewol::event::Time& _event);
|
||||
virtual ewol::WidgetShared getWidgetAtPos(const vec2& _pos) override {
|
||||
ewol::WidgetShared wid = ewol::widget::Windows::getWidgetAtPos(_pos);
|
||||
if (wid != nullptr) {
|
||||
if (wid != null) {
|
||||
return wid;
|
||||
}
|
||||
return ememory::dynamicPointerCast<ewol::Widget>(sharedFromThis());
|
||||
|
@ -56,13 +56,13 @@ namespace appl {
|
||||
APPL_INFO("==> START ... (BEGIN)");
|
||||
|
||||
ememory::SharedPtr<appl::MainWindows> basicWindows = appl::MainWindows::create();
|
||||
if (basicWindows == nullptr) {
|
||||
if (basicWindows == null) {
|
||||
APPL_ERROR("Can not allocate the basic windows");
|
||||
return;
|
||||
}
|
||||
// create the specific windows
|
||||
_context.setWindows(basicWindows);
|
||||
if (basicWindows == nullptr) {
|
||||
if (basicWindows == null) {
|
||||
APPL_ERROR("Can not allocate the basic windows");
|
||||
_context.exit(-1);
|
||||
return;
|
||||
|
@ -46,7 +46,7 @@ void appl::widget::SizerColor::onRegenerateDisplay() {
|
||||
vec2 underSize(0,0);
|
||||
vec2 underOrigin(999999999999.0,999999999999.0);
|
||||
for (auto &it : m_subWidget) {
|
||||
if (it == nullptr) {
|
||||
if (it == null) {
|
||||
continue;
|
||||
}
|
||||
vec2 size = it->getSize();
|
||||
@ -63,7 +63,7 @@ void appl::widget::SizerColor::onRegenerateDisplay() {
|
||||
vec2 localWidgetSize = m_size - tmpBorderSize*2.0f;
|
||||
vec2 localWidgetOrigin = m_origin + tmpBorderSize;
|
||||
for (auto &it : m_subWidget) {
|
||||
if (it == nullptr) {
|
||||
if (it == null) {
|
||||
continue;
|
||||
}
|
||||
vec2 origin = it->getOrigin();
|
||||
|
@ -51,15 +51,15 @@ void appl::MainWindows::init() {
|
||||
externSubBind(m_composer, ewol::widget::Button, "appl-next-gravity", signalPressed, sharedFromThis(), &appl::MainWindows::onCallbackGravityChange);
|
||||
|
||||
m_sizerVert = ememory::dynamicPointerCast<ewol::widget::Sizer>(m_composer->getSubObjectNamed("appl-upper-test-widget"));
|
||||
if (m_sizerVert == nullptr) {
|
||||
if (m_sizerVert == null) {
|
||||
APPL_CRITICAL("Can not get vertical pointer");
|
||||
}
|
||||
m_sizerDynamic = ememory::dynamicPointerCast<ewol::widget::Sizer>(m_composer->getSubObjectNamed("appl-dynamic-config"));
|
||||
if (m_sizerDynamic == nullptr) {
|
||||
if (m_sizerDynamic == null) {
|
||||
APPL_CRITICAL("Can not get dynamic pointer");
|
||||
}
|
||||
m_subWidget = ememory::dynamicPointerCast<ewol::Widget>(m_composer->getSubObjectNamed("[TEST]TO-TEST"));
|
||||
if (m_subWidget == nullptr) {
|
||||
if (m_subWidget == null) {
|
||||
APPL_CRITICAL("Can not get subWidget pointer");
|
||||
}
|
||||
shortCutAdd("F12", "menu:reloade-shader");
|
||||
@ -182,7 +182,7 @@ void appl::MainWindows::onCallbackWidgetChange(int32_t _increment) {
|
||||
break;
|
||||
case 1:
|
||||
m_subWidget = TestDistanceField::create();
|
||||
if (m_subWidget != nullptr) {
|
||||
if (m_subWidget != null) {
|
||||
m_sizerVert->subWidgetAdd(m_subWidget);
|
||||
}
|
||||
tmpDescription = "Test Distance Field";
|
||||
@ -191,7 +191,7 @@ void appl::MainWindows::onCallbackWidgetChange(int32_t _increment) {
|
||||
}
|
||||
// create the widget with a xml generator (readable for test ...):
|
||||
m_subWidget = ewol::widget::composerGenerateString(tmpConstruct);
|
||||
if (m_subWidget != nullptr) {
|
||||
if (m_subWidget != null) {
|
||||
m_sizerVert->subWidgetReplace(oldWidget, m_subWidget);
|
||||
}
|
||||
propertySetOnWidgetNamed("appl-label-test", "value", tmpDescription);
|
||||
@ -200,7 +200,7 @@ void appl::MainWindows::onCallbackWidgetChange(int32_t _increment) {
|
||||
|
||||
static void addSpacer(ememory::SharedPtr<ewol::widget::Sizer> _sizer, etk::Color<> _color=etk::color::none) {
|
||||
ememory::SharedPtr<ewol::widget::Spacer> mySpacer = ewol::widget::Spacer::create();
|
||||
if (mySpacer != nullptr) {
|
||||
if (mySpacer != null) {
|
||||
mySpacer->propertyExpand.set(bvec2(true,false));
|
||||
mySpacer->propertyFill.set(bvec2(true,false));
|
||||
if (_color == etk::color::none) {
|
||||
@ -214,7 +214,7 @@ static void addSpacer(ememory::SharedPtr<ewol::widget::Sizer> _sizer, etk::Color
|
||||
void appl::MainWindows::updateProperty() {
|
||||
// remove all elements:
|
||||
m_sizerDynamic->subWidgetRemoveAll();
|
||||
if (m_subWidget == nullptr) {
|
||||
if (m_subWidget == null) {
|
||||
return;
|
||||
}
|
||||
m_listConnection.clear();
|
||||
@ -224,12 +224,12 @@ void appl::MainWindows::updateProperty() {
|
||||
addSpacer(m_sizerDynamic, etk::color::red);
|
||||
for (size_t iii=0; iii<m_subWidget->properties.size(); ++iii) {
|
||||
eproperty::Property* param = m_subWidget->properties.getRaw(iii);
|
||||
if (param == nullptr) {
|
||||
APPL_WARNING("Parameter EMPTY . " << iii << " : nullptr");
|
||||
if (param == null) {
|
||||
APPL_WARNING("Parameter EMPTY . " << iii << " : null");
|
||||
continue;
|
||||
}
|
||||
ememory::SharedPtr<ewol::widget::Sizer> widgetSizer = ewol::widget::Sizer::create();
|
||||
if (widgetSizer != nullptr) {
|
||||
if (widgetSizer != null) {
|
||||
widgetSizer->propertyMode.set(ewol::widget::Sizer::modeHori);
|
||||
widgetSizer->propertyExpand.set(bvec2(true,false));
|
||||
widgetSizer->propertyFill.set(bvec2(true,true));
|
||||
@ -246,8 +246,8 @@ void appl::MainWindows::updateProperty() {
|
||||
ewol::widget::EntryShared widgetTmp = ewol::widget::Entry::create();
|
||||
widgetSizer->subWidgetAdd(widgetTmp);
|
||||
eproperty::Value<etk::String>* paramValue = dynamic_cast<eproperty::Value<etk::String>*>(param);
|
||||
if (paramValue == nullptr) {
|
||||
APPL_ERROR("nullptr...");
|
||||
if (paramValue == null) {
|
||||
APPL_ERROR("null...");
|
||||
return;
|
||||
}
|
||||
etk::String value = paramValue->get();
|
||||
@ -266,8 +266,8 @@ void appl::MainWindows::updateProperty() {
|
||||
ewol::widget::SpinShared widgetTmp = ewol::widget::Spin::create();
|
||||
widgetSizer->subWidgetAdd(widgetTmp);
|
||||
eproperty::Value<gale::Dimension>* paramValue = dynamic_cast<eproperty::Value<gale::Dimension>*>(param);
|
||||
if (paramValue == nullptr) {
|
||||
APPL_ERROR("nullptr... 2 ");
|
||||
if (paramValue == null) {
|
||||
APPL_ERROR("null... 2 ");
|
||||
return;
|
||||
}
|
||||
gale::Dimension value = paramValue->get();
|
||||
@ -335,8 +335,8 @@ void appl::MainWindows::updateProperty() {
|
||||
ewol::widget::CheckBoxShared widgetTmp = ewol::widget::CheckBox::create();
|
||||
widgetSizer->subWidgetAdd(widgetTmp);
|
||||
eproperty::Value<bvec2>* paramValue = dynamic_cast<eproperty::Value<bvec2>*>(param);
|
||||
if (paramValue == nullptr) {
|
||||
APPL_ERROR("nullptr... 2 ");
|
||||
if (paramValue == null) {
|
||||
APPL_ERROR("null... 2 ");
|
||||
return;
|
||||
}
|
||||
bvec2 value = paramValue->get();
|
||||
@ -374,8 +374,8 @@ void appl::MainWindows::updateProperty() {
|
||||
ewol::widget::SpinShared widgetTmp = ewol::widget::Spin::create();
|
||||
widgetSizer->subWidgetAdd(widgetTmp);
|
||||
eproperty::Value<ivec2>* paramValue = dynamic_cast<eproperty::Value<ivec2>*>(param);
|
||||
if (paramValue == nullptr) {
|
||||
APPL_ERROR("nullptr... 2 ");
|
||||
if (paramValue == null) {
|
||||
APPL_ERROR("null... 2 ");
|
||||
return;
|
||||
}
|
||||
ivec2 value = paramValue->get();
|
||||
@ -413,8 +413,8 @@ void appl::MainWindows::updateProperty() {
|
||||
ewol::widget::SpinShared widgetTmp = ewol::widget::Spin::create();
|
||||
widgetSizer->subWidgetAdd(widgetTmp);
|
||||
eproperty::Value<uivec2>* paramValue = dynamic_cast<eproperty::Value<uivec2>*>(param);
|
||||
if (paramValue == nullptr) {
|
||||
APPL_ERROR("nullptr... 2 ");
|
||||
if (paramValue == null) {
|
||||
APPL_ERROR("null... 2 ");
|
||||
return;
|
||||
}
|
||||
uivec2 value = paramValue->get();
|
||||
@ -452,8 +452,8 @@ void appl::MainWindows::updateProperty() {
|
||||
ewol::widget::SpinShared widgetTmp = ewol::widget::Spin::create();
|
||||
widgetSizer->subWidgetAdd(widgetTmp);
|
||||
eproperty::Value<vec2>* paramValue = dynamic_cast<eproperty::Value<vec2>*>(param);
|
||||
if (paramValue == nullptr) {
|
||||
APPL_ERROR("nullptr... 2 ");
|
||||
if (paramValue == null) {
|
||||
APPL_ERROR("null... 2 ");
|
||||
return;
|
||||
}
|
||||
vec2 value = paramValue->get();
|
||||
@ -494,8 +494,8 @@ void appl::MainWindows::updateProperty() {
|
||||
widgetSizer->subWidgetAdd(widgetTmp);
|
||||
esignal::Connection conn = widgetTmp->signalValue.connect(
|
||||
[=](const bool& _value) {
|
||||
if (m_subWidget == nullptr) {
|
||||
APPL_ERROR("nullptr...");
|
||||
if (m_subWidget == null) {
|
||||
APPL_ERROR("null...");
|
||||
return;
|
||||
}
|
||||
APPL_INFO("set parameter : name=" << param->getName() << " value=" << _value);
|
||||
@ -581,7 +581,7 @@ void appl::MainWindows::updateProperty() {
|
||||
}
|
||||
}
|
||||
ewol::widget::SpacerShared mySpacer = ewol::widget::Spacer::create();
|
||||
if (mySpacer != nullptr) {
|
||||
if (mySpacer != null) {
|
||||
mySpacer->propertyExpand.set(bvec2(true,false));
|
||||
mySpacer->propertyFill.set(bvec2(true,false));
|
||||
mySpacer->propertyMinSize.set(vec2(3,3));
|
||||
|
@ -56,13 +56,13 @@ namespace appl {
|
||||
APPL_INFO("==> START ... (BEGIN)");
|
||||
|
||||
ememory::SharedPtr<appl::MainWindows> basicWindows = appl::MainWindows::create();
|
||||
if (basicWindows == nullptr) {
|
||||
if (basicWindows == null) {
|
||||
APPL_ERROR("Can not allocate the basic windows");
|
||||
return;
|
||||
}
|
||||
// create the specific windows
|
||||
_context.setWindows(basicWindows);
|
||||
if (basicWindows == nullptr) {
|
||||
if (basicWindows == null) {
|
||||
APPL_ERROR("Can not allocate the basic windows");
|
||||
_context.exit(-1);
|
||||
return;
|
||||
|
@ -46,7 +46,7 @@ void appl::widget::SizerColor::onRegenerateDisplay() {
|
||||
vec2 underSize(0,0);
|
||||
vec2 underOrigin(999999999999.0,999999999999.0);
|
||||
for (auto &it : m_subWidget) {
|
||||
if (it == nullptr) {
|
||||
if (it == null) {
|
||||
continue;
|
||||
}
|
||||
vec2 size = it->getSize();
|
||||
@ -63,7 +63,7 @@ void appl::widget::SizerColor::onRegenerateDisplay() {
|
||||
vec2 localWidgetSize = m_size - tmpBorderSize*2.0f;
|
||||
vec2 localWidgetOrigin = m_origin + tmpBorderSize;
|
||||
for (auto &it : m_subWidget) {
|
||||
if (it == nullptr) {
|
||||
if (it == null) {
|
||||
continue;
|
||||
}
|
||||
vec2 origin = it->getOrigin();
|
||||
|
Loading…
x
Reference in New Issue
Block a user