]> git.saurik.com Git - wxWidgets.git/blame - include/wx/generic/fontdlgg.h
Fixed to work with the new wxMacControl system.
[wxWidgets.git] / include / wx / generic / fontdlgg.h
CommitLineData
c801d85f 1/////////////////////////////////////////////////////////////////////////////
c2c59b22 2// Name: wx/generic/fontdlgg.h
c801d85f
KB
3// Purpose: wxGenericFontDialog
4// Author: Julian Smart
5// Modified by:
6// Created: 01/02/97
7// RCS-ID: $Id$
8// Copyright: (c)
ca65c044 9// Licence: wxWindows licence
c801d85f
KB
10/////////////////////////////////////////////////////////////////////////////
11
c2c59b22
VZ
12#ifndef _WX_GENERIC_FONTDLGG_H
13#define _WX_GENERIC_FONTDLGG_H
c801d85f 14
12028905 15#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
c801d85f
KB
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 */
ca65c044 28
c801d85f
KB
29class WXDLLEXPORT wxChoice;
30class WXDLLEXPORT wxText;
31class WXDLLEXPORT wxCheckBox;
53cf79fa 32class WXDLLEXPORT wxFontPreviewer;
c801d85f 33
c2c59b22
VZ
34enum
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};
c801d85f 43
c2c59b22 44class WXDLLEXPORT wxGenericFontDialog : public wxFontDialogBase
c801d85f 45{
c2c59b22
VZ
46public:
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(); }
c801d85f 57
c2c59b22
VZ
58 // Internal functions
59 void OnCloseWindow(wxCloseEvent& event);
c801d85f 60
c2c59b22
VZ
61 virtual void CreateWidgets();
62 virtual void InitializeFont();
c801d85f 63
c2c59b22 64 void OnChangeFont(wxCommandEvent& event);
c801d85f 65
c2c59b22
VZ
66protected:
67 // common part of all ctors
68 void Init();
c801d85f 69
c2c59b22 70 virtual bool DoCreate(wxWindow *parent);
c801d85f 71
c2c59b22
VZ
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)
c801d85f
KB
87};
88
e9c9f9d4
VS
89WXDLLEXPORT const wxChar *wxFontFamilyIntToString(int family);
90WXDLLEXPORT const wxChar *wxFontWeightIntToString(int weight);
91WXDLLEXPORT const wxChar *wxFontStyleIntToString(int style);
92WXDLLEXPORT int wxFontFamilyStringToInt(wxChar *family);
93WXDLLEXPORT int wxFontWeightStringToInt(wxChar *weight);
94WXDLLEXPORT int wxFontStyleStringToInt(wxChar *style);
c801d85f 95
c2c59b22
VZ
96#endif // _WX_GENERIC_FONTDLGG_H
97