1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxGenericFontDialog
4 // Author: Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef __FONTDLGH_G__
13 #define __FONTDLGH_G__
16 #pragma interface "fontdlgg.h"
20 #include "wx/gdicmn.h"
22 #include "wx/dialog.h"
23 #include "wx/cmndata.h"
29 class WXDLLEXPORT wxChoice
;
30 class WXDLLEXPORT wxText
;
31 class WXDLLEXPORT wxCheckBox
;
33 #define wxID_FONT_UNDERLINE 3000
34 #define wxID_FONT_STYLE 3001
35 #define wxID_FONT_WEIGHT 3002
36 #define wxID_FONT_FAMILY 3003
37 #define wxID_FONT_COLOUR 3004
38 #define wxID_FONT_SIZE 3005
40 class WXDLLEXPORT wxGenericFontDialog
: public wxDialog
42 DECLARE_DYNAMIC_CLASS(wxGenericFontDialog
)
46 wxWindow
*dialogParent
;
48 // Area reserved for font display
51 wxChoice
*familyChoice
;
52 wxChoice
*styleChoice
;
53 wxChoice
*weightChoice
;
54 wxChoice
*colourChoice
;
55 wxCheckBox
*underLineCheckBox
;
56 wxChoice
*pointSizeChoice
;
58 // static bool fontDialogCancelled;
61 wxGenericFontDialog(void);
62 wxGenericFontDialog(wxWindow
*parent
, wxFontData
*data
= NULL
);
63 ~wxGenericFontDialog(void);
65 bool Create(wxWindow
*parent
, wxFontData
*data
= NULL
);
69 inline wxFontData
& GetFontData(void) { return fontData
; }
72 void OnPaint(wxPaintEvent
& event
);
76 virtual void CreateWidgets(void);
77 virtual void InitializeFont(void);
79 virtual void PaintFontBackground(wxDC
& dc
);
80 virtual void PaintFont(wxDC
& dc
);
82 void OnChangeFont(wxCommandEvent
& event
);
87 char* WXDLLEXPORT
wxFontFamilyIntToString(int family
);
88 char* WXDLLEXPORT
wxFontWeightIntToString(int weight
);
89 char* WXDLLEXPORT
wxFontStyleIntToString(int style
);
90 int WXDLLEXPORT
wxFontFamilyStringToInt(char *family
);
91 int WXDLLEXPORT
wxFontWeightStringToInt(char *weight
);
92 int WXDLLEXPORT
wxFontStyleStringToInt(char *style
);