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