]> git.saurik.com Git - wxWidgets.git/blob - include/wx/generic/fontdlgg.h
warning for 2.5.3
[wxWidgets.git] / include / wx / generic / fontdlgg.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/generic/fontdlgg.h
3 // Purpose: wxGenericFontDialog
4 // Author: Julian Smart
5 // Modified by:
6 // Created: 01/02/97
7 // RCS-ID: $Id$
8 // Copyright: (c)
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifndef _WX_GENERIC_FONTDLGG_H
13 #define _WX_GENERIC_FONTDLGG_H
14
15 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
16 #pragma interface "fontdlgg.h"
17 #endif
18
19 #include "wx/setup.h"
20 #include "wx/gdicmn.h"
21 #include "wx/font.h"
22 #include "wx/dialog.h"
23 #include "wx/cmndata.h"
24
25 /*
26 * FONT DIALOG
27 */
28
29 class WXDLLEXPORT wxChoice;
30 class WXDLLEXPORT wxText;
31 class WXDLLEXPORT wxCheckBox;
32 class WXDLLEXPORT wxFontPreviewer;
33
34 enum
35 {
36 wxID_FONT_UNDERLINE = 3000,
37 wxID_FONT_STYLE,
38 wxID_FONT_WEIGHT,
39 wxID_FONT_FAMILY,
40 wxID_FONT_COLOUR,
41 wxID_FONT_SIZE
42 };
43
44 class WXDLLEXPORT wxGenericFontDialog : public wxFontDialogBase
45 {
46 public:
47 wxGenericFontDialog() { Init(); }
48 wxGenericFontDialog(wxWindow *parent, const wxFontData& data)
49 : wxFontDialogBase(parent, data) { Init(); }
50 virtual ~wxGenericFontDialog();
51
52 virtual int ShowModal();
53
54 // deprecated, for backwards compatibility only
55 wxGenericFontDialog(wxWindow *parent, const wxFontData *data)
56 : wxFontDialogBase(parent, data) { Init(); }
57
58 // Internal functions
59 void OnCloseWindow(wxCloseEvent& event);
60
61 virtual void CreateWidgets();
62 virtual void InitializeFont();
63
64 void OnChangeFont(wxCommandEvent& event);
65
66 protected:
67 // common part of all ctors
68 void Init();
69
70 virtual bool DoCreate(wxWindow *parent);
71
72 wxFont dialogFont;
73
74 wxChoice *familyChoice;
75 wxChoice *styleChoice;
76 wxChoice *weightChoice;
77 wxChoice *colourChoice;
78 wxCheckBox *underLineCheckBox;
79 wxChoice *pointSizeChoice;
80
81 wxFontPreviewer *m_previewer;
82 bool m_useEvents;
83
84 // static bool fontDialogCancelled;
85 DECLARE_EVENT_TABLE()
86 DECLARE_DYNAMIC_CLASS(wxGenericFontDialog)
87 };
88
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);
95
96 #endif // _WX_GENERIC_FONTDLGG_H
97