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
;
59 // static bool fontDialogCancelled;
62 wxGenericFontDialog(void);
63 wxGenericFontDialog(wxWindow
*parent
, wxFontData
*data
= (wxFontData
*) NULL
);
64 ~wxGenericFontDialog(void);
66 bool Create(wxWindow
*parent
, wxFontData
*data
= (wxFontData
*) NULL
);
70 inline wxFontData
& GetFontData(void) { return fontData
; }
73 void OnPaint(wxPaintEvent
& event
);
75 void OnCloseWindow(wxCloseEvent
& event
);
77 virtual void CreateWidgets(void);
78 virtual void InitializeFont(void);
80 virtual void PaintFontBackground(wxDC
& dc
);
81 virtual void PaintFont(wxDC
& dc
);
83 void OnChangeFont(wxCommandEvent
& event
);
88 wxChar WXDLLEXPORT
*wxFontFamilyIntToString(int family
);
89 wxChar WXDLLEXPORT
*wxFontWeightIntToString(int weight
);
90 wxChar WXDLLEXPORT
*wxFontStyleIntToString(int style
);
91 int WXDLLEXPORT
wxFontFamilyStringToInt(wxChar
*family
);
92 int WXDLLEXPORT
wxFontWeightStringToInt(wxChar
*weight
);
93 int WXDLLEXPORT
wxFontStyleStringToInt(wxChar
*style
);