Treat split string errors in FOX windows implementation - gsl-shell.git - gsl-shell

index : gsl-shell.git
gsl-shell
summary refs log tree commit diff
path: root/fox-gui/window_surface.cpp
diff options
context:
space:
mode:
authorFrancesco Abbate <francesco.bbt@gmail.com>2012年11月06日 15:55:49 +0100
committerFrancesco Abbate <francesco.bbt@gmail.com>2012年11月06日 15:55:49 +0100
commit096abfe85cc5b961e943fa5970aac4f0dbbda5ab (patch)
treef07404ca910741a28297a9661917371fc860166d /fox-gui/window_surface.cpp
parent870dd15647f1bdc690ea8d0bb7cb13e76568b4cb (diff)
downloadgsl-shell-096abfe85cc5b961e943fa5970aac4f0dbbda5ab.tar.gz
Treat split string errors in FOX windows implementation
Diffstat (limited to 'fox-gui/window_surface.cpp')
-rw-r--r--fox-gui/window_surface.cpp 17
1 files changed, 11 insertions, 6 deletions
diff --git a/fox-gui/window_surface.cpp b/fox-gui/window_surface.cpp
index 9196f7f1..4a018bd9 100644
--- a/fox-gui/window_surface.cpp
+++ b/fox-gui/window_surface.cpp
@@ -5,10 +5,10 @@
#include "fatal.h"
#include "lua-graph.h"
-window_surface::window_surface(display_window* win, const char* split_str):
+window_surface::window_surface(display_window* win):
m_img(), m_save_img(), m_window(win), m_canvas(0)
{
- split(split_str ? split_str : ".");
+ clear_plots_list();
}
window_surface::~window_surface()
@@ -16,17 +16,22 @@ window_surface::~window_surface()
delete m_canvas;
}
-void window_surface::split(const char* split_str)
+void
+window_surface::clear_plots_list()
{
- m_part.parse(split_str);
- m_part.split();
-
m_plots.clear();
plot_ref empty;
for (unsigned k = 0; k < m_part.get_slot_number(); k++)
m_plots.add(empty);
}
+bool window_surface::split(const char* split_str)
+{
+ bool success = m_part.parse(split_str);
+ clear_plots_list();
+ return success;
+}
+
bool window_surface::resize(unsigned ww, unsigned hh)
{
m_save_img.clear();
generated by cgit v1.2.3 (git 2.39.1) at 2025年09月17日 16:52:24 +0000

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