author | Francesco Abbate <francesco.bbt@gmail.com> | 2012年11月06日 15:55:49 +0100 |
---|---|---|
committer | Francesco Abbate <francesco.bbt@gmail.com> | 2012年11月06日 15:55:49 +0100 |
commit | 096abfe85cc5b961e943fa5970aac4f0dbbda5ab (patch) | |
tree | f07404ca910741a28297a9661917371fc860166d /fox-gui/window_surface.cpp | |
parent | 870dd15647f1bdc690ea8d0bb7cb13e76568b4cb (diff) | |
download | gsl-shell-096abfe85cc5b961e943fa5970aac4f0dbbda5ab.tar.gz |
-rw-r--r-- | fox-gui/window_surface.cpp | 17 |
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(); |