[DEBUG] set the system rework corectly (step 5)
This commit is contained in:
parent
f52a6919e3
commit
d5d2297e7f
2
build
2
build
@ -1 +1 @@
|
|||||||
Subproject commit fbdf561438abd90fc713b6395d56784a33a76067
|
Subproject commit 8fd16ebb053e581abae3d839b06bce63ffa69ab3
|
2
external/egami
vendored
2
external/egami
vendored
@ -1 +1 @@
|
|||||||
Subproject commit 48f276df25855e091535c14639eb45b22e15acdb
|
Subproject commit a2ec749e8e34a40de57c714117dbaa4d0272de11
|
2
external/ege
vendored
2
external/ege
vendored
@ -1 +1 @@
|
|||||||
Subproject commit c213ebb32b1379fc601ef8ee9adcecebb15ea04d
|
Subproject commit 7f28ae22f21f223ff8f6776af70189f86ae715a8
|
@ -13,7 +13,7 @@
|
|||||||
#define __class__ "ConfigFont"
|
#define __class__ "ConfigFont"
|
||||||
|
|
||||||
ewol::ConfigFont::ConfigFont(void) :
|
ewol::ConfigFont::ConfigFont(void) :
|
||||||
m_folder("DATA::fonts"),
|
m_folder("DATA:fonts"),
|
||||||
m_name("Arial;Helvetica"),
|
m_name("Arial;Helvetica"),
|
||||||
m_size(10),
|
m_size(10),
|
||||||
m_useExternal(false)
|
m_useExternal(false)
|
||||||
|
@ -22,6 +22,22 @@ ewol::EObjectManager::EObjectManager(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
ewol::EObjectManager::~EObjectManager(void)
|
ewol::EObjectManager::~EObjectManager(void)
|
||||||
|
{
|
||||||
|
bool hasError = false;
|
||||||
|
if (m_eObjectAutoRemoveList.Size()!=0) {
|
||||||
|
EWOL_ERROR("Must not have anymore eObject to auto-remove !!!");
|
||||||
|
hasError = true;
|
||||||
|
}
|
||||||
|
if (m_eObjectList.Size()!=0) {
|
||||||
|
EWOL_ERROR("Must not have anymore eObject !!!");
|
||||||
|
hasError = true;
|
||||||
|
}
|
||||||
|
if (true==hasError) {
|
||||||
|
EWOL_ERROR("Check if the function UnInit has been called !!!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void ewol::EObjectManager::UnInit(void)
|
||||||
{
|
{
|
||||||
EWOL_DEBUG("==> Un-Init EObject-Manager");
|
EWOL_DEBUG("==> Un-Init EObject-Manager");
|
||||||
RemoveAllAutoRemove();
|
RemoveAllAutoRemove();
|
||||||
|
@ -23,6 +23,11 @@ namespace ewol
|
|||||||
public:
|
public:
|
||||||
EObjectManager(void);
|
EObjectManager(void);
|
||||||
~EObjectManager(void);
|
~EObjectManager(void);
|
||||||
|
/**
|
||||||
|
* @brief remove all resources (un-init) out of the destructor (due to the system implementation)
|
||||||
|
*/
|
||||||
|
void UnInit(void);
|
||||||
|
|
||||||
void Add(ewol::EObject* _object);
|
void Add(ewol::EObject* _object);
|
||||||
void Rm(ewol::EObject* _object);
|
void Rm(ewol::EObject* _object);
|
||||||
int32_t GetNumberObject(void);
|
int32_t GetNumberObject(void);
|
||||||
|
@ -296,6 +296,9 @@ ewol::eContext::~eContext(void)
|
|||||||
// unset all windows
|
// unset all windows
|
||||||
m_windowsCurrent = NULL;
|
m_windowsCurrent = NULL;
|
||||||
m_msgSystem.Clean();
|
m_msgSystem.Clean();
|
||||||
|
|
||||||
|
m_EObjectManager.UnInit();
|
||||||
|
m_resourceManager.UnInit();
|
||||||
// release the curent interface :
|
// release the curent interface :
|
||||||
UnLockContext();
|
UnLockContext();
|
||||||
EWOL_INFO("==> Ewol System Un-Init (END)");
|
EWOL_INFO("==> Ewol System Un-Init (END)");
|
||||||
@ -505,12 +508,13 @@ bool ewol::eContext::OS_Draw(bool _displayEveryTime)
|
|||||||
return hasDisplayDone;
|
return hasDisplayDone;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
void ewol::eContext::OnObjectRemove(ewol::EObject * removeObject)
|
void ewol::eContext::OnObjectRemove(ewol::EObject * _removeObject)
|
||||||
{
|
{
|
||||||
m_managementInput.OnObjectRemove(removeObject);
|
//EWOL_CRITICAL("element removed");
|
||||||
|
m_input.OnObjectRemove(_removeObject);
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
|
||||||
void ewol::eContext::ResetIOEvent(void)
|
void ewol::eContext::ResetIOEvent(void)
|
||||||
{
|
{
|
||||||
|
@ -162,9 +162,7 @@ namespace ewol
|
|||||||
* @param[in] removeObject Pointer on the EObject removed ==> the user must remove all reference on this EObject
|
* @param[in] removeObject Pointer on the EObject removed ==> the user must remove all reference on this EObject
|
||||||
* @note : Sub classes must call this class
|
* @note : Sub classes must call this class
|
||||||
*/
|
*/
|
||||||
void OnObjectRemove(ewol::EObject * removeObject) {
|
void OnObjectRemove(ewol::EObject * removeObject);
|
||||||
// TODO : I did not remember what I must do ...
|
|
||||||
};
|
|
||||||
/**
|
/**
|
||||||
* @brief reset event management for the IO like Input ou Mouse or keyborad
|
* @brief reset event management for the IO like Input ou Mouse or keyborad
|
||||||
*/
|
*/
|
||||||
|
@ -27,6 +27,21 @@ ewol::ResourceManager::ResourceManager(void) :
|
|||||||
}
|
}
|
||||||
|
|
||||||
ewol::ResourceManager::~ResourceManager(void)
|
ewol::ResourceManager::~ResourceManager(void)
|
||||||
|
{
|
||||||
|
bool hasError = false;
|
||||||
|
if (m_resourceListToUpdate.Size()!=0) {
|
||||||
|
EWOL_ERROR("Must not have anymore resources to update !!!");
|
||||||
|
hasError = true;
|
||||||
|
}
|
||||||
|
if (m_resourceList.Size()!=0) {
|
||||||
|
EWOL_ERROR("Must not have anymore resources !!!");
|
||||||
|
hasError = true;
|
||||||
|
}
|
||||||
|
if (true==hasError) {
|
||||||
|
EWOL_ERROR("Check if the function UnInit has been called !!!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
void ewol::ResourceManager::UnInit(void)
|
||||||
{
|
{
|
||||||
Display();
|
Display();
|
||||||
m_resourceListToUpdate.Clear();
|
m_resourceListToUpdate.Clear();
|
||||||
@ -43,6 +58,7 @@ ewol::ResourceManager::~ResourceManager(void)
|
|||||||
m_resourceList.Clear();
|
m_resourceList.Clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void ewol::ResourceManager::Display(void)
|
void ewol::ResourceManager::Display(void)
|
||||||
{
|
{
|
||||||
EWOL_INFO("Resources loaded : ");
|
EWOL_INFO("Resources loaded : ");
|
||||||
|
@ -40,6 +40,10 @@ namespace ewol
|
|||||||
* @note when not free ==> generate warning, because the segfault can appear after...
|
* @note when not free ==> generate warning, because the segfault can appear after...
|
||||||
*/
|
*/
|
||||||
~ResourceManager(void);
|
~ResourceManager(void);
|
||||||
|
/**
|
||||||
|
* @brief remove all resources (un-init) out of the destructor (due to the system implementation)
|
||||||
|
*/
|
||||||
|
void UnInit(void);
|
||||||
/**
|
/**
|
||||||
* @brief Display in the log all the resources loaded ...
|
* @brief Display in the log all the resources loaded ...
|
||||||
*/
|
*/
|
||||||
|
@ -259,30 +259,34 @@ void ewol::WidgetManager::AddWidgetCreator(const etk::UString& _name, ewol::Widg
|
|||||||
if (NULL==_pointer) {
|
if (NULL==_pointer) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (true==m_creatorList.Exist(_name)) {
|
//Keep name in lower case :
|
||||||
EWOL_WARNING("Replace Creator of a specify widget : " << _name);
|
etk::UString nameLower = _name.ToLower();
|
||||||
m_creatorList[_name] = _pointer;
|
if (true==m_creatorList.Exist(nameLower)) {
|
||||||
|
EWOL_WARNING("Replace Creator of a specify widget : " << nameLower);
|
||||||
|
m_creatorList[nameLower] = _pointer;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
EWOL_INFO("Add Creator of a specify widget : " << _name);
|
EWOL_INFO("Add Creator of a specify widget : " << nameLower);
|
||||||
m_creatorList.Add(_name, _pointer);
|
m_creatorList.Add(nameLower, _pointer);
|
||||||
}
|
}
|
||||||
|
|
||||||
ewol::Widget* ewol::WidgetManager::Create(const etk::UString& _name)
|
ewol::Widget* ewol::WidgetManager::Create(const etk::UString& _name)
|
||||||
{
|
{
|
||||||
if (true==m_creatorList.Exist(_name)) {
|
etk::UString nameLower = _name.ToLower();
|
||||||
ewol::WidgetManager::creator_tf pointerFunction = m_creatorList[_name];
|
if (true==m_creatorList.Exist(nameLower)) {
|
||||||
|
ewol::WidgetManager::creator_tf pointerFunction = m_creatorList[nameLower];
|
||||||
if (NULL != pointerFunction) {
|
if (NULL != pointerFunction) {
|
||||||
return pointerFunction();
|
return pointerFunction();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
EWOL_WARNING("try to create an UnExistant widget : " << _name);
|
EWOL_WARNING("try to create an UnExistant widget : " << nameLower);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ewol::WidgetManager::Exist(const etk::UString& _name)
|
bool ewol::WidgetManager::Exist(const etk::UString& _name)
|
||||||
{
|
{
|
||||||
return m_creatorList.Exist(_name);
|
etk::UString nameLower = _name.ToLower();
|
||||||
|
return m_creatorList.Exist(nameLower);
|
||||||
}
|
}
|
||||||
|
|
||||||
etk::UString ewol::WidgetManager::List(void)
|
etk::UString ewol::WidgetManager::List(void)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user