]> git.saurik.com Git - wxWidgets.git/blame - include/wx/generic/fontdlgg.h
Include order is wxprec.h=>defs.h=>platform.h=>setup.h so remove explicit setup.h...
[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$
99d80019 8// Copyright: (c) Julian Smart
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
c801d85f
KB
15#include "wx/setup.h"
16#include "wx/gdicmn.h"
17#include "wx/font.h"
18#include "wx/dialog.h"
19#include "wx/cmndata.h"
20
21/*
22 * FONT DIALOG
23 */
ca65c044 24
c801d85f
KB
25class WXDLLEXPORT wxChoice;
26class WXDLLEXPORT wxText;
27class WXDLLEXPORT wxCheckBox;
53cf79fa 28class WXDLLEXPORT wxFontPreviewer;
c801d85f 29
c2c59b22
VZ
30enum
31{
32 wxID_FONT_UNDERLINE = 3000,
33 wxID_FONT_STYLE,
34 wxID_FONT_WEIGHT,
35 wxID_FONT_FAMILY,
36 wxID_FONT_COLOUR,
37 wxID_FONT_SIZE
38};
c801d85f 39
c2c59b22 40class WXDLLEXPORT wxGenericFontDialog : public wxFontDialogBase
c801d85f 41{
c2c59b22
VZ
42public:
43 wxGenericFontDialog() { Init(); }
44 wxGenericFontDialog(wxWindow *parent, const wxFontData& data)
45 : wxFontDialogBase(parent, data) { Init(); }
46 virtual ~wxGenericFontDialog();
47
48 virtual int ShowModal();
49
50 // deprecated, for backwards compatibility only
51 wxGenericFontDialog(wxWindow *parent, const wxFontData *data)
52 : wxFontDialogBase(parent, data) { Init(); }
c801d85f 53
c2c59b22
VZ
54 // Internal functions
55 void OnCloseWindow(wxCloseEvent& event);
c801d85f 56
c2c59b22
VZ
57 virtual void CreateWidgets();
58 virtual void InitializeFont();
c801d85f 59
c2c59b22 60 void OnChangeFont(wxCommandEvent& event);
c801d85f 61
c2c59b22
VZ
62protected:
63 // common part of all ctors
64 void Init();
c801d85f 65
c2c59b22 66 virtual bool DoCreate(wxWindow *parent);
c801d85f 67
c2c59b22
VZ
68 wxFont dialogFont;
69
70 wxChoice *familyChoice;
71 wxChoice *styleChoice;
72 wxChoice *weightChoice;
73 wxChoice *colourChoice;
74 wxCheckBox *underLineCheckBox;
75 wxChoice *pointSizeChoice;
76
77 wxFontPreviewer *m_previewer;
78 bool m_useEvents;
79
80 // static bool fontDialogCancelled;
81 DECLARE_EVENT_TABLE()
82 DECLARE_DYNAMIC_CLASS(wxGenericFontDialog)
c801d85f
KB
83};
84
e9c9f9d4
VS
85WXDLLEXPORT const wxChar *wxFontFamilyIntToString(int family);
86WXDLLEXPORT const wxChar *wxFontWeightIntToString(int weight);
87WXDLLEXPORT const wxChar *wxFontStyleIntToString(int style);
88WXDLLEXPORT int wxFontFamilyStringToInt(wxChar *family);
89WXDLLEXPORT int wxFontWeightStringToInt(wxChar *weight);
90WXDLLEXPORT int wxFontStyleStringToInt(wxChar *style);
c801d85f 91
c2c59b22
VZ
92#endif // _WX_GENERIC_FONTDLGG_H
93