[DEV] update the main structure of the application

This commit is contained in:
Edouard DUPIN 2013-11-19 22:21:42 +01:00
parent f3b3967b1e
commit 09b7f9a749
89 changed files with 318 additions and 225 deletions

@ -1 +1 @@
Subproject commit 001054295728371e2a55ad33589867b3a07e3d11
Subproject commit 5a7a38c1824799bbd5030f0d7ed784895802cd1c

2
external/ege vendored

@ -1 +1 @@
Subproject commit 1d10f953326d14ff134be6c37a447d0f8a2e0c83
Subproject commit 803ae2fc3bb894109826fb763cbc4b0091393038

2
external/etk vendored

@ -1 +1 @@
Subproject commit a130375b478f0d622f8205d0537af530d00b131b
Subproject commit 4de67305e404900be7df09662f790bc29451c132

View File

@ -46,14 +46,17 @@ import org.ewol.Ewol;
* @brief Class :
*
*/
public abstract class EwolActivity extends Activity implements EwolCallback, EwolConstants
{
public abstract class EwolActivity extends Activity implements EwolCallback, EwolConstants {
private EwolSurfaceViewGL mGLView;
private EwolAudioTask mStreams;
private Thread mAudioThread;
private Ewol EWOL;
static {
System.loadLibrary("ewol");
try {
System.loadLibrary("ewol");
} catch (UnsatisfiedLinkError e) {
Log.e("EwolActivity", "error getting lib(): " + e);
}
}
public EwolActivity() {
// set the java evironement in the C sources :

View File

@ -9,6 +9,7 @@
#include <ewol/debug.h>
#include <ewol/compositing/Text.h>
#include <ewol/renderer/eContext.h>
#include <etk/UString.h>
#undef __class__
#define __class__ "ewol::Text"
@ -297,6 +298,7 @@ void ewol::Text::setFont(std::string _fontName, int32_t _fontSize) {
}
_fontName += ":";
_fontName += std::to_string(_fontSize);
EWOL_WARNING("plop : " << _fontName << " size=" << _fontSize << " result :" << _fontName);
// link to new one
m_font = ewol::TexturedFont::keep(_fontName);
if (m_font == NULL) {
@ -522,7 +524,7 @@ void ewol::Text::print(const std::string& _text, const std::vector<TextDecoratio
}
}
// note this is faster when nothing is requested ...
for(int32_t iii=0; iii<_text.size(); iii++) {
for(size_t iii=0; iii<_text.size(); iii++) {
// check if ve have decoration
if (iii<_decoration.size()) {
tmpFg = _decoration[iii].m_colorFg;
@ -612,7 +614,7 @@ void ewol::Text::print(const std::string& _text, const std::vector<TextDecoratio
setColorBg(m_colorCursor);
printCursor(false);
}
for(int32_t iii=currentId; iii<stop && iii<_text.size(); iii++) {
for(size_t iii=currentId; iii<stop && iii<_text.size(); iii++) {
float fontHeigh = m_font->getHeight(m_mode);
// get specific decoration if provided
if (iii<_decoration.size()) {
@ -710,7 +712,7 @@ void ewol::Text::print(const std::u32string& _text, const std::vector<TextDecora
}
}
// note this is faster when nothing is requested ...
for(int32_t iii=0; iii<_text.size(); iii++) {
for(size_t iii=0; iii<_text.size(); iii++) {
// check if ve have decoration
if (iii<_decoration.size()) {
tmpFg = _decoration[iii].m_colorFg;
@ -1123,8 +1125,8 @@ vec3 ewol::Text::calculateSize(const std::string& _text) {
return vec3(0,0,0);
}
vec3 outputSize(0, 0, 0);
for(int32_t iii=0; iii<_text.size(); iii++) {
vec3 tmpp = calculateSize(_text[iii]);
for(auto element : _text) {
vec3 tmpp = calculateSize(element);
if (outputSize.y() == 0) {
outputSize.setY(tmpp.y());
}
@ -1192,7 +1194,7 @@ bool ewol::Text::extrapolateLastId(const std::string& _text,
stopPosition = m_startTextpos + 3999999999.0;
}
for (int32_t iii=_start; iii<_text.size(); iii++) {
for (size_t iii=_start; iii<_text.size(); iii++) {
vec3 tmpSize = calculateSize(_text[iii]);
// check oveflow :
if (endPos + tmpSize.x() > stopPosition) {
@ -1255,7 +1257,7 @@ bool ewol::Text::extrapolateLastId(const std::u32string& _text,
stopPosition = m_startTextpos + 3999999999.0;
}
for (int32_t iii=_start; iii<_text.size(); iii++) {
for (size_t iii=_start; iii<_text.size(); iii++) {
vec3 tmpSize = calculateSize(_text[iii]);
// check oveflow :
if (endPos + tmpSize.x() > stopPosition) {

View File

@ -396,8 +396,7 @@ class AndroidContext : public ewol::eContext {
static std::vector<AndroidContext*> s_listInstance;
extern "C"
{
extern "C" {
// JNI onLoad
JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM* _jvm, void* _reserved) {
// get the java virtual machine handle ...

View File

@ -16,20 +16,30 @@
const char* const ewol::EObject::configName = "name";
size_t ewol::EObject::m_valUID = 0;
ewol::EObject::EObject(void) :
m_static(false) {
static int32_t ss_globalUniqueId = 0;
m_static(false),
m_isResource(false) {
// note this is nearly atomic ... (but it is enough)
m_uniqueId = ss_globalUniqueId++;
m_uniqueId = m_valUID++;
EWOL_DEBUG("new EObject : [" << m_uniqueId << "]");
getEObjectManager().add(this);
registerConfig(ewol::EObject::configName, "string", NULL, "EObject name, might be a unique reference in all the program");
}
ewol::EObject::EObject(const std::string& _name) :
m_static(false),
m_name(_name),
m_isResource(false) {
// note this is nearly atomic ... (but it is enough)
m_uniqueId = m_valUID++;
EWOL_DEBUG("new EObject : [" << m_uniqueId << "]");
getEObjectManager().add(this);
registerConfig(ewol::EObject::configName, "string", NULL, "EObject name, might be a unique reference in all the program");
}
ewol::EObject::~EObject(void) {
EWOL_DEBUG("delete EObject : [" << m_uniqueId << "]");
EWOL_DEBUG("delete EObject : [" << m_uniqueId << "] : " << getTypeDescription());
getEObjectManager().rm(this);
getMultiCast().rm(this);
for (int32_t iii=0; iii<m_externEvent.size(); iii++) {
@ -43,6 +53,41 @@ ewol::EObject::~EObject(void) {
m_uniqueId = -1;
}
const char * const ewol::EObject::getObjectType(void) {
if (m_listType.size() == 0) {
return "ewol::EObject";
}
return m_listType.back();
}
void ewol::EObject::addObjectType(const char* _type) {
if (_type == NULL) {
EWOL_ERROR(" try to add a type with no value...");
return;
}
m_listType.push_back(_type);
}
std::string ewol::EObject::getTypeDescription(void) {
std::string ret("ewol::EObject");
for(auto element : m_listType) {
ret += "|";
ret += element;
}
return ret;
}
bool ewol::EObject::isTypeCompatible(const std::string& _type) {
if (_type == "ewol::EObject") {
return true;
}
for(auto element : m_listType) {
if (_type == element) {
return true;
}
}
return false;
}
void ewol::EObject::autoDestroy(void) {
getEObjectManager().autoRemove(this);
}
@ -127,7 +172,7 @@ void ewol::EObject::registerOnEvent(ewol::EObject * _destinationObject,
}
}
if (false == findIt) {
EWOL_ERROR("Can not register event on this WidgetType=" << getObjectType() << " event=\"" << _eventId << "\" == > unknow event");
EWOL_ERROR("Can not register event on this Type=" << getObjectType() << " event=\"" << _eventId << "\" == > unknow event");
return;
}
ewol::EventExtGen * tmpEvent = new ewol::EventExtGen();

View File

@ -13,6 +13,7 @@
#include <etk/UString.h>
#include <vector>
#include <exml/exml.h>
#include <vector>
namespace ewol {
// some class need to define element befor other ...
class EObject;
@ -40,49 +41,83 @@ namespace ewol {
* this class mermit at every EObject to communicate between them.
*/
class EObject {
private:
static size_t m_valUID; //!< stic used for the unique ID definition
public:
// Config list of properties
static const char* const configName;
protected:
bool m_static; //!< set this variable at true if this element must not be auto destroy (exemple : use static object)
private:
int32_t m_uniqueId; //!< Object UniqueID == > TODO : Check if it use is needed
std::vector<EventExtGen*> m_externEvent; //!< Generic list of event generation for output link
std::vector<const char*> m_availlableEventId; //!< List of all event availlable for this widget
public:
/**
* @brief Constructor
* @brief Constructor.
*/
EObject(void);
/**
* @brief Constructor.
* @param[in] _name Name of the EObject.
*/
EObject(const std::string& _name);
/**
* @brief Destructor
*/
virtual ~EObject(void);
/**
* @brief get the static status of the EObject == > mark at true if the user set the object mark as static allocated element ==> not auto remove element
* @return true if it might not be removed == > usefull for conficuration class
*/
bool getStatic(void){ return m_static; };
/**
* @brief get the UniqueId of the EObject
* @return the requested ID
*/
int32_t getId(void){ return m_uniqueId; };
protected:
/**
* @brief Auto-destroy the object
*/
void autoDestroy(void);
public:
/**
* @brief Asynchronous removing the object
*/
void removeObject(void);
private:
std::vector<const char*> m_listType;
public:
/**
* @brief get the current Object type of the EObject
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast == > this will replace it
* @param[in] _objectType type description
* @return true if the object is compatible, otherwise false
* @return the last type name of the element
*/
virtual const char * const getObjectType(void) { return "EObject"; };
const char * const getObjectType(void);
/**
* @brief Get the herarchie of the EObject type.
* @return descriptive string.
*/
std::string getTypeDescription(void);
/**
* @brief check if the element herited from a specific type
* @param[in] _type Type to check.
* @return true if the element is compatible.
*/
bool isTypeCompatible(const std::string& _type);
protected:
/**
* @brief Add a type of the list of eObject.
* @param[in] _type new type to add.
*/
void addObjectType(const char* _type);
protected:
bool m_static; //!< set this variable at true if this element must not be auto destroy (exemple : use static object)
public:
/**
* @brief get the static status of the EObject == > mark at true if the user set the object mark as static allocated element ==> not auto remove element
* @return true if it might not be removed == > usefull for conficuration class
*/
bool getStatic(void){
return m_static;
};
private:
int32_t m_uniqueId; //!< Object UniqueID == > TODO : Check if it use is needed
public:
/**
* @brief get the UniqueId of the EObject
* @return the requested ID
*/
int32_t getId(void){
return m_uniqueId;
};
private:
std::vector<EventExtGen*> m_externEvent; //!< Generic list of event generation for output link
std::vector<const char*> m_availlableEventId; //!< List of all event availlable for this widget
protected:
/**
* @brief add a specific event Id in the list to prevent wrong link on a EObject
@ -117,7 +152,7 @@ namespace ewol {
void registerOnEvent(ewol::EObject * _destinationObject,
const char * _eventId,
const char * _eventIdgenerated = NULL,
const std::string& _overloadData="");
const std::string& _overloadData = "");
/**
* @brief Un-Register an EObject over an other.
* @param[in] _destinationObject pointer on the object that might be call when an event is generated
@ -135,7 +170,9 @@ namespace ewol {
* @brief Receive a message from an other EObject with a specific eventId and data
* @param[in] _msg Message handle
*/
virtual void onReceiveMessage(const ewol::EMessage& _msg) { };
virtual void onReceiveMessage(const ewol::EMessage& _msg) {
};
private:
std::vector<ewol::EConfigElement> m_listConfig;
protected:
@ -147,7 +184,11 @@ namespace ewol {
* @param[in] _description Descritpion on the current type.
* @param[in] _default Default value of this parameter.
*/
void registerConfig(const char* _config, const char* _type=NULL, const char* _control=NULL, const char* _description=NULL, const char* _default=NULL);
void registerConfig(const char* _config,
const char* _type = NULL,
const char* _control = NULL,
const char* _description = NULL,
const char* _default = NULL);
/**
* @brief Configuration requested to the curent EObject
* @param[in] _conf Configuration handle.
@ -166,13 +207,17 @@ namespace ewol {
* @brief get all the configuration list
* @return The list of all parameter availlable in the widget
*/
virtual const std::vector<ewol::EConfigElement>& getConfigList(void) { return m_listConfig; };
virtual const std::vector<ewol::EConfigElement>& getConfigList(void) {
return m_listConfig;
};
/**
* @brief Configuration requested to the curent EObject (systrem mode)
* @param[in] _conf Configuration handle.
* @return true if config set correctly...
*/
bool setConfig(const ewol::EConfig& _conf) { return onSetConfig(_conf); };
bool setConfig(const ewol::EConfig& _conf) {
return onSetConfig(_conf);
};
bool setConfig(const std::string& _config, const std::string& _value); // need a search ...
bool setConfigNamed(const std::string& _name, const std::string& _config, const std::string& _value); // need a search ...
bool setConfigNamed(const std::string& _name, const ewol::EConfig& _conf);
@ -190,12 +235,16 @@ namespace ewol {
* @brief get the eObject name
* @return The requested name
*/
const std::string& getName(void) const { return m_name; };
const std::string& getName(void) const {
return m_name;
};
/**
* @brief get the Widget name
* @param[in] _name The new name
*/
void setName(const std::string& _name) { m_name=_name; };
void setName(const std::string& _name) {
m_name = _name;
};
public:
/**
* @brief load properties with an XML node.
@ -227,6 +276,24 @@ namespace ewol {
* @return current reference on the instance.
*/
eContext& getContext(void);
private:
bool m_isResource; //!< enable this when you want to declare this element is auto-remove
public:
/**
* @brief Declare this element as a resource (or singleton) this mean the element will
* not be auto Remove at the end of the programm. It just notify that it is not removed.
* @param[in] _val Value of the type of the element.
*/
void setStatusResource(bool _val) {
m_isResource = _val;
}
/**
* @brief Get the resource status of the element.
* @return the resource status.
*/
bool getStatusResource(void) {
return m_isResource;
}
};
};

View File

@ -40,6 +40,22 @@ void ewol::EObjectManager::unInit(void) {
removeAllAutoRemove();
EWOL_INFO(" remove missing user widget");
int32_t iii=0;
while(iii<m_eObjectList.size()) {
if (m_eObjectList[iii]!=NULL) {
if ( m_eObjectList[iii]->getStatic() == true
|| m_eObjectList[iii]->getStatusResource() == true) {
iii++;
} else {
EWOL_WARNING("Un-INIT : remove EObject type=\"" << m_eObjectList[iii]->getObjectType() << "\"");
delete(m_eObjectList[iii]);
m_eObjectList[iii] = NULL;
}
} else {
m_eObjectList.erase(m_eObjectList.begin()+iii);
}
}
removeAllAutoRemove();
EWOL_INFO(" remove resources user widgets");
while(iii<m_eObjectList.size()) {
if (m_eObjectList[iii]!=NULL) {
if (m_eObjectList[iii]->getStatic() == true) {
@ -53,6 +69,17 @@ void ewol::EObjectManager::unInit(void) {
m_eObjectList.erase(m_eObjectList.begin()+iii);
}
}
removeAllAutoRemove();
EWOL_INFO(" remove static user widgets");
while(iii<m_eObjectList.size()) {
if (m_eObjectList[iii]!=NULL) {
EWOL_WARNING("Un-INIT : remove EObject type=\"" << m_eObjectList[iii]->getObjectType() << "\"");
delete(m_eObjectList[iii]);
m_eObjectList[iii] = NULL;
} else {
m_eObjectList.erase(m_eObjectList.begin()+iii);
}
}
}
void ewol::EObjectManager::add(ewol::EObject* _object) {

View File

@ -39,7 +39,9 @@ namespace ewol {
private:
ewol::EMultiCast m_multiCast; //!< muticast manager
public:
ewol::EMultiCast& multiCast(void) { return m_multiCast; };
ewol::EMultiCast& multiCast(void) {
return m_multiCast;
};
};
};

View File

@ -16,6 +16,7 @@
ewol::Colored3DObject::Colored3DObject(void) :
m_GLprogram(NULL) {
addObjectType("ewol::Colored3DObject");
// get the shader resource :
m_GLPosition = 0;
m_GLprogram = ewol::Program::keep("DATA:simple3D.prog");

View File

@ -18,20 +18,27 @@
void ewol::SimpleConfigElement::parse(const std::string& _value) {
m_value = _value;
try {
#ifdef __EXCEPTIONS
try {
m_valueInt = std::stoi(_value);
m_valuefloat = std::stof(_value);
}
catch (const std::invalid_argument& ia) {
EWOL_VERBOSE(" invalid argument= " << ia.what() << "val='" << _value << "'");
m_valueInt = 0;
m_valuefloat = 0;
}
#else
m_valueInt = std::stoi(_value);
m_valuefloat = std::stof(_value);
} catch (const std::invalid_argument& ia) {
EWOL_VERBOSE(" invalid argument= " << ia.what() << "val='" << _value << "'");
m_valueInt = 0;
m_valuefloat = 0;
}
#endif
}
ewol::ConfigFile::ConfigFile(const std::string& _filename) :
ewol::Resource(_filename) {
addObjectType("ewol::ConfigFile");
EWOL_DEBUG("SFP : load \"" << _filename << "\"");
reload();
}

View File

@ -54,6 +54,7 @@ void ewol::freeTypeUnInit(void) {
ewol::FontFreeType::FontFreeType(const std::string& _fontName) :
FontBase(_fontName) {
addObjectType("ewol::FontFreeType");
m_init = false;
m_FileBuffer = NULL;
m_FileSize = 0;

View File

@ -25,6 +25,7 @@ ewol::TextureFile::TextureFile(const std::string& _genName) :
ewol::TextureFile::TextureFile(std::string _genName, const std::string& _tmpfileName, const ivec2& _size) :
Texture(_genName) {
addObjectType("ewol::TextureFile");
if (false == egami::load(m_data, _tmpfileName, _size)) {
EWOL_ERROR("ERROR when loading the image : " << _tmpfileName);
}

View File

@ -20,6 +20,7 @@ ewol::Mesh::Mesh(const std::string& _fileName, const std::string& _shaderName) :
m_checkNormal(false),
m_pointerShape(NULL),
m_functionFreeShape(NULL) {
addObjectType("ewol::Mesh");
EWOL_VERBOSE("Load a new mesh : '" << _fileName << "'");
// get the shader resource :
m_GLPosition = 0;

View File

@ -25,6 +25,7 @@ ewol::Program::Program(const std::string& _filename) :
m_program(0),
m_hasTexture(false),
m_hasTexture1(false) {
addObjectType("ewol::Program");
m_resourceLevel = 1;
EWOL_DEBUG("OGL : load PROGRAM '" << m_name << "'");
// load data from file "all the time ..."

View File

@ -15,24 +15,20 @@
#include <ewol/renderer/eContext.h>
// Specific for the resource :
uint32_t ewol::Resource::m_valBase=0;
void ewol::Resource::updateContext(void) {
EWOL_DEBUG("Not set for : [" << m_uniqueId << "]" << m_name << " loaded " << m_counter << " time(s)");
EWOL_DEBUG("Not set for : [" << getId() << "]" << getName() << " loaded " << m_counter << " time(s)");
}
void ewol::Resource::removeContext(void) {
EWOL_DEBUG("Not set for : [" << m_uniqueId << "]" << m_name << " loaded " << m_counter << " time(s)");
EWOL_DEBUG("Not set for : [" << getId() << "]" << getName() << " loaded " << m_counter << " time(s)");
}
void ewol::Resource::removeContextToLate(void) {
EWOL_DEBUG("Not set for : [" << m_uniqueId << "]" << m_name << " loaded " << m_counter << " time(s)");
EWOL_DEBUG("Not set for : [" << getId() << "]" << getName() << " loaded " << m_counter << " time(s)");
}
void ewol::Resource::reload(void) {
EWOL_DEBUG("Not set for : [" << m_uniqueId << "]" << m_name << " loaded " << m_counter << " time(s)");
EWOL_DEBUG("Not set for : [" << getId() << "]" << getName() << " loaded " << m_counter << " time(s)");
}
ewol::ResourceManager& ewol::Resource::getManager(void) {

View File

@ -21,50 +21,46 @@ namespace ewol {
class ResourceManager;
// class resources is pure virtual
class Resource : public ewol::EObject {
/*
public:
void* operator new(size_t elmeentSize);
void operator delete(void* elementPointer);
*/
private:
static uint32_t m_valBase;
protected:
std::string m_name;
uint32_t m_counter;
uint32_t m_uniqueId;
uint8_t m_resourceLevel;
public:
Resource(void) :
m_name(""),
m_counter(1),
m_resourceLevel(MAX_RESOURCE_LEVEL-1) {
m_uniqueId = m_valBase;
m_valBase++;
addObjectType("ewol::Resource");
setStatusResource(true);
};
Resource(const std::string& _filename) :
m_name(_filename),
Resource(const std::string& _name) :
ewol::EObject(_name),
m_counter(1),
m_resourceLevel(MAX_RESOURCE_LEVEL-1) {
m_uniqueId = m_valBase;
m_valBase++;
addObjectType("ewol::Resource");
setStatusResource(true);
};
virtual ~Resource(void) { };
virtual bool hasName(const std::string& _fileName) {
EWOL_VERBOSE("G : check : " << _fileName << " ?= " << m_name << " = " << (_fileName == m_name) );
return _fileName == m_name;
virtual ~Resource(void) {
};
private:
uint32_t m_counter; //!< number of time the element was loaded.
public:
void increment(void) {
m_counter++;
};
bool decrement(void) {
m_counter--;
return (m_counter == 0)?true:false;
};
int32_t getCounter(void) {
return m_counter;
};
protected:
uint8_t m_resourceLevel; //!< Level of the resource ==> for updata priority [0..5] 0 must be update first.
public:
uint8_t getResourceLevel(void) {
return m_resourceLevel;
};
virtual const std::string& getName(void) { return m_name; };
void increment(void) { m_counter++; };
bool decrement(void) { m_counter--; return (m_counter == 0)?true:false; };
int32_t getCounter(void) { return m_counter; };
uint32_t getUID(void) { return m_uniqueId; };
uint8_t getResourceLevel(void) { return m_resourceLevel; };
virtual const char* getType(void) { return "unknow"; };
virtual void updateContext(void);
virtual void removeContext(void);
virtual void removeContextToLate(void);
virtual void reload(void);
static ewol::ResourceManager& getManager(void);
};
};

View File

@ -42,7 +42,7 @@ void ewol::ResourceManager::unInit(void) {
// remove all resources ...
for (int32_t iii=m_resourceList.size()-1; iii >= 0; iii--) {
if (m_resourceList[iii] != NULL) {
EWOL_WARNING("Find a resource that is not removed : [" << m_resourceList[iii]->getUID() << "]"
EWOL_WARNING("Find a resource that is not removed : [" << m_resourceList[iii]->getId() << "]"
<< "=\"" << m_resourceList[iii]->getName() << "\" "
<< m_resourceList[iii]->getCounter() << " elements");
delete(m_resourceList[iii]);
@ -57,8 +57,8 @@ void ewol::ResourceManager::display(void) {
// remove all resources ...
for (int32_t iii=m_resourceList.size()-1; iii >= 0; iii--) {
if (m_resourceList[iii] != NULL) {
EWOL_INFO(" [" << m_resourceList[iii]->getUID() << "]"
<< m_resourceList[iii]->getType()
EWOL_INFO(" [" << m_resourceList[iii]->getId() << "]"
<< m_resourceList[iii]->getObjectType()
<< "=\"" << m_resourceList[iii]->getName() << "\" "
<< m_resourceList[iii]->getCounter() << " elements");
}
@ -76,7 +76,7 @@ void ewol::ResourceManager::reLoadResources(void) {
if(m_resourceList[iii] != NULL) {
if (jjj == m_resourceList[iii]->getResourceLevel()) {
m_resourceList[iii]->reload();
EWOL_INFO(" [" << m_resourceList[iii]->getUID() << "]="<< m_resourceList[iii]->getType());
EWOL_INFO(" [" << m_resourceList[iii]->getId() << "]="<< m_resourceList[iii]->getObjectType());
}
}
}
@ -153,7 +153,7 @@ ewol::Resource* ewol::ResourceManager::localKeep(const std::string& _filename) {
EWOL_VERBOSE("KEEP (DEFAULT) : file : \"" << _filename << "\"");
for (int32_t iii=0; iii<m_resourceList.size(); iii++) {
if (m_resourceList[iii] != NULL) {
if(m_resourceList[iii]->hasName(_filename)) {
if(m_resourceList[iii]->getName() == _filename) {
m_resourceList[iii]->increment();
return m_resourceList[iii];
}

View File

@ -21,6 +21,7 @@ ewol::Shader::Shader(const std::string& _filename) :
m_fileData(NULL),
m_shader(0),
m_type(0) {
addObjectType("ewol::Shader");
m_resourceLevel = 0;
EWOL_DEBUG("OGL : load SHADER \"" << _filename << "\"");
// load data from file "all the time ..."

View File

@ -36,12 +36,14 @@ static int32_t nextP2(int32_t _value) {
ewol::Texture::Texture(const std::string& _filename) :
ewol::Resource(_filename) {
addObjectType("ewol::Texture");
m_loaded = false;
m_texId = 0;
m_endPointSize.setValue(1.0,1.0);
}
ewol::Texture::Texture(void) {
addObjectType("ewol::Texture");
m_loaded = false;
m_texId = 0;
m_endPointSize.setValue(1.0,1.0);
@ -68,7 +70,7 @@ void ewol::Texture::updateContext(void) {
//--- Mode linear
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
EWOL_INFO("TEXTURE: add [" << m_uniqueId << "]=" << m_data.getSize() << " OGl_Id=" <<m_texId);
EWOL_INFO("TEXTURE: add [" << getId() << "]=" << m_data.getSize() << " OGl_Id=" <<m_texId);
glTexImage2D(GL_TEXTURE_2D, // Target
0, // Level
GL_RGBA, // Format internal
@ -85,7 +87,7 @@ void ewol::Texture::updateContext(void) {
void ewol::Texture::removeContext(void) {
if (true == m_loaded) {
// Request remove texture ...
EWOL_INFO("TEXTURE: Rm [" << m_uniqueId << "] texId=" << m_texId);
EWOL_INFO("TEXTURE: Rm [" << getId() << "] texId=" << m_texId);
glDeleteTextures(1, &m_texId);
m_loaded = false;
}

View File

@ -44,6 +44,7 @@ etk::CCout& ewol::operator <<(etk::CCout& _os, enum ewol::font::mode _obj) {
ewol::TexturedFont::TexturedFont(const std::string& _fontName) :
ewol::Texture(_fontName) {
addObjectType("ewol::TexturedFont");
m_font[0] = NULL;
m_font[1] = NULL;
m_font[2] = NULL;
@ -357,7 +358,7 @@ void ewol::TexturedFont::release(ewol::TexturedFont*& _object) {
return;
}
std::string name = _object->getName();
int32_t count = _object->m_counter - 1;
int32_t count = _object->getCounter() - 1;
ewol::Resource* object2 = static_cast<ewol::Resource*>(_object);
if (getManager().release(object2) == true) {
EWOL_DEBUG("REMOVE: TexturedFont : file : '" << name << "' count=" << count);

View File

@ -17,6 +17,7 @@
ewol::VirtualBufferObject::VirtualBufferObject(int32_t _number) :
m_exist(false) {
addObjectType("ewol::VirtualBufferObject");
m_nbVBO = etk_avg(1, _number, NB_VBO_MAX);
for (int32_t iii=0; iii<NB_VBO_MAX; iii++) {
m_vbo[iii]=0;
@ -41,7 +42,7 @@ void ewol::VirtualBufferObject::updateContext(void) {
}
m_exist = true;
for (int32_t iii=0; iii<m_nbVBO; iii++) {
EWOL_INFO("VBO : add [" << m_uniqueId << "]=" << m_buffer[iii].size() << "*sizeof(float) OGl_Id=" << m_vbo[iii]);
EWOL_INFO("VBO : add [" << getId() << "]=" << m_buffer[iii].size() << "*sizeof(float) OGl_Id=" << m_vbo[iii]);
if (true == m_vboUsed[iii]) {
// select the buffer to set data inside it ...
if (m_buffer[iii].size()>0) {
@ -56,10 +57,10 @@ void ewol::VirtualBufferObject::updateContext(void) {
void ewol::VirtualBufferObject::removeContext(void) {
if (true == m_exist) {
EWOL_INFO("VBO: remove [" << m_uniqueId << "] OGl_Id=" << m_vbo[0]
<< "/" << m_vbo[1]
<< "/" << m_vbo[2]
<< "/" << m_vbo[3]);
EWOL_INFO("VBO: remove [" << getId() << "] OGl_Id=" << m_vbo[0]
<< "/" << m_vbo[1]
<< "/" << m_vbo[2]
<< "/" << m_vbo[3]);
glDeleteBuffers(m_nbVBO, m_vbo);
m_exist = false;
for (int32_t iii=0; iii<NB_VBO_MAX; iii++) {

View File

@ -51,6 +51,7 @@ widget::Button::Button(const std::string& _shaperName) :
m_buttonPressed(false),
m_selectableAreaPos(0,0),
m_selectableAreaSize(0,0) {
addObjectType("widget::Button");
// by default set no widget :
m_subWidget[0] = NULL;
m_subWidget[1] = NULL;

View File

@ -157,9 +157,6 @@ namespace widget {
virtual bool onSetConfig(const ewol::EConfig& _conf);
virtual bool onGetConfig(const char* _config, std::string& _result) const;
public: // Derived function
virtual const char * const getObjectType(void) {
return "widget::Button";
};
virtual void calculateMinMaxSize(void);
virtual void calculateSize(const vec2& _availlable);
virtual void onRegenerateDisplay(void);

View File

@ -42,6 +42,7 @@ widget::ButtonColor::ButtonColor(etk::Color<> _baseColor, std::string _shaperNam
m_shaper(_shaperName),
m_textColorFg(_baseColor),
m_widgetContextMenu(NULL) {
addObjectType("widget::ButtonColor");
addEventId(ewolEventButtonColorChange);
changeStatusIn(STATUS_UP);
setCanHaveFocus(true);

View File

@ -67,9 +67,6 @@ namespace widget {
virtual void onDraw(void);
public: // Derived function
virtual void calculateMinMaxSize(void);
virtual const char * const getObjectType(void) {
return "widget::ButtonColor";
};
virtual void onRegenerateDisplay(void);
virtual bool onEventInput(const ewol::EventInput& _event);
virtual void onReceiveMessage(const ewol::EMessage& _msg);

View File

@ -24,6 +24,7 @@ void widget::CheckBox::init(ewol::WidgetManager& _widgetManager) {
}
widget::CheckBox::CheckBox(const std::string& _newLabel) {
addObjectType("widget::CheckBox");
m_label = _newLabel;
addEventId(ewolEventCheckBoxClicked);
m_textColorFg = etk::color::black;

View File

@ -41,9 +41,6 @@ namespace widget {
protected: // Derived function
virtual void onDraw(void);
public: // Derived function
virtual const char * const getObjectType(void) {
return "widget::CheckBox";
};
virtual void calculateMinMaxSize(void);
virtual void onRegenerateDisplay(void);
virtual bool onEventInput(const ewol::EventInput& _event);

View File

@ -21,6 +21,7 @@ extern const char * const ewolEventColorBarChange = "ewol-color-bar-change";
#define __class__ "ColorBar"
widget::ColorBar::ColorBar(void) {
addObjectType("widget::ColorBar");
addEventId(ewolEventColorBarChange);
m_currentUserPos.setValue(0,0);
m_currentColor = etk::color::black;

View File

@ -34,9 +34,6 @@ namespace widget {
protected: // Derived function
virtual void onDraw(void);
public: // Derived function
virtual const char * const getObjectType(void) {
return "widget::ColorBar";
};
virtual void calculateMinMaxSize(void);
virtual void onRegenerateDisplay(void);
virtual bool onEventInput(const ewol::EventInput& _event);

View File

@ -20,6 +20,7 @@ widget::Composer::Composer(void) {
}
widget::Composer::Composer(enum composerMode _mode, const std::string& _fileName) {
addObjectType("widget::Composer");
switch(_mode) {
case widget::Composer::None:
// nothing to do ...

View File

@ -19,8 +19,7 @@ namespace widget
* @ingroup ewolWidgetGroup
* @brief the composer widget is a widget that create a link on a string.file to parse the data and generate some widget tree
*/
class Composer : public widget::Container
{
class Composer : public widget::Container {
public:
enum composerMode {
None,
@ -82,10 +81,6 @@ namespace widget
const char * _eventId,
const char * _eventIdgenerated = NULL,
const std::string& _overloadData="");
public: // herited functions:
virtual const char * const getObjectType(void) {
return "widget::Composer";
};
};
};

View File

@ -18,6 +18,7 @@
widget::Container::Container(ewol::Widget* _subElement) :
m_subWidget(_subElement) {
addObjectType("widget::Container");
// nothing to do ...
}

View File

@ -58,9 +58,6 @@ namespace widget {
virtual void calculateMinMaxSize(void);
virtual ewol::Widget* getWidgetAtPos(const vec2& _pos);
virtual ewol::Widget* getWidgetNamed(const std::string& _widgetName);
virtual const char * const getObjectType(void) {
return "widget::Container";
};
virtual bool loadXML(exml::Element* _node);
virtual void setOffset(const vec2& _newVal);
};

View File

@ -18,6 +18,7 @@
widget::ContainerN::ContainerN(void) :
m_lockExpand(false,false),
m_subExpend(false,false) {
addObjectType("widget::ContainerN");
// nothing to do ...
}

View File

@ -89,9 +89,6 @@ namespace widget {
virtual void calculateMinMaxSize(void);
virtual ewol::Widget* getWidgetAtPos(const vec2& _pos);
virtual ewol::Widget* getWidgetNamed(const std::string& _widgetName);
virtual const char * const getObjectType(void) {
return "widget::ContainerN";
};
virtual bool loadXML(exml::Element* _node);
virtual void setOffset(const vec2& _newVal);
};

View File

@ -32,6 +32,7 @@ void widget::ContextMenu::init(ewol::WidgetManager& _widgetManager) {
widget::ContextMenu::ContextMenu(const std::string& _shaperName) :
m_shaper(_shaperName) {
addObjectType("widget::ContextMenu");
// add basic configurations :
registerConfig(configArrowPosition, "vec2", NULL, "position of the arrow");
registerConfig(configArrowMode, "list", "none;left;buttom;right;top", "Position of the arrow in the pop-up");

View File

@ -68,9 +68,6 @@ namespace widget {
virtual bool onEventInput(const ewol::EventInput& _event);
virtual void calculateSize(const vec2& availlable);
virtual void calculateMinMaxSize(void);
virtual const char * const getObjectType(void) {
return "widget::ContextMenu";
};
virtual ewol::Widget* getWidgetAtPos(const vec2& pos);
};
};

View File

@ -59,6 +59,7 @@ widget::Entry::Entry(std::string _newData) :
m_textColorFg(etk::color::black),
m_textColorBg(etk::color::white),
m_textWhenNothing("") {
addObjectType("widget::Entry");
m_textColorBg.setA(0xAF);
setCanHaveFocus(true);
addEventId(eventClick);

View File

@ -198,9 +198,6 @@ namespace widget {
virtual bool onEventEntry(const ewol::EventEntry& _event);
virtual void onReceiveMessage(const ewol::EMessage& _msg);
virtual void onEventClipboard(enum ewol::clipBoard::clipboardListe _clipboardID);
virtual const char * const getObjectType(void) {
return "widget::Entry";
};
virtual void calculateMinMaxSize(void);
protected: // Derived function
virtual void onDraw(void);

View File

@ -29,6 +29,7 @@ widget::Gird::Gird(int32_t _colNumber) :
m_tmpWidget(NULL),
m_gavityButtom(true),
m_borderSize(0,0) {
addObjectType("widget::Gird");
setColNumber(_colNumber);
requestUpdateSize();
}

View File

@ -137,9 +137,6 @@ namespace widget {
virtual void onRegenerateDisplay(void);
virtual ewol::Widget* getWidgetAtPos(const vec2& pos);
virtual void onObjectRemove(ewol::EObject* _removeObject);
virtual const char * const getObjectType(void) {
return "widget::Gird";
};
virtual void calculateSize(const vec2& _availlable);
virtual void calculateMinMaxSize(void);
};

View File

@ -35,6 +35,7 @@ const char * const widget::Image::configSource = "src";
widget::Image::Image(const std::string& _file, const ewol::Dimension& _border) :
m_imageSize(vec2(0,0)),
m_keepRatio(true) {
addObjectType("widget::Image");
addEventId(eventPressed);
registerConfig(configRatio, "bool", NULL, "Keep ratio of the image");
registerConfig(configSize, "Dimension", NULL, "Basic display size of the image");

View File

@ -119,9 +119,6 @@ namespace widget {
virtual bool onSetConfig(const ewol::EConfig& _conf);
virtual bool onGetConfig(const char* _config, std::string& _result) const;
public: // Derived function
virtual const char * const getObjectType(void) {
return "widget::Image";
};
virtual void calculateMinMaxSize(void);
virtual void onRegenerateDisplay(void);
virtual bool onEventInput(const ewol::EventInput& _event);

View File

@ -25,6 +25,7 @@ static float l_ratio(1.0/7.0);
#define __class__ "Joystick"
widget::Joystick::Joystick(void) {
addObjectType("widget::Joystick");
addEventId(ewolEventJoystickEnable);
addEventId(ewolEventJoystickDisable);
addEventId(ewolEventJoystickMove);

View File

@ -76,9 +76,6 @@ namespace widget {
void getProperty(float& _distance, float& _angle);
public: // Derived function
virtual const char * const getObjectType(void) {
return "widget::Joystick";
};
virtual void calculateSize(const vec2& _availlable);
virtual void onRegenerateDisplay(void);
virtual bool onEventInput(const ewol::EventInput& _event);

View File

@ -26,6 +26,7 @@ void widget::Label::init(ewol::WidgetManager& _widgetManager) {
}
widget::Label::Label(std::string _newLabel) {
addObjectType("widget::Label");
m_label = _newLabel;
addEventId(eventPressed);
setCanHaveFocus(false);

View File

@ -61,9 +61,6 @@ namespace widget {
protected: // Derived function
virtual void onDraw(void);
public: // Derived function
virtual const char * const getObjectType(void) {
return "widget::Label";
};
virtual void calculateMinMaxSize(void);
virtual void onRegenerateDisplay(void);
virtual bool onEventInput(const ewol::EventInput& _event);

View File

@ -22,7 +22,7 @@ void widget::Layer::init(ewol::WidgetManager& _widgetManager) {
}
widget::Layer::Layer(void) {
// nothing to do ...
addObjectType("widget::Layer");
}
widget::Layer::~Layer(void) {

View File

@ -33,10 +33,7 @@ namespace widget {
* @brief Desstructor
*/
virtual ~Layer(void);
public:
virtual const char * const getObjectType(void) {
return "widget::Layer";
};
public: // Derived function
virtual ewol::Widget* getWidgetAtPos(const vec2& _pos);
};

View File

@ -17,6 +17,7 @@
widget::List::List(void) {
addObjectType("widget::List");
m_paddingSizeX = 2;
#ifdef __TARGET_OS__Android
m_paddingSizeY = 10;

View File

@ -22,10 +22,6 @@ namespace widget {
class List : public widget::WidgetScrooled {
public:
List(void);
// Derived function
virtual const char * const getObjectType(void) {
return "widget::List";
};
virtual ~List(void);
virtual void calculateMinMaxSize(void);
void setLabel(std::string _newLabel);

View File

@ -22,6 +22,7 @@ extern const char * const ewolEventFSFolderValidate = "ewol-event-file-system-fo
widget::ListFileSystem::ListFileSystem(void) {
addObjectType("widget::ListFileSystem");
m_selectedLine = -1;
m_showFile = true;
m_showTemporaryFile = true;

View File

@ -40,9 +40,6 @@ namespace widget {
uint32_t getNuberOfRaw(void);
bool getElement(int32_t _colomn, int32_t _raw, std::string& _myTextToWrite, etk::Color<>& _fg, etk::Color<>& _bg);
bool onItemEvent(int32_t _IdInput, enum ewol::keyEvent::status _typeEvent, int32_t _colomn, int32_t _raw, float _x, float _y);
const char * const getObjectType(void) {
return "widget::ListFileSystem";
};
public:
// extern API :
void setFolder(std::string _newFolder);

View File

@ -19,6 +19,7 @@
#define __class__ "Menu"
widget::Menu::Menu(void) {
addObjectType("widget::Menu");
m_staticId = 0;
m_widgetContextMenu = NULL;
}

View File

@ -35,10 +35,6 @@ namespace widget {
public:
Menu(void);
virtual ~Menu(void);
// Derived functionv
virtual const char * const getObjectType(void) {
return "widget::Menu";
};
private:
virtual void subWidgetRemoveAll(void);
virtual int32_t subWidgetAdd(ewol::Widget* _newWidget);

View File

@ -25,6 +25,7 @@ widget::Mesh::Mesh(const std::string& _filename) :
m_angle(0,0,0),
m_angleSpeed(0,0,0),
m_cameraDistance(10.0) {
addObjectType("widget::Mesh");
addEventId(ewolEventMeshPressed);
// Limit event at 1:
setMouseLimit(1);

View File

@ -34,9 +34,6 @@ namespace widget {
Mesh(const std::string& filename); // automatic considering in the appl Data older
virtual ~Mesh(void);
public: // Derived function
virtual const char * const getObjectType(void) {
return "widget::Mesh";
};
virtual void onRegenerateDisplay(void);
virtual void systemDraw(const ewol::DrawProperty& displayProp);
virtual void onDraw(void);

View File

@ -32,6 +32,7 @@ widget::PopUp::PopUp(const std::string& _shaperName) :
m_shaper(_shaperName),
m_lockExpand(true,true),
m_closeOutEvent(false) {
addObjectType("widget::PopUp");
m_userExpand.setValue(false, false);
setMinSize(ewol::Dimension(vec2(80,80),ewol::Dimension::Pourcent));
registerConfig(configShaper, "string", NULL, "The shaper properties");

View File

@ -104,10 +104,6 @@ namespace widget {
virtual void onRegenerateDisplay(void);
virtual void calculateSize(const vec2& _available);
virtual bool onEventInput(const ewol::EventInput& _event);
//virtual void calculateMinMaxSize(void);
virtual const char * const getObjectType(void) {
return "ewol::PopUp";
};
virtual ewol::Widget* getWidgetAtPos(const vec2& pos);
};

View File

@ -30,6 +30,7 @@ const char* const widget::ProgressBar::configValue = "value";
const int32_t dotRadius = 6;
widget::ProgressBar::ProgressBar(void) {
addObjectType("widget::ProgressBar");
m_value = 0.0;
m_textColorFg = etk::color::black;

View File

@ -51,9 +51,6 @@ namespace widget {
virtual bool onGetConfig(const char* _config, std::string& _result) const;
public: // Derived function
virtual void onRegenerateDisplay(void);
virtual const char * const getObjectType(void) {
return "widget::ProgressBar";
};
virtual void calculateMinMaxSize(void);
};

View File

@ -31,6 +31,7 @@ widget::Scroll::Scroll(void) :
m_highSpeedMode(speedModeDisable),
m_highSpeedButton(-1),
m_highSpeedType(ewol::keyEvent::typeUnknow) {
addObjectType("widget::Scroll");
registerConfig(configLimit, "vec2", NULL, "Limit the scroll maximum position [0..1]% represent the free space in the scoll when arrive at the end");
}

View File

@ -61,7 +61,6 @@ namespace widget {
const vec2& getLimit(void) const { return m_limit; };
public: // Derived function
virtual const char * const getObjectType(void) { return "widget::Scroll"; };
void calculateMinMaxSize(void);
virtual void onRegenerateDisplay(void);
virtual bool onEventInput(const ewol::EventInput& _event);

View File

@ -27,6 +27,7 @@ widget::Sizer::Sizer(enum displayMode _mode):
m_borderSize(),
m_animation(animationNone),
m_animationTime(0) {
addObjectType("widget::Sizer");
}

View File

@ -110,9 +110,6 @@ namespace widget {
return m_animationTime;
};
public: // Derived function
virtual const char * const getObjectType(void) {
return "widget::Sizer";
};
virtual void calculateSize(const vec2& _availlable);
virtual void calculateMinMaxSize(void);
virtual bool loadXML(exml::Element* _node);

View File

@ -26,6 +26,7 @@ void widget::Slider::init(ewol::WidgetManager& _widgetManager) {
const int32_t dotRadius = 6;
widget::Slider::Slider(void) {
addObjectType("widget::Slider");
addEventId(ewolEventSliderChange);
m_value = 0;

View File

@ -42,9 +42,6 @@ namespace widget {
etk::Color<> m_textColorFg; //!< Text color
etk::Color<> m_textColorBg; //!< Background color
public: // Derived function
virtual const char * const getObjectType(void) {
return "widget::Slider";
}
virtual void onDraw(void);
virtual void calculateMinMaxSize(void);
virtual void onRegenerateDisplay(void);

View File

@ -25,6 +25,7 @@ void widget::Spacer::init(ewol::WidgetManager& _widgetManager) {
}
widget::Spacer::Spacer(void) {
addObjectType("widget::Spacer");
m_userMinSize = ewol::Dimension(vec2(10,10));
setCanHaveFocus(false);
m_color = etk::color::black;

View File

@ -44,11 +44,7 @@ namespace widget {
* @param[in] newColor the display background color
*/
void setColor(etk::Color<> _newColor) { m_color = _newColor; markToRedraw(); };
public:
// Derived function
virtual const char * const getObjectType(void) {
return "widget::Spacer";
};
public: // Derived function
virtual ewol::Widget * getWidgetAtPos(const vec2& _pos) { return NULL; };
virtual void onRegenerateDisplay(void);
virtual void onDraw(void);

View File

@ -44,6 +44,7 @@ widget::WSlider::WSlider(void) :
m_slidingProgress(1.0f),
m_transitionSpeed(1.0f),
m_transitionSlide(sladingTransitionHori) {
addObjectType("widget::WSlider");
addEventId(eventStartSlide);
addEventId(eventStopSlide);
// add configuration

View File

@ -89,9 +89,6 @@ namespace widget {
return m_transitionSlide;
};
public: // Derived function
virtual const char * const getObjectType(void) {
return "widget::WSlider";
};
virtual void calculateSize(const vec2& _availlable);
virtual void systemDraw(const ewol::DrawProperty& _displayProp);
virtual void onRegenerateDisplay(void);

View File

@ -117,6 +117,7 @@ ewol::Widget::Widget(void) :
m_needRegenerateDisplay(true),
m_grabCursor(false),
m_cursorDisplay(ewol::cursorArrow) {
addObjectType("ewol::Widget");
// set all the config in the list :
registerConfig(ewol::Widget::configFill, "bvec2", NULL, "Fill the widget available size");
registerConfig(ewol::Widget::configExpand, "bvec2", NULL, "Request the widget Expand size wile space is available");

View File

@ -119,14 +119,6 @@ namespace ewol {
* @brief Destructor of the widget classes
*/
virtual ~Widget(void);
/**
* @brief get the current Object type of the EObject
* @param[in] objectType type description
* @return true if the object is compatible, otherwise false
*/
virtual const char * const getObjectType(void) {
return "ewol::Widget";
};
// ----------------------------------------------------------------------------------------------------------------
// -- Hierarchy management:
// ----------------------------------------------------------------------------------------------------------------

View File

@ -16,6 +16,7 @@
widget::WidgetScrooled::WidgetScrooled(void) {
addObjectType("widget::WidgetScrooled");
m_originScrooled.setValue(0,0);
m_pixelScrolling = 20;
m_highSpeedMode = widget::Scroll::speedModeDisable;
@ -146,6 +147,24 @@ bool widget::WidgetScrooled::onEventInput(const ewol::EventInput& _event) {
return true;
}
}
} else if ( _event.getId() == 11
&& _event.getStatus() == ewol::keyEvent::statusUp) {
// Scrool Left
if(m_size.x() < m_maxSize.x()) {
m_originScrooled.setX(m_originScrooled.x()-m_pixelScrolling);
m_originScrooled.setX(etk_avg(0, m_originScrooled.x(), (m_maxSize.x() - m_size.x()*m_limitScrolling)));
markToRedraw();
return true;
}
} else if ( _event.getId() == 10
&& _event.getStatus() == ewol::keyEvent::statusUp) {
// Scrool Right
if(m_size.x() < m_maxSize.x()) {
m_originScrooled.setX(m_originScrooled.x()+m_pixelScrolling);
m_originScrooled.setX(etk_avg(0, m_originScrooled.x(), (m_maxSize.x() - m_size.x()*m_limitScrolling)));
markToRedraw();
return true;
}
}else if (_event.getId() == 2) {
/*
if (true == ewol::isSetCtrl()) {

View File

@ -47,9 +47,6 @@ namespace widget {
protected: // Derived function
virtual void onDraw(void);
public: // Derived function
virtual const char * const getObjectType(void) {
return "widget::Scrooled";
};
virtual void onRegenerateDisplay(void);
virtual bool onEventInput(const ewol::EventInput& _event);
virtual void systemDraw(const ewol::DrawProperty& _displayProp);

View File

@ -25,6 +25,7 @@ extern const char * const ewolEventWindowsHideKeyboard = "ewol Windows hideKey
ewol::Windows::Windows(void) :
m_backgroundColor(0.750, 0.750, 0.750, 0.5) {
addObjectType("ewol::Windows");
setCanHaveFocus(true);
m_subWidget = NULL;
setDecorationDisable();

View File

@ -70,9 +70,6 @@ namespace ewol {
protected: // Derived function
virtual void systemDraw(const ewol::DrawProperty& _displayProp);
public: // Derived function
virtual const char * const getObjectType(void) {
return "ewol::Windows";
};
virtual void onRegenerateDisplay(void);
virtual void onObjectRemove(ewol::EObject * _removeObject);
virtual void calculateSize(const vec2& _availlable);

View File

@ -34,6 +34,7 @@ const char * const eventColorSpecificHasChange = "event-color-specific-has-c
widget::ColorChooser::ColorChooser(void) :
widget::Sizer(widget::Sizer::modeVert) {
addObjectType("widget::ColorChooser");
addEventId(ewolEventColorChooserChange);
m_widgetColorBar = NULL;
m_widgetRed = NULL;

View File

@ -30,10 +30,6 @@ namespace widget {
ColorChooser(void);
~ColorChooser(void);
// Derived function
virtual const char * const getObjectType(void) {
return "widget::ColorChooser";
};
// Derived function
virtual void onReceiveMessage(const ewol::EMessage& _msg);
// Derived function
virtual void onObjectRemove(ewol::EObject* _removeObject);

View File

@ -44,6 +44,7 @@ extern const char * const ewolEventFileChooserHome = "ewol-event-fil
widget::FileChooser::FileChooser(void) {
addObjectType("widget::FileChooser");
addEventId(eventCancel);
addEventId(eventValidate);

View File

@ -51,9 +51,6 @@ namespace widget {
std::string getCompleateFileName(void);
void updateCurrentFolder(void);
public: // Derived function
virtual const char * const getObjectType(void) {
return "Ewol::fileChooser";
};
virtual void onReceiveMessage(const ewol::EMessage& _msg);
virtual void onObjectRemove(ewol::EObject* _removeObject);
};

View File

@ -32,6 +32,7 @@ widget::Parameter::Parameter(void) :
m_currentIdList(0),
m_widgetTitle(NULL),
m_paramList(NULL) {
addObjectType("widget::Parameter");
addEventId(ewolEventParameterClose);
widget::Sizer * mySizerVert = NULL;

View File

@ -30,15 +30,10 @@ namespace widget {
public:
Parameter(void);
~Parameter(void);
// Derived function
virtual const char * const getObjectType(void) {
return "EwolParameter";
};
// Derived function
public: // Derived function
virtual void onReceiveMessage(const ewol::EMessage& _msg);
// Derived function
virtual void onObjectRemove(ewol::EObject * _removeObject);
public:
void setTitle(std::string _label);
void menuAdd(std::string _label, std::string _image, ewol::Widget* _associateWidget);
void menuAddGroup(std::string _label);

View File

@ -22,6 +22,7 @@ extern const char * const ewolEventParameterListSelect = "ewol-event-paramet
widget::ParameterList::ParameterList(void) {
addObjectType("widget::ParameterList");
addEventId(ewolEventParameterListSelect);
m_idSelected = -1;

View File

@ -63,9 +63,6 @@ namespace widget {
void menuSeparator(void);
public: // Derived function
virtual const char * const getObjectType(void) {
return "widgetParameterList";
};
virtual void onRegenerateDisplay(void);
virtual bool onEventInput(const ewol::EventInput& _event);
virtual void calculateMinMaxSize(void);

View File

@ -22,6 +22,7 @@ widget::StdPopUp::StdPopUp(void) :
m_title(NULL),
m_comment(NULL),
m_subBar(NULL) {
addObjectType("widget::StdPopUp");
setMinSize(ewol::Dimension(vec2(20,10),ewol::Dimension::Pourcent));
widget::Sizer* mySizerVert = NULL;

View File

@ -74,9 +74,6 @@ namespace widget {
*/
widget::Button* addButton(const std::string& _text, bool _autoExit=false);
public: // Derived function
virtual const char * const getObjectType(void) {
return "widget::StdPopUp";
};
virtual void onObjectRemove(ewol::EObject* _removeObject);
virtual void onReceiveMessage(const ewol::EMessage& _msg);
};