COIN-OR::LEMON - Graph Library

source: lemon-0.x/gui/main_win.h @ 1862:d47ebd34e581

Last change on this file since 1862:d47ebd34e581 was 1856:3f0558065bcd, checked in by Hegyi Péter, 18 years ago

Notebook tabs can be closed.

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