COIN-OR::LEMON - Graph Library

Changeset 57:1f158566c3bf in glemon-0.x


Ignore:
Timestamp:
08/07/05 20:06:41 (19 years ago)
Author:
Akos Ladanyi
Branch:
gui
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk/gui@2123
Message:

open file from command line

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • graph-displayer.cc

    r53 r57  
    4444
    4545  MainWin mainwin("Displayed Graph");
     46
     47  if ((argc == 2) && (Glib::file_test(argv[1], Glib::FILE_TEST_IS_REGULAR)))
     48  {
     49    mainwin.readFile(argv[1]);
     50  }
     51 
    4652  app.run(mainwin);
    4753
  • main_win.cc

    r56 r57  
    134134}
    135135
     136void MainWin::readFile(const std::string &file)
     137{
     138  mapstorage.readFromFile(file);
     139  mapstorage.file_name = file;
     140  mapstorage.modified = false;
     141  gd_canvas.drawGraph();
     142  mapwin.update();
     143}
     144
    136145void MainWin::newFile()
    137146{
  • main_win.h

    r54 r57  
    2222
    2323  MapStorage mapstorage;
     24
     25  void readFile(const std::string &);
    2426
    2527protected:
Note: See TracChangeset for help on using the changeset viewer.