[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"
|
||||
|
||||
ewol::ConfigFont::ConfigFont(void) :
|
||||
m_folder("DATA::fonts"),
|
||||
m_folder("DATA:fonts"),
|
||||
m_name("Arial;Helvetica"),
|
||||
m_size(10),
|
||||
m_useExternal(false)
|
||||
|
@ -22,6 +22,22 @@ 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");
|
||||
RemoveAllAutoRemove();
|
||||
|
@ -23,6 +23,11 @@ namespace ewol
|
||||
public:
|
||||
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 Rm(ewol::EObject* _object);
|
||||
int32_t GetNumberObject(void);
|
||||
|
@ -296,6 +296,9 @@ ewol::eContext::~eContext(void)
|
||||
// unset all windows
|
||||
m_windowsCurrent = NULL;
|
||||
m_msgSystem.Clean();
|
||||
|
||||
m_EObjectManager.UnInit();
|
||||
m_resourceManager.UnInit();
|
||||
// release the curent interface :
|
||||
UnLockContext();
|
||||
EWOL_INFO("==> Ewol System Un-Init (END)");
|
||||
@ -505,12 +508,13 @@ bool ewol::eContext::OS_Draw(bool _displayEveryTime)
|
||||
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)
|
||||
{
|
||||
|
@ -162,9 +162,7 @@ namespace ewol
|
||||
* @param[in] removeObject Pointer on the EObject removed ==> the user must remove all reference on this EObject
|
||||
* @note : Sub classes must call this class
|
||||
*/
|
||||
void OnObjectRemove(ewol::EObject * removeObject) {
|
||||
// TODO : I did not remember what I must do ...
|
||||
};
|
||||
void OnObjectRemove(ewol::EObject * removeObject);
|
||||
/**
|
||||
* @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)
|
||||
{
|
||||
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();
|
||||
m_resourceListToUpdate.Clear();
|
||||
@ -43,6 +58,7 @@ ewol::ResourceManager::~ResourceManager(void)
|
||||
m_resourceList.Clear();
|
||||
}
|
||||
|
||||
|
||||
void ewol::ResourceManager::Display(void)
|
||||
{
|
||||
EWOL_INFO("Resources loaded : ");
|
||||
|
@ -40,6 +40,10 @@ namespace ewol
|
||||
* @note when not free ==> generate warning, because the segfault can appear after...
|
||||
*/
|
||||
~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 ...
|
||||
*/
|
||||
|
@ -259,30 +259,34 @@ void ewol::WidgetManager::AddWidgetCreator(const etk::UString& _name, ewol::Widg
|
||||
if (NULL==_pointer) {
|
||||
return;
|
||||
}
|
||||
if (true==m_creatorList.Exist(_name)) {
|
||||
EWOL_WARNING("Replace Creator of a specify widget : " << _name);
|
||||
m_creatorList[_name] = _pointer;
|
||||
//Keep name in lower case :
|
||||
etk::UString nameLower = _name.ToLower();
|
||||
if (true==m_creatorList.Exist(nameLower)) {
|
||||
EWOL_WARNING("Replace Creator of a specify widget : " << nameLower);
|
||||
m_creatorList[nameLower] = _pointer;
|
||||
return;
|
||||
}
|
||||
EWOL_INFO("Add Creator of a specify widget : " << _name);
|
||||
m_creatorList.Add(_name, _pointer);
|
||||
EWOL_INFO("Add Creator of a specify widget : " << nameLower);
|
||||
m_creatorList.Add(nameLower, _pointer);
|
||||
}
|
||||
|
||||
ewol::Widget* ewol::WidgetManager::Create(const etk::UString& _name)
|
||||
{
|
||||
if (true==m_creatorList.Exist(_name)) {
|
||||
ewol::WidgetManager::creator_tf pointerFunction = m_creatorList[_name];
|
||||
etk::UString nameLower = _name.ToLower();
|
||||
if (true==m_creatorList.Exist(nameLower)) {
|
||||
ewol::WidgetManager::creator_tf pointerFunction = m_creatorList[nameLower];
|
||||
if (NULL != pointerFunction) {
|
||||
return pointerFunction();
|
||||
}
|
||||
}
|
||||
EWOL_WARNING("try to create an UnExistant widget : " << _name);
|
||||
EWOL_WARNING("try to create an UnExistant widget : " << nameLower);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user