summaryrefslogtreecommitdiff
path: root/include/widgets.h
diff options
context:
space:
mode:
authorpixel <pixel>2006-02-01 18:32:25 +0000
committerpixel <pixel>2006-02-01 18:32:25 +0000
commitaac581d00d4efa8c3b03fd802f22457d4127e23f (patch)
treee71267006aa6cd3e7a7e314d8e4ee5c4d367288e /include/widgets.h
parent97b4a5904a989e216b1fbb4d0a55b7340bd7f88a (diff)
Adding widgets new/delete scheduling - avoiding multithreading glitches.
Diffstat (limited to 'include/widgets.h')
-rw-r--r--include/widgets.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/include/widgets.h b/include/widgets.h
index 109f623..e46a226 100644
--- a/include/widgets.h
+++ b/include/widgets.h
@@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-/* $Id: widgets.h,v 1.14 2006-01-31 17:02:39 pixel Exp $ */
+/* $Id: widgets.h,v 1.15 2006-02-01 18:32:25 pixel Exp $ */
#ifndef __WIDGETS_H__
#define __WIDGETS_H__
@@ -49,7 +49,7 @@ namespace mogltk {
};
class widget : public Base {
public:
- virtual ~widget();
+ virtual ~widget() throw (GeneralException);
virtual void move(int x, int y);
virtual void resize(int sx, int sy);
int GetX();
@@ -113,12 +113,17 @@ namespace mogltk {
Uint32 t;
};
static std::vector<timed_event> timed_events;
+ static std::vector<widget *> add_list;
+ static std::vector<widget *> del_list;
+ static bool in_delete_loop;
void computeabs();
void idraw();
bool ievent(int x, int y, event_t event);
void icomputeabs();
void iresize_notify();
+
+ void linkme();
};
namespace widgets {
@@ -385,7 +390,7 @@ namespace mogltk {
virtual void do_action(mogltk::widget *) {
if (a)
a->do_action(parent);
- delete parent;
+ parent->delete_me();
delete this;
}
private: