]>
Commit | Line | Data |
---|---|---|
1 | //////////////////////////////////////////////////////////////////////////// | |
2 | // Name: stc.h | |
3 | // Purpose: A wxWidgets implementation of Scintilla. This class is the | |
4 | // one meant to be used directly by wx applications. It does not | |
5 | // derive directly from the Scintilla classes, and in fact there | |
6 | // is no mention of Scintilla classes at all in this header. | |
7 | // This class delegates all method calls and events to the | |
8 | // Scintilla objects and so forth. This allows the use of | |
9 | // Scintilla without polluting the namespace with all the | |
10 | // classes and itentifiers from Scintilla. | |
11 | // | |
12 | // Author: Robin Dunn | |
13 | // | |
14 | // Created: 13-Jan-2000 | |
15 | // RCS-ID: $Id$ | |
16 | // Copyright: (c) 2000 by Total Control Software | |
17 | // Licence: wxWindows license | |
18 | ///////////////////////////////////////////////////////////////////////////// | |
19 | ||
20 | #ifndef _WX_STC_STC_H_ | |
21 | #define _WX_STC_STC_H_ | |
22 | ||
23 | #include "wx/defs.h" | |
24 | ||
25 | #if wxUSE_STC | |
26 | ||
27 | #include "wx/control.h" | |
28 | #include "wx/dnd.h" | |
29 | #include "wx/stopwatch.h" | |
30 | ||
31 | class WXDLLIMPEXP_CORE wxScrollBar; | |
32 | ||
33 | #ifdef WXMAKINGDLL_STC | |
34 | #define WXDLLIMPEXP_STC WXEXPORT | |
35 | #elif defined(WXUSINGDLL) | |
36 | #define WXDLLIMPEXP_STC WXIMPORT | |
37 | #else // not making nor using DLL | |
38 | #define WXDLLIMPEXP_STC | |
39 | #endif | |
40 | ||
41 | ||
42 | // SWIG can't handle "#if" type of conditionals, only "#ifdef" | |
43 | #ifdef SWIG | |
44 | #define STC_USE_DND 1 | |
45 | #else | |
46 | #if wxUSE_DRAG_AND_DROP | |
47 | #define STC_USE_DND 1 | |
48 | #endif | |
49 | #endif | |
50 | ||
51 | //---------------------------------------------------------------------- | |
52 | ||
53 | // Should a wxPopupWindow be used for the call tips and autocomplete windows? | |
54 | #ifndef wxSTC_USE_POPUP | |
55 | #define wxSTC_USE_POPUP 1 | |
56 | #endif | |
57 | ||
58 | //---------------------------------------------------------------------- | |
59 | // BEGIN generated section. The following code is automatically generated | |
60 | // by gen_iface.py. Do not edit this file. Edit stc.h.in instead | |
61 | // and regenerate | |
62 | ||
63 | %(VALUES)s | |
64 | ||
65 | ||
66 | //----------------------------------------- | |
67 | // Commands that can be bound to keystrokes | |
68 | ||
69 | %(CMDS)s | |
70 | ||
71 | ||
72 | // END of generated section | |
73 | //---------------------------------------------------------------------- | |
74 | ||
75 | class ScintillaWX; // forward declare | |
76 | class WordList; | |
77 | struct SCNotification; | |
78 | ||
79 | #ifndef SWIG | |
80 | extern WXDLLIMPEXP_STC const wxChar* wxSTCNameStr; | |
81 | class WXDLLIMPEXP_STC wxStyledTextCtrl; | |
82 | class WXDLLIMPEXP_STC wxStyledTextEvent; | |
83 | #endif | |
84 | ||
85 | //---------------------------------------------------------------------- | |
86 | ||
87 | class WXDLLIMPEXP_STC wxStyledTextCtrl : public wxControl { | |
88 | public: | |
89 | ||
90 | #ifdef SWIG | |
91 | %%pythonAppend wxStyledTextCtrl "self._setOORInfo(self)" | |
92 | %%pythonAppend wxStyledTextCtrl() "" | |
93 | ||
94 | wxStyledTextCtrl(wxWindow *parent, wxWindowID id=wxID_ANY, | |
95 | const wxPoint& pos = wxDefaultPosition, | |
96 | const wxSize& size = wxDefaultSize, long style = 0, | |
97 | const wxString& name = wxPySTCNameStr); | |
98 | %%RenameCtor(PreStyledTextCtrl, wxStyledTextCtrl()); | |
99 | ||
100 | #else | |
101 | wxStyledTextCtrl(wxWindow *parent, wxWindowID id=wxID_ANY, | |
102 | const wxPoint& pos = wxDefaultPosition, | |
103 | const wxSize& size = wxDefaultSize, long style = 0, | |
104 | const wxString& name = wxSTCNameStr); | |
105 | wxStyledTextCtrl() { m_swx = NULL; } | |
106 | ~wxStyledTextCtrl(); | |
107 | ||
108 | #endif | |
109 | ||
110 | bool Create(wxWindow *parent, wxWindowID id=wxID_ANY, | |
111 | const wxPoint& pos = wxDefaultPosition, | |
112 | const wxSize& size = wxDefaultSize, long style = 0, | |
113 | const wxString& name = wxSTCNameStr); | |
114 | ||
115 | ||
116 | //---------------------------------------------------------------------- | |
117 | // BEGIN generated section. The following code is automatically generated | |
118 | // by gen_iface.py. Do not edit this file. Edit stc.h.in instead | |
119 | // and regenerate | |
120 | ||
121 | %(METHOD_DEFS)s | |
122 | ||
123 | // END of generated section | |
124 | //---------------------------------------------------------------------- | |
125 | // Others... | |
126 | ||
127 | ||
128 | // Returns the line number of the line with the caret. | |
129 | int GetCurrentLine(); | |
130 | ||
131 | // Extract style settings from a spec-string which is composed of one or | |
132 | // more of the following comma separated elements: | |
133 | // | |
134 | // bold turns on bold | |
135 | // italic turns on italics | |
136 | // fore:[name or #RRGGBB] sets the foreground colour | |
137 | // back:[name or #RRGGBB] sets the background colour | |
138 | // face:[facename] sets the font face name to use | |
139 | // size:[num] sets the font size in points | |
140 | // eol turns on eol filling | |
141 | // underline turns on underlining | |
142 | // | |
143 | void StyleSetSpec(int styleNum, const wxString& spec); | |
144 | ||
145 | ||
146 | ||
147 | // Set style size, face, bold, italic, and underline attributes from | |
148 | // a wxFont's attributes. | |
149 | void StyleSetFont(int styleNum, wxFont& font); | |
150 | ||
151 | ||
152 | ||
153 | // Set all font style attributes at once. | |
154 | void StyleSetFontAttr(int styleNum, int size, | |
155 | const wxString& faceName, | |
156 | bool bold, bool italic, | |
157 | bool underline, | |
158 | wxFontEncoding encoding=wxFONTENCODING_DEFAULT); | |
159 | ||
160 | ||
161 | // Set the character set of the font in a style. Converts the Scintilla | |
162 | // character set values to a wxFontEncoding. | |
163 | void StyleSetCharacterSet(int style, int characterSet); | |
164 | ||
165 | // Set the font encoding to be used by a style. | |
166 | void StyleSetFontEncoding(int style, wxFontEncoding encoding); | |
167 | ||
168 | ||
169 | // Perform one of the operations defined by the wxSTC_CMD_* constants. | |
170 | void CmdKeyExecute(int cmd); | |
171 | ||
172 | ||
173 | // Set the left and right margin in the edit area, measured in pixels. | |
174 | void SetMargins(int left, int right); | |
175 | ||
176 | ||
177 | // Retrieve the start and end positions of the current selection. | |
178 | #ifdef SWIG | |
179 | void GetSelection(int* OUTPUT, int* OUTPUT); | |
180 | #else | |
181 | void GetSelection(int* startPos, int* endPos); | |
182 | #endif | |
183 | ||
184 | // Retrieve the point in the window where a position is displayed. | |
185 | wxPoint PointFromPosition(int pos); | |
186 | ||
187 | ||
188 | // Scroll enough to make the given line visible | |
189 | void ScrollToLine(int line); | |
190 | ||
191 | ||
192 | // Scroll enough to make the given column visible | |
193 | void ScrollToColumn(int column); | |
194 | ||
195 | ||
196 | // Send a message to Scintilla | |
197 | long SendMsg(int msg, long wp=0, long lp=0); | |
198 | ||
199 | ||
200 | // Set the vertical scrollbar to use instead of the ont that's built-in. | |
201 | void SetVScrollBar(wxScrollBar* bar); | |
202 | ||
203 | ||
204 | // Set the horizontal scrollbar to use instead of the ont that's built-in. | |
205 | void SetHScrollBar(wxScrollBar* bar); | |
206 | ||
207 | // Can be used to prevent the EVT_CHAR handler from adding the char | |
208 | bool GetLastKeydownProcessed() { return m_lastKeyDownConsumed; } | |
209 | void SetLastKeydownProcessed(bool val) { m_lastKeyDownConsumed = val; } | |
210 | ||
211 | // Write the contents of the editor to filename | |
212 | bool SaveFile(const wxString& filename); | |
213 | ||
214 | // Load the contents of filename into the editor | |
215 | bool LoadFile(const wxString& filename); | |
216 | ||
217 | #ifdef STC_USE_DND | |
218 | // Allow for simulating a DnD DragOver | |
219 | wxDragResult DoDragOver(wxCoord x, wxCoord y, wxDragResult def); | |
220 | ||
221 | // Allow for simulating a DnD DropText | |
222 | bool DoDropText(long x, long y, const wxString& data); | |
223 | #endif | |
224 | ||
225 | // Specify whether anti-aliased fonts should be used. Will have no effect | |
226 | // on some platforms, but on some (wxMac for example) can greatly improve | |
227 | // performance. | |
228 | void SetUseAntiAliasing(bool useAA); | |
229 | ||
230 | // Returns the current UseAntiAliasing setting. | |
231 | bool GetUseAntiAliasing(); | |
232 | ||
233 | ||
234 | ||
235 | // The following methods are nearly equivallent to their similarly named | |
236 | // cousins above. The difference is that these methods bypass wxString | |
237 | // and always use a char* even if used in a unicode build of wxWidgets. | |
238 | // In that case the character data will be utf-8 encoded since that is | |
239 | // what is used internally by Scintilla in unicode builds. | |
240 | ||
241 | // Add text to the document at current position. | |
242 | void AddTextRaw(const char* text); | |
243 | ||
244 | // Insert string at a position. | |
245 | void InsertTextRaw(int pos, const char* text); | |
246 | ||
247 | // Retrieve the text of the line containing the caret. | |
248 | // Returns the index of the caret on the line. | |
249 | #ifdef SWIG | |
250 | wxCharBuffer GetCurLineRaw(int* OUTPUT); | |
251 | #else | |
252 | wxCharBuffer GetCurLineRaw(int* linePos=NULL); | |
253 | #endif | |
254 | ||
255 | // Retrieve the contents of a line. | |
256 | wxCharBuffer GetLineRaw(int line); | |
257 | ||
258 | // Retrieve the selected text. | |
259 | wxCharBuffer GetSelectedTextRaw(); | |
260 | ||
261 | // Retrieve a range of text. | |
262 | wxCharBuffer GetTextRangeRaw(int startPos, int endPos); | |
263 | ||
264 | // Replace the contents of the document with the argument text. | |
265 | void SetTextRaw(const char* text); | |
266 | ||
267 | // Retrieve all the text in the document. | |
268 | wxCharBuffer GetTextRaw(); | |
269 | ||
270 | // Append a string to the end of the document without changing the selection. | |
271 | void AppendTextRaw(const char* text); | |
272 | ||
273 | #ifdef SWIG | |
274 | %%pythoncode "_stc_utf8_methods.py" | |
275 | #endif | |
276 | //---------------------------------------------------------------------- | |
277 | ||
278 | ||
279 | #ifndef SWIG | |
280 | protected: | |
281 | // Event handlers | |
282 | void OnPaint(wxPaintEvent& evt); | |
283 | void OnScrollWin(wxScrollWinEvent& evt); | |
284 | void OnScroll(wxScrollEvent& evt); | |
285 | void OnSize(wxSizeEvent& evt); | |
286 | void OnMouseLeftDown(wxMouseEvent& evt); | |
287 | void OnMouseMove(wxMouseEvent& evt); | |
288 | void OnMouseLeftUp(wxMouseEvent& evt); | |
289 | void OnMouseRightUp(wxMouseEvent& evt); | |
290 | void OnMouseMiddleUp(wxMouseEvent& evt); | |
291 | void OnContextMenu(wxContextMenuEvent& evt); | |
292 | void OnMouseWheel(wxMouseEvent& evt); | |
293 | void OnChar(wxKeyEvent& evt); | |
294 | void OnKeyDown(wxKeyEvent& evt); | |
295 | void OnLoseFocus(wxFocusEvent& evt); | |
296 | void OnGainFocus(wxFocusEvent& evt); | |
297 | void OnSysColourChanged(wxSysColourChangedEvent& evt); | |
298 | void OnEraseBackground(wxEraseEvent& evt); | |
299 | void OnMenu(wxCommandEvent& evt); | |
300 | void OnListBox(wxCommandEvent& evt); | |
301 | void OnIdle(wxIdleEvent& evt); | |
302 | ||
303 | virtual wxSize DoGetBestSize() const; | |
304 | ||
305 | // Turn notifications from Scintilla into events | |
306 | void NotifyChange(); | |
307 | void NotifyParent(SCNotification* scn); | |
308 | ||
309 | private: | |
310 | DECLARE_EVENT_TABLE() | |
311 | DECLARE_DYNAMIC_CLASS(wxStyledTextCtrl) | |
312 | ||
313 | protected: | |
314 | ||
315 | ScintillaWX* m_swx; | |
316 | wxStopWatch m_stopWatch; | |
317 | wxScrollBar* m_vScrollBar; | |
318 | wxScrollBar* m_hScrollBar; | |
319 | ||
320 | bool m_lastKeyDownConsumed; | |
321 | ||
322 | friend class ScintillaWX; | |
323 | friend class Platform; | |
324 | #endif | |
325 | }; | |
326 | ||
327 | //---------------------------------------------------------------------- | |
328 | ||
329 | class WXDLLIMPEXP_STC wxStyledTextEvent : public wxCommandEvent { | |
330 | public: | |
331 | wxStyledTextEvent(wxEventType commandType=0, int id=0); | |
332 | #ifndef SWIG | |
333 | wxStyledTextEvent(const wxStyledTextEvent& event); | |
334 | #endif | |
335 | ~wxStyledTextEvent() {} | |
336 | ||
337 | void SetPosition(int pos) { m_position = pos; } | |
338 | void SetKey(int k) { m_key = k; } | |
339 | void SetModifiers(int m) { m_modifiers = m; } | |
340 | void SetModificationType(int t) { m_modificationType = t; } | |
341 | void SetText(const wxString& t) { m_text = t; } | |
342 | void SetLength(int len) { m_length = len; } | |
343 | void SetLinesAdded(int num) { m_linesAdded = num; } | |
344 | void SetLine(int val) { m_line = val; } | |
345 | void SetFoldLevelNow(int val) { m_foldLevelNow = val; } | |
346 | void SetFoldLevelPrev(int val) { m_foldLevelPrev = val; } | |
347 | void SetMargin(int val) { m_margin = val; } | |
348 | void SetMessage(int val) { m_message = val; } | |
349 | void SetWParam(int val) { m_wParam = val; } | |
350 | void SetLParam(int val) { m_lParam = val; } | |
351 | void SetListType(int val) { m_listType = val; } | |
352 | void SetX(int val) { m_x = val; } | |
353 | void SetY(int val) { m_y = val; } | |
354 | void SetDragText(const wxString& val) { m_dragText = val; } | |
355 | void SetDragAllowMove(bool val) { m_dragAllowMove = val; } | |
356 | #ifdef STC_USE_DND | |
357 | void SetDragResult(wxDragResult val) { m_dragResult = val; } | |
358 | #endif | |
359 | ||
360 | int GetPosition() const { return m_position; } | |
361 | int GetKey() const { return m_key; } | |
362 | int GetModifiers() const { return m_modifiers; } | |
363 | int GetModificationType() const { return m_modificationType; } | |
364 | wxString GetText() const { return m_text; } | |
365 | int GetLength() const { return m_length; } | |
366 | int GetLinesAdded() const { return m_linesAdded; } | |
367 | int GetLine() const { return m_line; } | |
368 | int GetFoldLevelNow() const { return m_foldLevelNow; } | |
369 | int GetFoldLevelPrev() const { return m_foldLevelPrev; } | |
370 | int GetMargin() const { return m_margin; } | |
371 | int GetMessage() const { return m_message; } | |
372 | int GetWParam() const { return m_wParam; } | |
373 | int GetLParam() const { return m_lParam; } | |
374 | int GetListType() const { return m_listType; } | |
375 | int GetX() const { return m_x; } | |
376 | int GetY() const { return m_y; } | |
377 | wxString GetDragText() { return m_dragText; } | |
378 | bool GetDragAllowMove() { return m_dragAllowMove; } | |
379 | #ifdef STC_USE_DND | |
380 | wxDragResult GetDragResult() { return m_dragResult; } | |
381 | #endif | |
382 | ||
383 | bool GetShift() const; | |
384 | bool GetControl() const; | |
385 | bool GetAlt() const; | |
386 | ||
387 | virtual wxEvent* Clone() const { return new wxStyledTextEvent(*this); } | |
388 | ||
389 | #ifndef SWIG | |
390 | private: | |
391 | DECLARE_DYNAMIC_CLASS(wxStyledTextEvent) | |
392 | ||
393 | int m_position; | |
394 | int m_key; | |
395 | int m_modifiers; | |
396 | ||
397 | int m_modificationType; // wxEVT_STC_MODIFIED | |
398 | wxString m_text; | |
399 | int m_length; | |
400 | int m_linesAdded; | |
401 | int m_line; | |
402 | int m_foldLevelNow; | |
403 | int m_foldLevelPrev; | |
404 | ||
405 | int m_margin; // wxEVT_STC_MARGINCLICK | |
406 | ||
407 | int m_message; // wxEVT_STC_MACRORECORD | |
408 | int m_wParam; | |
409 | int m_lParam; | |
410 | ||
411 | int m_listType; | |
412 | int m_x; | |
413 | int m_y; | |
414 | ||
415 | wxString m_dragText; // wxEVT_STC_START_DRAG, wxEVT_STC_DO_DROP | |
416 | bool m_dragAllowMove; // wxEVT_STC_START_DRAG | |
417 | ||
418 | #if wxUSE_DRAG_AND_DROP | |
419 | wxDragResult m_dragResult; // wxEVT_STC_DRAG_OVER,wxEVT_STC_DO_DROP | |
420 | #endif | |
421 | #endif | |
422 | }; | |
423 | ||
424 | ||
425 | ||
426 | #ifndef SWIG | |
427 | BEGIN_DECLARE_EVENT_TYPES() | |
428 | DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC, wxEVT_STC_CHANGE, 1650) | |
429 | DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC, wxEVT_STC_STYLENEEDED, 1651) | |
430 | DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC, wxEVT_STC_CHARADDED, 1652) | |
431 | DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC, wxEVT_STC_SAVEPOINTREACHED, 1653) | |
432 | DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC, wxEVT_STC_SAVEPOINTLEFT, 1654) | |
433 | DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC, wxEVT_STC_ROMODIFYATTEMPT, 1655) | |
434 | DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC, wxEVT_STC_KEY, 1656) | |
435 | DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC, wxEVT_STC_DOUBLECLICK, 1657) | |
436 | DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC, wxEVT_STC_UPDATEUI, 1658) | |
437 | DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC, wxEVT_STC_MODIFIED, 1659) | |
438 | DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC, wxEVT_STC_MACRORECORD, 1660) | |
439 | DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC, wxEVT_STC_MARGINCLICK, 1661) | |
440 | DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC, wxEVT_STC_NEEDSHOWN, 1662) | |
441 | DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC, wxEVT_STC_PAINTED, 1664) | |
442 | DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC, wxEVT_STC_USERLISTSELECTION, 1665) | |
443 | DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC, wxEVT_STC_URIDROPPED, 1666) | |
444 | DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC, wxEVT_STC_DWELLSTART, 1667) | |
445 | DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC, wxEVT_STC_DWELLEND, 1668) | |
446 | DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC, wxEVT_STC_START_DRAG, 1669) | |
447 | DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC, wxEVT_STC_DRAG_OVER, 1670) | |
448 | DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC, wxEVT_STC_DO_DROP, 1671) | |
449 | DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC, wxEVT_STC_ZOOM, 1672) | |
450 | DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC, wxEVT_STC_HOTSPOT_CLICK, 1673) | |
451 | DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC, wxEVT_STC_HOTSPOT_DCLICK, 1674) | |
452 | DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC, wxEVT_STC_CALLTIP_CLICK, 1675) | |
453 | DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC, wxEVT_STC_AUTOCOMP_SELECTION, 1676) | |
454 | END_DECLARE_EVENT_TYPES() | |
455 | #else | |
456 | enum { | |
457 | wxEVT_STC_CHANGE, | |
458 | wxEVT_STC_STYLENEEDED, | |
459 | wxEVT_STC_CHARADDED, | |
460 | wxEVT_STC_SAVEPOINTREACHED, | |
461 | wxEVT_STC_SAVEPOINTLEFT, | |
462 | wxEVT_STC_ROMODIFYATTEMPT, | |
463 | wxEVT_STC_KEY, | |
464 | wxEVT_STC_DOUBLECLICK, | |
465 | wxEVT_STC_UPDATEUI, | |
466 | wxEVT_STC_MODIFIED, | |
467 | wxEVT_STC_MACRORECORD, | |
468 | wxEVT_STC_MARGINCLICK, | |
469 | wxEVT_STC_NEEDSHOWN, | |
470 | wxEVT_STC_PAINTED, | |
471 | wxEVT_STC_USERLISTSELECTION, | |
472 | wxEVT_STC_URIDROPPED, | |
473 | wxEVT_STC_DWELLSTART, | |
474 | wxEVT_STC_DWELLEND, | |
475 | wxEVT_STC_START_DRAG, | |
476 | wxEVT_STC_DRAG_OVER, | |
477 | wxEVT_STC_DO_DROP, | |
478 | wxEVT_STC_ZOOM, | |
479 | wxEVT_STC_HOTSPOT_CLICK, | |
480 | wxEVT_STC_HOTSPOT_DCLICK, | |
481 | wxEVT_STC_CALLTIP_CLICK, | |
482 | wxEVT_STC_AUTOCOMP_SELECTION | |
483 | }; | |
484 | #endif | |
485 | ||
486 | ||
487 | ||
488 | #ifndef SWIG | |
489 | typedef void (wxEvtHandler::*wxStyledTextEventFunction)(wxStyledTextEvent&); | |
490 | ||
491 | #define EVT_STC_CHANGE(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_CHANGE, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ), | |
492 | #define EVT_STC_STYLENEEDED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_STYLENEEDED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ), | |
493 | #define EVT_STC_CHARADDED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_CHARADDED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ), | |
494 | #define EVT_STC_SAVEPOINTREACHED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_SAVEPOINTREACHED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ), | |
495 | #define EVT_STC_SAVEPOINTLEFT(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_SAVEPOINTLEFT, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ), | |
496 | #define EVT_STC_ROMODIFYATTEMPT(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_ROMODIFYATTEMPT, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ), | |
497 | #define EVT_STC_KEY(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_KEY, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ), | |
498 | #define EVT_STC_DOUBLECLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DOUBLECLICK, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ), | |
499 | #define EVT_STC_UPDATEUI(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_UPDATEUI, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ), | |
500 | #define EVT_STC_MODIFIED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_MODIFIED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ), | |
501 | #define EVT_STC_MACRORECORD(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_MACRORECORD, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ), | |
502 | #define EVT_STC_MARGINCLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_MARGINCLICK, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ), | |
503 | #define EVT_STC_NEEDSHOWN(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_NEEDSHOWN, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ), | |
504 | #define EVT_STC_PAINTED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_PAINTED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ), | |
505 | #define EVT_STC_USERLISTSELECTION(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_USERLISTSELECTION, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ), | |
506 | #define EVT_STC_URIDROPPED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_URIDROPPED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ), | |
507 | #define EVT_STC_DWELLSTART(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DWELLSTART, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ), | |
508 | #define EVT_STC_DWELLEND(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DWELLEND, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ), | |
509 | #define EVT_STC_START_DRAG(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_START_DRAG, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ), | |
510 | #define EVT_STC_DRAG_OVER(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DRAG_OVER, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ), | |
511 | #define EVT_STC_DO_DROP(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DO_DROP, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ), | |
512 | #define EVT_STC_ZOOM(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_ZOOM, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ), | |
513 | #define EVT_STC_HOTSPOT_CLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_HOTSPOT_CLICK, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ), | |
514 | #define EVT_STC_HOTSPOT_DCLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_HOTSPOT_DCLICK, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ), | |
515 | #define EVT_STC_CALLTIP_CLICK(id, fn)) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_CALLTIP_CLICK id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ), | |
516 | #define EVT_STC_AUTOCOMP_SELECTION(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_AUTOCOMP_SELECTION id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ), | |
517 | #endif | |
518 | ||
519 | #endif // wxUSE_STC | |
520 | ||
521 | #endif // _WX_STC_STC_H_ |