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