]> git.saurik.com Git - wxWidgets.git/blame - include/wx/richtext/richtextbulletspage.h
Dispatch pending events without waiting for idle time (closes #10994).
[wxWidgets.git] / include / wx / richtext / richtextbulletspage.h
CommitLineData
97ff49b3 1/////////////////////////////////////////////////////////////////////////////
b68603d5 2// Name: wx/richtext/richtextbulletspage.h
97ff49b3
JS
3// Purpose:
4// Author: Julian Smart
5// Modified by:
6// Created: 10/4/2006 10:32:31 AM
b68603d5 7// RCS-ID: $Id$
97ff49b3 8// Copyright: (c) Julian Smart
b68603d5 9// Licence: wxWindows licence
97ff49b3
JS
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _RICHTEXTBULLETSPAGE_H_
13#define _RICHTEXTBULLETSPAGE_H_
14
15/*!
16 * Includes
17 */
25af884d 18#include "wx/spinbutt.h" // for wxSpinEvent
97ff49b3 19
97ff49b3
JS
20/*!
21 * Forward declarations
22 */
23
24////@begin forward declarations
25class wxSpinCtrl;
26class wxRichTextCtrl;
27////@end forward declarations
28
29/*!
30 * Control identifiers
31 */
32
33////@begin control identifiers
34#define SYMBOL_WXRICHTEXTBULLETSPAGE_STYLE wxRESIZE_BORDER|wxTAB_TRAVERSAL
c187b472 35#define SYMBOL_WXRICHTEXTBULLETSPAGE_TITLE _T("")
97ff49b3
JS
36#define SYMBOL_WXRICHTEXTBULLETSPAGE_IDNAME ID_RICHTEXTBULLETSPAGE
37#define SYMBOL_WXRICHTEXTBULLETSPAGE_SIZE wxSize(400, 300)
38#define SYMBOL_WXRICHTEXTBULLETSPAGE_POSITION wxDefaultPosition
39////@end control identifiers
40
97ff49b3
JS
41/*!
42 * wxRichTextBulletsPage class declaration
43 */
44
45class WXDLLIMPEXP_RICHTEXT wxRichTextBulletsPage: public wxPanel
46{
47 DECLARE_DYNAMIC_CLASS( wxRichTextBulletsPage )
48 DECLARE_EVENT_TABLE()
49
50public:
51 /// Constructors
52 wxRichTextBulletsPage( );
8871035d 53 wxRichTextBulletsPage( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = SYMBOL_WXRICHTEXTBULLETSPAGE_POSITION, const wxSize& size = SYMBOL_WXRICHTEXTBULLETSPAGE_SIZE, long style = SYMBOL_WXRICHTEXTBULLETSPAGE_STYLE );
97ff49b3
JS
54
55 /// Creation
8871035d 56 bool Create( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = SYMBOL_WXRICHTEXTBULLETSPAGE_POSITION, const wxSize& size = SYMBOL_WXRICHTEXTBULLETSPAGE_SIZE, long style = SYMBOL_WXRICHTEXTBULLETSPAGE_STYLE );
97ff49b3
JS
57
58 /// Initialise members
59 void Init();
60
61 /// Creates the controls and sizers
62 void CreateControls();
63
64 /// Updates the bullets preview
65 void UpdatePreview();
66
67 /// Transfer data from/to window
68 virtual bool TransferDataFromWindow();
69 virtual bool TransferDataToWindow();
70
71 /// Gets the attributes associated with the main formatting dialog
44cc96a8 72 wxTextAttr* GetAttributes();
97ff49b3
JS
73
74 /// Update for symbol-related controls
75 void OnSymbolUpdate( wxUpdateUIEvent& event );
76
77 /// Update for number-related controls
78 void OnNumberUpdate( wxUpdateUIEvent& event );
79
f089713f
JS
80 /// Update for standard bullet-related controls
81 void OnStandardBulletUpdate( wxUpdateUIEvent& event );
82
97ff49b3
JS
83////@begin wxRichTextBulletsPage event handler declarations
84
85 /// wxEVT_COMMAND_LISTBOX_SELECTED event handler for ID_RICHTEXTBULLETSPAGE_STYLELISTBOX
86 void OnStylelistboxSelected( wxCommandEvent& event );
87
f089713f
JS
88 /// wxEVT_COMMAND_CHECKBOX_CLICKED event handler for ID_RICHTEXTBULLETSPAGE_PERIODCTRL
89 void OnPeriodctrlClick( wxCommandEvent& event );
90
91 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_PERIODCTRL
92 void OnPeriodctrlUpdate( wxUpdateUIEvent& event );
93
94 /// wxEVT_COMMAND_CHECKBOX_CLICKED event handler for ID_RICHTEXTBULLETSPAGE_PARENTHESESCTRL
95 void OnParenthesesctrlClick( wxCommandEvent& event );
96
97 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_PARENTHESESCTRL
98 void OnParenthesesctrlUpdate( wxUpdateUIEvent& event );
99
d2d0adc7
JS
100 /// wxEVT_COMMAND_CHECKBOX_CLICKED event handler for ID_RICHTEXTBULLETSPAGE_RIGHTPARENTHESISCTRL
101 void OnRightParenthesisCtrlClick( wxCommandEvent& event );
f089713f 102
d2d0adc7
JS
103 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_RIGHTPARENTHESISCTRL
104 void OnRightParenthesisCtrlUpdate( wxUpdateUIEvent& event );
f089713f 105
d2d0adc7
JS
106 /// wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_RICHTEXTBULLETSPAGE_BULLETALIGNMENTCTRL
107 void OnBulletAlignmentCtrlSelected( wxCommandEvent& event );
f089713f 108
97ff49b3
JS
109 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_SYMBOLSTATIC
110 void OnSymbolstaticUpdate( wxUpdateUIEvent& event );
111
112 /// wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_RICHTEXTBULLETSPAGE_SYMBOLCTRL
113 void OnSymbolctrlSelected( wxCommandEvent& event );
114
115 /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTBULLETSPAGE_SYMBOLCTRL
116 void OnSymbolctrlUpdated( wxCommandEvent& event );
117
118 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_SYMBOLCTRL
119 void OnSymbolctrlUpdate( wxUpdateUIEvent& event );
120
121 /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_RICHTEXTBULLETSPAGE_CHOOSE_SYMBOL
122 void OnChooseSymbolClick( wxCommandEvent& event );
123
124 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_CHOOSE_SYMBOL
125 void OnChooseSymbolUpdate( wxUpdateUIEvent& event );
126
127 /// wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_RICHTEXTBULLETSPAGE_SYMBOLFONTCTRL
128 void OnSymbolfontctrlSelected( wxCommandEvent& event );
129
130 /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTBULLETSPAGE_SYMBOLFONTCTRL
131 void OnSymbolfontctrlUpdated( wxCommandEvent& event );
132
133 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_SYMBOLFONTCTRL
134 void OnSymbolfontctrlUIUpdate( wxUpdateUIEvent& event );
135
f089713f
JS
136 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_NAMESTATIC
137 void OnNamestaticUpdate( wxUpdateUIEvent& event );
97ff49b3 138
f089713f
JS
139 /// wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_RICHTEXTBULLETSPAGE_NAMECTRL
140 void OnNamectrlSelected( wxCommandEvent& event );
97ff49b3 141
f089713f
JS
142 /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTBULLETSPAGE_NAMECTRL
143 void OnNamectrlUpdated( wxCommandEvent& event );
97ff49b3 144
f089713f
JS
145 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_NAMECTRL
146 void OnNamectrlUIUpdate( wxUpdateUIEvent& event );
97ff49b3 147
d2d0adc7
JS
148 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_NUMBERSTATIC
149 void OnNumberstaticUpdate( wxUpdateUIEvent& event );
150
151 /// wxEVT_COMMAND_SPINCTRL_UPDATED event handler for ID_RICHTEXTBULLETSPAGE_NUMBERCTRL
152 void OnNumberctrlUpdated( wxSpinEvent& event );
153
154 /// wxEVT_SCROLL_LINEUP event handler for ID_RICHTEXTBULLETSPAGE_NUMBERCTRL
155 void OnNumberctrlUp( wxSpinEvent& event );
156
157 /// wxEVT_SCROLL_LINEDOWN event handler for ID_RICHTEXTBULLETSPAGE_NUMBERCTRL
158 void OnNumberctrlDown( wxSpinEvent& event );
159
160 /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTBULLETSPAGE_NUMBERCTRL
161 void OnNumberctrlTextUpdated( wxCommandEvent& event );
162
163 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_NUMBERCTRL
164 void OnNumberctrlUpdate( wxUpdateUIEvent& event );
165
97ff49b3
JS
166////@end wxRichTextBulletsPage event handler declarations
167
168////@begin wxRichTextBulletsPage member function declarations
169
170 /// Retrieves bitmap resources
171 wxBitmap GetBitmapResource( const wxString& name );
172
173 /// Retrieves icon resources
174 wxIcon GetIconResource( const wxString& name );
175////@end wxRichTextBulletsPage member function declarations
176
177 /// Should we show tooltips?
178 static bool ShowToolTips();
179
180////@begin wxRichTextBulletsPage member variables
181 wxListBox* m_styleListBox;
f089713f
JS
182 wxCheckBox* m_periodCtrl;
183 wxCheckBox* m_parenthesesCtrl;
d2d0adc7
JS
184 wxCheckBox* m_rightParenthesisCtrl;
185 wxComboBox* m_bulletAlignmentCtrl;
97ff49b3
JS
186 wxComboBox* m_symbolCtrl;
187 wxComboBox* m_symbolFontCtrl;
f089713f 188 wxComboBox* m_bulletNameCtrl;
d2d0adc7 189 wxSpinCtrl* m_numberCtrl;
97ff49b3
JS
190 wxRichTextCtrl* m_previewCtrl;
191 /// Control identifiers
192 enum {
193 ID_RICHTEXTBULLETSPAGE = 10300,
194 ID_RICHTEXTBULLETSPAGE_STYLELISTBOX = 10305,
f089713f
JS
195 ID_RICHTEXTBULLETSPAGE_PERIODCTRL = 10313,
196 ID_RICHTEXTBULLETSPAGE_PARENTHESESCTRL = 10311,
d2d0adc7
JS
197 ID_RICHTEXTBULLETSPAGE_RIGHTPARENTHESISCTRL = 10306,
198 ID_RICHTEXTBULLETSPAGE_BULLETALIGNMENTCTRL = 10315,
97ff49b3
JS
199 ID_RICHTEXTBULLETSPAGE_SYMBOLSTATIC = 10301,
200 ID_RICHTEXTBULLETSPAGE_SYMBOLCTRL = 10307,
201 ID_RICHTEXTBULLETSPAGE_CHOOSE_SYMBOL = 10308,
202 ID_RICHTEXTBULLETSPAGE_SYMBOLFONTCTRL = 10309,
f089713f
JS
203 ID_RICHTEXTBULLETSPAGE_NAMESTATIC = 10303,
204 ID_RICHTEXTBULLETSPAGE_NAMECTRL = 10304,
d2d0adc7
JS
205 ID_RICHTEXTBULLETSPAGE_NUMBERSTATIC = 10302,
206 ID_RICHTEXTBULLETSPAGE_NUMBERCTRL = 10310,
97ff49b3
JS
207 ID_RICHTEXTBULLETSPAGE_PREVIEW_CTRL = 10314
208 };
209////@end wxRichTextBulletsPage member variables
210
211 bool m_hasBulletStyle;
212 bool m_hasBulletNumber;
213 bool m_hasBulletSymbol;
214 bool m_dontUpdate;
215};
216
217#endif
218 // _RICHTEXTBULLETSPAGE_H_