]> git.saurik.com Git - wxWidgets.git/blame - include/wx/richtext/richtextbulletspage.h
[ 1823588 ] gtk filedlg - droping support for gtk 2.2
[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
f089713f 20#include "wx/statline.h"
d2d0adc7 21#include "wx/spinctrl.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( );
8871035d 57 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
58
59 /// Creation
8871035d 60 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
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
44cc96a8 76 wxTextAttr* GetAttributes();
97ff49b3
JS
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
d2d0adc7
JS
104 /// wxEVT_COMMAND_CHECKBOX_CLICKED event handler for ID_RICHTEXTBULLETSPAGE_RIGHTPARENTHESISCTRL
105 void OnRightParenthesisCtrlClick( wxCommandEvent& event );
f089713f 106
d2d0adc7
JS
107 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_RIGHTPARENTHESISCTRL
108 void OnRightParenthesisCtrlUpdate( wxUpdateUIEvent& event );
f089713f 109
d2d0adc7
JS
110 /// wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_RICHTEXTBULLETSPAGE_BULLETALIGNMENTCTRL
111 void OnBulletAlignmentCtrlSelected( wxCommandEvent& event );
f089713f 112
97ff49b3
JS
113 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_SYMBOLSTATIC
114 void OnSymbolstaticUpdate( wxUpdateUIEvent& event );
115
116 /// wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_RICHTEXTBULLETSPAGE_SYMBOLCTRL
117 void OnSymbolctrlSelected( wxCommandEvent& event );
118
119 /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTBULLETSPAGE_SYMBOLCTRL
120 void OnSymbolctrlUpdated( wxCommandEvent& event );
121
122 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_SYMBOLCTRL
123 void OnSymbolctrlUpdate( wxUpdateUIEvent& event );
124
125 /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_RICHTEXTBULLETSPAGE_CHOOSE_SYMBOL
126 void OnChooseSymbolClick( wxCommandEvent& event );
127
128 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_CHOOSE_SYMBOL
129 void OnChooseSymbolUpdate( wxUpdateUIEvent& event );
130
131 /// wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_RICHTEXTBULLETSPAGE_SYMBOLFONTCTRL
132 void OnSymbolfontctrlSelected( wxCommandEvent& event );
133
134 /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTBULLETSPAGE_SYMBOLFONTCTRL
135 void OnSymbolfontctrlUpdated( wxCommandEvent& event );
136
137 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_SYMBOLFONTCTRL
138 void OnSymbolfontctrlUIUpdate( wxUpdateUIEvent& event );
139
f089713f
JS
140 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_NAMESTATIC
141 void OnNamestaticUpdate( wxUpdateUIEvent& event );
97ff49b3 142
f089713f
JS
143 /// wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_RICHTEXTBULLETSPAGE_NAMECTRL
144 void OnNamectrlSelected( wxCommandEvent& event );
97ff49b3 145
f089713f
JS
146 /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTBULLETSPAGE_NAMECTRL
147 void OnNamectrlUpdated( wxCommandEvent& event );
97ff49b3 148
f089713f
JS
149 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_NAMECTRL
150 void OnNamectrlUIUpdate( wxUpdateUIEvent& event );
97ff49b3 151
d2d0adc7
JS
152 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_NUMBERSTATIC
153 void OnNumberstaticUpdate( wxUpdateUIEvent& event );
154
155 /// wxEVT_COMMAND_SPINCTRL_UPDATED event handler for ID_RICHTEXTBULLETSPAGE_NUMBERCTRL
156 void OnNumberctrlUpdated( wxSpinEvent& event );
157
158 /// wxEVT_SCROLL_LINEUP event handler for ID_RICHTEXTBULLETSPAGE_NUMBERCTRL
159 void OnNumberctrlUp( wxSpinEvent& event );
160
161 /// wxEVT_SCROLL_LINEDOWN event handler for ID_RICHTEXTBULLETSPAGE_NUMBERCTRL
162 void OnNumberctrlDown( wxSpinEvent& event );
163
164 /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTBULLETSPAGE_NUMBERCTRL
165 void OnNumberctrlTextUpdated( wxCommandEvent& event );
166
167 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_NUMBERCTRL
168 void OnNumberctrlUpdate( wxUpdateUIEvent& event );
169
97ff49b3
JS
170////@end wxRichTextBulletsPage event handler declarations
171
172////@begin wxRichTextBulletsPage member function declarations
173
174 /// Retrieves bitmap resources
175 wxBitmap GetBitmapResource( const wxString& name );
176
177 /// Retrieves icon resources
178 wxIcon GetIconResource( const wxString& name );
179////@end wxRichTextBulletsPage member function declarations
180
181 /// Should we show tooltips?
182 static bool ShowToolTips();
183
184////@begin wxRichTextBulletsPage member variables
185 wxListBox* m_styleListBox;
f089713f
JS
186 wxCheckBox* m_periodCtrl;
187 wxCheckBox* m_parenthesesCtrl;
d2d0adc7
JS
188 wxCheckBox* m_rightParenthesisCtrl;
189 wxComboBox* m_bulletAlignmentCtrl;
97ff49b3
JS
190 wxComboBox* m_symbolCtrl;
191 wxComboBox* m_symbolFontCtrl;
f089713f 192 wxComboBox* m_bulletNameCtrl;
d2d0adc7 193 wxSpinCtrl* m_numberCtrl;
97ff49b3
JS
194 wxRichTextCtrl* m_previewCtrl;
195 /// Control identifiers
196 enum {
197 ID_RICHTEXTBULLETSPAGE = 10300,
198 ID_RICHTEXTBULLETSPAGE_STYLELISTBOX = 10305,
f089713f
JS
199 ID_RICHTEXTBULLETSPAGE_PERIODCTRL = 10313,
200 ID_RICHTEXTBULLETSPAGE_PARENTHESESCTRL = 10311,
d2d0adc7
JS
201 ID_RICHTEXTBULLETSPAGE_RIGHTPARENTHESISCTRL = 10306,
202 ID_RICHTEXTBULLETSPAGE_BULLETALIGNMENTCTRL = 10315,
97ff49b3
JS
203 ID_RICHTEXTBULLETSPAGE_SYMBOLSTATIC = 10301,
204 ID_RICHTEXTBULLETSPAGE_SYMBOLCTRL = 10307,
205 ID_RICHTEXTBULLETSPAGE_CHOOSE_SYMBOL = 10308,
206 ID_RICHTEXTBULLETSPAGE_SYMBOLFONTCTRL = 10309,
f089713f
JS
207 ID_RICHTEXTBULLETSPAGE_NAMESTATIC = 10303,
208 ID_RICHTEXTBULLETSPAGE_NAMECTRL = 10304,
d2d0adc7
JS
209 ID_RICHTEXTBULLETSPAGE_NUMBERSTATIC = 10302,
210 ID_RICHTEXTBULLETSPAGE_NUMBERCTRL = 10310,
97ff49b3
JS
211 ID_RICHTEXTBULLETSPAGE_PREVIEW_CTRL = 10314
212 };
213////@end wxRichTextBulletsPage member variables
214
215 bool m_hasBulletStyle;
216 bool m_hasBulletNumber;
217 bool m_hasBulletSymbol;
218 bool m_dontUpdate;
219};
220
221#endif
222 // _RICHTEXTBULLETSPAGE_H_