]> git.saurik.com Git - wxWidgets.git/blame - include/wx/richtext/richtextbulletspage.h
define WXDEBUG_NEW to use special VC++-specific new version too (closes 1386286)
[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 */
18
19////@begin includes
97ff49b3 20#include "wx/spinctrl.h"
f089713f 21#include "wx/statline.h"
97ff49b3
JS
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
97ff49b3
JS
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
f089713f
JS
84 /// Update for standard bullet-related controls
85 void OnStandardBulletUpdate( wxUpdateUIEvent& event );
86
97ff49b3
JS
87////@begin wxRichTextBulletsPage event handler declarations
88
89 /// wxEVT_COMMAND_LISTBOX_SELECTED event handler for ID_RICHTEXTBULLETSPAGE_STYLELISTBOX
90 void OnStylelistboxSelected( wxCommandEvent& event );
91
f089713f
JS
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_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_NUMBERSTATIC
105 void OnNumberstaticUpdate( wxUpdateUIEvent& event );
106
107 /// wxEVT_COMMAND_SPINCTRL_UPDATED event handler for ID_RICHTEXTBULLETSPAGE_NUMBERCTRL
108 void OnNumberctrlUpdated( wxSpinEvent& event );
109
110 /// wxEVT_SCROLL_LINEUP event handler for ID_RICHTEXTBULLETSPAGE_NUMBERCTRL
111 void OnNumberctrlUp( wxSpinEvent& event );
112
113 /// wxEVT_SCROLL_LINEDOWN event handler for ID_RICHTEXTBULLETSPAGE_NUMBERCTRL
114 void OnNumberctrlDown( wxSpinEvent& event );
115
116 /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTBULLETSPAGE_NUMBERCTRL
117 void OnNumberctrlTextUpdated( wxCommandEvent& event );
118
119 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_NUMBERCTRL
120 void OnNumberctrlUpdate( wxUpdateUIEvent& event );
121
97ff49b3
JS
122 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_SYMBOLSTATIC
123 void OnSymbolstaticUpdate( wxUpdateUIEvent& event );
124
125 /// wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_RICHTEXTBULLETSPAGE_SYMBOLCTRL
126 void OnSymbolctrlSelected( wxCommandEvent& event );
127
128 /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTBULLETSPAGE_SYMBOLCTRL
129 void OnSymbolctrlUpdated( wxCommandEvent& event );
130
131 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_SYMBOLCTRL
132 void OnSymbolctrlUpdate( wxUpdateUIEvent& event );
133
134 /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_RICHTEXTBULLETSPAGE_CHOOSE_SYMBOL
135 void OnChooseSymbolClick( wxCommandEvent& event );
136
137 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_CHOOSE_SYMBOL
138 void OnChooseSymbolUpdate( wxUpdateUIEvent& event );
139
140 /// wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_RICHTEXTBULLETSPAGE_SYMBOLFONTCTRL
141 void OnSymbolfontctrlSelected( wxCommandEvent& event );
142
143 /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTBULLETSPAGE_SYMBOLFONTCTRL
144 void OnSymbolfontctrlUpdated( wxCommandEvent& event );
145
146 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_SYMBOLFONTCTRL
147 void OnSymbolfontctrlUIUpdate( wxUpdateUIEvent& event );
148
f089713f
JS
149 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_NAMESTATIC
150 void OnNamestaticUpdate( wxUpdateUIEvent& event );
97ff49b3 151
f089713f
JS
152 /// wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_RICHTEXTBULLETSPAGE_NAMECTRL
153 void OnNamectrlSelected( wxCommandEvent& event );
97ff49b3 154
f089713f
JS
155 /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTBULLETSPAGE_NAMECTRL
156 void OnNamectrlUpdated( wxCommandEvent& event );
97ff49b3 157
f089713f
JS
158 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_NAMECTRL
159 void OnNamectrlUIUpdate( wxUpdateUIEvent& event );
97ff49b3
JS
160
161////@end wxRichTextBulletsPage event handler declarations
162
163////@begin wxRichTextBulletsPage member function declarations
164
165 /// Retrieves bitmap resources
166 wxBitmap GetBitmapResource( const wxString& name );
167
168 /// Retrieves icon resources
169 wxIcon GetIconResource( const wxString& name );
170////@end wxRichTextBulletsPage member function declarations
171
172 /// Should we show tooltips?
173 static bool ShowToolTips();
174
175////@begin wxRichTextBulletsPage member variables
176 wxListBox* m_styleListBox;
f089713f
JS
177 wxCheckBox* m_periodCtrl;
178 wxCheckBox* m_parenthesesCtrl;
179 wxSpinCtrl* m_numberCtrl;
97ff49b3
JS
180 wxComboBox* m_symbolCtrl;
181 wxComboBox* m_symbolFontCtrl;
f089713f 182 wxComboBox* m_bulletNameCtrl;
97ff49b3
JS
183 wxRichTextCtrl* m_previewCtrl;
184 /// Control identifiers
185 enum {
186 ID_RICHTEXTBULLETSPAGE = 10300,
187 ID_RICHTEXTBULLETSPAGE_STYLELISTBOX = 10305,
f089713f
JS
188 ID_RICHTEXTBULLETSPAGE_PERIODCTRL = 10313,
189 ID_RICHTEXTBULLETSPAGE_PARENTHESESCTRL = 10311,
190 ID_RICHTEXTBULLETSPAGE_NUMBERSTATIC = 10302,
191 ID_RICHTEXTBULLETSPAGE_NUMBERCTRL = 10310,
97ff49b3
JS
192 ID_RICHTEXTBULLETSPAGE_SYMBOLSTATIC = 10301,
193 ID_RICHTEXTBULLETSPAGE_SYMBOLCTRL = 10307,
194 ID_RICHTEXTBULLETSPAGE_CHOOSE_SYMBOL = 10308,
195 ID_RICHTEXTBULLETSPAGE_SYMBOLFONTCTRL = 10309,
f089713f
JS
196 ID_RICHTEXTBULLETSPAGE_NAMESTATIC = 10303,
197 ID_RICHTEXTBULLETSPAGE_NAMECTRL = 10304,
97ff49b3
JS
198 ID_RICHTEXTBULLETSPAGE_PREVIEW_CTRL = 10314
199 };
200////@end wxRichTextBulletsPage member variables
201
202 bool m_hasBulletStyle;
203 bool m_hasBulletNumber;
204 bool m_hasBulletSymbol;
205 bool m_dontUpdate;
206};
207
208#endif
209 // _RICHTEXTBULLETSPAGE_H_