added window show method plus modification in window initialization - 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 Abbate <francesco.bbt@gmail.com>2010年09月18日 13:29:55 +0200
committerFrancesco Abbate <francesco.bbt@gmail.com>2010年09月18日 13:29:55 +0200
commitc6bb452d9c23ccf7b5512a7564854a1e321a54b2 (patch)
tree7aebe1fcc46bd1228685c6e290bb999601612231 /agg-plot/window.cpp
parenta9280fa9c09179eedf8e2177a72ecd06e15813aa (diff)
downloadgsl-shell-c6bb452d9c23ccf7b5512a7564854a1e321a54b2.tar.gz
added window show method plus modification in window initialization
Diffstat (limited to 'agg-plot/window.cpp')
-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.39.1) at 2025年09月13日 10:59:58 +0000

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