cout->cerr, node radius and edge width is now scaled, maps are editable by clicking on texts.
4 bool EditWin::closeIfEscapeIsPressed(GdkEventKey* e)
6 if(e->keyval==GDK_Escape)
13 EditWin::EditWin(const std::string& title, GraphDisplayerCanvas & grdispc):gdc(grdispc),table(2, 2, true)
16 set_default_size(200, 50);
18 signal_key_press_event().connect(sigc::mem_fun(*this, &EditWin::closeIfEscapeIsPressed));
21 buttons=new Gtk::RadioButton * [TOOL_NUM];
22 for(int i=0;i<TOOL_NUM;i++)
27 Gtk::RadioButton::Group group;//=buttons[MOVE]->get_group();
30 buttons[CREATE_NODE]=new Gtk::RadioButton("New Node");
31 buttons[CREATE_NODE]->set_mode(false);
32 buttons[CREATE_NODE]->set_group(group);
33 buttons[CREATE_NODE]->signal_clicked().connect
37 sigc::mem_fun(*this, &EditWin::makeEditorialToolChanged),
41 table.attach(*buttons[CREATE_NODE],0,1,0,1);
44 buttons[CREATE_EDGE]=new Gtk::RadioButton("New Edge");
45 buttons[CREATE_EDGE]->set_mode(false);
46 buttons[CREATE_EDGE]->set_group(group);
47 buttons[CREATE_EDGE]->signal_clicked().connect
51 sigc::mem_fun(*this, &EditWin::makeEditorialToolChanged),
55 table.attach(*buttons[CREATE_EDGE],1,2,0,1);
58 buttons[MOVE]=new Gtk::RadioButton("Move");
59 buttons[MOVE]->set_mode(false);
60 buttons[MOVE]->set_group(group);
61 buttons[MOVE]->signal_clicked().connect
65 sigc::mem_fun(*this, &EditWin::makeEditorialToolChanged),
69 table.attach(*buttons[MOVE],0,1,1,2);
72 buttons[ERASER]=new Gtk::RadioButton("Erase Item");
73 buttons[ERASER]->set_mode(false);
74 buttons[ERASER]->set_group(group);
75 buttons[ERASER]->signal_clicked().connect
79 sigc::mem_fun(*this, &EditWin::makeEditorialToolChanged),
83 table.attach(*buttons[ERASER],1,2,1,2);
91 void EditWin::makeEditorialToolChanged(int newtool)
93 gdc.changeEditorialTool(newtool);