]> git.saurik.com Git - wxWidgets.git/blame - include/wx/generic/fontdlgg.h
1. bug fixes in wxCaret
[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;
32
33#define wxID_FONT_UNDERLINE 3000
34#define wxID_FONT_STYLE 3001
35#define wxID_FONT_WEIGHT 3002
36#define wxID_FONT_FAMILY 3003
37#define wxID_FONT_COLOUR 3004
38#define wxID_FONT_SIZE 3005
39
40class WXDLLEXPORT wxGenericFontDialog: public wxDialog
41{
42 DECLARE_DYNAMIC_CLASS(wxGenericFontDialog)
43 protected:
44 wxFontData fontData;
45 wxFont dialogFont;
46 wxWindow *dialogParent;
47
48 // Area reserved for font display
16e93305 49 wxRect fontRect;
c801d85f
KB
50
51 wxChoice *familyChoice;
52 wxChoice *styleChoice;
53 wxChoice *weightChoice;
54 wxChoice *colourChoice;
55 wxCheckBox *underLineCheckBox;
56 wxChoice *pointSizeChoice;
66bd6b93 57 bool m_useEvents;
c801d85f
KB
58
59// static bool fontDialogCancelled;
60 public:
61
62 wxGenericFontDialog(void);
c67daf87 63 wxGenericFontDialog(wxWindow *parent, wxFontData *data = (wxFontData *) NULL);
c801d85f
KB
64 ~wxGenericFontDialog(void);
65
c67daf87 66 bool Create(wxWindow *parent, wxFontData *data = (wxFontData *) NULL);
c801d85f
KB
67
68 int ShowModal(void);
69
70 inline wxFontData& GetFontData(void) { return fontData; }
71
72 // Internal functions
73 void OnPaint(wxPaintEvent& event);
74
e3065973 75 void OnCloseWindow(wxCloseEvent& event);
c801d85f
KB
76
77 virtual void CreateWidgets(void);
78 virtual void InitializeFont(void);
79
80 virtual void PaintFontBackground(wxDC& dc);
81 virtual void PaintFont(wxDC& dc);
82
83 void OnChangeFont(wxCommandEvent& event);
84
85DECLARE_EVENT_TABLE()
86};
87
83a21afb
OK
88wxChar WXDLLEXPORT *wxFontFamilyIntToString(int family);
89wxChar WXDLLEXPORT *wxFontWeightIntToString(int weight);
90wxChar WXDLLEXPORT *wxFontStyleIntToString(int style);
91int WXDLLEXPORT wxFontFamilyStringToInt(wxChar *family);
92int WXDLLEXPORT wxFontWeightStringToInt(wxChar *weight);
93int WXDLLEXPORT wxFontStyleStringToInt(wxChar *style);
c801d85f
KB
94
95#endif