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