Documentation fixes
[vlp.git] / src / edit / editor.h
1 #ifndef _VLP_EDITOR_H
2 #define _VLP_EDITOR_H
3
4 #include <QtGui/QTextEdit>
5 #include <QtGui/QMainWindow>
6 #include <QtGui/QLineEdit>
7 #include <QtGui/QPushButton>
8 #include <QtGui/QLabel>
9
10 #include "ui/editor.h"
11
12 /**
13  * @file
14  */
15
16 namespace loglan {
17 namespace vlp {
18
19 #define COMP_MODE       1
20 #define GEN_MODE        2
21 #define ALL_MODE        3
22
23 typedef struct {
24         char name[255];
25         char filename[255];
26 } FuncEntry;
27
28 typedef struct {
29         QList<FuncEntry> dictionary;
30         QStringList names;
31         char name[255];
32 } CategoryEntry;
33
34 class Editor : public QMainWindow, private Ui::EditorWindow {
35         Q_OBJECT
36 public:
37         QString compiler_path;
38         QString gen_path;
39         QString file_path;
40
41         Editor(int argc, char **argv);
42         ~Editor();
43
44         void compile(int mode);
45
46 public:
47         void load(const char *fileName);
48         void save(const char *fileName);
49 private:
50         QString fname;
51         QString find_text;
52         bool sensitive;
53         char HomeDir[255];
54
55 private slots:
56         void on_actionNew_triggered();
57         void on_actionOpen_triggered();
58         void on_actionSave_triggered();
59         void on_actionSave_as_triggered();
60         void on_actionQuit_triggered();
61         void on_actionCopy_triggered();
62         void on_actionPaste_triggered();
63         void on_actionCut_triggered();
64         void on_actionClear_all_triggered();
65         void on_actionFind_triggered();
66         void on_actionFind_Next_triggered();
67         void on_actionPreferences_triggered();
68
69         void on_actionCompile_triggered();
70         void on_actionGen_triggered();
71         void on_actionCompile_Gen_triggered();
72
73         void on_actionProgram_structure_triggered();
74         void on_actionUnit_structure_triggered();
75
76
77         void on_editor_cursorPositionChanged();
78 };
79
80 }
81 }
82
83 #endif // _VLP_EDITOR_H