2 // EDITWINDOW.H: Header file
5 // (C) 2008 Underground Software
8 #ifndef __EDITWINDOW_H__
9 #define __EDITWINDOW_H__
13 //#include "ttedit.h" // For TTEditApp
14 #include "toolwindow.h" // For ToolType enum
15 #include "glyphpoints.h"
17 class EditWindow: public QWidget
22 EditWindow(QWidget * parent = NULL);
23 QSize minimumSizeHint() const;
24 QSize sizeHint() const;
27 void paintEvent(QPaintEvent * event);
28 void mousePressEvent(QMouseEvent * event);
29 void mouseMoveEvent(QMouseEvent * event);
30 void mouseReleaseEvent(QMouseEvent * event);
33 void CreateCursors(void);
34 QPoint GetAdjustedMousePosition(QMouseEvent * event);
35 QPoint GetAdjustedClientPosition(int x, int y);
38 QPoint pt, ptOffset, ptPrevious;
39 // TTEditApp & app; // Reference to the application object
40 double scale; // Window scaling factor
41 int32 offsetX, offsetY; // Window offsets
42 ToolType tool; // Current tool
43 GlyphPoints pts; // Glyph point structure
44 int32 ptHighlight, oldPtHighlight, ptNextHighlight, oldPtNextHighlight;
47 ToolWindow * toolPalette;
52 #include <wx/wx.h> // So that whoever uses this can without having
53 // to pull in a bunch of references manually
55 #include "ttedit.h" // For TTEditApp
56 #include "toolwindow.h" // For ToolType enum
57 #include "glyphpoints.h"
59 class TTEditWindow: public wxWindow
62 TTEditApp & app; // Reference to the application object
63 double scale; // Window scaling factor
64 int32 offsetX, offsetY; // Window offsets
65 ToolType tool; // Current tool
66 GlyphPoints pts; // Glyph point structure
67 int32 ptHighlight, oldPtHighlight, ptNextHighlight, oldPtNextHighlight;
73 wxPoint pt, ptOffset, ptPrevious;
75 // Constructor and destructor
76 TTEditWindow(wxFrame * parent, const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, long style = 0);
79 void OnPaint(wxPaintEvent &e);
80 void OnMouseEvent(wxMouseEvent &e);
83 wxPoint GetAdjustedMousePosition(wxMouseEvent &e);
84 wxPoint GetAdjustedClientPosition(wxCoord x, wxCoord y);
90 #endif // __EDITWINDOW_H__