map_win.cc
branchgui
changeset 54 9128e364fb19
parent 48 b8ec84524fa2
child 62 80eefca04b1e
equal deleted inserted replaced
11:5f615b86f6ea 12:96823bc38731
     1 #include <map_win.h>
     1 #include "map_win.h"
     2 #include <set>
     2 #include <set>
     3 
     3 
     4 bool MapWin::closeIfEscapeIsPressed(GdkEventKey* e)
     4 bool MapWin::closeIfEscapeIsPressed(GdkEventKey* e)
     5 {
     5 {
     6   if(e->keyval==GDK_Escape)
     6   if(e->keyval==GDK_Escape)
   116 
   116 
   117   vbox.pack_start(*table);
   117   vbox.pack_start(*table);
   118 
   118 
   119   show_all_children();
   119   show_all_children();
   120 
   120 
       
   121 }
       
   122 
       
   123 void MapWin::update()
       
   124 {
       
   125   for(int i=0;i<EDGE_PROPERTY_NUM;i++)
       
   126   {
       
   127     //filling in combo box with choices
       
   128     std::list<Glib::ustring> listStrings;
       
   129 
       
   130     listStrings.push_back("Default");
       
   131 
       
   132     std::map< std::string,Graph::EdgeMap<double> * >::iterator emsi=ms.beginOfEdgeMaps();
       
   133     for(;emsi!=ms.endOfEdgeMaps();emsi++)
       
   134     {
       
   135       listStrings.push_back(emsi->first);
       
   136     }
       
   137 
       
   138     e_combo_array[i].set_popdown_strings(listStrings);
       
   139   }
       
   140   for(int i=0;i<NODE_PROPERTY_NUM;i++)
       
   141   {
       
   142     //filling in combo box with choices
       
   143     std::list<Glib::ustring> listStrings;
       
   144 
       
   145     listStrings.push_back("Default");
       
   146 
       
   147     std::map< std::string,Graph::NodeMap<double> * >::iterator emsi=ms.beginOfNodeMaps();
       
   148 
       
   149     for(;emsi!=ms.endOfNodeMaps();emsi++)
       
   150     {
       
   151       listStrings.push_back(emsi->first);
       
   152     }
       
   153 
       
   154     n_combo_array[i].set_popdown_strings(listStrings);
       
   155   }
   121 }
   156 }
   122 
   157 
   123 void MapWin::eComboChanged(int prop)
   158 void MapWin::eComboChanged(int prop)
   124 {
   159 {
   125 
   160