COIN-OR::LEMON - Graph Library

Changeset 156:c5cdf6690cdf in glemon-0.x for main_win.cc


Ignore:
Timestamp:
09/28/06 16:32:40 (18 years ago)
Author:
Hegyi Péter
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/glemon/trunk@2961
Message:

Zoom tracking of nodes is implemented and is switchable.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main_win.cc

    r155 r156  
    200200
    201201  }
    202 
    203   auto_scale= new Gtk::CheckButton("Autoscale");
     202 
     203  table2.set_row_spacings(10);
     204  table2.set_col_spacings(5);
     205
     206  auto_scale = new Gtk::CheckButton("Autoscale");
    204207  auto_scale->set_active(false);
    205208  auto_scale->signal_toggled().connect(sigc::mem_fun(*this, &MainWin::nodeViewChanged));
    206 
    207   table2.set_row_spacings(10);
    208   table2.set_col_spacings(5);
    209 
    210209  table2.attach(*auto_scale, 0,2,0,1);
    211  
     210
    212211  Gtk::Label * unit_label= new Gtk::Label("Unit:");
    213212//   table2.attach(*unit_label, 2,3,0,1);
     
    236235  radius_max->signal_value_changed().connect(sigc::mem_fun(*this, &MainWin::nodeViewChanged));
    237236  table2.attach(*radius_max, 3,4,1,2);
     237
     238  zoom_track = new Gtk::CheckButton("Zoom tracking");
     239  zoom_track->set_active(false);
     240  zoom_track->signal_toggled().connect(sigc::mem_fun(*this, &MainWin::nodeViewChanged));
     241  table2.attach(*zoom_track, 2,4,0,1);
     242
    238243
    239244  //vbox.pack_start(hbox, Gtk::PACK_SHRINK);
     
    363368  set_title(tabnames[active_tab]);
    364369  bool autoscale;
     370  bool zoomtrack;
    365371  double min;
    366372  double max;
    367373  double unit;
    368   tabs[active_tab]->getNodeView(autoscale, min, max, unit);
     374  tabs[active_tab]->getNodeView(autoscale, zoomtrack, min, max, unit);
    369375  radius_min->set_value(min);
    370376  radius_max->set_value(max);
    371377  radius_unit->set_value(unit);
     378  zoom_track->set_active(zoomtrack);
    372379  auto_scale->set_active(autoscale);
    373380
     
    540547  double max=radius_max->get_value();
    541548  double unit=radius_unit->get_value();
     549  bool zoomtrack=zoom_track->get_active();
    542550  bool autoscale=auto_scale->get_active();
    543   tabs[active_tab]->setNodeView(autoscale, min, max, unit);
    544 }
     551  tabs[active_tab]->setNodeView(autoscale, zoomtrack, min, max, unit);
     552}
Note: See TracChangeset for help on using the changeset viewer.