1.1 --- a/gui/edit_win.cc Mon Jun 13 17:21:55 2005 +0000
1.2 +++ b/gui/edit_win.cc Mon Jun 13 19:49:33 2005 +0000
1.3 @@ -14,12 +14,23 @@
1.4 {
1.5 set_title(title);
1.6 set_default_size(200, 50);
1.7 -
1.8 + set_keep_above(true);
1.9 signal_key_press_event().connect(sigc::mem_fun(*this, &EditWin::close_if_escape_is_pressed));
1.10
1.11 + //buttons array
1.12 + buttons=new (Gtk::RadioButton *) [TOOL_NUM];
1.13 + for(int i=0;i<TOOL_NUM;i++)
1.14 + {
1.15 + buttons[i]=NULL;
1.16 + }
1.17 +
1.18 + Gtk::RadioButton::Group group;//=buttons[MOVE]->get_group();
1.19 +
1.20 //New node button
1.21 - button=new Gtk::Button("New Node");
1.22 - button->signal_clicked().connect
1.23 + buttons[CREATE_NODE]=new Gtk::RadioButton("New Node");
1.24 + buttons[CREATE_NODE]->set_mode(false);
1.25 + buttons[CREATE_NODE]->set_group(group);
1.26 + buttons[CREATE_NODE]->signal_clicked().connect
1.27 (
1.28 sigc::bind
1.29 (
1.30 @@ -27,11 +38,13 @@
1.31 1
1.32 )
1.33 );
1.34 - table.attach(*button,0,1,0,1);
1.35 + table.attach(*buttons[CREATE_NODE],0,1,0,1);
1.36
1.37 //New edge button
1.38 - button=new Gtk::Button("New Edge");
1.39 - button->signal_clicked().connect
1.40 + buttons[CREATE_EDGE]=new Gtk::RadioButton("New Edge");
1.41 + buttons[CREATE_EDGE]->set_mode(false);
1.42 + buttons[CREATE_EDGE]->set_group(group);
1.43 + buttons[CREATE_EDGE]->signal_clicked().connect
1.44 (
1.45 sigc::bind
1.46 (
1.47 @@ -39,11 +52,13 @@
1.48 2
1.49 )
1.50 );
1.51 - table.attach(*button,1,2,0,1);
1.52 + table.attach(*buttons[CREATE_EDGE],1,2,0,1);
1.53
1.54 //Move button
1.55 - button=new Gtk::Button("Move");
1.56 - button->signal_clicked().connect
1.57 + buttons[MOVE]=new Gtk::RadioButton("Move");
1.58 + buttons[MOVE]->set_mode(false);
1.59 + buttons[MOVE]->set_group(group);
1.60 + buttons[MOVE]->signal_clicked().connect
1.61 (
1.62 sigc::bind
1.63 (
1.64 @@ -51,8 +66,8 @@
1.65 0
1.66 )
1.67 );
1.68 - table.attach(*button,0,1,1,2);
1.69 -
1.70 + table.attach(*buttons[MOVE],0,1,1,2);
1.71 +
1.72 add(table);
1.73
1.74 show_all_children();