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