summaryrefslogtreecommitdiff
path: root/src/interface/Window.h
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2012-04-09 11:40:30 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-04-09 11:40:30 (GMT)
commitb2907798f28b4acce5b024f025e7b96079f53338 (patch)
treeb331b195c491344afc48d61da4db730fc2ae817a /src/interface/Window.h
parentda9cec2c3bbf0ff46642ffbbf918d3afa513069a (diff)
downloadpowder-b2907798f28b4acce5b024f025e7b96079f53338.zip
powder-b2907798f28b4acce5b024f025e7b96079f53338.tar.gz
Fix issue where unborn children were slaughtered when removing a component from an event
Diffstat (limited to 'src/interface/Window.h')
-rw-r--r--src/interface/Window.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/interface/Window.h b/src/interface/Window.h
index 5fb5eec..4e705f0 100644
--- a/src/interface/Window.h
+++ b/src/interface/Window.h
@@ -58,6 +58,9 @@ enum ChromeStyle
virtual void DoKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt);
virtual void DoKeyRelease(int key, Uint16 character, bool shift, bool ctrl, bool alt);
+ //Sets halt and destroy, this causes the Windows to stop sending events and remove itself.
+ void SelfDestruct();
+
bool IsFocused(const Component* c) const;
void FocusComponent(Component* c);
@@ -79,6 +82,11 @@ enum ChromeStyle
Component* focusedComponent_;
ChromeStyle chrome;
+ //These controls allow a component to call the destruction of the Window inside an event (called by the Window)
+ void finalise();
+ bool halt;
+ bool destruct;
+
};