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) |
7 { |
7 { |
8 hide(); |
8 mainwin.closeMapWin(); |
|
9 // hide(); |
9 } |
10 } |
10 return true; |
11 return true; |
11 } |
12 } |
12 |
13 |
13 MapWin::MapWin(const std::string& title, std::vector<std::string> eml, std::vector<std::string> nml, MainWin & mw):mainwin(mw) |
14 MapWin::MapWin(const std::string& title, std::vector<std::string> eml, std::vector<std::string> nml, MainWin & mw):mainwin(mw) |
21 |
22 |
22 table=new Gtk::Table(EDGE_PROPERTY_NUM, 1, false); |
23 table=new Gtk::Table(EDGE_PROPERTY_NUM, 1, false); |
23 |
24 |
24 for(int i=0;i<EDGE_PROPERTY_NUM;i++) |
25 for(int i=0;i<EDGE_PROPERTY_NUM;i++) |
25 { |
26 { |
26 e_combo_array[i]=new MapSelector(eml, i, true); |
27 e_combo_array[i]=new MapSelector(eml, mainwin.getActiveEdgeMap(i), i, true); |
27 |
28 |
28 (*table).attach((*(e_combo_array[i])),0,1,i,i+1,Gtk::SHRINK,Gtk::SHRINK,10,3); |
29 (*table).attach((*(e_combo_array[i])),0,1,i,i+1,Gtk::SHRINK,Gtk::SHRINK,10,3); |
29 |
30 |
30 e_combo_array[i]->signal_cbt_ch().connect(sigc::bind(sigc::mem_fun(*this, &MapWin::edgeMapChanged), i)); |
31 e_combo_array[i]->signal_cbt_ch().connect(sigc::bind(sigc::mem_fun(*this, &MapWin::edgeMapChanged), i)); |
31 e_combo_array[i]->signal_newmapwin_needed().connect(sigc::bind(sigc::mem_fun(*this, &MapWin::newMapWinNeeded), i)); |
32 e_combo_array[i]->signal_newmapwin_needed().connect(sigc::bind(sigc::mem_fun(*this, &MapWin::newMapWinNeeded), i)); |
41 |
42 |
42 table=new Gtk::Table(NODE_PROPERTY_NUM, 1, false); |
43 table=new Gtk::Table(NODE_PROPERTY_NUM, 1, false); |
43 |
44 |
44 for(int i=0;i<NODE_PROPERTY_NUM;i++) |
45 for(int i=0;i<NODE_PROPERTY_NUM;i++) |
45 { |
46 { |
46 n_combo_array[i]=new MapSelector(nml, i, false); |
47 n_combo_array[i]=new MapSelector(nml, mainwin.getActiveNodeMap(i), i, false); |
47 |
48 |
48 (*table).attach((*(n_combo_array[i])),0,1,i,i+1,Gtk::SHRINK,Gtk::SHRINK,10,3); |
49 (*table).attach((*(n_combo_array[i])),0,1,i,i+1,Gtk::SHRINK,Gtk::SHRINK,10,3); |
49 |
50 |
50 n_combo_array[i]->signal_cbt_ch().connect(sigc::bind(sigc::mem_fun(*this, &MapWin::nodeMapChanged), i)); |
51 n_combo_array[i]->signal_cbt_ch().connect(sigc::bind(sigc::mem_fun(*this, &MapWin::nodeMapChanged), i)); |
51 n_combo_array[i]->signal_newmapwin_needed().connect(sigc::bind(sigc::mem_fun(*this, &MapWin::newMapWinNeeded), i)); |
52 n_combo_array[i]->signal_newmapwin_needed().connect(sigc::bind(sigc::mem_fun(*this, &MapWin::newMapWinNeeded), i)); |