1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/richtext/richtextbulletspage.h
4 // Author: Julian Smart
6 // Created: 10/4/2006 10:32:31 AM
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef _RICHTEXTBULLETSPAGE_H_
13 #define _RICHTEXTBULLETSPAGE_H_
20 * Forward declarations
23 ////@begin forward declarations
26 ////@end forward declarations
32 ////@begin control identifiers
33 #define SYMBOL_WXRICHTEXTBULLETSPAGE_STYLE wxRESIZE_BORDER|wxTAB_TRAVERSAL
34 #define SYMBOL_WXRICHTEXTBULLETSPAGE_TITLE _("wxRichTextBulletsPage")
35 #define SYMBOL_WXRICHTEXTBULLETSPAGE_IDNAME ID_RICHTEXTBULLETSPAGE
36 #define SYMBOL_WXRICHTEXTBULLETSPAGE_SIZE wxSize(400, 300)
37 #define SYMBOL_WXRICHTEXTBULLETSPAGE_POSITION wxDefaultPosition
38 ////@end control identifiers
41 * wxRichTextBulletsPage class declaration
44 class WXDLLIMPEXP_RICHTEXT wxRichTextBulletsPage
: public wxPanel
46 DECLARE_DYNAMIC_CLASS( wxRichTextBulletsPage
)
51 wxRichTextBulletsPage( );
52 wxRichTextBulletsPage( wxWindow
* parent
, wxWindowID id
= wxID_ANY
, const wxPoint
& pos
= SYMBOL_WXRICHTEXTBULLETSPAGE_POSITION
, const wxSize
& size
= SYMBOL_WXRICHTEXTBULLETSPAGE_SIZE
, long style
= SYMBOL_WXRICHTEXTBULLETSPAGE_STYLE
);
55 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
);
57 /// Initialise members
60 /// Creates the controls and sizers
61 void CreateControls();
63 /// Updates the bullets preview
66 /// Transfer data from/to window
67 virtual bool TransferDataFromWindow();
68 virtual bool TransferDataToWindow();
70 /// Gets the attributes associated with the main formatting dialog
71 wxTextAttr
* GetAttributes();
73 /// Update for symbol-related controls
74 void OnSymbolUpdate( wxUpdateUIEvent
& event
);
76 /// Update for number-related controls
77 void OnNumberUpdate( wxUpdateUIEvent
& event
);
79 /// Update for standard bullet-related controls
80 void OnStandardBulletUpdate( wxUpdateUIEvent
& event
);
82 ////@begin wxRichTextBulletsPage event handler declarations
84 /// wxEVT_COMMAND_LISTBOX_SELECTED event handler for ID_RICHTEXTBULLETSPAGE_STYLELISTBOX
85 void OnStylelistboxSelected( wxCommandEvent
& event
);
87 /// wxEVT_COMMAND_CHECKBOX_CLICKED event handler for ID_RICHTEXTBULLETSPAGE_PERIODCTRL
88 void OnPeriodctrlClick( wxCommandEvent
& event
);
90 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_PERIODCTRL
91 void OnPeriodctrlUpdate( wxUpdateUIEvent
& event
);
93 /// wxEVT_COMMAND_CHECKBOX_CLICKED event handler for ID_RICHTEXTBULLETSPAGE_PARENTHESESCTRL
94 void OnParenthesesctrlClick( wxCommandEvent
& event
);
96 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_PARENTHESESCTRL
97 void OnParenthesesctrlUpdate( wxUpdateUIEvent
& event
);
99 /// wxEVT_COMMAND_CHECKBOX_CLICKED event handler for ID_RICHTEXTBULLETSPAGE_RIGHTPARENTHESISCTRL
100 void OnRightParenthesisCtrlClick( wxCommandEvent
& event
);
102 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_RIGHTPARENTHESISCTRL
103 void OnRightParenthesisCtrlUpdate( wxUpdateUIEvent
& event
);
105 /// wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_RICHTEXTBULLETSPAGE_BULLETALIGNMENTCTRL
106 void OnBulletAlignmentCtrlSelected( wxCommandEvent
& event
);
108 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_SYMBOLSTATIC
109 void OnSymbolstaticUpdate( wxUpdateUIEvent
& event
);
111 /// wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_RICHTEXTBULLETSPAGE_SYMBOLCTRL
112 void OnSymbolctrlSelected( wxCommandEvent
& event
);
114 /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTBULLETSPAGE_SYMBOLCTRL
115 void OnSymbolctrlUpdated( wxCommandEvent
& event
);
117 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_SYMBOLCTRL
118 void OnSymbolctrlUpdate( wxUpdateUIEvent
& event
);
120 /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_RICHTEXTBULLETSPAGE_CHOOSE_SYMBOL
121 void OnChooseSymbolClick( wxCommandEvent
& event
);
123 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_CHOOSE_SYMBOL
124 void OnChooseSymbolUpdate( wxUpdateUIEvent
& event
);
126 /// wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_RICHTEXTBULLETSPAGE_SYMBOLFONTCTRL
127 void OnSymbolfontctrlSelected( wxCommandEvent
& event
);
129 /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTBULLETSPAGE_SYMBOLFONTCTRL
130 void OnSymbolfontctrlUpdated( wxCommandEvent
& event
);
132 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_SYMBOLFONTCTRL
133 void OnSymbolfontctrlUIUpdate( wxUpdateUIEvent
& event
);
135 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_NAMESTATIC
136 void OnNamestaticUpdate( wxUpdateUIEvent
& event
);
138 /// wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_RICHTEXTBULLETSPAGE_NAMECTRL
139 void OnNamectrlSelected( wxCommandEvent
& event
);
141 /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTBULLETSPAGE_NAMECTRL
142 void OnNamectrlUpdated( wxCommandEvent
& event
);
144 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_NAMECTRL
145 void OnNamectrlUIUpdate( wxUpdateUIEvent
& event
);
147 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_NUMBERSTATIC
148 void OnNumberstaticUpdate( wxUpdateUIEvent
& event
);
150 /// wxEVT_COMMAND_SPINCTRL_UPDATED event handler for ID_RICHTEXTBULLETSPAGE_NUMBERCTRL
151 void OnNumberctrlUpdated( wxSpinEvent
& event
);
153 /// wxEVT_SCROLL_LINEUP event handler for ID_RICHTEXTBULLETSPAGE_NUMBERCTRL
154 void OnNumberctrlUp( wxSpinEvent
& event
);
156 /// wxEVT_SCROLL_LINEDOWN event handler for ID_RICHTEXTBULLETSPAGE_NUMBERCTRL
157 void OnNumberctrlDown( wxSpinEvent
& event
);
159 /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTBULLETSPAGE_NUMBERCTRL
160 void OnNumberctrlTextUpdated( wxCommandEvent
& event
);
162 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_NUMBERCTRL
163 void OnNumberctrlUpdate( wxUpdateUIEvent
& event
);
165 ////@end wxRichTextBulletsPage event handler declarations
167 ////@begin wxRichTextBulletsPage member function declarations
169 /// Retrieves bitmap resources
170 wxBitmap
GetBitmapResource( const wxString
& name
);
172 /// Retrieves icon resources
173 wxIcon
GetIconResource( const wxString
& name
);
174 ////@end wxRichTextBulletsPage member function declarations
176 /// Should we show tooltips?
177 static bool ShowToolTips();
179 ////@begin wxRichTextBulletsPage member variables
180 wxListBox
* m_styleListBox
;
181 wxCheckBox
* m_periodCtrl
;
182 wxCheckBox
* m_parenthesesCtrl
;
183 wxCheckBox
* m_rightParenthesisCtrl
;
184 wxComboBox
* m_bulletAlignmentCtrl
;
185 wxComboBox
* m_symbolCtrl
;
186 wxComboBox
* m_symbolFontCtrl
;
187 wxComboBox
* m_bulletNameCtrl
;
188 wxSpinCtrl
* m_numberCtrl
;
189 wxRichTextCtrl
* m_previewCtrl
;
190 /// Control identifiers
192 ID_RICHTEXTBULLETSPAGE
= 10300,
193 ID_RICHTEXTBULLETSPAGE_STYLELISTBOX
= 10305,
194 ID_RICHTEXTBULLETSPAGE_PERIODCTRL
= 10313,
195 ID_RICHTEXTBULLETSPAGE_PARENTHESESCTRL
= 10311,
196 ID_RICHTEXTBULLETSPAGE_RIGHTPARENTHESISCTRL
= 10306,
197 ID_RICHTEXTBULLETSPAGE_BULLETALIGNMENTCTRL
= 10315,
198 ID_RICHTEXTBULLETSPAGE_SYMBOLSTATIC
= 10301,
199 ID_RICHTEXTBULLETSPAGE_SYMBOLCTRL
= 10307,
200 ID_RICHTEXTBULLETSPAGE_CHOOSE_SYMBOL
= 10308,
201 ID_RICHTEXTBULLETSPAGE_SYMBOLFONTCTRL
= 10309,
202 ID_RICHTEXTBULLETSPAGE_NAMESTATIC
= 10303,
203 ID_RICHTEXTBULLETSPAGE_NAMECTRL
= 10304,
204 ID_RICHTEXTBULLETSPAGE_NUMBERSTATIC
= 10302,
205 ID_RICHTEXTBULLETSPAGE_NUMBERCTRL
= 10310,
206 ID_RICHTEXTBULLETSPAGE_PREVIEW_CTRL
= 10314
208 ////@end wxRichTextBulletsPage member variables
210 bool m_hasBulletStyle
;
211 bool m_hasBulletNumber
;
212 bool m_hasBulletSymbol
;
217 // _RICHTEXTBULLETSPAGE_H_