COIN-OR::LEMON - Graph Library

source: glemon-0.x/main_win.h @ 96:e664d8aa3f72

gui
Last change on this file since 96:e664d8aa3f72 was 96:e664d8aa3f72, checked in by Hegyi Péter, 18 years ago

Notebook style is provided. Without opportunity to close tabs. :-) But with all other necessary things (I think).

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