COIN-OR::LEMON - Graph Library

Changeset 1478:bc7ae573d77d in lemon-0.x for gui/edit_win.cc


Ignore:
Timestamp:
06/13/05 21:49:33 (15 years ago)
Author:
Hegyi Péter
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1958
Message:

Known bugs are eliminated from gui, and new ones are created by changing tool selectors to special radiobuttons, and by adding edgecreation-canceller function (right-click on any group element).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gui/edit_win.cc

    r1469 r1478  
    1515  set_title(title);
    1616  set_default_size(200, 50);
    17 
     17  set_keep_above(true);
    1818  signal_key_press_event().connect(sigc::mem_fun(*this, &EditWin::close_if_escape_is_pressed));
    1919 
     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
    2029  //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
    2334    (
    2435     sigc::bind
     
    2839      )
    2940     );
    30   table.attach(*button,0,1,0,1);
     41  table.attach(*buttons[CREATE_NODE],0,1,0,1);
    3142
    3243  //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
    3548    (
    3649     sigc::bind
     
    4053      )
    4154     );
    42   table.attach(*button,1,2,0,1);
     55  table.attach(*buttons[CREATE_EDGE],1,2,0,1);
    4356   
    4457  //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
    4762    (
    4863     sigc::bind
     
    5267      )
    5368     );
    54   table.attach(*button,0,1,1,2);
    55    
     69  table.attach(*buttons[MOVE],0,1,1,2);
     70     
    5671  add(table);
    5772
Note: See TracChangeset for help on using the changeset viewer.