COIN-OR::LEMON - Graph Library

source: glemon-0.x/main_win.h @ 103:3a263e57e1d9

gui
Last change on this file since 103:3a263e57e1d9 was 103:3a263e57e1d9, checked in by Hegyi Péter, 20 years ago

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

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