Introduce a flag to create a window without showing it - gsl-shell.git - gsl-shell

index : gsl-shell.git
gsl-shell
summary refs log tree commit diff
path: root/agg-plot/lua-plot.cpp
diff options
context:
space:
mode:
authorFrancesco Abbate <francesco.bbt@gmail.com>2012年11月09日 14:11:57 +0100
committerFrancesco Abbate <francesco.bbt@gmail.com>2012年11月09日 14:11:57 +0100
commit018813c6e5f2b1d7e1809cde0ebae790d57aa3fd (patch)
tree09f2712a8572eeb9de45dc63df5c45d43baa6007 /agg-plot/lua-plot.cpp
parent096abfe85cc5b961e943fa5970aac4f0dbbda5ab (diff)
downloadgsl-shell-018813c6e5f2b1d7e1809cde0ebae790d57aa3fd.tar.gz
Introduce a flag to create a window without showing it
Diffstat (limited to 'agg-plot/lua-plot.cpp')
-rw-r--r--agg-plot/lua-plot.cpp 23
1 files changed, 18 insertions, 5 deletions
diff --git a/agg-plot/lua-plot.cpp b/agg-plot/lua-plot.cpp
index 1999f7cc..42961d46 100644
--- a/agg-plot/lua-plot.cpp
+++ b/agg-plot/lua-plot.cpp
@@ -494,11 +494,24 @@ plot_flush (lua_State *L)
int
plot_show (lua_State *L)
{
- lua_pushcfunction (L, app_window_hooks->attach);
- (*app_window_hooks->create)(L);
- lua_pushvalue (L, 1);
- lua_pushstring (L, "");
- lua_call (L, 3, 0);
+ /* create a window without shouwing it */
+ lua_pushcfunction(L, app_window_hooks->create);
+ lua_pushstring(L, ".");
+ lua_pushboolean(L, 1);
+ lua_call(L, 2, 1);
+
+ /* attach the plot to the window */
+ lua_pushcfunction(L, app_window_hooks->attach);
+ lua_pushvalue(L, 2);
+ lua_pushvalue(L, 1);
+ lua_pushstring(L, "");
+ lua_call(L, 3, 0);
+
+ /* show the window */
+ lua_pushcfunction(L, app_window_hooks->show);
+ lua_pushvalue(L, 2);
+ lua_call(L, 1, 0);
+
return 0;
}
generated by cgit v1.2.3 (git 2.39.1) at 2025年09月12日 14:24:05 +0000

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