]>
Commit | Line | Data |
---|---|---|
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 |
41a85215 | 7 | // RCS-ID: $Id$ |
dadd4f55 | 8 | // Copyright: (c) Julian Smart |
41a85215 | 9 | // Licence: wxWindows licence |
dadd4f55 JS |
10 | ///////////////////////////////////////////////////////////////////////////// |
11 | ||
12 | #ifndef _RICHTEXTLISTSTYLEPAGE_H_ | |
13 | #define _RICHTEXTLISTSTYLEPAGE_H_ | |
14 | ||
15 | /*! | |
16 | * Includes | |
17 | */ | |
18 | ||
603f702b JS |
19 | #include "wx/richtext/richtextdialogpage.h" |
20 | ||
dadd4f55 JS |
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 | |
603f702b | 33 | #define SYMBOL_WXRICHTEXTLISTSTYLEPAGE_TITLE wxEmptyString |
dadd4f55 JS |
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 | ||
603f702b | 43 | class WXDLLIMPEXP_RICHTEXT wxRichTextListStylePage: public wxRichTextDialogPage |
41a85215 | 44 | { |
dadd4f55 JS |
45 | DECLARE_DYNAMIC_CLASS( wxRichTextListStylePage ) |
46 | DECLARE_EVENT_TABLE() | |
603f702b | 47 | DECLARE_HELP_PROVISION() |
dadd4f55 JS |
48 | |
49 | public: | |
50 | /// Constructors | |
51 | wxRichTextListStylePage( ); | |
8871035d | 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 ); |
dadd4f55 JS |
53 | |
54 | /// Creation | |
8871035d | 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 ); |
dadd4f55 JS |
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(); | |
41a85215 | 69 | |
dadd4f55 | 70 | /// Get attributes for selected level |
24777478 | 71 | wxRichTextAttr* GetAttributesForSelection(); |
dadd4f55 JS |
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 | ||
f089713f JS |
79 | /// Update for standard bullet-related controls |
80 | void OnStandardBulletUpdate( wxUpdateUIEvent& event ); | |
81 | ||
dadd4f55 JS |
82 | /// Just transfer to the window |
83 | void DoTransferDataToWindow(); | |
84 | ||
85 | /// Transfer from the window and preview | |
86 | void TransferAndPreview(); | |
41a85215 | 87 | |
dadd4f55 JS |
88 | ////@begin wxRichTextListStylePage event handler declarations |
89 | ||
ce7fe42e | 90 | /// wxEVT_SPINCTRL event handler for ID_RICHTEXTLISTSTYLEPAGE_LEVEL |
dadd4f55 JS |
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 | ||
ce7fe42e | 99 | /// wxEVT_TEXT event handler for ID_RICHTEXTLISTSTYLEPAGE_LEVEL |
dadd4f55 JS |
100 | void OnLevelTextUpdated( wxCommandEvent& event ); |
101 | ||
102 | /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTLISTSTYLEPAGE_LEVEL | |
103 | void OnLevelUIUpdate( wxUpdateUIEvent& event ); | |
104 | ||
ce7fe42e | 105 | /// wxEVT_BUTTON event handler for ID_RICHTEXTLISTSTYLEPAGE_CHOOSE_FONT |
dadd4f55 JS |
106 | void OnChooseFontClick( wxCommandEvent& event ); |
107 | ||
ce7fe42e | 108 | /// wxEVT_LISTBOX event handler for ID_RICHTEXTLISTSTYLEPAGE_STYLELISTBOX |
dadd4f55 JS |
109 | void OnStylelistboxSelected( wxCommandEvent& event ); |
110 | ||
ce7fe42e | 111 | /// wxEVT_CHECKBOX event handler for ID_RICHTEXTLISTSTYLEPAGE_PERIODCTRL |
f089713f JS |
112 | void OnPeriodctrlClick( wxCommandEvent& event ); |
113 | ||
114 | /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTLISTSTYLEPAGE_PERIODCTRL | |
115 | void OnPeriodctrlUpdate( wxUpdateUIEvent& event ); | |
116 | ||
ce7fe42e | 117 | /// wxEVT_CHECKBOX event handler for ID_RICHTEXTLISTSTYLEPAGE_PARENTHESESCTRL |
f089713f JS |
118 | void OnParenthesesctrlClick( wxCommandEvent& event ); |
119 | ||
120 | /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTLISTSTYLEPAGE_PARENTHESESCTRL | |
121 | void OnParenthesesctrlUpdate( wxUpdateUIEvent& event ); | |
122 | ||
ce7fe42e | 123 | /// wxEVT_CHECKBOX event handler for ID_RICHTEXTLISTSTYLEPAGE_RIGHTPARENTHESISCTRL |
d2d0adc7 JS |
124 | void OnRightParenthesisCtrlClick( wxCommandEvent& event ); |
125 | ||
126 | /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTLISTSTYLEPAGE_RIGHTPARENTHESISCTRL | |
127 | void OnRightParenthesisCtrlUpdate( wxUpdateUIEvent& event ); | |
128 | ||
ce7fe42e | 129 | /// wxEVT_COMBOBOX event handler for ID_RICHTEXTLISTSTYLEPAGE_BULLETALIGNMENTCTRL |
d2d0adc7 JS |
130 | void OnBulletAlignmentCtrlSelected( wxCommandEvent& event ); |
131 | ||
dadd4f55 JS |
132 | /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTLISTSTYLEPAGE_SYMBOLSTATIC |
133 | void OnSymbolstaticUpdate( wxUpdateUIEvent& event ); | |
134 | ||
ce7fe42e | 135 | /// wxEVT_COMBOBOX event handler for ID_RICHTEXTLISTSTYLEPAGE_SYMBOLCTRL |
dadd4f55 JS |
136 | void OnSymbolctrlSelected( wxCommandEvent& event ); |
137 | ||
ce7fe42e | 138 | /// wxEVT_TEXT event handler for ID_RICHTEXTLISTSTYLEPAGE_SYMBOLCTRL |
dadd4f55 JS |
139 | void OnSymbolctrlUpdated( wxCommandEvent& event ); |
140 | ||
cbfc8d9a | 141 | /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTLISTSTYLEPAGE_SYMBOLCTRL |
dadd4f55 JS |
142 | void OnSymbolctrlUIUpdate( wxUpdateUIEvent& event ); |
143 | ||
ce7fe42e | 144 | /// wxEVT_BUTTON event handler for ID_RICHTEXTLISTSTYLEPAGE_CHOOSE_SYMBOL |
dadd4f55 JS |
145 | void OnChooseSymbolClick( wxCommandEvent& event ); |
146 | ||
cbfc8d9a | 147 | /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTLISTSTYLEPAGE_CHOOSE_SYMBOL |
dadd4f55 JS |
148 | void OnChooseSymbolUpdate( wxUpdateUIEvent& event ); |
149 | ||
ce7fe42e | 150 | /// wxEVT_COMBOBOX event handler for ID_RICHTEXTLISTSTYLEPAGE_SYMBOLFONTCTRL |
dadd4f55 JS |
151 | void OnSymbolfontctrlSelected( wxCommandEvent& event ); |
152 | ||
ce7fe42e | 153 | /// wxEVT_TEXT event handler for ID_RICHTEXTLISTSTYLEPAGE_SYMBOLFONTCTRL |
dadd4f55 JS |
154 | void OnSymbolfontctrlUpdated( wxCommandEvent& event ); |
155 | ||
156 | /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTLISTSTYLEPAGE_SYMBOLFONTCTRL | |
157 | void OnSymbolfontctrlUIUpdate( wxUpdateUIEvent& event ); | |
158 | ||
f089713f JS |
159 | /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTLISTSTYLEPAGE_NAMESTATIC |
160 | void OnNamestaticUpdate( wxUpdateUIEvent& event ); | |
dadd4f55 | 161 | |
ce7fe42e | 162 | /// wxEVT_COMBOBOX event handler for ID_RICHTEXTLISTSTYLEPAGE_NAMECTRL |
f089713f | 163 | void OnNamectrlSelected( wxCommandEvent& event ); |
dadd4f55 | 164 | |
ce7fe42e | 165 | /// wxEVT_TEXT event handler for ID_RICHTEXTLISTSTYLEPAGE_NAMECTRL |
f089713f | 166 | void OnNamectrlUpdated( wxCommandEvent& event ); |
dadd4f55 | 167 | |
f089713f JS |
168 | /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTLISTSTYLEPAGE_NAMECTRL |
169 | void OnNamectrlUIUpdate( wxUpdateUIEvent& event ); | |
dadd4f55 | 170 | |
ce7fe42e | 171 | /// wxEVT_RADIOBUTTON event handler for ID_RICHTEXTLISTSTYLEPAGE_ALIGNLEFT |
dadd4f55 JS |
172 | void OnRichtextliststylepageAlignleftSelected( wxCommandEvent& event ); |
173 | ||
ce7fe42e | 174 | /// wxEVT_RADIOBUTTON event handler for ID_RICHTEXTLISTSTYLEPAGE_ALIGNRIGHT |
dadd4f55 JS |
175 | void OnRichtextliststylepageAlignrightSelected( wxCommandEvent& event ); |
176 | ||
ce7fe42e | 177 | /// wxEVT_RADIOBUTTON event handler for ID_RICHTEXTLISTSTYLEPAGE_JUSTIFIED |
dadd4f55 JS |
178 | void OnRichtextliststylepageJustifiedSelected( wxCommandEvent& event ); |
179 | ||
ce7fe42e | 180 | /// wxEVT_RADIOBUTTON event handler for ID_RICHTEXTLISTSTYLEPAGE_CENTERED |
dadd4f55 JS |
181 | void OnRichtextliststylepageCenteredSelected( wxCommandEvent& event ); |
182 | ||
ce7fe42e | 183 | /// wxEVT_RADIOBUTTON event handler for ID_RICHTEXTLISTSTYLEPAGE_ALIGNINDETERMINATE |
dadd4f55 JS |
184 | void OnRichtextliststylepageAlignindeterminateSelected( wxCommandEvent& event ); |
185 | ||
ce7fe42e | 186 | /// wxEVT_TEXT event handler for ID_RICHTEXTLISTSTYLEPAGE_INDENTLEFT |
dadd4f55 JS |
187 | void OnIndentLeftUpdated( wxCommandEvent& event ); |
188 | ||
ce7fe42e | 189 | /// wxEVT_TEXT event handler for ID_RICHTEXTLISTSTYLEPAGE_INDENTFIRSTLINE |
dadd4f55 JS |
190 | void OnIndentFirstLineUpdated( wxCommandEvent& event ); |
191 | ||
ce7fe42e | 192 | /// wxEVT_TEXT event handler for ID_RICHTEXTLISTSTYLEPAGE_INDENTRIGHT |
dadd4f55 JS |
193 | void OnIndentRightUpdated( wxCommandEvent& event ); |
194 | ||
ce7fe42e | 195 | /// wxEVT_TEXT event handler for ID_RICHTEXTLISTSTYLEPAGE_SPACINGBEFORE |
dadd4f55 JS |
196 | void OnSpacingBeforeUpdated( wxCommandEvent& event ); |
197 | ||
ce7fe42e | 198 | /// wxEVT_TEXT event handler for ID_RICHTEXTLISTSTYLEPAGE_SPACINGAFTER |
dadd4f55 JS |
199 | void OnSpacingAfterUpdated( wxCommandEvent& event ); |
200 | ||
ce7fe42e | 201 | /// wxEVT_COMBOBOX event handler for ID_RICHTEXTLISTSTYLEPAGE_LINESPACING |
dadd4f55 JS |
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; | |
f089713f JS |
221 | wxCheckBox* m_periodCtrl; |
222 | wxCheckBox* m_parenthesesCtrl; | |
d2d0adc7 JS |
223 | wxCheckBox* m_rightParenthesisCtrl; |
224 | wxComboBox* m_bulletAlignmentCtrl; | |
dadd4f55 JS |
225 | wxComboBox* m_symbolCtrl; |
226 | wxComboBox* m_symbolFontCtrl; | |
f089713f | 227 | wxComboBox* m_bulletNameCtrl; |
dadd4f55 JS |
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, | |
cbfc8d9a | 245 | ID_RICHTEXTLISTSTYLEPAGE_NOTEBOOK = 10618, |
dadd4f55 JS |
246 | ID_RICHTEXTLISTSTYLEPAGE_BULLETS = 10619, |
247 | ID_RICHTEXTLISTSTYLEPAGE_STYLELISTBOX = 10620, | |
f089713f JS |
248 | ID_RICHTEXTLISTSTYLEPAGE_PERIODCTRL = 10627, |
249 | ID_RICHTEXTLISTSTYLEPAGE_PARENTHESESCTRL = 10626, | |
d2d0adc7 JS |
250 | ID_RICHTEXTLISTSTYLEPAGE_RIGHTPARENTHESISCTRL = 10602, |
251 | ID_RICHTEXTLISTSTYLEPAGE_BULLETALIGNMENTCTRL = 10603, | |
dadd4f55 | 252 | ID_RICHTEXTLISTSTYLEPAGE_SYMBOLSTATIC = 10621, |
cbfc8d9a JS |
253 | ID_RICHTEXTLISTSTYLEPAGE_SYMBOLCTRL = 10622, |
254 | ID_RICHTEXTLISTSTYLEPAGE_CHOOSE_SYMBOL = 10623, | |
dadd4f55 | 255 | ID_RICHTEXTLISTSTYLEPAGE_SYMBOLFONTCTRL = 10625, |
f089713f JS |
256 | ID_RICHTEXTLISTSTYLEPAGE_NAMESTATIC = 10600, |
257 | ID_RICHTEXTLISTSTYLEPAGE_NAMECTRL = 10601, | |
dadd4f55 JS |
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_ |