2 // EDITWINDOW.H: Header file
5 // (C) 2008 Underground Software
8 #ifndef __EDITWINDOW_H__
9 #define __EDITWINDOW_H__
13 #include "toolwindow.h" // For ToolType enum
14 #include "glyphpoints.h"
18 class EditWindow: public QWidget
23 EditWindow(QWidget * parent = NULL);
24 QSize minimumSizeHint() const;
25 QSize sizeHint() const;
28 void paintEvent(QPaintEvent *);
29 void mousePressEvent(QMouseEvent *);
30 void mouseMoveEvent(QMouseEvent *);
31 void mouseReleaseEvent(QMouseEvent *);
32 void keyPressEvent(QKeyEvent *);
33 void keyReleaseEvent(QKeyEvent *);
36 void CreateCursors(void);
37 void DrawGlyph(Painter & p, GlyphPoints & glyph);
38 void DrawGlyphPoly(Painter & p, GlyphPoints & glyph, uint16_t poly);
39 void DrawGlyphSegment(Painter & p, IPoint p1, IPoint p2, IPoint p3);
40 void ClearSelection(void);
44 Vector pt, ptOffset, ptPrevious, addPoint;
46 ToolType tool; // Current tool
47 GlyphPoints pts; // Glyph point structure
48 int32_t ptHighlight, oldPtHighlight, ptNextHighlight, oldPtNextHighlight;
49 int16_t polyHighlight, oldPolyHighlight;
51 bool showRotationCenter, haveZeroPoint;
52 Vector rotationCenter, rotationZeroPoint, rotationCurrentPoint;
55 ToolWindow * toolPalette;
57 bool selectedPoints[65536]; // Potential memory leak :-O
59 bool selectionInProgress;
62 #endif // __EDITWINDOW_H__