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