removed plot index and plot id mechanisms - gsl-shell.git - gsl-shell

index : gsl-shell.git
gsl-shell
summary refs log tree commit diff
diff options
context:
space:
mode:
authorfrancesco-ST <francesco.abbate@st.com>2010年08月25日 11:09:52 +0200
committerfrancesco-ST <francesco.abbate@st.com>2010年08月25日 11:09:52 +0200
commit29a9dbd5af79c3c80749efaf09fb8240482ff5b5 (patch)
tree649b5ca2d64736acaef19ba9025e88ae872c54b3
parente175b9208a1e5a2eaa1889c1f3a3bab6897a4aff (diff)
downloadgsl-shell-29a9dbd5af79c3c80749efaf09fb8240482ff5b5.tar.gz
removed plot index and plot id mechanisms
Diffstat
-rw-r--r--agg-plot/lua-plot-cpp.h 4
-rw-r--r--agg-plot/lua-plot.cpp 2
-rw-r--r--object-index.c 12
-rw-r--r--object-index.h 6
4 files changed, 7 insertions, 17 deletions
diff --git a/agg-plot/lua-plot-cpp.h b/agg-plot/lua-plot-cpp.h
index a9cfb45a..1c3f52c0 100644
--- a/agg-plot/lua-plot-cpp.h
+++ b/agg-plot/lua-plot-cpp.h
@@ -19,7 +19,7 @@ private:
plot_type m_plot;
public:
- lua_plot() : m_plot(), window_id(-1), id(-1) { };
+ lua_plot() : m_plot(), window_id(-1) { };
void update_window(lua_State *L);
@@ -29,8 +29,6 @@ public:
int window_id;
int slot_id;
-
- int id;
};
#endif
diff --git a/agg-plot/lua-plot.cpp b/agg-plot/lua-plot.cpp
index cdde089c..0f28020b 100644
--- a/agg-plot/lua-plot.cpp
+++ b/agg-plot/lua-plot.cpp
@@ -124,8 +124,6 @@ plot_new (lua_State *L)
p->self().set_title(title);
}
- p->id = object_index_add (L, OBJECT_PLOT, -1);
-
return 1;
}
diff --git a/object-index.c b/object-index.c
index 7fb1e262..fab7830e 100644
--- a/object-index.c
+++ b/object-index.c
@@ -4,22 +4,13 @@
#include "object-index.h"
-#warning OBJECT_PLOT is no longer used
-static const char *table_name[] = {"GSL.reg.wins", "GSL.reg.plts"};
+static const char *table_name[] = {"GSL.reg.wins"};
void
object_index_prepare (lua_State *L)
{
lua_newtable (L);
lua_setfield (L, LUA_REGISTRYINDEX, table_name[OBJECT_WINDOW]);
-
- lua_newtable (L);
- /* the metatable to define it as a weak table */
- lua_newtable (L);
- lua_pushstring (L, "v");
- lua_setfield (L, -2, "__mode");
- lua_setmetatable (L, -2);
- lua_setfield (L, LUA_REGISTRYINDEX, table_name[OBJECT_PLOT]);
}
int
@@ -66,7 +57,6 @@ object_index_apply_all (lua_State *L, int obj_class, lua_CFunction f)
lua_pushnil (L); /* first key */
while (lua_next(L, -2) != 0)
{
- /* lua_pushcfunction (L, canvas_window_close_protected); */
lua_pushcfunction (L, f);
lua_insert (L, -2);
lua_call (L, 1, 0);
diff --git a/object-index.h b/object-index.h
index db1db84f..dd19c3f6 100644
--- a/object-index.h
+++ b/object-index.h
@@ -7,9 +7,13 @@ __BEGIN_DECLS
#include "lua.h"
+/* We have currently just one class of objects that have a unique ID, windows.
+ At some moments during development this machinary was also used for plots.
+ Because we have just one object type that get an id the code could be
+ potentially simplified. */
enum object_class_e {
OBJECT_WINDOW = 0,
- OBJECT_PLOT,
+ /* OBJECT_PLOT, */
};
extern void object_index_prepare (lua_State *L);
generated by cgit v1.2.3 (git 2.39.1) at 2025年09月27日 12:02:49 +0000

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