]> Shamusworld >> Repos - ttedit/blob - src/charwindow.h
a5bfb18bbbbffd18aec1ac8c0e219ce9dad3d1f1
[ttedit] / src / charwindow.h
1 //
2 // CHARWINDOW.H: Header file
3 //
4 // by James L. Hammons
5 // (C) 2009 Underground Software
6 //
7
8 #ifndef __CHARWINDOW_H__
9 #define __CHARWINDOW_H__
10
11 #include <QtWidgets>
12 #include "glyphpoints.h"
13
14 class CharWindow: public QWidget
15 {
16         Q_OBJECT
17
18         public:
19                 CharWindow(QWidget * parent = NULL);
20                 void MakePathFromPoints(GlyphPoints * gp);
21
22         protected:
23                 QSize minimumSizeHint() const;
24                 QSize sizeHint() const;
25                 void paintEvent(QPaintEvent * event);
26
27         private:
28                 QImage img;
29                 QPainterPath * path;
30 };
31
32 #if 0
33 #include <wx/wx.h>                                                              // So that whoever uses this can without having
34                                                                                                 // to pull in a bunch of references manually
35 #include <wx/minifram.h>
36
37 class CharWindow: public wxMiniFrame
38 {
39         private:
40         protected:
41         public:
42                 wxBitmap * bmp;
43
44                 // Constructor and destructor
45 //              CharWindow(wxFrame * parent, const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, long style = 0);
46                 CharWindow(wxFrame * parent, const wxString &title, const wxPoint &pos, const wxSize &size, long style);
47                 ~CharWindow(void);
48
49                 void OnPaint(wxPaintEvent &e);
50 //              void OnMouseEvent(wxMouseEvent &e);
51
52         DECLARE_EVENT_TABLE()
53 };
54 #endif
55
56 #endif  // __CHARWINDOW_H__