X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fstructs.h;h=daa5127046fbd4fc895ceecc9ccf99473e3b2b5b;hb=e06428cc60e07d9ef33af8b559d60f23894130fb;hp=1bbfc3fdc589fc3ed619808f8be390c5bd725a0c;hpb=8d80165e3ab9173b8689b3b3420b40bf3020161f;p=architektonas diff --git a/src/structs.h b/src/structs.h index 1bbfc3f..daa5127 100644 --- a/src/structs.h +++ b/src/structs.h @@ -13,6 +13,8 @@ enum DimensionType { DTLinear, DTLinearVert, DTLinearHorz, DTRadial, DTDiametric enum ToolType { TTNone, TTLine, TTCircle, TTEllipse, TTArc, TTDimension, TTText, TTPolygon, TTSpline, TTRotate, TTMirror, TTTrim, TTTriangulate, TTDelete }; +enum ToolState { TSNone, TSPoint1, TSPoint2, TSDone }; + #define OBJECT_COMMON \ int type; \ uint32_t id; \ @@ -33,7 +35,7 @@ struct Line { Line(): type(OTLine), id(Global::objectID++) {} Line(Vector pt1, Vector pt2, float th = 1.0, uint32_t c = 0, int l = LSSolid): type(OTLine), id(Global::objectID++), layer(0), color(c), thickness(th), - style(l), selected(false), hovered(false), p1(pt1), p2(pt2) {} + style(l), selected(false), hovered(false), hitObject(false), p1(pt1), p2(pt2) {} }; struct Circle { @@ -43,7 +45,7 @@ struct Circle { Circle(Vector pt1, double r, float th = 1.0, uint32_t c = 0, int l = LSSolid): type(OTCircle), id(Global::objectID++), layer(0), color(c), thickness(th), - style(l), selected(false), hovered(false), p1(pt1), radius(r) {} + style(l), selected(false), hovered(false), hitObject(false), p1(pt1), radius(r) {} }; struct Ellipse { @@ -55,7 +57,7 @@ struct Ellipse { Ellipse(Vector pt1, Vector pt2, double r1, double r2, float th = 1.0, uint32_t c = 0, int l = LSSolid): type(OTEllipse), id(Global::objectID++), layer(0), color(c), thickness(th), - style(l), selected(false), hovered(false), p1(pt1), p2(pt2), radius1(r1), radius2(r2) {} + style(l), selected(false), hovered(false), hitObject(false), p1(pt1), p2(pt2), radius1(r1), radius2(r2) {} }; struct Arc { @@ -67,7 +69,7 @@ struct Arc { Arc(Vector pt1, double r, double a1, double a2, float th = 1.0, uint32_t c = 0, int l = LSSolid): type(OTArc), id(Global::objectID++), layer(0), color(c), thickness(th), - style(l), selected(false), hovered(false), p1(pt1), radius(r), angle1(a1), angle2(a2) {} + style(l), selected(false), hovered(false), hitObject(false), p1(pt1), radius(r), angle1(a1), angle2(a2) {} }; struct Dimension { @@ -79,7 +81,7 @@ struct Dimension { Dimension(Vector pt1, Vector pt2, DimensionType dt = DTLinear, float th = 1.0, uint32_t c = 0x0000FF, int l = LSSolid): type(OTDimension), id(Global::objectID++), layer(0), color(c), thickness(th), - style(l), selected(false), hovered(false), subtype(dt), p1(pt1), p2(pt2) {} + style(l), selected(false), hovered(false), hitObject(false), subtype(dt), p1(pt1), p2(pt2) {} }; struct Text { @@ -89,7 +91,7 @@ struct Text { Text(Vector pt, char * str, float th = 10.0, uint32_t c = 0): type(OTText), id(Global::objectID++), layer(0), color(c), thickness(th), - style(LSSolid), selected(false), hovered(false), p1(pt), s(str) {} + style(LSSolid), selected(false), hovered(false), hitObject(false), p1(pt), s(str) {} }; struct Container { @@ -99,7 +101,7 @@ struct Container { double angle; double scale; - Container(): type(OTContainer), id(Global::objectID++), selected(false), hovered(false) {} + Container(): type(OTContainer), id(Global::objectID++), selected(false), hovered(false), hitObject(false) {} }; struct Object {