COIN-OR::LEMON - Graph Library

Changeset 191:af2ed974ab68 in glemon-0.x for main_win.cc


Ignore:
Timestamp:
02/27/07 18:18:19 (13 years ago)
Author:
Hegyi Péter
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/glemon/trunk@3202
Message:

GUI can now export graph to EPS.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main_win.cc

    r190 r191  
    4949  Glib::RefPtr<Gdk::Pixbuf> p_newmap_pixbuf = Gdk::Pixbuf::create_from_inline(
    5050      2328, gui_icons_newmap);
     51  Glib::RefPtr<Gdk::Pixbuf> p_eps_pixbuf = Gdk::Pixbuf::create_from_inline(
     52      2328, gui_icons_eps);
    5153
    5254  Gtk::IconSource move_icon_source;
     
    8587  newmap_icon_set.add_source(newmap_icon_source);
    8688  p_icon_factory->add(Gtk::StockID("gd-newmap"), newmap_icon_set);
     89
     90  Gtk::IconSource eps_icon_source;
     91  eps_icon_source.set_pixbuf(p_eps_pixbuf);
     92  Gtk::IconSet eps_icon_set;
     93  eps_icon_set.add_source(eps_icon_source);
     94  p_icon_factory->add(Gtk::StockID("gd-eps"), eps_icon_set);
    8795
    8896  p_icon_factory->add_default();
     
    152160  ag->add( Gtk::Action::create("DesignGraph", Gtk::Stock::REFRESH),
    153161      sigc::mem_fun ( *this , &MainWin::reDesignGraph ) );
     162
     163  ag->add( Gtk::Action::create("Eps", Gtk::StockID("gd-eps")),
     164      sigc::mem_fun ( *this , &MainWin::exportToEPS ) );
    154165
    155166  uim=Gtk::UIManager::create();
     
    209220      "    <toolitem action='AddMap' />"
    210221      "    <toolitem action='DesignGraph' />"
     222      "    <toolitem action='Eps' />"
    211223      "  </toolbar>"
    212224      "</ui>";
     
    611623}
    612624
     625void MainWin::exportToEPS()
     626{
     627  if(active_tab!=-1)
     628    {
     629      tabs[active_tab]->createExportToEPSWin(tabnames[active_tab]);
     630    }
     631}
     632
    613633void MainWin::createBackgroundChooser()
    614634{
Note: See TracChangeset for help on using the changeset viewer.