]> git.saurik.com Git - wxWidgets.git/blob - include/wx/richtext/richtextliststylepage.h
replacing old core graphics with new graphics context implementation
[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 = SYMBOL_WXRICHTEXTLISTSTYLEPAGE_IDNAME, 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 = SYMBOL_WXRICHTEXTLISTSTYLEPAGE_IDNAME, 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 wxTextAttrEx* 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 /// Just transfer to the window
77 void DoTransferDataToWindow();
78
79 /// Transfer from the window and preview
80 void TransferAndPreview();
81
82 ////@begin wxRichTextListStylePage event handler declarations
83
84 /// wxEVT_COMMAND_SPINCTRL_UPDATED event handler for ID_RICHTEXTLISTSTYLEPAGE_LEVEL
85 void OnLevelUpdated( wxSpinEvent& event );
86
87 /// wxEVT_SCROLL_LINEUP event handler for ID_RICHTEXTLISTSTYLEPAGE_LEVEL
88 void OnLevelUp( wxSpinEvent& event );
89
90 /// wxEVT_SCROLL_LINEDOWN event handler for ID_RICHTEXTLISTSTYLEPAGE_LEVEL
91 void OnLevelDown( wxSpinEvent& event );
92
93 /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTLISTSTYLEPAGE_LEVEL
94 void OnLevelTextUpdated( wxCommandEvent& event );
95
96 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTLISTSTYLEPAGE_LEVEL
97 void OnLevelUIUpdate( wxUpdateUIEvent& event );
98
99 /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_RICHTEXTLISTSTYLEPAGE_CHOOSE_FONT
100 void OnChooseFontClick( wxCommandEvent& event );
101
102 /// wxEVT_COMMAND_LISTBOX_SELECTED event handler for ID_RICHTEXTLISTSTYLEPAGE_STYLELISTBOX
103 void OnStylelistboxSelected( wxCommandEvent& event );
104
105 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTLISTSTYLEPAGE_SYMBOLSTATIC
106 void OnSymbolstaticUpdate( wxUpdateUIEvent& event );
107
108 /// wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_RICHTEXTBULLETSPAGE_SYMBOLCTRL
109 void OnSymbolctrlSelected( wxCommandEvent& event );
110
111 /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTBULLETSPAGE_SYMBOLCTRL
112 void OnSymbolctrlUpdated( wxCommandEvent& event );
113
114 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_SYMBOLCTRL
115 void OnSymbolctrlUIUpdate( wxUpdateUIEvent& event );
116
117 /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_RICHTEXTBULLETSPAGE_CHOOSE_SYMBOL
118 void OnChooseSymbolClick( wxCommandEvent& event );
119
120 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_CHOOSE_SYMBOL
121 void OnChooseSymbolUpdate( wxUpdateUIEvent& event );
122
123 /// wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_RICHTEXTLISTSTYLEPAGE_SYMBOLFONTCTRL
124 void OnSymbolfontctrlSelected( wxCommandEvent& event );
125
126 /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTLISTSTYLEPAGE_SYMBOLFONTCTRL
127 void OnSymbolfontctrlUpdated( wxCommandEvent& event );
128
129 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTLISTSTYLEPAGE_SYMBOLFONTCTRL
130 void OnSymbolfontctrlUIUpdate( wxUpdateUIEvent& event );
131
132 /// wxEVT_COMMAND_CHECKBOX_CLICKED event handler for ID_RICHTEXTLISTSTYLEPAGE_PARENTHESESCTRL
133 void OnParenthesesctrlClick( wxCommandEvent& event );
134
135 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTLISTSTYLEPAGE_PARENTHESESCTRL
136 void OnParenthesesctrlUpdate( wxUpdateUIEvent& event );
137
138 /// wxEVT_COMMAND_CHECKBOX_CLICKED event handler for ID_RICHTEXTLISTSTYLEPAGE_PERIODCTRL
139 void OnPeriodctrlClick( wxCommandEvent& event );
140
141 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTLISTSTYLEPAGE_PERIODCTRL
142 void OnPeriodctrlUpdate( wxUpdateUIEvent& event );
143
144 /// wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_RICHTEXTLISTSTYLEPAGE_ALIGNLEFT
145 void OnRichtextliststylepageAlignleftSelected( wxCommandEvent& event );
146
147 /// wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_RICHTEXTLISTSTYLEPAGE_ALIGNRIGHT
148 void OnRichtextliststylepageAlignrightSelected( wxCommandEvent& event );
149
150 /// wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_RICHTEXTLISTSTYLEPAGE_JUSTIFIED
151 void OnRichtextliststylepageJustifiedSelected( wxCommandEvent& event );
152
153 /// wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_RICHTEXTLISTSTYLEPAGE_CENTERED
154 void OnRichtextliststylepageCenteredSelected( wxCommandEvent& event );
155
156 /// wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for ID_RICHTEXTLISTSTYLEPAGE_ALIGNINDETERMINATE
157 void OnRichtextliststylepageAlignindeterminateSelected( wxCommandEvent& event );
158
159 /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTLISTSTYLEPAGE_INDENTLEFT
160 void OnIndentLeftUpdated( wxCommandEvent& event );
161
162 /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTLISTSTYLEPAGE_INDENTFIRSTLINE
163 void OnIndentFirstLineUpdated( wxCommandEvent& event );
164
165 /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTLISTSTYLEPAGE_INDENTRIGHT
166 void OnIndentRightUpdated( wxCommandEvent& event );
167
168 /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTLISTSTYLEPAGE_SPACINGBEFORE
169 void OnSpacingBeforeUpdated( wxCommandEvent& event );
170
171 /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTLISTSTYLEPAGE_SPACINGAFTER
172 void OnSpacingAfterUpdated( wxCommandEvent& event );
173
174 /// wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_RICHTEXTLISTSTYLEPAGE_LINESPACING
175 void OnLineSpacingSelected( wxCommandEvent& event );
176
177 ////@end wxRichTextListStylePage event handler declarations
178
179 ////@begin wxRichTextListStylePage member function declarations
180
181 /// Retrieves bitmap resources
182 wxBitmap GetBitmapResource( const wxString& name );
183
184 /// Retrieves icon resources
185 wxIcon GetIconResource( const wxString& name );
186 ////@end wxRichTextListStylePage member function declarations
187
188 /// Should we show tooltips?
189 static bool ShowToolTips();
190
191 ////@begin wxRichTextListStylePage member variables
192 wxSpinCtrl* m_levelCtrl;
193 wxListBox* m_styleListBox;
194 wxComboBox* m_symbolCtrl;
195 wxComboBox* m_symbolFontCtrl;
196 wxCheckBox* m_parenthesesCtrl;
197 wxCheckBox* m_periodCtrl;
198 wxRadioButton* m_alignmentLeft;
199 wxRadioButton* m_alignmentRight;
200 wxRadioButton* m_alignmentJustified;
201 wxRadioButton* m_alignmentCentred;
202 wxRadioButton* m_alignmentIndeterminate;
203 wxTextCtrl* m_indentLeft;
204 wxTextCtrl* m_indentLeftFirst;
205 wxTextCtrl* m_indentRight;
206 wxTextCtrl* m_spacingBefore;
207 wxTextCtrl* m_spacingAfter;
208 wxComboBox* m_spacingLine;
209 wxRichTextCtrl* m_previewCtrl;
210 /// Control identifiers
211 enum {
212 ID_RICHTEXTLISTSTYLEPAGE = 10616,
213 ID_RICHTEXTLISTSTYLEPAGE_LEVEL = 10617,
214 ID_RICHTEXTLISTSTYLEPAGE_CHOOSE_FONT = 10604,
215 ID_RICHTEXTLISTSTYLEPAGE_NOTEBOOK = 10618,
216 ID_RICHTEXTLISTSTYLEPAGE_BULLETS = 10619,
217 ID_RICHTEXTLISTSTYLEPAGE_STYLELISTBOX = 10620,
218 ID_RICHTEXTLISTSTYLEPAGE_SYMBOLSTATIC = 10621,
219 ID_RICHTEXTBULLETSPAGE_SYMBOLCTRL = 10622,
220 ID_RICHTEXTBULLETSPAGE_CHOOSE_SYMBOL = 10623,
221 ID_RICHTEXTLISTSTYLEPAGE_SYMBOLFONTCTRL = 10625,
222 ID_RICHTEXTLISTSTYLEPAGE_PARENTHESESCTRL = 10626,
223 ID_RICHTEXTLISTSTYLEPAGE_PERIODCTRL = 10627,
224 ID_RICHTEXTLISTSTYLEPAGE_SPACING = 10628,
225 ID_RICHTEXTLISTSTYLEPAGE_ALIGNLEFT = 10629,
226 ID_RICHTEXTLISTSTYLEPAGE_ALIGNRIGHT = 10630,
227 ID_RICHTEXTLISTSTYLEPAGE_JUSTIFIED = 10631,
228 ID_RICHTEXTLISTSTYLEPAGE_CENTERED = 10632,
229 ID_RICHTEXTLISTSTYLEPAGE_ALIGNINDETERMINATE = 10633,
230 ID_RICHTEXTLISTSTYLEPAGE_INDENTLEFT = 10634,
231 ID_RICHTEXTLISTSTYLEPAGE_INDENTFIRSTLINE = 10635,
232 ID_RICHTEXTLISTSTYLEPAGE_INDENTRIGHT = 10636,
233 ID_RICHTEXTLISTSTYLEPAGE_SPACINGBEFORE = 10637,
234 ID_RICHTEXTLISTSTYLEPAGE_SPACINGAFTER = 10638,
235 ID_RICHTEXTLISTSTYLEPAGE_LINESPACING = 10639,
236 ID_RICHTEXTLISTSTYLEPAGE_RICHTEXTCTRL = 10640
237 };
238 ////@end wxRichTextListStylePage member variables
239
240 bool m_dontUpdate;
241 int m_currentLevel;
242 };
243
244 #endif
245 // _RICHTEXTLISTSTYLEPAGE_H_