changes plot updates mechanism to use win-plot-refs - gsl-shell.git - gsl-shell

index : gsl-shell.git
gsl-shell
summary refs log tree commit diff
path: root/agg-plot/window.cpp
diff options
context:
space:
mode:
authorfrancesco-ST <francesco.abbate@st.com>2010年08月25日 15:49:10 +0200
committerfrancesco-ST <francesco.abbate@st.com>2010年08月25日 15:49:10 +0200
commit57eff12fb29f77f919d12de2550d5e1484c4ff4a (patch)
treecfb418cbe90d12a698b0ec7d4b5f7e0a13cd592f /agg-plot/window.cpp
parent29a9dbd5af79c3c80749efaf09fb8240482ff5b5 (diff)
downloadgsl-shell-57eff12fb29f77f919d12de2550d5e1484c4ff4a.tar.gz
changes plot updates mechanism to use win-plot-refs
Now the plot does not store a window ID any more. When an update of the plot is needed a reverse lookup is made in the window-plot refs table to find all the windows that references the given plot and asking the to update the slot. The net results of this change is that: - all the windows that contains the plot are automatically updated - the lua_plot class is now virtually a simple "plot" class - the lookup mechanisms could be slower because we need to search the windows by inspecting some lua tables Added also the missing 'show' method for plots.
Diffstat (limited to 'agg-plot/window.cpp')
-rw-r--r--agg-plot/window.cpp 7
1 files changed, 0 insertions, 7 deletions
diff --git a/agg-plot/window.cpp b/agg-plot/window.cpp
index 5c9a2bb6..7d10e346 100644
--- a/agg-plot/window.cpp
+++ b/agg-plot/window.cpp
@@ -17,10 +17,8 @@ extern "C" {
__BEGIN_DECLS
-static int window_new (lua_State *L);
static int window_free (lua_State *L);
static int window_split (lua_State *L);
-static int window_attach (lua_State *L);
static const struct luaL_Reg window_functions[] = {
{"window", window_new},
@@ -304,13 +302,8 @@ window_attach (lua_State *L)
if (slot_id >= 0)
{
- plot->window_id = win->id;
- plot->slot_id = slot_id;
-
win->draw_slot(slot_id, true);
-
win->unlock();
-
window_plot_ref_add (L, slot_id, 1, 2);
}
else
generated by cgit v1.2.3 (git 2.39.1) at 2025年09月26日 19:22:03 +0000

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