1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/generic/fontdlgg.h
3 // Purpose: wxGenericFontDialog
4 // Author: Julian Smart
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_GENERIC_FONTDLGG_H
13 #define _WX_GENERIC_FONTDLGG_H
16 #include "wx/gdicmn.h"
18 #include "wx/dialog.h"
19 #include "wx/cmndata.h"
25 class WXDLLEXPORT wxChoice
;
26 class WXDLLEXPORT wxText
;
27 class WXDLLEXPORT wxCheckBox
;
28 class WXDLLEXPORT wxFontPreviewer
;
32 wxID_FONT_UNDERLINE
= 3000,
40 class WXDLLEXPORT wxGenericFontDialog
: public wxFontDialogBase
43 wxGenericFontDialog() { Init(); }
44 wxGenericFontDialog(wxWindow
*parent
, const wxFontData
& data
)
45 : wxFontDialogBase(parent
, data
) { Init(); }
46 virtual ~wxGenericFontDialog();
48 virtual int ShowModal();
50 // deprecated, for backwards compatibility only
51 wxGenericFontDialog(wxWindow
*parent
, const wxFontData
*data
)
52 : wxFontDialogBase(parent
, data
) { Init(); }
55 void OnCloseWindow(wxCloseEvent
& event
);
57 virtual void CreateWidgets();
58 virtual void InitializeFont();
60 void OnChangeFont(wxCommandEvent
& event
);
63 // common part of all ctors
66 virtual bool DoCreate(wxWindow
*parent
);
70 wxChoice
*familyChoice
;
71 wxChoice
*styleChoice
;
72 wxChoice
*weightChoice
;
73 wxChoice
*colourChoice
;
74 wxCheckBox
*underLineCheckBox
;
75 wxChoice
*pointSizeChoice
;
77 wxFontPreviewer
*m_previewer
;
80 // static bool fontDialogCancelled;
82 DECLARE_DYNAMIC_CLASS(wxGenericFontDialog
)
85 WXDLLEXPORT
const wxChar
*wxFontFamilyIntToString(int family
);
86 WXDLLEXPORT
const wxChar
*wxFontWeightIntToString(int weight
);
87 WXDLLEXPORT
const wxChar
*wxFontStyleIntToString(int style
);
88 WXDLLEXPORT
int wxFontFamilyStringToInt(wxChar
*family
);
89 WXDLLEXPORT
int wxFontWeightStringToInt(wxChar
*weight
);
90 WXDLLEXPORT
int wxFontStyleStringToInt(wxChar
*style
);
92 #endif // _WX_GENERIC_FONTDLGG_H