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