diff options
Diffstat (limited to 'gui/gui-manager.h')
-rw-r--r-- | gui/gui-manager.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gui/gui-manager.h b/gui/gui-manager.h index 4dc9af95fb..82a8aa9cfd 100644 --- a/gui/gui-manager.h +++ b/gui/gui-manager.h @@ -27,6 +27,7 @@ #include "common/singleton.h" #include "common/stack.h" #include "common/str.h" +#include "common/list.h" #include "gui/ThemeEngine.h" @@ -44,6 +45,7 @@ namespace GUI { class Dialog; class ThemeEval; +class GuiObject; #define g_gui (GUI::GuiManager::instance()) @@ -99,6 +101,13 @@ public: */ bool checkScreenChange(); + /** + * Tell the GuiManager to delete the given GuiObject later. If a parent + * dialog is provided and is present in the DialogStack, the object will + * only be deleted when that dialog is the top level dialog. + */ + void addToTrash(GuiObject*, Dialog* parent = 0); + bool _launched; protected: @@ -137,6 +146,13 @@ protected: int _cursorAnimateTimer; byte _cursor[2048]; + // delayed deletion of GuiObject + struct GuiObjectTrashItem { + GuiObject* object; + Dialog* parent; + }; + Common::List<GuiObjectTrashItem> _guiObjectTrash; + void initKeymap(); void pushKeymap(); void popKeymap(); |