author | francesco-ST <francesco.abbate@st.com> | 2010年08月12日 15:10:57 +0200 |
---|---|---|
committer | francesco-ST <francesco.abbate@st.com> | 2010年08月12日 15:10:57 +0200 |
commit | 11e74b41cb7712913d55942fdfe32770a5738475 (patch) | |
tree | b3b8caa200ef1af74f01698ffc28fcf500a9c07d /agg-plot/window-cpp.h | |
parent | b55a4cf705a06ef2c9995da4d2784e8d5969ee3e (diff) | |
download | gsl-shell-11e74b41cb7712913d55942fdfe32770a5738475.tar.gz |
-rw-r--r-- | agg-plot/window-cpp.h | 13 |
diff --git a/agg-plot/window-cpp.h b/agg-plot/window-cpp.h index e5d6292e..3f6edf53 100644 --- a/agg-plot/window-cpp.h +++ b/agg-plot/window-cpp.h @@ -30,17 +30,26 @@ class window : public canvas_window { split::node<ref>* m_tree; void draw_rec(split::node<ref> *n); + void cleanup_tree_rec (lua_State *L, int window_index, split::node<ref>* n); public: - window(agg::rgba& bgcol) : canvas_window(bgcol), m_tree(0) {}; + window(agg::rgba& bgcol) : canvas_window(bgcol), m_tree(0) + { + this->split("."); + }; - ~window() { if (m_tree) delete m_tree; }; + ~window() { delete m_tree; }; static window *check (lua_State *L, int index); void split(const char *spec); int attach(lua_plot *plot, const char *spec, int id); + void cleanup_refs(lua_State *L, int window_index) + { + cleanup_tree_rec (L, window_index, m_tree); + }; + void on_draw_unprotected(); virtual void on_draw(); }; |