]> git.saurik.com Git - wxWidgets.git/blame - include/wx/generic/fontdlgg.h
fixed array tests compilation and a bug in obj array test
[wxWidgets.git] / include / wx / generic / fontdlgg.h
CommitLineData
c801d85f
KB
1/////////////////////////////////////////////////////////////////////////////
2// Name: 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 __FONTDLGH_G__
13#define __FONTDLGH_G__
14
15#ifdef __GNUG__
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
29class WXDLLEXPORT wxChoice;
30class WXDLLEXPORT wxText;
31class WXDLLEXPORT wxCheckBox;
53cf79fa 32class WXDLLEXPORT wxFontPreviewer;
c801d85f
KB
33
34#define wxID_FONT_UNDERLINE 3000
35#define wxID_FONT_STYLE 3001
36#define wxID_FONT_WEIGHT 3002
37#define wxID_FONT_FAMILY 3003
38#define wxID_FONT_COLOUR 3004
39#define wxID_FONT_SIZE 3005
40
41class WXDLLEXPORT wxGenericFontDialog: public wxDialog
42{
43 DECLARE_DYNAMIC_CLASS(wxGenericFontDialog)
44 protected:
45 wxFontData fontData;
46 wxFont dialogFont;
47 wxWindow *dialogParent;
48
c801d85f
KB
49 wxChoice *familyChoice;
50 wxChoice *styleChoice;
51 wxChoice *weightChoice;
52 wxChoice *colourChoice;
53 wxCheckBox *underLineCheckBox;
54 wxChoice *pointSizeChoice;
53cf79fa 55 wxFontPreviewer *m_previewer;
66bd6b93 56 bool m_useEvents;
c801d85f
KB
57
58// static bool fontDialogCancelled;
59 public:
60
61 wxGenericFontDialog(void);
c67daf87 62 wxGenericFontDialog(wxWindow *parent, wxFontData *data = (wxFontData *) NULL);
c801d85f
KB
63 ~wxGenericFontDialog(void);
64
c67daf87 65 bool Create(wxWindow *parent, wxFontData *data = (wxFontData *) NULL);
c801d85f
KB
66
67 int ShowModal(void);
68
69 inline wxFontData& GetFontData(void) { return fontData; }
70
71 // Internal functions
e3065973 72 void OnCloseWindow(wxCloseEvent& event);
c801d85f
KB
73
74 virtual void CreateWidgets(void);
75 virtual void InitializeFont(void);
76
c801d85f
KB
77 void OnChangeFont(wxCommandEvent& event);
78
79DECLARE_EVENT_TABLE()
80};
81
d0060e77
VZ
82const wxChar WXDLLEXPORT *wxFontFamilyIntToString(int family);
83const wxChar WXDLLEXPORT *wxFontWeightIntToString(int weight);
84const wxChar WXDLLEXPORT *wxFontStyleIntToString(int style);
83a21afb
OK
85int WXDLLEXPORT wxFontFamilyStringToInt(wxChar *family);
86int WXDLLEXPORT wxFontWeightStringToInt(wxChar *weight);
87int WXDLLEXPORT wxFontStyleStringToInt(wxChar *style);
c801d85f
KB
88
89#endif