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, 18 years ago

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

File size: 1.9 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
[1871]30  std::set< AlgoWin* > aws;
31
[1442]32public:
[1849]33 
34  ///Constructor of the \ref NoteBookTab. It creates the menu and the \ref GraphDisplayerCanvas on which the graph will be drawn.
[1442]35  ///\param title is the title of the window
[1650]36  MainWin();
[1606]37
[1849]38  void set_tabtitle(std::string);
[1442]39
40  ///ActionGroup for menu
41  Glib::RefPtr<Gtk::ActionGroup> ag;
42
43  ///UIManager for menu
44  Glib::RefPtr<Gtk::UIManager> uim;
45
[1849]46  void readFile(const std::string &);
[1442]47
[1601]48  ///Tooltips
49  Gtk::Tooltips tooltips;
50
[1849]51  //Call-backs of buttons
52
[1442]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();
[1606]61  ///Callback for 'Close' action.
62  virtual void close();
[1837]63
[1849]64  //Toolbar
65  virtual void zoomIn();
66  virtual void zoomOut();
67  virtual void zoomFit();
68  virtual void zoom100();
[1837]69
[1849]70  virtual void createMapWin();
[1837]71
[1871]72  virtual void createAlgoWin(int);
73  virtual void deRegisterAlgoWin(AlgoWin *);
74  virtual void updateAlgoWins();
75
[1849]76  virtual void changeEditorialTool(int);
[1837]77
[1849]78  virtual void createNewMapWinAfterSignal(NoteBookTab *, bool);
79  virtual void createNewMapWin();
80
81  //Notebook handlers
82  ///Callback for 'FileNewTab' action.
83  virtual void newTab();
[1856]84  virtual void closeTab();
[1849]85  virtual void onChangeTab(GtkNotebookPage*, guint);
86  virtual void onCloseTab();
87
88
[1442]89};
90
91#endif //MAIN_WIN_H
Note: See TracBrowser for help on using the repository browser.