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_IDNAME ID_RICHTEXTBULLETSPAGE
35 #define SYMBOL_WXRICHTEXTBULLETSPAGE_SIZE wxSize(400, 300)
36 #define SYMBOL_WXRICHTEXTBULLETSPAGE_POSITION wxDefaultPosition
37 ////@end control identifiers
40 * wxRichTextBulletsPage class declaration
43 class WXDLLIMPEXP_RICHTEXT wxRichTextBulletsPage
: public wxPanel
45 DECLARE_DYNAMIC_CLASS( wxRichTextBulletsPage
)
50 wxRichTextBulletsPage( );
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
);
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
);
56 /// Initialise members
59 /// Creates the controls and sizers
60 void CreateControls();
62 /// Updates the bullets preview
65 /// Transfer data from/to window
66 virtual bool TransferDataFromWindow();
67 virtual bool TransferDataToWindow();
69 /// Gets the attributes associated with the main formatting dialog
70 wxTextAttr
* GetAttributes();
72 /// Update for symbol-related controls
73 void OnSymbolUpdate( wxUpdateUIEvent
& event
);
75 /// Update for number-related controls
76 void OnNumberUpdate( wxUpdateUIEvent
& event
);
78 /// Update for standard bullet-related controls
79 void OnStandardBulletUpdate( wxUpdateUIEvent
& event
);
81 ////@begin wxRichTextBulletsPage event handler declarations
83 /// wxEVT_COMMAND_LISTBOX_SELECTED event handler for ID_RICHTEXTBULLETSPAGE_STYLELISTBOX
84 void OnStylelistboxSelected( wxCommandEvent
& event
);
86 /// wxEVT_COMMAND_CHECKBOX_CLICKED event handler for ID_RICHTEXTBULLETSPAGE_PERIODCTRL
87 void OnPeriodctrlClick( wxCommandEvent
& event
);
89 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_PERIODCTRL
90 void OnPeriodctrlUpdate( wxUpdateUIEvent
& event
);
92 /// wxEVT_COMMAND_CHECKBOX_CLICKED event handler for ID_RICHTEXTBULLETSPAGE_PARENTHESESCTRL
93 void OnParenthesesctrlClick( wxCommandEvent
& event
);
95 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_PARENTHESESCTRL
96 void OnParenthesesctrlUpdate( wxUpdateUIEvent
& event
);
98 /// wxEVT_COMMAND_CHECKBOX_CLICKED event handler for ID_RICHTEXTBULLETSPAGE_RIGHTPARENTHESISCTRL
99 void OnRightParenthesisCtrlClick( wxCommandEvent
& event
);
101 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_RIGHTPARENTHESISCTRL
102 void OnRightParenthesisCtrlUpdate( wxUpdateUIEvent
& event
);
104 /// wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_RICHTEXTBULLETSPAGE_BULLETALIGNMENTCTRL
105 void OnBulletAlignmentCtrlSelected( wxCommandEvent
& event
);
107 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_SYMBOLSTATIC
108 void OnSymbolstaticUpdate( wxUpdateUIEvent
& event
);
110 /// wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_RICHTEXTBULLETSPAGE_SYMBOLCTRL
111 void OnSymbolctrlSelected( wxCommandEvent
& event
);
113 /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTBULLETSPAGE_SYMBOLCTRL
114 void OnSymbolctrlUpdated( wxCommandEvent
& event
);
116 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_SYMBOLCTRL
117 void OnSymbolctrlUpdate( wxUpdateUIEvent
& event
);
119 /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_RICHTEXTBULLETSPAGE_CHOOSE_SYMBOL
120 void OnChooseSymbolClick( wxCommandEvent
& event
);
122 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_CHOOSE_SYMBOL
123 void OnChooseSymbolUpdate( wxUpdateUIEvent
& event
);
125 /// wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_RICHTEXTBULLETSPAGE_SYMBOLFONTCTRL
126 void OnSymbolfontctrlSelected( wxCommandEvent
& event
);
128 /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTBULLETSPAGE_SYMBOLFONTCTRL
129 void OnSymbolfontctrlUpdated( wxCommandEvent
& event
);
131 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_SYMBOLFONTCTRL
132 void OnSymbolfontctrlUIUpdate( wxUpdateUIEvent
& event
);
134 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_NAMESTATIC
135 void OnNamestaticUpdate( wxUpdateUIEvent
& event
);
137 /// wxEVT_COMMAND_COMBOBOX_SELECTED event handler for ID_RICHTEXTBULLETSPAGE_NAMECTRL
138 void OnNamectrlSelected( wxCommandEvent
& event
);
140 /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTBULLETSPAGE_NAMECTRL
141 void OnNamectrlUpdated( wxCommandEvent
& event
);
143 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_NAMECTRL
144 void OnNamectrlUIUpdate( wxUpdateUIEvent
& event
);
146 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_NUMBERSTATIC
147 void OnNumberstaticUpdate( wxUpdateUIEvent
& event
);
149 /// wxEVT_COMMAND_SPINCTRL_UPDATED event handler for ID_RICHTEXTBULLETSPAGE_NUMBERCTRL
150 void OnNumberctrlUpdated( wxSpinEvent
& event
);
152 /// wxEVT_SCROLL_LINEUP event handler for ID_RICHTEXTBULLETSPAGE_NUMBERCTRL
153 void OnNumberctrlUp( wxSpinEvent
& event
);
155 /// wxEVT_SCROLL_LINEDOWN event handler for ID_RICHTEXTBULLETSPAGE_NUMBERCTRL
156 void OnNumberctrlDown( wxSpinEvent
& event
);
158 /// wxEVT_COMMAND_TEXT_UPDATED event handler for ID_RICHTEXTBULLETSPAGE_NUMBERCTRL
159 void OnNumberctrlTextUpdated( wxCommandEvent
& event
);
161 /// wxEVT_UPDATE_UI event handler for ID_RICHTEXTBULLETSPAGE_NUMBERCTRL
162 void OnNumberctrlUpdate( wxUpdateUIEvent
& event
);
164 ////@end wxRichTextBulletsPage event handler declarations
166 ////@begin wxRichTextBulletsPage member function declarations
168 /// Retrieves bitmap resources
169 wxBitmap
GetBitmapResource( const wxString
& name
);
171 /// Retrieves icon resources
172 wxIcon
GetIconResource( const wxString
& name
);
173 ////@end wxRichTextBulletsPage member function declarations
175 /// Should we show tooltips?
176 static bool ShowToolTips();
178 ////@begin wxRichTextBulletsPage member variables
179 wxListBox
* m_styleListBox
;
180 wxCheckBox
* m_periodCtrl
;
181 wxCheckBox
* m_parenthesesCtrl
;
182 wxCheckBox
* m_rightParenthesisCtrl
;
183 wxComboBox
* m_bulletAlignmentCtrl
;
184 wxComboBox
* m_symbolCtrl
;
185 wxComboBox
* m_symbolFontCtrl
;
186 wxComboBox
* m_bulletNameCtrl
;
187 wxSpinCtrl
* m_numberCtrl
;
188 wxRichTextCtrl
* m_previewCtrl
;
189 /// Control identifiers
191 ID_RICHTEXTBULLETSPAGE
= 10300,
192 ID_RICHTEXTBULLETSPAGE_STYLELISTBOX
= 10305,
193 ID_RICHTEXTBULLETSPAGE_PERIODCTRL
= 10313,
194 ID_RICHTEXTBULLETSPAGE_PARENTHESESCTRL
= 10311,
195 ID_RICHTEXTBULLETSPAGE_RIGHTPARENTHESISCTRL
= 10306,
196 ID_RICHTEXTBULLETSPAGE_BULLETALIGNMENTCTRL
= 10315,
197 ID_RICHTEXTBULLETSPAGE_SYMBOLSTATIC
= 10301,
198 ID_RICHTEXTBULLETSPAGE_SYMBOLCTRL
= 10307,
199 ID_RICHTEXTBULLETSPAGE_CHOOSE_SYMBOL
= 10308,
200 ID_RICHTEXTBULLETSPAGE_SYMBOLFONTCTRL
= 10309,
201 ID_RICHTEXTBULLETSPAGE_NAMESTATIC
= 10303,
202 ID_RICHTEXTBULLETSPAGE_NAMECTRL
= 10304,
203 ID_RICHTEXTBULLETSPAGE_NUMBERSTATIC
= 10302,
204 ID_RICHTEXTBULLETSPAGE_NUMBERCTRL
= 10310,
205 ID_RICHTEXTBULLETSPAGE_PREVIEW_CTRL
= 10314
207 ////@end wxRichTextBulletsPage member variables
209 bool m_hasBulletStyle
;
210 bool m_hasBulletNumber
;
211 bool m_hasBulletSymbol
;
216 // _RICHTEXTBULLETSPAGE_H_