author | francesco-ST <francesco.abbate@st.com> | 2010年08月12日 11:51:29 +0200 |
---|---|---|
committer | francesco-ST <francesco.abbate@st.com> | 2010年08月12日 11:51:29 +0200 |
commit | b55a4cf705a06ef2c9995da4d2784e8d5969ee3e (patch) | |
tree | cee3a5404dee2d8a74fb60c0d5daad1985f8b402 /agg-plot/window-cpp.h | |
parent | 9529186aacd0d02d6b609cec247ab6b4610fd342 (diff) | |
download | gsl-shell-b55a4cf705a06ef2c9995da4d2784e8d5969ee3e.tar.gz |
-rw-r--r-- | agg-plot/window-cpp.h | 14 |
diff --git a/agg-plot/window-cpp.h b/agg-plot/window-cpp.h index 44beaa30..e5d6292e 100644 --- a/agg-plot/window-cpp.h +++ b/agg-plot/window-cpp.h @@ -19,9 +19,17 @@ extern "C" { class window : public canvas_window { typedef plot<drawable, lua_management> plot_type; - split::node<plot_type*>* m_tree; + struct ref { + plot_type *plot; + int id; - void draw_rec(split::node<plot_type*> *n); + ref() : plot(0), id(-1) {}; + ref(plot_type *p, int _id) : plot(p), id(_id) {}; + }; + + split::node<ref>* m_tree; + + void draw_rec(split::node<ref> *n); public: window(agg::rgba& bgcol) : canvas_window(bgcol), m_tree(0) {}; @@ -31,7 +39,7 @@ public: static window *check (lua_State *L, int index); void split(const char *spec); - bool attach(lua_plot *plot, const char *spec); + int attach(lua_plot *plot, const char *spec, int id); void on_draw_unprotected(); virtual void on_draw(); |