COIN-OR::LEMON - Graph Library

source: lemon-0.x/gui/main_win.h @ 1884:9c061834b33b

Last change on this file since 1884:9c061834b33b was 1884:9c061834b33b, checked in by Hegyi Péter, 18 years ago

In algorithm window maps can be selected and reated through MapSelector? widget.

File size: 2.1 KB
RevLine 
[1442]1// -*- C++ -*- //
2
3#ifndef MAIN_WIN_H
4#define MAIN_WIN_H
5
[1606]6#include "all_include.h"
[1871]7#include "algowin.h"
[1606]8#include "map_win.h"
9#include "new_map_win.h"
[1849]10#include "nbtab.h"
[1442]11#include <libgnomecanvasmm.h>
12#include <libgnomecanvasmm/polygon.h>
13
[1849]14
[1442]15///This class is the main window of GUI.
16///It has menus, but the main part of it is the canvas.
17class MainWin : public Gtk::Window
18{
[1849]19  ///Container
20  Gtk::VBox vbox;
21
22  Gtk::Notebook notebook;
23
24  int active_tool;
25
26  int active_tab;
27  std::vector<NoteBookTab *> tabs;
28  std::vector<std::string> tabnames;
29
[1872]30  std::map<std::string, int> strinst;
31
[1871]32  std::set< AlgoWin* > aws;
33
[1442]34public:
[1849]35 
36  ///Constructor of the \ref NoteBookTab. It creates the menu and the \ref GraphDisplayerCanvas on which the graph will be drawn.
[1442]37  ///\param title is the title of the window
[1650]38  MainWin();
[1606]39
[1849]40  void set_tabtitle(std::string);
[1442]41
42  ///ActionGroup for menu
43  Glib::RefPtr<Gtk::ActionGroup> ag;
44
45  ///UIManager for menu
46  Glib::RefPtr<Gtk::UIManager> uim;
47
[1849]48  void readFile(const std::string &);
[1442]49
[1601]50  ///Tooltips
51  Gtk::Tooltips tooltips;
52
[1849]53  //Call-backs of buttons
54
[1442]55  ///Callback for 'FileNew' action.
56  virtual void newFile();
57  ///Callback for 'FileOpen' action.
58  virtual void openFile();
59  ///Callback for 'FileSave' action.
60  virtual void saveFile();
61  ///Callback for 'FileSaveAs' action.
62  virtual void saveFileAs();
[1606]63  ///Callback for 'Close' action.
64  virtual void close();
[1837]65
[1849]66  //Toolbar
67  virtual void zoomIn();
68  virtual void zoomOut();
69  virtual void zoomFit();
70  virtual void zoom100();
[1837]71
[1849]72  virtual void createMapWin();
[1837]73
[1871]74  virtual void createAlgoWin(int);
75  virtual void deRegisterAlgoWin(AlgoWin *);
[1876]76  virtual void updateAlgoWinTabs();
77  virtual void updateAlgoWinMaps(AlgoWin *, std::string);
[1871]78
[1849]79  virtual void changeEditorialTool(int);
[1837]80
[1849]81  virtual void createNewMapWinAfterSignal(NoteBookTab *, bool);
[1884]82  virtual void createNewMapWinTabString(std::string, bool);
[1849]83  virtual void createNewMapWin();
84
85  //Notebook handlers
86  ///Callback for 'FileNewTab' action.
87  virtual void newTab();
[1856]88  virtual void closeTab();
[1849]89  virtual void onChangeTab(GtkNotebookPage*, guint);
90  virtual void onCloseTab();
91
92
[1442]93};
94
95#endif //MAIN_WIN_H
Note: See TracBrowser for help on using the repository browser.