35 ag->add( Gtk::Action::create("ShowMaps", "_Maps"), |
35 ag->add( Gtk::Action::create("ShowMaps", "_Maps"), |
36 sigc::mem_fun(*this, &MainWin::showMaps)); |
36 sigc::mem_fun(*this, &MainWin::showMaps)); |
37 ag->add( Gtk::Action::create("ShowEditorials", "_Editorials"), |
37 ag->add( Gtk::Action::create("ShowEditorials", "_Editorials"), |
38 sigc::mem_fun(*this, &MainWin::showEditorials)); |
38 sigc::mem_fun(*this, &MainWin::showEditorials)); |
39 |
39 |
|
40 ag->add( Gtk::Action::create("CreateNode", Gtk::Stock::NO), |
|
41 sigc::bind( sigc::mem_fun ( this->gd_canvas, &GraphDisplayerCanvas::changeEditorialTool ), 1) ); |
|
42 ag->add( Gtk::Action::create("CreateEdge", Gtk::Stock::REMOVE), |
|
43 sigc::bind( sigc::mem_fun ( this->gd_canvas, &GraphDisplayerCanvas::changeEditorialTool ), 2) ); |
|
44 ag->add( Gtk::Action::create("EraseItem", Gtk::Stock::DELETE), |
|
45 sigc::bind( sigc::mem_fun ( this->gd_canvas, &GraphDisplayerCanvas::changeEditorialTool ), 3) ); |
|
46 ag->add( Gtk::Action::create("MoveItem", Gtk::Stock::CONVERT), |
|
47 sigc::bind( sigc::mem_fun ( this->gd_canvas, &GraphDisplayerCanvas::changeEditorialTool ), 0) ); |
|
48 |
40 uim=Gtk::UIManager::create(); |
49 uim=Gtk::UIManager::create(); |
41 uim->insert_action_group(ag); |
50 uim->insert_action_group(ag); |
42 add_accel_group(uim->get_accel_group()); |
51 add_accel_group(uim->get_accel_group()); |
43 |
52 |
44 try |
53 try |
72 " <separator />" |
81 " <separator />" |
73 " <toolitem action='ViewZoomIn' />" |
82 " <toolitem action='ViewZoomIn' />" |
74 " <toolitem action='ViewZoomOut' />" |
83 " <toolitem action='ViewZoomOut' />" |
75 " <toolitem action='ViewZoomFit' />" |
84 " <toolitem action='ViewZoomFit' />" |
76 " <toolitem action='ViewZoom100' />" |
85 " <toolitem action='ViewZoom100' />" |
|
86 " <separator />" |
|
87 " <toolitem action='CreateNode' />" |
|
88 " <toolitem action='CreateEdge' />" |
|
89 " <toolitem action='EraseItem' />" |
|
90 " <toolitem action='MoveItem' />" |
77 " </toolbar>" |
91 " </toolbar>" |
78 "</ui>"; |
92 "</ui>"; |
79 |
93 |
80 uim->add_ui_from_string(ui_info); |
94 uim->add_ui_from_string(ui_info); |
81 |
95 |