2 // EDITWINDOW.H: Header file
\r
4 // by James L. Hammons
\r
5 // (C) 2008 Underground Software
\r
8 #ifndef __EDITWINDOW_H__
\r
9 #define __EDITWINDOW_H__
\r
11 #include <wx/wx.h> // So that whoever uses this can without having
\r
12 // to pull in a bunch of references manually
\r
14 #include "ttedit.h" // For TTEditApp
\r
15 #include "toolwindow.h" // For ToolType enum
\r
16 #include "glyphpoints.h"
\r
18 class TTEditWindow: public wxWindow
\r
21 TTEditApp & app; // Reference to the application object
\r
22 double scale; // Window scaling factor
\r
23 int32 offsetX, offsetY; // Window offsets
\r
24 ToolType tool; // Current tool
\r
25 GlyphPoints pts; // Glyph point structure
\r
26 int32 ptHighlight, oldPtHighlight, ptNextHighlight, oldPtNextHighlight;
\r
27 bool polyFirstPoint;
\r
32 wxPoint pt, ptOffset, ptPrevious;
\r
34 // Constructor and destructor
\r
35 TTEditWindow(wxFrame * parent, const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, long style = 0);
\r
36 ~TTEditWindow(void);
\r
38 void OnPaint(wxPaintEvent &e);
\r
39 void OnMouseEvent(wxMouseEvent &e);
\r
42 wxPoint GetAdjustedMousePosition(wxMouseEvent &e);
\r
43 wxPoint GetAdjustedClientPosition(wxCoord x, wxCoord y);
\r
44 void DrawRoundDot(wxDC &, int32, int32);
\r
45 void DrawSquareDot(wxDC &, int32, int32);
\r
46 void DrawRoundDotN(wxDC &, int32, int32, uint32);
\r
47 void DrawSquareDotN(wxDC &, int32, int32, uint32);
\r
49 DECLARE_EVENT_TABLE()
\r
52 #endif // __EDITWINDOW_H__
\r