]> git.saurik.com Git - wxWidgets.git/blame - include/wx/richtext/richtextbulletspage.h
take const wxConfig object in wxDocManager::FileHistoryLoad() and wxFileHistory:...
[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
97ff49b3
JS
35#define SYMBOL_WXRICHTEXTBULLETSPAGE_IDNAME ID_RICHTEXTBULLETSPAGE
36#define SYMBOL_WXRICHTEXTBULLETSPAGE_SIZE wxSize(400, 300)
37#define SYMBOL_WXRICHTEXTBULLETSPAGE_POSITION wxDefaultPosition
38////@end control identifiers
39
97ff49b3
JS
40/*!
41 * wxRichTextBulletsPage class declaration
42 */
43
44class WXDLLIMPEXP_RICHTEXT wxRichTextBulletsPage: public wxPanel
45{
46 DECLARE_DYNAMIC_CLASS( wxRichTextBulletsPage )
47 DECLARE_EVENT_TABLE()
48
49public:
50 /// Constructors
51 wxRichTextBulletsPage( );
8871035d 52 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
53
54 /// Creation
8871035d 55 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
56
57 /// Initialise members
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();
69
70 /// Gets the attributes associated with the main formatting dialog
44cc96a8 71 wxTextAttr* GetAttributes();
97ff49b3
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
97ff49b3
JS
82////@begin wxRichTextBulletsPage event handler declarations
83
84 /// wxEVT_COMMAND_LISTBOX_SELECTED event handler for ID_RICHTEXTBULLETSPAGE_STYLELISTBOX
85 void OnStylelistboxSelected( wxCommandEvent& event );
86
f089713f
JS
87 /// wxEVT_COMMAND_CHECKBOX_CLICKED event handler for ID_RICHTEXTBULLETSPAGE_PERIODCTRL
88 void OnPeriodctrlClick( wxCommandEvent& event );
89
90 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_PERIODCTRL
91 void OnPeriodctrlUpdate( wxUpdateUIEvent& event );
92
93 /// wxEVT_COMMAND_CHECKBOX_CLICKED event handler for ID_RICHTEXTBULLETSPAGE_PARENTHESESCTRL
94 void OnParenthesesctrlClick( wxCommandEvent& event );
95
96 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_PARENTHESESCTRL
97 void OnParenthesesctrlUpdate( wxUpdateUIEvent& event );
98
d2d0adc7
JS
99 /// wxEVT_COMMAND_CHECKBOX_CLICKED event handler for ID_RICHTEXTBULLETSPAGE_RIGHTPARENTHESISCTRL
100 void OnRightParenthesisCtrlClick( wxCommandEvent& event );
f089713f 101
d2d0adc7
JS
102 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_RIGHTPARENTHESISCTRL
103 void OnRightParenthesisCtrlUpdate( wxUpdateUIEvent& event );
f089713f 104
d2d0adc7
JS
105 /// wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_RICHTEXTBULLETSPAGE_BULLETALIGNMENTCTRL
106 void OnBulletAlignmentCtrlSelected( wxCommandEvent& event );
f089713f 107
97ff49b3
JS
108 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_SYMBOLSTATIC
109 void OnSymbolstaticUpdate( wxUpdateUIEvent& event );
110
111 /// wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_RICHTEXTBULLETSPAGE_SYMBOLCTRL
112 void OnSymbolctrlSelected( wxCommandEvent& event );
113
114 /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTBULLETSPAGE_SYMBOLCTRL
115 void OnSymbolctrlUpdated( wxCommandEvent& event );
116
117 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_SYMBOLCTRL
118 void OnSymbolctrlUpdate( wxUpdateUIEvent& event );
119
120 /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_RICHTEXTBULLETSPAGE_CHOOSE_SYMBOL
121 void OnChooseSymbolClick( wxCommandEvent& event );
122
123 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_CHOOSE_SYMBOL
124 void OnChooseSymbolUpdate( wxUpdateUIEvent& event );
125
126 /// wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_RICHTEXTBULLETSPAGE_SYMBOLFONTCTRL
127 void OnSymbolfontctrlSelected( wxCommandEvent& event );
128
129 /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTBULLETSPAGE_SYMBOLFONTCTRL
130 void OnSymbolfontctrlUpdated( wxCommandEvent& event );
131
132 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_SYMBOLFONTCTRL
133 void OnSymbolfontctrlUIUpdate( wxUpdateUIEvent& event );
134
f089713f
JS
135 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_NAMESTATIC
136 void OnNamestaticUpdate( wxUpdateUIEvent& event );
97ff49b3 137
f089713f
JS
138 /// wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_RICHTEXTBULLETSPAGE_NAMECTRL
139 void OnNamectrlSelected( wxCommandEvent& event );
97ff49b3 140
f089713f
JS
141 /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTBULLETSPAGE_NAMECTRL
142 void OnNamectrlUpdated( wxCommandEvent& event );
97ff49b3 143
f089713f
JS
144 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_NAMECTRL
145 void OnNamectrlUIUpdate( wxUpdateUIEvent& event );
97ff49b3 146
d2d0adc7
JS
147 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_NUMBERSTATIC
148 void OnNumberstaticUpdate( wxUpdateUIEvent& event );
149
150 /// wxEVT_COMMAND_SPINCTRL_UPDATED event handler for ID_RICHTEXTBULLETSPAGE_NUMBERCTRL
151 void OnNumberctrlUpdated( wxSpinEvent& event );
152
153 /// wxEVT_SCROLL_LINEUP event handler for ID_RICHTEXTBULLETSPAGE_NUMBERCTRL
154 void OnNumberctrlUp( wxSpinEvent& event );
155
156 /// wxEVT_SCROLL_LINEDOWN event handler for ID_RICHTEXTBULLETSPAGE_NUMBERCTRL
157 void OnNumberctrlDown( wxSpinEvent& event );
158
159 /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTBULLETSPAGE_NUMBERCTRL
160 void OnNumberctrlTextUpdated( wxCommandEvent& event );
161
162 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_NUMBERCTRL
163 void OnNumberctrlUpdate( wxUpdateUIEvent& event );
164
97ff49b3
JS
165////@end wxRichTextBulletsPage event handler declarations
166
167////@begin wxRichTextBulletsPage member function declarations
168
169 /// Retrieves bitmap resources
170 wxBitmap GetBitmapResource( const wxString& name );
171
172 /// Retrieves icon resources
173 wxIcon GetIconResource( const wxString& name );
174////@end wxRichTextBulletsPage member function declarations
175
176 /// Should we show tooltips?
177 static bool ShowToolTips();
178
179////@begin wxRichTextBulletsPage member variables
180 wxListBox* m_styleListBox;
f089713f
JS
181 wxCheckBox* m_periodCtrl;
182 wxCheckBox* m_parenthesesCtrl;
d2d0adc7
JS
183 wxCheckBox* m_rightParenthesisCtrl;
184 wxComboBox* m_bulletAlignmentCtrl;
97ff49b3
JS
185 wxComboBox* m_symbolCtrl;
186 wxComboBox* m_symbolFontCtrl;
f089713f 187 wxComboBox* m_bulletNameCtrl;
d2d0adc7 188 wxSpinCtrl* m_numberCtrl;
97ff49b3
JS
189 wxRichTextCtrl* m_previewCtrl;
190 /// Control identifiers
191 enum {
192 ID_RICHTEXTBULLETSPAGE = 10300,
193 ID_RICHTEXTBULLETSPAGE_STYLELISTBOX = 10305,
f089713f
JS
194 ID_RICHTEXTBULLETSPAGE_PERIODCTRL = 10313,
195 ID_RICHTEXTBULLETSPAGE_PARENTHESESCTRL = 10311,
d2d0adc7
JS
196 ID_RICHTEXTBULLETSPAGE_RIGHTPARENTHESISCTRL = 10306,
197 ID_RICHTEXTBULLETSPAGE_BULLETALIGNMENTCTRL = 10315,
97ff49b3
JS
198 ID_RICHTEXTBULLETSPAGE_SYMBOLSTATIC = 10301,
199 ID_RICHTEXTBULLETSPAGE_SYMBOLCTRL = 10307,
200 ID_RICHTEXTBULLETSPAGE_CHOOSE_SYMBOL = 10308,
201 ID_RICHTEXTBULLETSPAGE_SYMBOLFONTCTRL = 10309,
f089713f
JS
202 ID_RICHTEXTBULLETSPAGE_NAMESTATIC = 10303,
203 ID_RICHTEXTBULLETSPAGE_NAMECTRL = 10304,
d2d0adc7
JS
204 ID_RICHTEXTBULLETSPAGE_NUMBERSTATIC = 10302,
205 ID_RICHTEXTBULLETSPAGE_NUMBERCTRL = 10310,
97ff49b3
JS
206 ID_RICHTEXTBULLETSPAGE_PREVIEW_CTRL = 10314
207 };
208////@end wxRichTextBulletsPage member variables
209
210 bool m_hasBulletStyle;
211 bool m_hasBulletNumber;
212 bool m_hasBulletSymbol;
213 bool m_dontUpdate;
214};
215
216#endif
217 // _RICHTEXTBULLETSPAGE_H_