author | hegyi |
Mon, 09 Jan 2006 12:41:06 +0000 | |
changeset 1887 | 22fdc00894aa |
parent 1876 | 5ad84ad1b68f |
child 1889 | edcb68a93a95 |
permissions | -rw-r--r-- |
ladanyi@1442 | 1 |
// -*- C++ -*- // |
ladanyi@1442 | 2 |
|
ladanyi@1442 | 3 |
#ifndef MAIN_WIN_H |
ladanyi@1442 | 4 |
#define MAIN_WIN_H |
ladanyi@1442 | 5 |
|
ladanyi@1606 | 6 |
#include "all_include.h" |
hegyi@1871 | 7 |
#include "algowin.h" |
ladanyi@1606 | 8 |
#include "map_win.h" |
ladanyi@1606 | 9 |
#include "new_map_win.h" |
hegyi@1849 | 10 |
#include "nbtab.h" |
ladanyi@1442 | 11 |
#include <libgnomecanvasmm.h> |
ladanyi@1442 | 12 |
#include <libgnomecanvasmm/polygon.h> |
ladanyi@1442 | 13 |
|
hegyi@1849 | 14 |
|
ladanyi@1442 | 15 |
///This class is the main window of GUI. |
ladanyi@1442 | 16 |
///It has menus, but the main part of it is the canvas. |
ladanyi@1442 | 17 |
class MainWin : public Gtk::Window |
ladanyi@1442 | 18 |
{ |
hegyi@1849 | 19 |
///Container |
hegyi@1849 | 20 |
Gtk::VBox vbox; |
hegyi@1849 | 21 |
|
hegyi@1849 | 22 |
Gtk::Notebook notebook; |
hegyi@1849 | 23 |
|
hegyi@1849 | 24 |
int active_tool; |
hegyi@1849 | 25 |
|
hegyi@1849 | 26 |
int active_tab; |
hegyi@1849 | 27 |
std::vector<NoteBookTab *> tabs; |
hegyi@1849 | 28 |
std::vector<std::string> tabnames; |
hegyi@1849 | 29 |
|
hegyi@1872 | 30 |
std::map<std::string, int> strinst; |
hegyi@1872 | 31 |
|
hegyi@1871 | 32 |
std::set< AlgoWin* > aws; |
hegyi@1871 | 33 |
|
ladanyi@1442 | 34 |
public: |
hegyi@1849 | 35 |
|
hegyi@1849 | 36 |
///Constructor of the \ref NoteBookTab. It creates the menu and the \ref GraphDisplayerCanvas on which the graph will be drawn. |
ladanyi@1442 | 37 |
///\param title is the title of the window |
ladanyi@1650 | 38 |
MainWin(); |
ladanyi@1606 | 39 |
|
hegyi@1849 | 40 |
void set_tabtitle(std::string); |
ladanyi@1442 | 41 |
|
ladanyi@1442 | 42 |
///ActionGroup for menu |
ladanyi@1442 | 43 |
Glib::RefPtr<Gtk::ActionGroup> ag; |
ladanyi@1442 | 44 |
|
ladanyi@1442 | 45 |
///UIManager for menu |
ladanyi@1442 | 46 |
Glib::RefPtr<Gtk::UIManager> uim; |
ladanyi@1442 | 47 |
|
hegyi@1849 | 48 |
void readFile(const std::string &); |
ladanyi@1442 | 49 |
|
hegyi@1601 | 50 |
///Tooltips |
hegyi@1601 | 51 |
Gtk::Tooltips tooltips; |
hegyi@1601 | 52 |
|
hegyi@1849 | 53 |
//Call-backs of buttons |
hegyi@1849 | 54 |
|
ladanyi@1442 | 55 |
///Callback for 'FileNew' action. |
ladanyi@1442 | 56 |
virtual void newFile(); |
ladanyi@1442 | 57 |
///Callback for 'FileOpen' action. |
ladanyi@1442 | 58 |
virtual void openFile(); |
ladanyi@1442 | 59 |
///Callback for 'FileSave' action. |
ladanyi@1442 | 60 |
virtual void saveFile(); |
ladanyi@1442 | 61 |
///Callback for 'FileSaveAs' action. |
ladanyi@1442 | 62 |
virtual void saveFileAs(); |
ladanyi@1606 | 63 |
///Callback for 'Close' action. |
ladanyi@1606 | 64 |
virtual void close(); |
hegyi@1837 | 65 |
|
hegyi@1849 | 66 |
//Toolbar |
hegyi@1849 | 67 |
virtual void zoomIn(); |
hegyi@1849 | 68 |
virtual void zoomOut(); |
hegyi@1849 | 69 |
virtual void zoomFit(); |
hegyi@1849 | 70 |
virtual void zoom100(); |
hegyi@1837 | 71 |
|
hegyi@1849 | 72 |
virtual void createMapWin(); |
hegyi@1837 | 73 |
|
hegyi@1871 | 74 |
virtual void createAlgoWin(int); |
hegyi@1871 | 75 |
virtual void deRegisterAlgoWin(AlgoWin *); |
hegyi@1876 | 76 |
virtual void updateAlgoWinTabs(); |
hegyi@1876 | 77 |
virtual void updateAlgoWinMaps(AlgoWin *, std::string); |
hegyi@1871 | 78 |
|
hegyi@1849 | 79 |
virtual void changeEditorialTool(int); |
hegyi@1837 | 80 |
|
hegyi@1849 | 81 |
virtual void createNewMapWinAfterSignal(NoteBookTab *, bool); |
hegyi@1884 | 82 |
virtual void createNewMapWinTabString(std::string, bool); |
hegyi@1849 | 83 |
virtual void createNewMapWin(); |
hegyi@1849 | 84 |
|
hegyi@1849 | 85 |
//Notebook handlers |
hegyi@1849 | 86 |
///Callback for 'FileNewTab' action. |
hegyi@1849 | 87 |
virtual void newTab(); |
hegyi@1856 | 88 |
virtual void closeTab(); |
hegyi@1849 | 89 |
virtual void onChangeTab(GtkNotebookPage*, guint); |
hegyi@1849 | 90 |
virtual void onCloseTab(); |
hegyi@1849 | 91 |
|
hegyi@1849 | 92 |
|
ladanyi@1442 | 93 |
}; |
ladanyi@1442 | 94 |
|
ladanyi@1442 | 95 |
#endif //MAIN_WIN_H |