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