Size of MapWin cannot be changed.
4 bool MapWin::closeIfEscapeIsPressed(GdkEventKey* e)
6 if(e->keyval==GDK_Escape)
14 MapWin::MapWin(const std::string& title, std::vector<std::string> eml, std::vector<std::string> nml, NoteBookTab & mw):mytab(mw)
17 set_default_size(200, 50);
21 signal_key_press_event().connect(sigc::mem_fun(*this, &MapWin::closeIfEscapeIsPressed));
23 e_combo_array=new MapSelector * [EDGE_PROPERTY_NUM];
25 table=new Gtk::Table(EDGE_PROPERTY_NUM, 1, false);
27 for(int i=0;i<EDGE_PROPERTY_NUM;i++)
29 e_combo_array[i]=new MapSelector(eml, mytab.getActiveEdgeMap(i), edge_property_strings[i], true);
31 (*table).attach((*(e_combo_array[i])),0,1,i,i+1,Gtk::SHRINK,Gtk::SHRINK,10,3);
33 e_combo_array[i]->signal_cbt_ch().connect(sigc::bind(sigc::mem_fun(*this, &MapWin::edgeMapChanged), i));
34 e_combo_array[i]->signal_newmapwin_needed().connect(sigc::mem_fun(*this, &MapWin::newMapWinNeeded));
37 vbox.pack_start(*(new Gtk::Label("Edge properties")));
39 vbox.pack_start(*table);
41 vbox.pack_start(*(new Gtk::HSeparator));
43 n_combo_array=new MapSelector * [NODE_PROPERTY_NUM];
45 table=new Gtk::Table(NODE_PROPERTY_NUM, 1, false);
47 for(int i=0;i<NODE_PROPERTY_NUM;i++)
49 n_combo_array[i]=new MapSelector(nml, mytab.getActiveNodeMap(i), node_property_strings[i], false);
51 (*table).attach((*(n_combo_array[i])),0,1,i,i+1,Gtk::SHRINK,Gtk::SHRINK,10,3);
53 n_combo_array[i]->signal_cbt_ch().connect(sigc::bind(sigc::mem_fun(*this, &MapWin::nodeMapChanged), i));
54 n_combo_array[i]->signal_newmapwin_needed().connect(sigc::mem_fun(*this, &MapWin::newMapWinNeeded));
59 vbox.pack_start(*(new Gtk::Label("Node properties")));
61 vbox.pack_start(*table);
67 void MapWin::nodeMapChanged(std::string mapname, int prop)
69 mytab.propertyChange(false, prop, mapname);
72 void MapWin::edgeMapChanged(std::string mapname, int prop)
74 mytab.propertyChange(true, prop, mapname);
77 void MapWin::newMapWinNeeded(bool itisedge)
79 mytab.popupNewMapWin(itisedge);
82 void MapWin::update(std::vector<std::string> eml, std::vector<std::string> nml)
84 for(int i=0;i<EDGE_PROPERTY_NUM;i++)
86 e_combo_array[i]->update_list(eml);
89 for(int i=0;i<NODE_PROPERTY_NUM;i++)
91 n_combo_array[i]->update_list(nml);
95 void MapWin::registerNewEdgeMap(std::string newmapname)
97 for(int i=0;i<EDGE_PROPERTY_NUM;i++)
99 //filling in combo box with choices
100 e_combo_array[i]->append_text((Glib::ustring)newmapname);
104 void MapWin::registerNewNodeMap(std::string newmapname)
106 for(int i=0;i<NODE_PROPERTY_NUM;i++)
108 //filling in combo box with choices
109 n_combo_array[i]->append_text((Glib::ustring)newmapname);
113 bool MapWin::on_delete_event(GdkEventAny * event)