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
;
32 class WXDLLEXPORT wxFontPreviewer
;
34 #define wxID_FONT_UNDERLINE 3000
35 #define wxID_FONT_STYLE 3001
36 #define wxID_FONT_WEIGHT 3002
37 #define wxID_FONT_FAMILY 3003
38 #define wxID_FONT_COLOUR 3004
39 #define wxID_FONT_SIZE 3005
41 class WXDLLEXPORT wxGenericFontDialog
: public wxDialog
43 DECLARE_DYNAMIC_CLASS(wxGenericFontDialog
)
47 wxWindow
*dialogParent
;
49 wxChoice
*familyChoice
;
50 wxChoice
*styleChoice
;
51 wxChoice
*weightChoice
;
52 wxChoice
*colourChoice
;
53 wxCheckBox
*underLineCheckBox
;
54 wxChoice
*pointSizeChoice
;
55 wxFontPreviewer
*m_previewer
;
58 // static bool fontDialogCancelled;
61 wxGenericFontDialog(void);
62 wxGenericFontDialog(wxWindow
*parent
, wxFontData
*data
= (wxFontData
*) NULL
);
63 ~wxGenericFontDialog(void);
65 bool Create(wxWindow
*parent
, wxFontData
*data
= (wxFontData
*) NULL
);
69 inline wxFontData
& GetFontData(void) { return fontData
; }
72 void OnCloseWindow(wxCloseEvent
& event
);
74 virtual void CreateWidgets(void);
75 virtual void InitializeFont(void);
77 void OnChangeFont(wxCommandEvent
& event
);
82 const wxChar WXDLLEXPORT
*wxFontFamilyIntToString(int family
);
83 const wxChar WXDLLEXPORT
*wxFontWeightIntToString(int weight
);
84 const wxChar WXDLLEXPORT
*wxFontStyleIntToString(int style
);
85 int WXDLLEXPORT
wxFontFamilyStringToInt(wxChar
*family
);
86 int WXDLLEXPORT
wxFontWeightStringToInt(wxChar
*weight
);
87 int WXDLLEXPORT
wxFontStyleStringToInt(wxChar
*style
);