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"
22 #define USE_SPINCTRL_FOR_POINT_SIZE 1
23 class WXDLLEXPORT wxSpinEvent
;
25 #define USE_SPINCTRL_FOR_POINT_SIZE 0
32 class WXDLLEXPORT wxChoice
;
33 class WXDLLEXPORT wxText
;
34 class WXDLLEXPORT wxCheckBox
;
35 class WXDLLEXPORT wxFontPreviewer
;
39 wxID_FONT_UNDERLINE
= 3000,
47 class WXDLLEXPORT wxGenericFontDialog
: public wxFontDialogBase
50 wxGenericFontDialog() { Init(); }
51 wxGenericFontDialog(wxWindow
*parent
, const wxFontData
& data
)
52 : wxFontDialogBase(parent
, data
) { Init(); }
53 virtual ~wxGenericFontDialog();
55 virtual int ShowModal();
57 // deprecated, for backwards compatibility only
58 wxGenericFontDialog(wxWindow
*parent
, const wxFontData
*data
)
59 : wxFontDialogBase(parent
, data
) { Init(); }
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
);
74 // common part of all ctors
77 virtual bool DoCreate(wxWindow
*parent
);
81 wxChoice
*familyChoice
;
82 wxChoice
*styleChoice
;
83 wxChoice
*weightChoice
;
84 wxChoice
*colourChoice
;
85 wxCheckBox
*underLineCheckBox
;
87 #if !USE_SPINCTRL_FOR_POINT_SIZE
88 wxChoice
*pointSizeChoice
;
91 wxFontPreviewer
*m_previewer
;
94 // static bool fontDialogCancelled;
96 DECLARE_DYNAMIC_CLASS(wxGenericFontDialog
)
99 WXDLLEXPORT
const wxChar
*wxFontFamilyIntToString(int family
);
100 WXDLLEXPORT
const wxChar
*wxFontWeightIntToString(int weight
);
101 WXDLLEXPORT
const wxChar
*wxFontStyleIntToString(int style
);
102 WXDLLEXPORT
int wxFontFamilyStringToInt(wxChar
*family
);
103 WXDLLEXPORT
int wxFontWeightStringToInt(wxChar
*weight
);
104 WXDLLEXPORT
int wxFontStyleStringToInt(wxChar
*style
);
106 #endif // _WX_GENERIC_FONTDLGG_H