added object index to manage both plot and windows - gsl-shell.git - gsl-shell

index : gsl-shell.git
gsl-shell
summary refs log tree commit diff
path: root/agg-plot/window-cpp.h
diff options
context:
space:
mode:
authorfrancesco-ST <francesco.abbate@st.com>2010年08月12日 11:51:29 +0200
committerfrancesco-ST <francesco.abbate@st.com>2010年08月12日 11:51:29 +0200
commitb55a4cf705a06ef2c9995da4d2784e8d5969ee3e (patch)
treecee3a5404dee2d8a74fb60c0d5daad1985f8b402 /agg-plot/window-cpp.h
parent9529186aacd0d02d6b609cec247ab6b4610fd342 (diff)
downloadgsl-shell-b55a4cf705a06ef2c9995da4d2784e8d5969ee3e.tar.gz
added object index to manage both plot and windows
Now both plot and windows gets an id which is used to manage userdata cross-references.
Diffstat (limited to 'agg-plot/window-cpp.h')
-rw-r--r--agg-plot/window-cpp.h 14
1 files changed, 11 insertions, 3 deletions
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();
generated by cgit v1.2.3 (git 2.39.1) at 2025年09月13日 12:27:37 +0000

AltStyle によって変換されたページ (->オリジナル) /