]> git.saurik.com Git - wxWidgets.git/blame - include/wx/richtext/richtextfontpage.h
wxGraphicsRenderer::CreateContextFromImage is not static
[wxWidgets.git] / include / wx / richtext / richtextfontpage.h
CommitLineData
97ff49b3 1/////////////////////////////////////////////////////////////////////////////
80fdcdb9 2// Name: wx/richtext/richtextfontpage.h
97ff49b3
JS
3// Purpose: Font page for wxRichTextFormattingDialog
4// Author: Julian Smart
5// Modified by:
6// Created: 2006-10-02
7// RCS-ID: $Id$
8// Copyright: (c) Julian Smart
9// Licence: wxWindows licence
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _RICHTEXTFONTPAGE_H_
13#define _RICHTEXTFONTPAGE_H_
14
15/*!
16 * Includes
17 */
18
603f702b
JS
19#include "wx/richtext/richtextdialogpage.h"
20
97ff49b3
JS
21////@begin includes
22////@end includes
23
24/*!
25 * Forward declarations
26 */
27
28////@begin forward declarations
29class wxRichTextFontListBox;
30class wxRichTextColourSwatchCtrl;
31class wxRichTextFontPreviewCtrl;
32////@end forward declarations
33
34/*!
35 * Control identifiers
36 */
37
38////@begin control identifiers
2fce6547 39#define SYMBOL_WXRICHTEXTFONTPAGE_STYLE wxTAB_TRAVERSAL
603f702b 40#define SYMBOL_WXRICHTEXTFONTPAGE_TITLE wxEmptyString
97ff49b3 41#define SYMBOL_WXRICHTEXTFONTPAGE_IDNAME ID_RICHTEXTFONTPAGE
2fce6547 42#define SYMBOL_WXRICHTEXTFONTPAGE_SIZE wxSize(200, 100)
97ff49b3
JS
43#define SYMBOL_WXRICHTEXTFONTPAGE_POSITION wxDefaultPosition
44////@end control identifiers
45
46/*!
47 * wxRichTextFontPage class declaration
48 */
49
603f702b 50class WXDLLIMPEXP_RICHTEXT wxRichTextFontPage: public wxRichTextDialogPage
97ff49b3
JS
51{
52 DECLARE_DYNAMIC_CLASS( wxRichTextFontPage )
53 DECLARE_EVENT_TABLE()
603f702b 54 DECLARE_HELP_PROVISION()
97ff49b3
JS
55
56public:
57 /// Constructors
58 wxRichTextFontPage( );
8871035d 59 wxRichTextFontPage( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = SYMBOL_WXRICHTEXTFONTPAGE_POSITION, const wxSize& size = SYMBOL_WXRICHTEXTFONTPAGE_SIZE, long style = SYMBOL_WXRICHTEXTFONTPAGE_STYLE );
97ff49b3
JS
60
61 /// Initialise members
62 void Init();
63
64 /// Creation
8871035d 65 bool Create( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = SYMBOL_WXRICHTEXTFONTPAGE_POSITION, const wxSize& size = SYMBOL_WXRICHTEXTFONTPAGE_SIZE, long style = SYMBOL_WXRICHTEXTFONTPAGE_STYLE );
97ff49b3
JS
66
67 /// Creates the controls and sizers
68 void CreateControls();
69
70 /// Transfer data from/to window
71 virtual bool TransferDataFromWindow();
72 virtual bool TransferDataToWindow();
73
74 /// Updates the font preview
75 void UpdatePreview();
76
77 void OnFaceListBoxSelected( wxCommandEvent& event );
78 void OnColourClicked( wxCommandEvent& event );
79
80 /// Gets the attributes associated with the main formatting dialog
24777478 81 wxRichTextAttr* GetAttributes();
97ff49b3
JS
82
83////@begin wxRichTextFontPage event handler declarations
84
85 /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTFONTPAGE_FACETEXTCTRL
86 void OnFaceTextCtrlUpdated( wxCommandEvent& event );
87
88 /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTFONTPAGE_SIZETEXTCTRL
89 void OnSizeTextCtrlUpdated( wxCommandEvent& event );
90
91 /// wxEVT_COMMAND_LISTBOX_SELECTED event handler for ID_RICHTEXTFONTPAGE_SIZELISTBOX
92 void OnSizeListBoxSelected( wxCommandEvent& event );
93
94 /// wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_RICHTEXTFONTPAGE_STYLECTRL
95 void OnStyleCtrlSelected( wxCommandEvent& event );
96
97 /// wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_RICHTEXTFONTPAGE_WEIGHTCTRL
98 void OnWeightCtrlSelected( wxCommandEvent& event );
99
100 /// wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_RICHTEXTFONTPAGE_UNDERLINING_CTRL
101 void OnUnderliningCtrlSelected( wxCommandEvent& event );
102
42688aea
JS
103 /// wxEVT_COMMAND_CHECKBOX_CLICKED event handler for ID_RICHTEXTFONTPAGE_STRIKETHROUGHCTRL
104 void OnStrikethroughctrlClick( wxCommandEvent& event );
105
106 /// wxEVT_COMMAND_CHECKBOX_CLICKED event handler for ID_RICHTEXTFONTPAGE_CAPSCTRL
107 void OnCapsctrlClick( wxCommandEvent& event );
108
30bf7630
JS
109 /// wxEVT_COMMAND_CHECKBOX_CLICKED event handler for ID_RICHTEXTFONTPAGE_SUPERSCRIPT
110 void OnRichtextfontpageSuperscriptClick( wxCommandEvent& event );
111
112 /// wxEVT_COMMAND_CHECKBOX_CLICKED event handler for ID_RICHTEXTFONTPAGE_SUBSCRIPT
113 void OnRichtextfontpageSubscriptClick( wxCommandEvent& event );
114
97ff49b3
JS
115////@end wxRichTextFontPage event handler declarations
116
117////@begin wxRichTextFontPage member function declarations
118
119 /// Retrieves bitmap resources
120 wxBitmap GetBitmapResource( const wxString& name );
121
122 /// Retrieves icon resources
123 wxIcon GetIconResource( const wxString& name );
124////@end wxRichTextFontPage member function declarations
125
126 /// Should we show tooltips?
127 static bool ShowToolTips();
128
129////@begin wxRichTextFontPage member variables
130 wxTextCtrl* m_faceTextCtrl;
131 wxRichTextFontListBox* m_faceListBox;
132 wxTextCtrl* m_sizeTextCtrl;
133 wxListBox* m_sizeListBox;
134 wxComboBox* m_styleCtrl;
135 wxComboBox* m_weightCtrl;
136 wxComboBox* m_underliningCtrl;
3c6cc330 137 wxCheckBox* m_textColourLabel;
97ff49b3 138 wxRichTextColourSwatchCtrl* m_colourCtrl;
3c6cc330 139 wxCheckBox* m_bgColourLabel;
50283a51 140 wxRichTextColourSwatchCtrl* m_bgColourCtrl;
42688aea
JS
141 wxCheckBox* m_strikethroughCtrl;
142 wxCheckBox* m_capitalsCtrl;
30bf7630
JS
143 wxCheckBox* m_superscriptCtrl;
144 wxCheckBox* m_subscriptCtrl;
97ff49b3
JS
145 wxRichTextFontPreviewCtrl* m_previewCtrl;
146 /// Control identifiers
147 enum {
148 ID_RICHTEXTFONTPAGE = 10000,
149 ID_RICHTEXTFONTPAGE_FACETEXTCTRL = 10001,
150 ID_RICHTEXTFONTPAGE_FACELISTBOX = 10002,
151 ID_RICHTEXTFONTPAGE_SIZETEXTCTRL = 10005,
152 ID_RICHTEXTFONTPAGE_SIZELISTBOX = 10006,
153 ID_RICHTEXTFONTPAGE_STYLECTRL = 10007,
154 ID_RICHTEXTFONTPAGE_WEIGHTCTRL = 10004,
155 ID_RICHTEXTFONTPAGE_UNDERLINING_CTRL = 10008,
3c6cc330 156 ID_RICHTEXTFONTPAGE_COLOURCTRL_LABEL = 10015,
97ff49b3 157 ID_RICHTEXTFONTPAGE_COLOURCTRL = 10009,
3c6cc330 158 ID_RICHTEXTFONTPAGE_BGCOLOURCTRL_LABEL = 10016,
50283a51 159 ID_RICHTEXTFONTPAGE_BGCOLOURCTRL = 10014,
42688aea
JS
160 ID_RICHTEXTFONTPAGE_STRIKETHROUGHCTRL = 10010,
161 ID_RICHTEXTFONTPAGE_CAPSCTRL = 10011,
30bf7630
JS
162 ID_RICHTEXTFONTPAGE_SUPERSCRIPT = 10012,
163 ID_RICHTEXTFONTPAGE_SUBSCRIPT = 10013,
97ff49b3
JS
164 ID_RICHTEXTFONTPAGE_PREVIEWCTRL = 10003
165 };
166////@end wxRichTextFontPage member variables
167
168 bool m_dontUpdate;
169 bool m_colourPresent;
50283a51 170 bool m_bgColourPresent;
97ff49b3
JS
171};
172
173#endif
174 // _RICHTEXTFONTPAGE_H_