]> Shamusworld >> Repos - ttedit/blobdiff - src/global.cpp
Added rectangle point selection, canvas zooming.
[ttedit] / src / global.cpp
diff --git a/src/global.cpp b/src/global.cpp
new file mode 100644 (file)
index 0000000..ad562ee
--- /dev/null
@@ -0,0 +1,51 @@
+//
+// This page intentionally left (mostly) blank
+//
+
+#include "global.h"
+#include <QFont>
+//#include "structs.h"
+#include "toolwindow.h"
+
+// Initialize static variables
+
+bool Global::fixedAngle = false;
+bool Global::fixedLength = false;
+QFont * Global::font = 0;
+int Global::viewportHeight = 0;
+
+bool Global::deleteActive = false;
+bool Global::dimensionActive = false;
+bool Global::snapToGrid = true;
+
+//snapToPoints all well here?
+bool Global::ignoreClicks = false;
+bool Global::dontMove = false;
+bool Global::selectionInProgress = false;
+QRectF Global::selection;
+
+int Global::tool = TOOLSelect;
+//int Global::toolState = TSNone;
+
+double Global::gridSpacing;
+int Global::currentLayer = 0;
+Point Global::snapPoint;
+bool Global::snapPointIsValid = false;
+uint32_t Global::objectID = 1;
+
+Vector Global::origin(-10.0, -10.0);
+double Global::zoom = 1.0;
+Vector Global::screenSize(200.0, 200.0);
+
+float Global::scale = 0.5;
+
+Point Global::intersectPoint[16]; // Overkill, yes
+double Global::intersectParam[16]; // Ditto
+int Global::numIntersectPoints = 0;
+int Global::numIntersectParams = 0;
+
+int Global::activeLayer = 0;
+int Global::numLayers = 1;
+std::vector<bool> Global::layerHidden;
+std::vector<bool> Global::layerLocked;
+