main_win.cc
changeset 160 14a76109b561
parent 158 aa50a64b3a6e
child 162 aaa517c9dc23
     1.1 --- a/main_win.cc	Mon Oct 09 08:06:31 2006 +0000
     1.2 +++ b/main_win.cc	Thu Oct 12 11:39:29 2006 +0000
     1.3 @@ -99,6 +99,8 @@
     1.4    ag->add( Gtk::Action::create("ShowMenu", _("_Show")) );
     1.5    ag->add( Gtk::Action::create("ShowMaps", _("_Maps")),
     1.6  	   sigc::mem_fun(*this, &MainWin::createMapWin));
     1.7 +  ag->add( Gtk::Action::create("ShowDesign", _("_Design")),
     1.8 +	   sigc::mem_fun(*this, &MainWin::createDesignWin));
     1.9  
    1.10    ag->add( Gtk::Action::create("AlgoMenu", _("_Algorithms")) );
    1.11    ag->add( Gtk::Action::create("AlgoGeneral", _("_General")),
    1.12 @@ -122,6 +124,9 @@
    1.13    ag->add( Gtk::Action::create("AddMap", Gtk::StockID("gd-newmap")),
    1.14        sigc::mem_fun ( *this , &MainWin::createNewMapWin ) );
    1.15  
    1.16 +  ag->add( Gtk::Action::create("DesignGraph", Gtk::Stock::REFRESH),
    1.17 +      sigc::mem_fun ( *this , &MainWin::reDesignGraph ) );
    1.18 +
    1.19    uim=Gtk::UIManager::create();
    1.20    uim->insert_action_group(ag);
    1.21    add_accel_group(uim->get_accel_group());
    1.22 @@ -149,6 +154,7 @@
    1.23        "    </menu>"
    1.24        "    <menu action='ShowMenu'>"
    1.25        "      <menuitem action='ShowMaps'/>"
    1.26 +      "      <menuitem action='ShowDesign'/>"
    1.27        "    </menu>"
    1.28        "    <menu action='AlgoMenu'>"
    1.29        "      <menuitem action='AlgoGeneral'/>"
    1.30 @@ -173,6 +179,7 @@
    1.31        "    <toolitem action='EditEdgeMap' />"
    1.32        "    <separator />"
    1.33        "    <toolitem action='AddMap' />"
    1.34 +      "    <toolitem action='DesignGraph' />"
    1.35        "  </toolbar>"
    1.36        "</ui>";
    1.37  
    1.38 @@ -448,6 +455,14 @@
    1.39      }
    1.40  }
    1.41  
    1.42 +void MainWin::createDesignWin()
    1.43 +{
    1.44 +  if(active_tab!=-1)
    1.45 +    {
    1.46 +      tabs[active_tab]->createDesignWin(tabnames[active_tab]);
    1.47 +    }
    1.48 +}
    1.49 +
    1.50  void MainWin::createAlgoWin(int algoid)
    1.51  {
    1.52    AlgoWin * aw=new AlgoWin(algoid, tabnames);
    1.53 @@ -536,3 +551,8 @@
    1.54    bool autoscale=auto_scale->get_active();
    1.55    tabs[active_tab]->setView(autoscale, zoomtrack, width, radius);
    1.56  }
    1.57 +
    1.58 +void MainWin::reDesignGraph()
    1.59 +{
    1.60 +  tabs[active_tab]->reDesignGraph();
    1.61 +}