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
15 #include "wx/gdicmn.h"
19 #define USE_SPINCTRL_FOR_POINT_SIZE 1
20 class WXDLLIMPEXP_FWD_CORE wxSpinEvent
;
22 #define USE_SPINCTRL_FOR_POINT_SIZE 0
29 class WXDLLIMPEXP_FWD_CORE wxChoice
;
30 class WXDLLIMPEXP_FWD_CORE wxText
;
31 class WXDLLIMPEXP_FWD_CORE wxCheckBox
;
32 class WXDLLIMPEXP_FWD_CORE wxFontPreviewer
;
36 wxID_FONT_UNDERLINE
= 3000,
44 class WXDLLIMPEXP_CORE wxGenericFontDialog
: public wxFontDialogBase
47 wxGenericFontDialog() { Init(); }
48 wxGenericFontDialog(wxWindow
*parent
)
49 : wxFontDialogBase(parent
) { Init(); }
50 wxGenericFontDialog(wxWindow
*parent
, const wxFontData
& data
)
51 : wxFontDialogBase(parent
, data
) { Init(); }
52 virtual ~wxGenericFontDialog();
54 virtual int ShowModal();
56 #if WXWIN_COMPATIBILITY_2_6
57 // deprecated, for backwards compatibility only
58 wxDEPRECATED( wxGenericFontDialog(wxWindow
*parent
, const wxFontData
*data
) );
59 #endif // WXWIN_COMPATIBILITY_2_6
62 void OnCloseWindow(wxCloseEvent
& event
);
64 virtual void CreateWidgets();
65 virtual void InitializeFont();
67 void OnChangeFont(wxCommandEvent
& event
);
69 #if USE_SPINCTRL_FOR_POINT_SIZE
70 void OnChangeSize(wxSpinEvent
& event
);
75 virtual bool DoCreate(wxWindow
*parent
);
79 // common part of all ctors
86 wxChoice
*m_familyChoice
;
87 wxChoice
*m_styleChoice
;
88 wxChoice
*m_weightChoice
;
89 wxChoice
*m_colourChoice
;
90 wxCheckBox
*m_underLineCheckBox
;
92 #if !USE_SPINCTRL_FOR_POINT_SIZE
93 wxChoice
*m_pointSizeChoice
;
96 wxFontPreviewer
*m_previewer
;
99 // static bool fontDialogCancelled;
100 DECLARE_EVENT_TABLE()
101 DECLARE_DYNAMIC_CLASS(wxGenericFontDialog
)
104 #if WXWIN_COMPATIBILITY_2_6
105 // deprecated, for backwards compatibility only
106 inline wxGenericFontDialog::wxGenericFontDialog(wxWindow
*parent
, const wxFontData
*data
)
107 :wxFontDialogBase(parent
) { Init(); InitFontData(data
); Create(parent
); }
108 #endif // WXWIN_COMPATIBILITY_2_6
110 #endif // _WX_GENERIC_FONTDLGG_H