]> git.saurik.com Git - wxWidgets.git/blame - include/wx/richtext/richtextbulletspage.h
Allow customizing AUI tab colours in wxAuiTabArt.
[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 */
603f702b
JS
18
19#include "wx/richtext/richtextdialogpage.h"
25af884d 20#include "wx/spinbutt.h" // for wxSpinEvent
97ff49b3 21
97ff49b3
JS
22/*!
23 * Forward declarations
24 */
25
26////@begin forward declarations
27class wxSpinCtrl;
28class 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
603f702b 37#define SYMBOL_WXRICHTEXTBULLETSPAGE_TITLE wxEmptyString
97ff49b3
JS
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
97ff49b3
JS
43/*!
44 * wxRichTextBulletsPage class declaration
45 */
46
603f702b 47class WXDLLIMPEXP_RICHTEXT wxRichTextBulletsPage: public wxRichTextDialogPage
97ff49b3
JS
48{
49 DECLARE_DYNAMIC_CLASS( wxRichTextBulletsPage )
50 DECLARE_EVENT_TABLE()
603f702b 51 DECLARE_HELP_PROVISION()
97ff49b3
JS
52
53public:
54 /// Constructors
55 wxRichTextBulletsPage( );
8871035d 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 );
97ff49b3
JS
57
58 /// Creation
8871035d 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 );
97ff49b3
JS
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
24777478 75 wxRichTextAttr* GetAttributes();
97ff49b3
JS
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
f089713f
JS
83 /// Update for standard bullet-related controls
84 void OnStandardBulletUpdate( wxUpdateUIEvent& event );
85
97ff49b3
JS
86////@begin wxRichTextBulletsPage event handler declarations
87
88 /// wxEVT_COMMAND_LISTBOX_SELECTED event handler for ID_RICHTEXTBULLETSPAGE_STYLELISTBOX
89 void OnStylelistboxSelected( wxCommandEvent& event );
90
f089713f
JS
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
d2d0adc7
JS
103 /// wxEVT_COMMAND_CHECKBOX_CLICKED event handler for ID_RICHTEXTBULLETSPAGE_RIGHTPARENTHESISCTRL
104 void OnRightParenthesisCtrlClick( wxCommandEvent& event );
f089713f 105
d2d0adc7
JS
106 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_RIGHTPARENTHESISCTRL
107 void OnRightParenthesisCtrlUpdate( wxUpdateUIEvent& event );
f089713f 108
d2d0adc7
JS
109 /// wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_RICHTEXTBULLETSPAGE_BULLETALIGNMENTCTRL
110 void OnBulletAlignmentCtrlSelected( wxCommandEvent& event );
f089713f 111
97ff49b3
JS
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
f089713f
JS
139 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_NAMESTATIC
140 void OnNamestaticUpdate( wxUpdateUIEvent& event );
97ff49b3 141
f089713f
JS
142 /// wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_RICHTEXTBULLETSPAGE_NAMECTRL
143 void OnNamectrlSelected( wxCommandEvent& event );
97ff49b3 144
f089713f
JS
145 /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTBULLETSPAGE_NAMECTRL
146 void OnNamectrlUpdated( wxCommandEvent& event );
97ff49b3 147
f089713f
JS
148 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_NAMECTRL
149 void OnNamectrlUIUpdate( wxUpdateUIEvent& event );
97ff49b3 150
d2d0adc7
JS
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
97ff49b3
JS
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;
f089713f
JS
185 wxCheckBox* m_periodCtrl;
186 wxCheckBox* m_parenthesesCtrl;
d2d0adc7
JS
187 wxCheckBox* m_rightParenthesisCtrl;
188 wxComboBox* m_bulletAlignmentCtrl;
97ff49b3
JS
189 wxComboBox* m_symbolCtrl;
190 wxComboBox* m_symbolFontCtrl;
f089713f 191 wxComboBox* m_bulletNameCtrl;
d2d0adc7 192 wxSpinCtrl* m_numberCtrl;
97ff49b3
JS
193 wxRichTextCtrl* m_previewCtrl;
194 /// Control identifiers
195 enum {
196 ID_RICHTEXTBULLETSPAGE = 10300,
197 ID_RICHTEXTBULLETSPAGE_STYLELISTBOX = 10305,
f089713f
JS
198 ID_RICHTEXTBULLETSPAGE_PERIODCTRL = 10313,
199 ID_RICHTEXTBULLETSPAGE_PARENTHESESCTRL = 10311,
d2d0adc7
JS
200 ID_RICHTEXTBULLETSPAGE_RIGHTPARENTHESISCTRL = 10306,
201 ID_RICHTEXTBULLETSPAGE_BULLETALIGNMENTCTRL = 10315,
97ff49b3
JS
202 ID_RICHTEXTBULLETSPAGE_SYMBOLSTATIC = 10301,
203 ID_RICHTEXTBULLETSPAGE_SYMBOLCTRL = 10307,
204 ID_RICHTEXTBULLETSPAGE_CHOOSE_SYMBOL = 10308,
205 ID_RICHTEXTBULLETSPAGE_SYMBOLFONTCTRL = 10309,
f089713f
JS
206 ID_RICHTEXTBULLETSPAGE_NAMESTATIC = 10303,
207 ID_RICHTEXTBULLETSPAGE_NAMECTRL = 10304,
d2d0adc7
JS
208 ID_RICHTEXTBULLETSPAGE_NUMBERSTATIC = 10302,
209 ID_RICHTEXTBULLETSPAGE_NUMBERCTRL = 10310,
97ff49b3
JS
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_