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