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
RevLine 
[1442]1// -*- C++ -*- //
2
3#ifndef MAIN_WIN_H
4#define MAIN_WIN_H
5
[1606]6#include "all_include.h"
7#include "map_win.h"
8#include "new_map_win.h"
[1849]9#include "nbtab.h"
[1442]10#include <libgnomecanvasmm.h>
11#include <libgnomecanvasmm/polygon.h>
12
[1849]13
[1442]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{
[1849]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
[1442]29public:
[1849]30 
31  ///Constructor of the \ref NoteBookTab. It creates the menu and the \ref GraphDisplayerCanvas on which the graph will be drawn.
[1442]32  ///\param title is the title of the window
[1650]33  MainWin();
[1606]34
[1849]35  void set_tabtitle(std::string);
[1442]36
37  ///ActionGroup for menu
38  Glib::RefPtr<Gtk::ActionGroup> ag;
39
40  ///UIManager for menu
41  Glib::RefPtr<Gtk::UIManager> uim;
42
[1849]43  void readFile(const std::string &);
[1442]44
[1601]45  ///Tooltips
46  Gtk::Tooltips tooltips;
47
[1849]48  //Call-backs of buttons
49
[1442]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();
[1606]58  ///Callback for 'Close' action.
59  virtual void close();
[1837]60
[1849]61  //Toolbar
62  virtual void zoomIn();
63  virtual void zoomOut();
64  virtual void zoomFit();
65  virtual void zoom100();
[1837]66
[1849]67  virtual void createMapWin();
[1837]68
[1849]69  virtual void changeEditorialTool(int);
[1837]70
[1849]71  virtual void createNewMapWinAfterSignal(NoteBookTab *, bool);
72  virtual void createNewMapWin();
73
74  //Notebook handlers
75  ///Callback for 'FileNewTab' action.
76  virtual void newTab();
[1856]77  virtual void closeTab();
[1849]78  virtual void onChangeTab(GtkNotebookPage*, guint);
79  virtual void onCloseTab();
80
81
[1442]82};
83
84#endif //MAIN_WIN_H
Note: See TracBrowser for help on using the repository browser.