COIN-OR::LEMON - Graph Library

source: lemon-0.x/gui/main_win.h @ 1871:3905d347112c

Last change on this file since 1871:3905d347112c was 1871:3905d347112c, checked in by Hegyi Péter, 14 years ago

Coding of Algorithms has begun, but code is really-really ugly yet.

File size: 1.9 KB
Line 
1// -*- C++ -*- //
2
3#ifndef MAIN_WIN_H
4#define MAIN_WIN_H
5
6#include "all_include.h"
7#include "algowin.h"
8#include "map_win.h"
9#include "new_map_win.h"
10#include "nbtab.h"
11#include <libgnomecanvasmm.h>
12#include <libgnomecanvasmm/polygon.h>
13
14
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{
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
30  std::set< AlgoWin* > aws;
31
32public:
33 
34  ///Constructor of the \ref NoteBookTab. It creates the menu and the \ref GraphDisplayerCanvas on which the graph will be drawn.
35  ///\param title is the title of the window
36  MainWin();
37
38  void set_tabtitle(std::string);
39
40  ///ActionGroup for menu
41  Glib::RefPtr<Gtk::ActionGroup> ag;
42
43  ///UIManager for menu
44  Glib::RefPtr<Gtk::UIManager> uim;
45
46  void readFile(const std::string &);
47
48  ///Tooltips
49  Gtk::Tooltips tooltips;
50
51  //Call-backs of buttons
52
53  ///Callback for 'FileNew' action.
54  virtual void newFile();
55  ///Callback for 'FileOpen' action.
56  virtual void openFile();
57  ///Callback for 'FileSave' action.
58  virtual void saveFile();
59  ///Callback for 'FileSaveAs' action.
60  virtual void saveFileAs();
61  ///Callback for 'Close' action.
62  virtual void close();
63
64  //Toolbar
65  virtual void zoomIn();
66  virtual void zoomOut();
67  virtual void zoomFit();
68  virtual void zoom100();
69
70  virtual void createMapWin();
71
72  virtual void createAlgoWin(int);
73  virtual void deRegisterAlgoWin(AlgoWin *);
74  virtual void updateAlgoWins();
75
76  virtual void changeEditorialTool(int);
77
78  virtual void createNewMapWinAfterSignal(NoteBookTab *, bool);
79  virtual void createNewMapWin();
80
81  //Notebook handlers
82  ///Callback for 'FileNewTab' action.
83  virtual void newTab();
84  virtual void closeTab();
85  virtual void onChangeTab(GtkNotebookPage*, guint);
86  virtual void onCloseTab();
87
88
89};
90
91#endif //MAIN_WIN_H
Note: See TracBrowser for help on using the repository browser.