branch | gui |
changeset 83 | 6c0db51a1d99 |
parent 81 | 5ad61c33487c |
child 85 | 0b2217328320 |
15:0fb25aee4581 | 16:1933cdbafb33 |
---|---|
8 hide(); |
8 hide(); |
9 } |
9 } |
10 return true; |
10 return true; |
11 } |
11 } |
12 |
12 |
13 MapWin::MapWin(const std::string& title, MapStorage & mapst, GraphDisplayerCanvas & grdispc):gdc(grdispc),ms(mapst) |
13 MapWin::MapWin(const std::string& title, MapStorage & mapst, GraphDisplayerCanvas & grdispc, NewMapWin & newmapwin):gdc(grdispc),ms(mapst), nmw(newmapwin) |
14 { |
14 { |
15 set_title(title); |
15 set_title(title); |
16 set_default_size(200, 50); |
16 set_default_size(200, 50); |
17 |
17 |
18 signal_key_press_event().connect(sigc::mem_fun(*this, &MapWin::closeIfEscapeIsPressed)); |
18 signal_key_press_event().connect(sigc::mem_fun(*this, &MapWin::closeIfEscapeIsPressed)); |
21 |
21 |
22 table=new Gtk::Table(EDGE_PROPERTY_NUM, 1, false); |
22 table=new Gtk::Table(EDGE_PROPERTY_NUM, 1, false); |
23 |
23 |
24 for(int i=0;i<EDGE_PROPERTY_NUM;i++) |
24 for(int i=0;i<EDGE_PROPERTY_NUM;i++) |
25 { |
25 { |
26 e_combo_array[i]=new MapSelector(gdc, ms, *this, i, true); |
26 e_combo_array[i]=new MapSelector(gdc, ms, nmw, i, true); |
27 |
27 |
28 (*table).attach((*(e_combo_array[i])),0,1,i,i+1,Gtk::SHRINK,Gtk::SHRINK,10,3); |
28 (*table).attach((*(e_combo_array[i])),0,1,i,i+1,Gtk::SHRINK,Gtk::SHRINK,10,3); |
29 } |
29 } |
30 |
30 |
31 vbox.pack_start(*(new Gtk::Label("Edge properties"))); |
31 vbox.pack_start(*(new Gtk::Label("Edge properties"))); |
38 |
38 |
39 table=new Gtk::Table(NODE_PROPERTY_NUM, 1, false); |
39 table=new Gtk::Table(NODE_PROPERTY_NUM, 1, false); |
40 |
40 |
41 for(int i=0;i<NODE_PROPERTY_NUM;i++) |
41 for(int i=0;i<NODE_PROPERTY_NUM;i++) |
42 { |
42 { |
43 n_combo_array[i]=new MapSelector(gdc, ms, *this, i, false); |
43 n_combo_array[i]=new MapSelector(gdc, ms, nmw, i, false); |
44 |
44 |
45 (*table).attach((*(n_combo_array[i])),0,1,i,i+1,Gtk::SHRINK,Gtk::SHRINK,10,3); |
45 (*table).attach((*(n_combo_array[i])),0,1,i,i+1,Gtk::SHRINK,Gtk::SHRINK,10,3); |
46 } |
46 } |
47 |
47 |
48 add(vbox); |
48 add(vbox); |
99 void MapWin::registerNewNodeMap(std::string newmapname) |
99 void MapWin::registerNewNodeMap(std::string newmapname) |
100 { |
100 { |
101 for(int i=0;i<NODE_PROPERTY_NUM;i++) |
101 for(int i=0;i<NODE_PROPERTY_NUM;i++) |
102 { |
102 { |
103 //filling in combo box with choices |
103 //filling in combo box with choices |
104 e_combo_array[i]->append_text((Glib::ustring)newmapname); |
104 n_combo_array[i]->append_text((Glib::ustring)newmapname); |
105 } |
105 } |
106 //setting text property for the new map |
106 //setting text property for the new map |
107 n_combo_array[N_TEXT]->set_active_text((Glib::ustring)newmapname); |
107 n_combo_array[N_TEXT]->set_active_text((Glib::ustring)newmapname); |
108 } |
108 } |