]> Shamusworld >> Repos - ttedit/blob - src/global.h
Added preview window to file loading dialog. :-)
[ttedit] / src / global.h
1 #ifndef __GLOBALS_H__
2 #define __GLOBALS_H__
3
4 // Global variable class. Note that all vars are class vars, so we don't have
5 // to do any instantiation shite--it's treated as a namespace.
6
7 #include <stdint.h>
8 #include <vector>
9 #include <QRectF>
10 #include "vector.h"
11
12 class QFont;
13 class CharWindow;
14 class MainWindow;
15
16 enum LineStyle { LSNone, LSSolid, LSDash, LSDot, LSDashDot, LSDashDotDot };
17
18
19 class Global
20 {
21         public:
22                 static double gridSpacing;
23                 static bool selectionInProgress;
24                 static QRectF selection;
25                 static int currentLayer;
26                 static QFont * font;
27                 static Point snapPoint;
28                 static bool snapPointIsValid;
29
30                 static bool fixedAngle;
31                 static bool fixedLength;
32                 static int viewportHeight;
33                 static bool deleteActive;
34                 static bool dimensionActive;
35
36                 static bool snapToGrid;
37                 static bool ignoreClicks;
38                 static bool dontMove;
39                 static uint32_t objectID;
40                 static int tool;
41                 static int toolState;
42
43                 static Point origin;
44                 static double zoom;
45                 static Vector screenSize;
46
47                 static float scale;
48
49                 static Point intersectPoint[16]; // Overkill, yes
50                 static double intersectParam[16]; // Ditto
51                 static int numIntersectPoints;
52                 static int numIntersectParams;
53
54                 static int activeLayer;
55                 static int numLayers;
56                 static std::vector<bool> layerHidden;
57                 static std::vector<bool> layerLocked;
58
59                 static CharWindow * charWnd;
60                 static MainWindow * mainWindow;
61 };
62
63 #endif  // __GLOBALS_H__
64