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