Changeset 1478:bc7ae573d77d in lemon-0.x for gui/edit_win.cc
- Timestamp:
- 06/13/05 21:49:33 (19 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1958
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gui/edit_win.cc
r1469 r1478 15 15 set_title(title); 16 16 set_default_size(200, 50); 17 17 set_keep_above(true); 18 18 signal_key_press_event().connect(sigc::mem_fun(*this, &EditWin::close_if_escape_is_pressed)); 19 19 20 //buttons array 21 buttons=new (Gtk::RadioButton *) [TOOL_NUM]; 22 for(int i=0;i<TOOL_NUM;i++) 23 { 24 buttons[i]=NULL; 25 } 26 27 Gtk::RadioButton::Group group;//=buttons[MOVE]->get_group(); 28 20 29 //New node button 21 button=new Gtk::Button("New Node"); 22 button->signal_clicked().connect 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 23 34 ( 24 35 sigc::bind … … 28 39 ) 29 40 ); 30 table.attach(*button ,0,1,0,1);41 table.attach(*buttons[CREATE_NODE],0,1,0,1); 31 42 32 43 //New edge button 33 button=new Gtk::Button("New Edge"); 34 button->signal_clicked().connect 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 35 48 ( 36 49 sigc::bind … … 40 53 ) 41 54 ); 42 table.attach(*button ,1,2,0,1);55 table.attach(*buttons[CREATE_EDGE],1,2,0,1); 43 56 44 57 //Move button 45 button=new Gtk::Button("Move"); 46 button->signal_clicked().connect 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 47 62 ( 48 63 sigc::bind … … 52 67 ) 53 68 ); 54 table.attach(*button ,0,1,1,2);55 69 table.attach(*buttons[MOVE],0,1,1,2); 70 56 71 add(table); 57 72
Note: See TracChangeset
for help on using the changeset viewer.