]> git.saurik.com Git - wxWidgets.git/blob - include/wx/richtext/richtextliststylepage.h
add support for GtkFontChooserDialog, new in GTK 3.2
[wxWidgets.git] / include / wx / richtext / richtextliststylepage.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/richtext/richtextliststylepage.h
3 // Purpose:
4 // Author: Julian Smart
5 // Modified by:
6 // Created: 10/18/2006 11:36:37 AM
7 // RCS-ID: $Id$
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifndef _RICHTEXTLISTSTYLEPAGE_H_
13 #define _RICHTEXTLISTSTYLEPAGE_H_
14
15 /*!
16 * Includes
17 */
18
19 #include "wx/richtext/richtextdialogpage.h"
20
21 ////@begin includes
22 #include "wx/spinctrl.h"
23 #include "wx/notebook.h"
24 #include "wx/statline.h"
25 ////@end includes
26
27 /*!
28 * Control identifiers
29 */
30
31 ////@begin control identifiers
32 #define SYMBOL_WXRICHTEXTLISTSTYLEPAGE_STYLE wxRESIZE_BORDER|wxTAB_TRAVERSAL
33 #define SYMBOL_WXRICHTEXTLISTSTYLEPAGE_TITLE wxEmptyString
34 #define SYMBOL_WXRICHTEXTLISTSTYLEPAGE_IDNAME ID_RICHTEXTLISTSTYLEPAGE
35 #define SYMBOL_WXRICHTEXTLISTSTYLEPAGE_SIZE wxSize(400, 300)
36 #define SYMBOL_WXRICHTEXTLISTSTYLEPAGE_POSITION wxDefaultPosition
37 ////@end control identifiers
38
39 /*!
40 * wxRichTextListStylePage class declaration
41 */
42
43 class WXDLLIMPEXP_RICHTEXT wxRichTextListStylePage: public wxRichTextDialogPage
44 {
45 DECLARE_DYNAMIC_CLASS( wxRichTextListStylePage )
46 DECLARE_EVENT_TABLE()
47 DECLARE_HELP_PROVISION()
48
49 public:
50 /// Constructors
51 wxRichTextListStylePage( );
52 wxRichTextListStylePage( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = SYMBOL_WXRICHTEXTLISTSTYLEPAGE_POSITION, const wxSize& size = SYMBOL_WXRICHTEXTLISTSTYLEPAGE_SIZE, long style = SYMBOL_WXRICHTEXTLISTSTYLEPAGE_STYLE );
53
54 /// Creation
55 bool Create( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = SYMBOL_WXRICHTEXTLISTSTYLEPAGE_POSITION, const wxSize& size = SYMBOL_WXRICHTEXTLISTSTYLEPAGE_SIZE, long style = SYMBOL_WXRICHTEXTLISTSTYLEPAGE_STYLE );
56
57 /// Initialises member variables
58 void Init();
59
60 /// Creates the controls and sizers
61 void CreateControls();
62
63 /// Updates the bullets preview
64 void UpdatePreview();
65
66 /// Transfer data from/to window
67 virtual bool TransferDataFromWindow();
68 virtual bool TransferDataToWindow();
69
70 /// Get attributes for selected level
71 wxRichTextAttr* GetAttributesForSelection();
72
73 /// Update for symbol-related controls
74 void OnSymbolUpdate( wxUpdateUIEvent& event );
75
76 /// Update for number-related controls
77 void OnNumberUpdate( wxUpdateUIEvent& event );
78
79 /// Update for standard bullet-related controls
80 void OnStandardBulletUpdate( wxUpdateUIEvent& event );
81
82 /// Just transfer to the window
83 void DoTransferDataToWindow();
84
85 /// Transfer from the window and preview
86 void TransferAndPreview();
87
88 ////@begin wxRichTextListStylePage event handler declarations
89
90 /// wxEVT_COMMAND_SPINCTRL_UPDATED event handler for ID_RICHTEXTLISTSTYLEPAGE_LEVEL
91 void OnLevelUpdated( wxSpinEvent& event );
92
93 /// wxEVT_SCROLL_LINEUP event handler for ID_RICHTEXTLISTSTYLEPAGE_LEVEL
94 void OnLevelUp( wxSpinEvent& event );
95
96 /// wxEVT_SCROLL_LINEDOWN event handler for ID_RICHTEXTLISTSTYLEPAGE_LEVEL
97 void OnLevelDown( wxSpinEvent& event );
98
99 /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTLISTSTYLEPAGE_LEVEL
100 void OnLevelTextUpdated( wxCommandEvent& event );
101
102 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTLISTSTYLEPAGE_LEVEL
103 void OnLevelUIUpdate( wxUpdateUIEvent& event );
104
105 /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_RICHTEXTLISTSTYLEPAGE_CHOOSE_FONT
106 void OnChooseFontClick( wxCommandEvent& event );
107
108 /// wxEVT_COMMAND_LISTBOX_SELECTED event handler for ID_RICHTEXTLISTSTYLEPAGE_STYLELISTBOX
109 void OnStylelistboxSelected( wxCommandEvent& event );
110
111 /// wxEVT_COMMAND_CHECKBOX_CLICKED event handler for ID_RICHTEXTLISTSTYLEPAGE_PERIODCTRL
112 void OnPeriodctrlClick( wxCommandEvent& event );
113
114 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTLISTSTYLEPAGE_PERIODCTRL
115 void OnPeriodctrlUpdate( wxUpdateUIEvent& event );
116
117 /// wxEVT_COMMAND_CHECKBOX_CLICKED event handler for ID_RICHTEXTLISTSTYLEPAGE_PARENTHESESCTRL
118 void OnParenthesesctrlClick( wxCommandEvent& event );
119
120 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTLISTSTYLEPAGE_PARENTHESESCTRL
121 void OnParenthesesctrlUpdate( wxUpdateUIEvent& event );
122
123 /// wxEVT_COMMAND_CHECKBOX_CLICKED event handler for ID_RICHTEXTLISTSTYLEPAGE_RIGHTPARENTHESISCTRL
124 void OnRightParenthesisCtrlClick( wxCommandEvent& event );
125
126 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTLISTSTYLEPAGE_RIGHTPARENTHESISCTRL
127 void OnRightParenthesisCtrlUpdate( wxUpdateUIEvent& event );
128
129 /// wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_RICHTEXTLISTSTYLEPAGE_BULLETALIGNMENTCTRL
130 void OnBulletAlignmentCtrlSelected( wxCommandEvent& event );
131
132 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTLISTSTYLEPAGE_SYMBOLSTATIC
133 void OnSymbolstaticUpdate( wxUpdateUIEvent& event );
134
135 /// wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_RICHTEXTLISTSTYLEPAGE_SYMBOLCTRL
136 void OnSymbolctrlSelected( wxCommandEvent& event );
137
138 /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTLISTSTYLEPAGE_SYMBOLCTRL
139 void OnSymbolctrlUpdated( wxCommandEvent& event );
140
141 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTLISTSTYLEPAGE_SYMBOLCTRL
142 void OnSymbolctrlUIUpdate( wxUpdateUIEvent& event );
143
144 /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_RICHTEXTLISTSTYLEPAGE_CHOOSE_SYMBOL
145 void OnChooseSymbolClick( wxCommandEvent& event );
146
147 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTLISTSTYLEPAGE_CHOOSE_SYMBOL
148 void OnChooseSymbolUpdate( wxUpdateUIEvent& event );
149
150 /// wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_RICHTEXTLISTSTYLEPAGE_SYMBOLFONTCTRL
151 void OnSymbolfontctrlSelected( wxCommandEvent& event );
152
153 /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTLISTSTYLEPAGE_SYMBOLFONTCTRL
154 void OnSymbolfontctrlUpdated( wxCommandEvent& event );
155
156 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTLISTSTYLEPAGE_SYMBOLFONTCTRL
157 void OnSymbolfontctrlUIUpdate( wxUpdateUIEvent& event );
158
159 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTLISTSTYLEPAGE_NAMESTATIC
160 void OnNamestaticUpdate( wxUpdateUIEvent& event );
161
162 /// wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_RICHTEXTLISTSTYLEPAGE_NAMECTRL
163 void OnNamectrlSelected( wxCommandEvent& event );
164
165 /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTLISTSTYLEPAGE_NAMECTRL
166 void OnNamectrlUpdated( wxCommandEvent& event );
167
168 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTLISTSTYLEPAGE_NAMECTRL
169 void OnNamectrlUIUpdate( wxUpdateUIEvent& event );
170
171 /// wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_RICHTEXTLISTSTYLEPAGE_ALIGNLEFT
172 void OnRichtextliststylepageAlignleftSelected( wxCommandEvent& event );
173
174 /// wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_RICHTEXTLISTSTYLEPAGE_ALIGNRIGHT
175 void OnRichtextliststylepageAlignrightSelected( wxCommandEvent& event );
176
177 /// wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_RICHTEXTLISTSTYLEPAGE_JUSTIFIED
178 void OnRichtextliststylepageJustifiedSelected( wxCommandEvent& event );
179
180 /// wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_RICHTEXTLISTSTYLEPAGE_CENTERED
181 void OnRichtextliststylepageCenteredSelected( wxCommandEvent& event );
182
183 /// wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_RICHTEXTLISTSTYLEPAGE_ALIGNINDETERMINATE
184 void OnRichtextliststylepageAlignindeterminateSelected( wxCommandEvent& event );
185
186 /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTLISTSTYLEPAGE_INDENTLEFT
187 void OnIndentLeftUpdated( wxCommandEvent& event );
188
189 /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTLISTSTYLEPAGE_INDENTFIRSTLINE
190 void OnIndentFirstLineUpdated( wxCommandEvent& event );
191
192 /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTLISTSTYLEPAGE_INDENTRIGHT
193 void OnIndentRightUpdated( wxCommandEvent& event );
194
195 /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTLISTSTYLEPAGE_SPACINGBEFORE
196 void OnSpacingBeforeUpdated( wxCommandEvent& event );
197
198 /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTLISTSTYLEPAGE_SPACINGAFTER
199 void OnSpacingAfterUpdated( wxCommandEvent& event );
200
201 /// wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_RICHTEXTLISTSTYLEPAGE_LINESPACING
202 void OnLineSpacingSelected( wxCommandEvent& event );
203
204 ////@end wxRichTextListStylePage event handler declarations
205
206 ////@begin wxRichTextListStylePage member function declarations
207
208 /// Retrieves bitmap resources
209 wxBitmap GetBitmapResource( const wxString& name );
210
211 /// Retrieves icon resources
212 wxIcon GetIconResource( const wxString& name );
213 ////@end wxRichTextListStylePage member function declarations
214
215 /// Should we show tooltips?
216 static bool ShowToolTips();
217
218 ////@begin wxRichTextListStylePage member variables
219 wxSpinCtrl* m_levelCtrl;
220 wxListBox* m_styleListBox;
221 wxCheckBox* m_periodCtrl;
222 wxCheckBox* m_parenthesesCtrl;
223 wxCheckBox* m_rightParenthesisCtrl;
224 wxComboBox* m_bulletAlignmentCtrl;
225 wxComboBox* m_symbolCtrl;
226 wxComboBox* m_symbolFontCtrl;
227 wxComboBox* m_bulletNameCtrl;
228 wxRadioButton* m_alignmentLeft;
229 wxRadioButton* m_alignmentRight;
230 wxRadioButton* m_alignmentJustified;
231 wxRadioButton* m_alignmentCentred;
232 wxRadioButton* m_alignmentIndeterminate;
233 wxTextCtrl* m_indentLeft;
234 wxTextCtrl* m_indentLeftFirst;
235 wxTextCtrl* m_indentRight;
236 wxTextCtrl* m_spacingBefore;
237 wxTextCtrl* m_spacingAfter;
238 wxComboBox* m_spacingLine;
239 wxRichTextCtrl* m_previewCtrl;
240 /// Control identifiers
241 enum {
242 ID_RICHTEXTLISTSTYLEPAGE = 10616,
243 ID_RICHTEXTLISTSTYLEPAGE_LEVEL = 10617,
244 ID_RICHTEXTLISTSTYLEPAGE_CHOOSE_FONT = 10604,
245 ID_RICHTEXTLISTSTYLEPAGE_NOTEBOOK = 10618,
246 ID_RICHTEXTLISTSTYLEPAGE_BULLETS = 10619,
247 ID_RICHTEXTLISTSTYLEPAGE_STYLELISTBOX = 10620,
248 ID_RICHTEXTLISTSTYLEPAGE_PERIODCTRL = 10627,
249 ID_RICHTEXTLISTSTYLEPAGE_PARENTHESESCTRL = 10626,
250 ID_RICHTEXTLISTSTYLEPAGE_RIGHTPARENTHESISCTRL = 10602,
251 ID_RICHTEXTLISTSTYLEPAGE_BULLETALIGNMENTCTRL = 10603,
252 ID_RICHTEXTLISTSTYLEPAGE_SYMBOLSTATIC = 10621,
253 ID_RICHTEXTLISTSTYLEPAGE_SYMBOLCTRL = 10622,
254 ID_RICHTEXTLISTSTYLEPAGE_CHOOSE_SYMBOL = 10623,
255 ID_RICHTEXTLISTSTYLEPAGE_SYMBOLFONTCTRL = 10625,
256 ID_RICHTEXTLISTSTYLEPAGE_NAMESTATIC = 10600,
257 ID_RICHTEXTLISTSTYLEPAGE_NAMECTRL = 10601,
258 ID_RICHTEXTLISTSTYLEPAGE_SPACING = 10628,
259 ID_RICHTEXTLISTSTYLEPAGE_ALIGNLEFT = 10629,
260 ID_RICHTEXTLISTSTYLEPAGE_ALIGNRIGHT = 10630,
261 ID_RICHTEXTLISTSTYLEPAGE_JUSTIFIED = 10631,
262 ID_RICHTEXTLISTSTYLEPAGE_CENTERED = 10632,
263 ID_RICHTEXTLISTSTYLEPAGE_ALIGNINDETERMINATE = 10633,
264 ID_RICHTEXTLISTSTYLEPAGE_INDENTLEFT = 10634,
265 ID_RICHTEXTLISTSTYLEPAGE_INDENTFIRSTLINE = 10635,
266 ID_RICHTEXTLISTSTYLEPAGE_INDENTRIGHT = 10636,
267 ID_RICHTEXTLISTSTYLEPAGE_SPACINGBEFORE = 10637,
268 ID_RICHTEXTLISTSTYLEPAGE_SPACINGAFTER = 10638,
269 ID_RICHTEXTLISTSTYLEPAGE_LINESPACING = 10639,
270 ID_RICHTEXTLISTSTYLEPAGE_RICHTEXTCTRL = 10640
271 };
272 ////@end wxRichTextListStylePage member variables
273
274 bool m_dontUpdate;
275 int m_currentLevel;
276 };
277
278 #endif
279 // _RICHTEXTLISTSTYLEPAGE_H_