]> git.saurik.com Git - wxWidgets.git/blame_incremental - include/wx/generic/fontdlgg.h
Added some inline helpers so the dependence on wxUSE_UNICODE and
[wxWidgets.git] / include / wx / generic / fontdlgg.h
... / ...
CommitLineData
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;
32class WXDLLEXPORT wxFontPreviewer;
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
49 wxChoice *familyChoice;
50 wxChoice *styleChoice;
51 wxChoice *weightChoice;
52 wxChoice *colourChoice;
53 wxCheckBox *underLineCheckBox;
54 wxChoice *pointSizeChoice;
55 wxFontPreviewer *m_previewer;
56 bool m_useEvents;
57
58// static bool fontDialogCancelled;
59 public:
60
61 wxGenericFontDialog(void);
62 wxGenericFontDialog(wxWindow *parent, wxFontData *data = (wxFontData *) NULL);
63 ~wxGenericFontDialog(void);
64
65 bool Create(wxWindow *parent, wxFontData *data = (wxFontData *) NULL);
66
67 int ShowModal(void);
68
69 inline wxFontData& GetFontData(void) { return fontData; }
70
71 // Internal functions
72 void OnCloseWindow(wxCloseEvent& event);
73
74 virtual void CreateWidgets(void);
75 virtual void InitializeFont(void);
76
77 void OnChangeFont(wxCommandEvent& event);
78
79DECLARE_EVENT_TABLE()
80};
81
82const wxChar WXDLLEXPORT *wxFontFamilyIntToString(int family);
83const wxChar WXDLLEXPORT *wxFontWeightIntToString(int weight);
84const wxChar WXDLLEXPORT *wxFontStyleIntToString(int style);
85int WXDLLEXPORT wxFontFamilyStringToInt(wxChar *family);
86int WXDLLEXPORT wxFontWeightStringToInt(wxChar *weight);
87int WXDLLEXPORT wxFontStyleStringToInt(wxChar *style);
88
89#endif