1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/generic/fontdlgg.h
3 // Purpose: wxGenericFontDialog
4 // Author: Julian Smart
7 // Copyright: (c) Julian Smart
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
11 #ifndef _WX_GENERIC_FONTDLGG_H
12 #define _WX_GENERIC_FONTDLGG_H
14 #include "wx/gdicmn.h"
18 #define USE_SPINCTRL_FOR_POINT_SIZE 1
19 class WXDLLIMPEXP_FWD_CORE wxSpinEvent
;
21 #define USE_SPINCTRL_FOR_POINT_SIZE 0
28 class WXDLLIMPEXP_FWD_CORE wxChoice
;
29 class WXDLLIMPEXP_FWD_CORE wxText
;
30 class WXDLLIMPEXP_FWD_CORE wxCheckBox
;
31 class WXDLLIMPEXP_FWD_CORE wxFontPreviewer
;
35 wxID_FONT_UNDERLINE
= 3000,
43 class WXDLLIMPEXP_CORE wxGenericFontDialog
: public wxFontDialogBase
46 wxGenericFontDialog() { Init(); }
47 wxGenericFontDialog(wxWindow
*parent
)
48 : wxFontDialogBase(parent
) { Init(); }
49 wxGenericFontDialog(wxWindow
*parent
, const wxFontData
& data
)
50 : wxFontDialogBase(parent
, data
) { Init(); }
51 virtual ~wxGenericFontDialog();
53 virtual int ShowModal();
55 #if WXWIN_COMPATIBILITY_2_6
56 // deprecated, for backwards compatibility only
57 wxDEPRECATED( wxGenericFontDialog(wxWindow
*parent
, const wxFontData
*data
) );
58 #endif // WXWIN_COMPATIBILITY_2_6
61 void OnCloseWindow(wxCloseEvent
& event
);
63 virtual void CreateWidgets();
64 virtual void InitializeFont();
66 void OnChangeFont(wxCommandEvent
& event
);
68 #if USE_SPINCTRL_FOR_POINT_SIZE
69 void OnChangeSize(wxSpinEvent
& event
);
74 virtual bool DoCreate(wxWindow
*parent
);
78 // common part of all ctors
85 wxChoice
*m_familyChoice
;
86 wxChoice
*m_styleChoice
;
87 wxChoice
*m_weightChoice
;
88 wxChoice
*m_colourChoice
;
89 wxCheckBox
*m_underLineCheckBox
;
91 #if !USE_SPINCTRL_FOR_POINT_SIZE
92 wxChoice
*m_pointSizeChoice
;
95 wxFontPreviewer
*m_previewer
;
98 // static bool fontDialogCancelled;
100 DECLARE_DYNAMIC_CLASS(wxGenericFontDialog
)
103 #if WXWIN_COMPATIBILITY_2_6
104 // deprecated, for backwards compatibility only
105 inline wxGenericFontDialog::wxGenericFontDialog(wxWindow
*parent
, const wxFontData
*data
)
106 :wxFontDialogBase(parent
) { Init(); InitFontData(data
); Create(parent
); }
107 #endif // WXWIN_COMPATIBILITY_2_6
109 #endif // _WX_GENERIC_FONTDLGG_H