]> Shamusworld >> Repos - ttedit/blob - src/global.h
Added rectangle point selection, canvas zooming.
[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
14 enum LineStyle { LSNone, LSSolid, LSDash, LSDot, LSDashDot, LSDashDotDot };
15
16
17 class Global
18 {
19         public:
20                 static double gridSpacing;
21                 static bool selectionInProgress;
22                 static QRectF selection;
23                 static int currentLayer;
24                 static QFont * font;
25                 static Point snapPoint;
26                 static bool snapPointIsValid;
27
28                 static bool fixedAngle;
29                 static bool fixedLength;
30                 static int viewportHeight;
31                 static bool deleteActive;
32                 static bool dimensionActive;
33
34                 static bool snapToGrid;
35                 static bool ignoreClicks;
36                 static bool dontMove;
37                 static uint32_t objectID;
38                 static int tool;
39                 static int toolState;
40
41                 static Point origin;
42                 static double zoom;
43                 static Vector screenSize;
44
45                 static float scale;
46
47                 static Point intersectPoint[16]; // Overkill, yes
48                 static double intersectParam[16]; // Ditto
49                 static int numIntersectPoints;
50                 static int numIntersectParams;
51
52                 static int activeLayer;
53                 static int numLayers;
54                 static std::vector<bool> layerHidden;
55                 static std::vector<bool> layerLocked;
56 };
57
58 #endif  // __GLOBALS_H__
59