gsl-shell.git - gsl-shell

index : gsl-shell.git
gsl-shell
summary refs log tree commit diff
path: root/agg-plot
diff options
context:
space:
mode:
Diffstat (limited to 'agg-plot')
-rw-r--r--agg-plot/window.cpp 18
1 files changed, 18 insertions, 0 deletions
diff --git a/agg-plot/window.cpp b/agg-plot/window.cpp
index 2a01999a..b3987f63 100644
--- a/agg-plot/window.cpp
+++ b/agg-plot/window.cpp
@@ -18,6 +18,7 @@ extern "C" {
__BEGIN_DECLS
+static int window_show (lua_State *L);
static int window_free (lua_State *L);
static int window_split (lua_State *L);
@@ -27,6 +28,7 @@ static const struct luaL_Reg window_functions[] = {
};
static const struct luaL_Reg window_methods[] = {
+ {"show", window_show },
{"attach", window_attach },
{"split", window_split },
{"update", window_update },
@@ -398,11 +400,27 @@ int
window_new (lua_State *L)
{
window *win = push_new_object<window>(L, GS_WINDOW, colors::white);
+ const char *spec = lua_tostring (L, 1);
+
win->start_new_thread (L);
+
+ if (spec)
+ {
+ win->split(spec);
+ }
+
return 1;
}
int
+window_show (lua_State *L)
+{
+ window *win = object_check<window>(L, 1, GS_WINDOW);
+ win->start_new_thread (L);
+ return 0;
+}
+
+int
window_free (lua_State *L)
{
return object_free<window>(L, 1, GS_WINDOW);
generated by cgit v1.2.3 (git 2.25.1) at 2025年09月17日 23:20:10 +0000

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