]> git.saurik.com Git - wxWidgets.git/blob - include/wx/richtext/richtextbulletspage.h
add comparison operators for wxPen/BrushStyle and wxSOLID/... constants to avoid...
[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 #include "wx/spinbutt.h" // for wxSpinEvent
19
20 /*!
21 * Forward declarations
22 */
23
24 ////@begin forward declarations
25 class wxSpinCtrl;
26 class 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
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
40 /*!
41 * wxRichTextBulletsPage class declaration
42 */
43
44 class WXDLLIMPEXP_RICHTEXT wxRichTextBulletsPage: public wxPanel
45 {
46 DECLARE_DYNAMIC_CLASS( wxRichTextBulletsPage )
47 DECLARE_EVENT_TABLE()
48
49 public:
50 /// Constructors
51 wxRichTextBulletsPage( );
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 );
53
54 /// Creation
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 );
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
71 wxTextAttr* GetAttributes();
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
79 /// Update for standard bullet-related controls
80 void OnStandardBulletUpdate( wxUpdateUIEvent& event );
81
82 ////@begin wxRichTextBulletsPage event handler declarations
83
84 /// wxEVT_COMMAND_LISTBOX_SELECTED event handler for ID_RICHTEXTBULLETSPAGE_STYLELISTBOX
85 void OnStylelistboxSelected( wxCommandEvent& event );
86
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
99 /// wxEVT_COMMAND_CHECKBOX_CLICKED event handler for ID_RICHTEXTBULLETSPAGE_RIGHTPARENTHESISCTRL
100 void OnRightParenthesisCtrlClick( wxCommandEvent& event );
101
102 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_RIGHTPARENTHESISCTRL
103 void OnRightParenthesisCtrlUpdate( wxUpdateUIEvent& event );
104
105 /// wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_RICHTEXTBULLETSPAGE_BULLETALIGNMENTCTRL
106 void OnBulletAlignmentCtrlSelected( wxCommandEvent& event );
107
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
135 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_NAMESTATIC
136 void OnNamestaticUpdate( wxUpdateUIEvent& event );
137
138 /// wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_RICHTEXTBULLETSPAGE_NAMECTRL
139 void OnNamectrlSelected( wxCommandEvent& event );
140
141 /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTBULLETSPAGE_NAMECTRL
142 void OnNamectrlUpdated( wxCommandEvent& event );
143
144 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_NAMECTRL
145 void OnNamectrlUIUpdate( wxUpdateUIEvent& event );
146
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
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;
181 wxCheckBox* m_periodCtrl;
182 wxCheckBox* m_parenthesesCtrl;
183 wxCheckBox* m_rightParenthesisCtrl;
184 wxComboBox* m_bulletAlignmentCtrl;
185 wxComboBox* m_symbolCtrl;
186 wxComboBox* m_symbolFontCtrl;
187 wxComboBox* m_bulletNameCtrl;
188 wxSpinCtrl* m_numberCtrl;
189 wxRichTextCtrl* m_previewCtrl;
190 /// Control identifiers
191 enum {
192 ID_RICHTEXTBULLETSPAGE = 10300,
193 ID_RICHTEXTBULLETSPAGE_STYLELISTBOX = 10305,
194 ID_RICHTEXTBULLETSPAGE_PERIODCTRL = 10313,
195 ID_RICHTEXTBULLETSPAGE_PARENTHESESCTRL = 10311,
196 ID_RICHTEXTBULLETSPAGE_RIGHTPARENTHESISCTRL = 10306,
197 ID_RICHTEXTBULLETSPAGE_BULLETALIGNMENTCTRL = 10315,
198 ID_RICHTEXTBULLETSPAGE_SYMBOLSTATIC = 10301,
199 ID_RICHTEXTBULLETSPAGE_SYMBOLCTRL = 10307,
200 ID_RICHTEXTBULLETSPAGE_CHOOSE_SYMBOL = 10308,
201 ID_RICHTEXTBULLETSPAGE_SYMBOLFONTCTRL = 10309,
202 ID_RICHTEXTBULLETSPAGE_NAMESTATIC = 10303,
203 ID_RICHTEXTBULLETSPAGE_NAMECTRL = 10304,
204 ID_RICHTEXTBULLETSPAGE_NUMBERSTATIC = 10302,
205 ID_RICHTEXTBULLETSPAGE_NUMBERCTRL = 10310,
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_