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