1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/generic/fontdlgg.h
3 // Purpose: wxGenericFontDialog
4 // Author: Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_GENERIC_FONTDLGG_H
13 #define _WX_GENERIC_FONTDLGG_H
15 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
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
;
36 wxID_FONT_UNDERLINE
= 3000,
44 class WXDLLEXPORT wxGenericFontDialog
: public wxFontDialogBase
47 wxGenericFontDialog() { Init(); }
48 wxGenericFontDialog(wxWindow
*parent
, const wxFontData
& data
)
49 : wxFontDialogBase(parent
, data
) { Init(); }
50 virtual ~wxGenericFontDialog();
52 virtual int ShowModal();
54 // deprecated, for backwards compatibility only
55 wxGenericFontDialog(wxWindow
*parent
, const wxFontData
*data
)
56 : wxFontDialogBase(parent
, data
) { Init(); }
59 void OnCloseWindow(wxCloseEvent
& event
);
61 virtual void CreateWidgets();
62 virtual void InitializeFont();
64 void OnChangeFont(wxCommandEvent
& event
);
67 // common part of all ctors
70 virtual bool DoCreate(wxWindow
*parent
);
74 wxChoice
*familyChoice
;
75 wxChoice
*styleChoice
;
76 wxChoice
*weightChoice
;
77 wxChoice
*colourChoice
;
78 wxCheckBox
*underLineCheckBox
;
79 wxChoice
*pointSizeChoice
;
81 wxFontPreviewer
*m_previewer
;
84 // static bool fontDialogCancelled;
86 DECLARE_DYNAMIC_CLASS(wxGenericFontDialog
)
89 WXDLLEXPORT
const wxChar
*wxFontFamilyIntToString(int family
);
90 WXDLLEXPORT
const wxChar
*wxFontWeightIntToString(int weight
);
91 WXDLLEXPORT
const wxChar
*wxFontStyleIntToString(int style
);
92 WXDLLEXPORT
int wxFontFamilyStringToInt(wxChar
*family
);
93 WXDLLEXPORT
int wxFontWeightStringToInt(wxChar
*weight
);
94 WXDLLEXPORT
int wxFontStyleStringToInt(wxChar
*style
);
96 #endif // _WX_GENERIC_FONTDLGG_H