From 2b9942bbec7c8219dcc07563ca1b82a7f9033dbe Mon Sep 17 00:00:00 2001 From: paolo Date: Tue, 5 Sep 2006 23:54:16 +0000 Subject: [PATCH] - test-holt_widget: temporary added an extra holt_widget in container - gui_builder: added an holt_widget in container - Makefile.am: added holt_containr_window accordling git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@1015 3ecf2c5c-341e-0410-92b4-d18e462d057c --- Makefile.am | 2 ++ src/gui_builder.cc | 10 +++++++++- src/gui_builder.hh | 4 ++++ src/testsuite/test-holt_widget.cc | 22 ++++++++++++++++++---- 4 files changed, 33 insertions(+), 5 deletions(-) diff --git a/Makefile.am b/Makefile.am index 3c33728..208a50a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -302,6 +302,7 @@ sgpemv2_SOURCES = \ src/configure_policy_dialog.cc \ src/graphical_preferences_editor.cc \ src/gui_builder.cc \ + src/holt_container_window.cc \ src/holt_widget.cc \ src/main.cc \ src/parse_opts.cc \ @@ -472,6 +473,7 @@ src_testsuite_test_holt_widget_SOURCES = \ src/cairo_elements.cc \ src/cairo_widget.cc \ src/simulation_widget.cc \ + src/holt_container_window.cc \ src/holt_widget.cc \ src/testsuite/test-holt_widget.cc diff --git a/src/gui_builder.cc b/src/gui_builder.cc index 9ad00c2..4ee9b8a 100644 --- a/src/gui_builder.cc +++ b/src/gui_builder.cc @@ -25,6 +25,7 @@ #include "configure_policy_dialog.hh" #include "graphical_preferences_editor.hh" +#include "holt_container_window.hh" #include "holt_widget.hh" #include "schedulables_tree_widget.hh" #include "simulation_widget.hh" @@ -432,7 +433,9 @@ GuiBuilder::on_toggle_simulation_mode() GuiBuilder::GuiBuilder(const std::string& gladefile) - : _refXml(Xml::create(gladefile)), _controller(Simulation::get_instance(), _refXml) + : _refXml(Xml::create(gladefile)), _controller(Simulation::get_instance(), _refXml), + _holt_container(Simulation::get_instance()) + { using namespace Gtk; @@ -535,6 +538,11 @@ GuiBuilder::GuiBuilder(const std::string& gladefile) // HoltWidget& holt = *manage(new HoltWidget(Simulation::get_instance())); // simulation_window->add(holt); // holt.show(); + + // temporary test on holt widget... + _holt_container.set_keep_above(); + // _holt_container.set_deletable(false); + _holt_container.show(); } diff --git a/src/gui_builder.hh b/src/gui_builder.hh index 34ce26c..036db9e 100644 --- a/src/gui_builder.hh +++ b/src/gui_builder.hh @@ -22,6 +22,7 @@ #define GUI_BUILDER_HH 1 #include "config.h" +#include "holt_container_window.hh" #include "simulation_widget.hh" #include "backend/cpu_policy.hh" @@ -68,6 +69,9 @@ namespace sgpem // Used to store the loaded snapshot filename, when !empty std::string _filename; + + HoltContainerWindow _holt_container; + }; } //~ namespace sgpem diff --git a/src/testsuite/test-holt_widget.cc b/src/testsuite/test-holt_widget.cc index 5a8280b..40350c2 100644 --- a/src/testsuite/test-holt_widget.cc +++ b/src/testsuite/test-holt_widget.cc @@ -55,6 +55,7 @@ #include "backend/thread.hh" #include "cairo_elements.hh" #include "cairo_widget.hh" +#include "holt_container_window.hh" #include "holt_widget.hh" #include "simulation_widget.hh" @@ -229,6 +230,13 @@ protected: + + + + + + + // ------------------------------------------------------ // // MainWindow class @@ -274,6 +282,8 @@ protected: Gtk::ScrolledWindow _simulation_scroller; Gtk::ScrolledWindow _holt_scroller; Simulation::state _sim_state; + + HoltContainerWindow _holt_container; }; @@ -291,7 +301,8 @@ MainWindow::MainWindow(Simulation& simulation) _circular_radio("dispose circular"), _simulation_widget(simulation), _holt_widget(simulation), - _sim_state(Simulation::state_stopped) + _sim_state(Simulation::state_stopped), + _holt_container(simulation) { // This just sets the title of our new window. set_title("Holt Graph Widget Test"); @@ -380,6 +391,9 @@ MainWindow::MainWindow(Simulation& simulation) timeout_source->connect(sigc::ptr_fun(&timeout_handler)); timeout_source->attach(Glib::MainContext::get_default()); */ + _holt_container.set_keep_above(); + // _holt_container.set_deletable(false); + _holt_container.show(); } MainWindow::~MainWindow() @@ -534,7 +548,7 @@ Glib::ustring get_simulation_state_name(Simulation::state st); // ------------------------------------------------------ // -// MainWindow class +// program main // // ------------------------------------------------------ @@ -556,8 +570,8 @@ main(int argc, char** argv) History& hist = Simulation::get_instance().get_history(); - ResourcePolicyManager & rpm = *ResourcePoliciesGatekeeper::get_instance().get_registered().at(0); - Simulation::get_instance().set_resource_policy(rpm.get_avail_policies().at(0)); + ResourcePolicyManager & rpm = *ResourcePoliciesGatekeeper::get_instance().get_registered().at(0); + Simulation::get_instance().set_resource_policy(rpm.get_avail_policies().at(0)); info << "gets history \n";