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