00001 #include "ModuleWindow.h"
00002
00003 ModuleWindow *ModuleWindow::m_instance = NULL;
00004
00005 ModuleWindow::ModuleWindow()
00006 {
00007 set_title("Modules");
00008 set_border_width(5);
00009
00010 add(m_notebook);
00011
00012 m_notebook.set_border_width(10);
00013 show_all();
00014 }
00015
00016 ModuleWindow* ModuleWindow::getInstance()
00017 {
00018 if (m_instance == NULL) {
00019 m_instance = new ModuleWindow;
00020 }
00021 return m_instance;
00022 }
00023
00024 void ModuleWindow::destroy()
00025 {
00026 if (m_instance != NULL) {
00027 delete m_instance;
00028 m_instance = NULL;
00029 }
00030 }
00031
00032 void ModuleWindow::registerTab(std::string name, Gtk::ScrolledWindow &gui)
00033 {
00034 m_notebook.append_page(gui, name);
00035 }
00036
00037 void ModuleWindow::unregisterTab(Gtk::ScrolledWindow &gui)
00038 {
00039 m_notebook.remove_page(gui);
00040 }
00041