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