]> git.saurik.com Git - wxWidgets.git/blob - include/wx/richtext/richtextbulletspage.h
53aa6664becc2f4c2e31db5fcf25eca1d62cdc12
[wxWidgets.git] / include / wx / richtext / richtextbulletspage.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: richtextbulletspage.h
3 // Purpose:
4 // Author: Julian Smart
5 // Modified by:
6 // Created: 10/4/2006 10:32:31 AM
7 // RCS-ID:
8 // Copyright: (c) Julian Smart
9 // Licence:
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifndef _RICHTEXTBULLETSPAGE_H_
13 #define _RICHTEXTBULLETSPAGE_H_
14
15 /*!
16 * Includes
17 */
18
19 ////@begin includes
20 #include "wx/statline.h"
21 #include "wx/spinctrl.h"
22 ////@end includes
23
24 /*!
25 * Forward declarations
26 */
27
28 ////@begin forward declarations
29 class wxSpinCtrl;
30 class 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
45 /*!
46 * Compatibility
47 */
48
49 #ifndef wxCLOSE_BOX
50 #define wxCLOSE_BOX 0x1000
51 #endif
52
53 /*!
54 * wxRichTextBulletsPage class declaration
55 */
56
57 class WXDLLIMPEXP_RICHTEXT wxRichTextBulletsPage: public wxPanel
58 {
59 DECLARE_DYNAMIC_CLASS( wxRichTextBulletsPage )
60 DECLARE_EVENT_TABLE()
61
62 public:
63 /// Constructors
64 wxRichTextBulletsPage( );
65 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 );
66
67 /// Creation
68 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 );
69
70 /// Initialise members
71 void Init();
72
73 /// Creates the controls and sizers
74 void CreateControls();
75
76 /// Updates the bullets preview
77 void UpdatePreview();
78
79 /// Transfer data from/to window
80 virtual bool TransferDataFromWindow();
81 virtual bool TransferDataToWindow();
82
83 /// Gets the attributes associated with the main formatting dialog
84 wxTextAttrEx* GetAttributes();
85
86 /// Update for symbol-related controls
87 void OnSymbolUpdate( wxUpdateUIEvent& event );
88
89 /// Update for number-related controls
90 void OnNumberUpdate( wxUpdateUIEvent& event );
91
92 ////@begin wxRichTextBulletsPage event handler declarations
93
94 /// wxEVT_COMMAND_LISTBOX_SELECTED event handler for ID_RICHTEXTBULLETSPAGE_STYLELISTBOX
95 void OnStylelistboxSelected( wxCommandEvent& event );
96
97 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_SYMBOLSTATIC
98 void OnSymbolstaticUpdate( wxUpdateUIEvent& event );
99
100 /// wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_RICHTEXTBULLETSPAGE_SYMBOLCTRL
101 void OnSymbolctrlSelected( wxCommandEvent& event );
102
103 /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTBULLETSPAGE_SYMBOLCTRL
104 void OnSymbolctrlUpdated( wxCommandEvent& event );
105
106 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_SYMBOLCTRL
107 void OnSymbolctrlUpdate( wxUpdateUIEvent& event );
108
109 /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_RICHTEXTBULLETSPAGE_CHOOSE_SYMBOL
110 void OnChooseSymbolClick( wxCommandEvent& event );
111
112 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_CHOOSE_SYMBOL
113 void OnChooseSymbolUpdate( wxUpdateUIEvent& event );
114
115 /// wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_RICHTEXTBULLETSPAGE_SYMBOLFONTCTRL
116 void OnSymbolfontctrlSelected( wxCommandEvent& event );
117
118 /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTBULLETSPAGE_SYMBOLFONTCTRL
119 void OnSymbolfontctrlUpdated( wxCommandEvent& event );
120
121 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_SYMBOLFONTCTRL
122 void OnSymbolfontctrlUIUpdate( wxUpdateUIEvent& event );
123
124 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_NUMBERSTATIC
125 void OnNumberstaticUpdate( wxUpdateUIEvent& event );
126
127 /// wxEVT_COMMAND_SPINCTRL_UPDATED event handler for ID_RICHTEXTBULLETSPAGE_NUMBERCTRL
128 void OnNumberctrlUpdated( wxSpinEvent& event );
129
130 /// wxEVT_SCROLL_LINEUP event handler for ID_RICHTEXTBULLETSPAGE_NUMBERCTRL
131 void OnNumberctrlUp( wxSpinEvent& event );
132
133 /// wxEVT_SCROLL_LINEDOWN event handler for ID_RICHTEXTBULLETSPAGE_NUMBERCTRL
134 void OnNumberctrlDown( wxSpinEvent& event );
135
136 /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTBULLETSPAGE_NUMBERCTRL
137 void OnNumberctrlTextUpdated( wxCommandEvent& event );
138
139 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_NUMBERCTRL
140 void OnNumberctrlUpdate( wxUpdateUIEvent& event );
141
142 /// wxEVT_COMMAND_CHECKBOX_CLICKED event handler for ID_RICHTEXTBULLETSPAGE_PARENTHESESCTRL
143 void OnParenthesesctrlClick( wxCommandEvent& event );
144
145 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_PARENTHESESCTRL
146 void OnParenthesesctrlUpdate( wxUpdateUIEvent& event );
147
148 /// wxEVT_COMMAND_CHECKBOX_CLICKED event handler for ID_RICHTEXTBULLETSPAGE_PERIODCTRL
149 void OnPeriodctrlClick( wxCommandEvent& event );
150
151 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_PERIODCTRL
152 void OnPeriodctrlUpdate( wxUpdateUIEvent& event );
153
154 ////@end wxRichTextBulletsPage event handler declarations
155
156 ////@begin wxRichTextBulletsPage member function declarations
157
158 /// Retrieves bitmap resources
159 wxBitmap GetBitmapResource( const wxString& name );
160
161 /// Retrieves icon resources
162 wxIcon GetIconResource( const wxString& name );
163 ////@end wxRichTextBulletsPage member function declarations
164
165 /// Should we show tooltips?
166 static bool ShowToolTips();
167
168 ////@begin wxRichTextBulletsPage member variables
169 wxListBox* m_styleListBox;
170 wxComboBox* m_symbolCtrl;
171 wxComboBox* m_symbolFontCtrl;
172 wxSpinCtrl* m_numberCtrl;
173 wxCheckBox* m_parenthesesCtrl;
174 wxCheckBox* m_periodCtrl;
175 wxRichTextCtrl* m_previewCtrl;
176 /// Control identifiers
177 enum {
178 ID_RICHTEXTBULLETSPAGE = 10300,
179 ID_RICHTEXTBULLETSPAGE_STYLELISTBOX = 10305,
180 ID_RICHTEXTBULLETSPAGE_SYMBOLSTATIC = 10301,
181 ID_RICHTEXTBULLETSPAGE_SYMBOLCTRL = 10307,
182 ID_RICHTEXTBULLETSPAGE_CHOOSE_SYMBOL = 10308,
183 ID_RICHTEXTBULLETSPAGE_SYMBOLFONTCTRL = 10309,
184 ID_RICHTEXTBULLETSPAGE_NUMBERSTATIC = 10302,
185 ID_RICHTEXTBULLETSPAGE_NUMBERCTRL = 10310,
186 ID_RICHTEXTBULLETSPAGE_PARENTHESESCTRL = 10311,
187 ID_RICHTEXTBULLETSPAGE_PERIODCTRL = 10313,
188 ID_RICHTEXTBULLETSPAGE_PREVIEW_CTRL = 10314
189 };
190 ////@end wxRichTextBulletsPage member variables
191
192 bool m_hasBulletStyle;
193 bool m_hasBulletNumber;
194 bool m_hasBulletSymbol;
195 bool m_dontUpdate;
196 };
197
198 #endif
199 // _RICHTEXTBULLETSPAGE_H_