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