////////////////////////////////////////////////////////////////////////////
// Name: stc.h
-// Purpose: A wxWindows implementation of Scintilla. This class is the
+// Purpose: A wxWidgets implementation of Scintilla. This class is the
// one meant to be used directly by wx applications. It does not
// derive directly from the Scintilla classes, and in fact there
// is no mention of Scintilla classes at all in this header.
#define __stc_h__
-#include <wx/wx.h>
+#include "wx/wx.h"
+#include "wx/dnd.h"
+
+
+#ifdef WXMAKINGDLL_STC
+ #define WXDLLIMPEXP_STC WXEXPORT
+#elif defined(WXUSINGDLL)
+ #define WXDLLIMPEXP_STC WXIMPORT
+#else // not making nor using DLL
+ #define WXDLLIMPEXP_STC
+#endif
+
+
+// SWIG can't handle "#if" type of conditionals, only "#ifdef"
+#ifdef SWIG
+#define STC_USE_DND 1
+#else
+#if wxUSE_DRAG_AND_DROP
+#define STC_USE_DND 1
+#endif
+#endif
+
+//----------------------------------------------------------------------
+
+// Should a wxPopupWindow be used for the call tips and autocomplete windows?
+#ifndef wxSTC_USE_POPUP
+#define wxSTC_USE_POPUP 1
+#endif
//----------------------------------------------------------------------
// BEGIN generated section. The following code is automatically generated
%(VALUES)s
-// END of generated section
-//----------------------------------------------------------------------
-// Others
-#define wxSTC_MASK_FOLDERS ((1 << wxSTC_MARKNUM_FOLDER) | (1 << wxSTC_MARKNUM_FOLDEROPEN))
+//-----------------------------------------
+// Commands that can be bound to keystrokes
+%(CMDS)s
+// END of generated section
//----------------------------------------------------------------------
class ScintillaWX; // forward declare
class WordList;
struct SCNotification;
-
-extern const wxChar* wxSTCNameStr;
+#ifndef SWIG
+extern WXDLLIMPEXP_STC const wxChar* wxSTCNameStr;
+class WXDLLIMPEXP_STC wxStyledTextCtrl;
+class WXDLLIMPEXP_STC wxStyledTextEvent;
+#endif
//----------------------------------------------------------------------
-class wxStyledTextCtrl : public wxControl {
+class WXDLLIMPEXP_STC wxStyledTextCtrl : public wxControl {
public:
#ifdef SWIG
- wxStyledTextCtrl(wxWindow *parent, wxWindowID id,
+ %%pythonAppend wxStyledTextCtrl "self._setOORInfo(self)"
+ %%pythonAppend wxStyledTextCtrl() ""
+
+ wxStyledTextCtrl(wxWindow *parent, wxWindowID id=wxID_ANY,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0,
- const char* name = "styledtext");
+ const wxString& name = wxPySTCNameStr);
+ %%RenameCtor(PreStyledTextCtrl, wxStyledTextCtrl());
+
#else
- wxStyledTextCtrl(wxWindow *parent, wxWindowID id,
+ wxStyledTextCtrl(wxWindow *parent, wxWindowID id=wxID_ANY,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0,
const wxString& name = wxSTCNameStr);
+ wxStyledTextCtrl() { m_swx = NULL; }
+ ~wxStyledTextCtrl();
+
#endif
+ bool Create(wxWindow *parent, wxWindowID id=wxID_ANY,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize, long style = 0,
+ const wxString& name = wxSTCNameStr);
-#ifndef SWIG
- ~wxStyledTextCtrl();
-#endif
//----------------------------------------------------------------------
// BEGIN generated section. The following code is automatically generated
//
// bold turns on bold
// italic turns on italics
- // fore:#RRGGBB sets the foreground colour
- // back:#RRGGBB sets the background colour
+ // fore:[name or #RRGGBB] sets the foreground colour
+ // back:[name or #RRGGBB] sets the background colour
// face:[facename] sets the font face name to use
// size:[num] sets the font size in points
// eol turns on eol filling
void StyleSetFontAttr(int styleNum, int size,
const wxString& faceName,
bool bold, bool italic,
- bool underline);
+ bool underline,
+ wxFontEncoding encoding=wxFONTENCODING_DEFAULT);
+
+ // Set the character set of the font in a style. Converts the Scintilla
+ // character set values to a wxFontEncoding.
+ void StyleSetCharacterSet(int style, int characterSet);
+ // Set the font encoding to be used by a style.
+ void StyleSetFontEncoding(int style, wxFontEncoding encoding);
+
// Perform one of the operations defined by the wxSTC_CMD_* constants.
void CmdKeyExecute(int cmd);
-
// Set the left and right margin in the edit area, measured in pixels.
void SetMargins(int left, int right);
// Scroll enough to make the given column visible
void ScrollToColumn(int column);
+
+ // Send a message to Scintilla
+ long SendMsg(int msg, long wp=0, long lp=0);
+
+
+ // Set the vertical scrollbar to use instead of the ont that's built-in.
+ void SetVScrollBar(wxScrollBar* bar);
+
+
+ // Set the horizontal scrollbar to use instead of the ont that's built-in.
+ void SetHScrollBar(wxScrollBar* bar);
+
+ // Can be used to prevent the EVT_CHAR handler from adding the char
+ bool GetLastKeydownProcessed() { return m_lastKeyDownConsumed; }
+ void SetLastKeydownProcessed(bool val) { m_lastKeyDownConsumed = val; }
+
+ // Write the contents of the editor to filename
+ bool SaveFile(const wxString& filename);
+
+ // Load the contents of filename into the editor
+ bool LoadFile(const wxString& filename);
+
+#ifdef STC_USE_DND
+ // Allow for simulating a DnD DragOver
+ wxDragResult DoDragOver(wxCoord x, wxCoord y, wxDragResult def);
+
+ // Allow for simulating a DnD DropText
+ bool DoDropText(long x, long y, const wxString& data);
+#endif
+
+ // Specify whether anti-aliased fonts should be used. Will have no effect
+ // on some platforms, but on some (wxMac for example) can greatly improve
+ // performance.
+ void SetUseAntiAliasing(bool useAA);
+
+ // Returns the current UseAntiAliasing setting.
+ bool GetUseAntiAliasing();
+
+
+
+ // The following methods are nearly equivallent to their similarly named
+ // cousins above. The difference is that these methods bypass wxString
+ // and always use a char* even if used in a unicode build of wxWidgets.
+ // In that case the character data will be utf-8 encoded since that is
+ // what is used internally by Scintilla in unicode builds.
+
+ // Add text to the document at current position.
+ void AddTextRaw(const char* text);
+
+ // Insert string at a position.
+ void InsertTextRaw(int pos, const char* text);
+
+ // Retrieve the text of the line containing the caret.
+ // Returns the index of the caret on the line.
+#ifdef SWIG
+ wxCharBuffer GetCurLineRaw(int* OUTPUT);
+#else
+ wxCharBuffer GetCurLineRaw(int* linePos=NULL);
+#endif
+
+ // Retrieve the contents of a line.
+ wxCharBuffer GetLineRaw(int line);
+
+ // Retrieve the selected text.
+ wxCharBuffer GetSelectedTextRaw();
+
+ // Retrieve a range of text.
+ wxCharBuffer GetTextRangeRaw(int startPos, int endPos);
+
+ // Replace the contents of the document with the argument text.
+ void SetTextRaw(const char* text);
+
+ // Retrieve all the text in the document.
+ wxCharBuffer GetTextRaw();
+
+ // Append a string to the end of the document without changing the selection.
+ void AppendTextRaw(const char* text);
+
+#ifdef SWIG
+ %%pythoncode "_stc_utf8_methods.py"
+#endif
//----------------------------------------------------------------------
#ifndef SWIG
-private:
+protected:
// Event handlers
void OnPaint(wxPaintEvent& evt);
void OnScrollWin(wxScrollWinEvent& evt);
+ void OnScroll(wxScrollEvent& evt);
void OnSize(wxSizeEvent& evt);
void OnMouseLeftDown(wxMouseEvent& evt);
void OnMouseMove(wxMouseEvent& evt);
void OnMouseLeftUp(wxMouseEvent& evt);
void OnMouseRightUp(wxMouseEvent& evt);
+ void OnMouseMiddleUp(wxMouseEvent& evt);
+ void OnContextMenu(wxContextMenuEvent& evt);
void OnMouseWheel(wxMouseEvent& evt);
void OnChar(wxKeyEvent& evt);
void OnKeyDown(wxKeyEvent& evt);
void OnEraseBackground(wxEraseEvent& evt);
void OnMenu(wxCommandEvent& evt);
void OnListBox(wxCommandEvent& evt);
+ void OnIdle(wxIdleEvent& evt);
+ virtual wxSize DoGetBestSize() const;
// Turn notifications from Scintilla into events
void NotifyChange();
void NotifyParent(SCNotification* scn);
- long SendMsg(int msg, long wp=0, long lp=0);
-
private:
DECLARE_EVENT_TABLE()
- DECLARE_CLASS(wxStyledTextCtrl)
+ DECLARE_DYNAMIC_CLASS(wxStyledTextCtrl)
+
+protected:
ScintillaWX* m_swx;
wxStopWatch m_stopWatch;
+ wxScrollBar* m_vScrollBar;
+ wxScrollBar* m_hScrollBar;
+ bool m_lastKeyDownConsumed;
friend class ScintillaWX;
friend class Platform;
//----------------------------------------------------------------------
-class wxStyledTextEvent : public wxCommandEvent {
+class WXDLLIMPEXP_STC wxStyledTextEvent : public wxCommandEvent {
public:
wxStyledTextEvent(wxEventType commandType=0, int id=0);
+#ifndef SWIG
+ wxStyledTextEvent(const wxStyledTextEvent& event);
+#endif
~wxStyledTextEvent() {}
- void SetPosition(int pos) { m_position = pos; }
- void SetKey(int k) { m_key = k; }
- void SetModifiers(int m) { m_modifiers = m; }
- void SetModificationType(int t) { m_modificationType = t; }
- void SetText(const char* t) { m_text = t; }
- void SetLength(int len) { m_length = len; }
- void SetLinesAdded(int num) { m_linesAdded = num; }
- void SetLine(int val) { m_line = val; }
- void SetFoldLevelNow(int val) { m_foldLevelNow = val; }
- void SetFoldLevelPrev(int val) { m_foldLevelPrev = val; }
- void SetMargin(int val) { m_margin = val; }
- void SetMessage(int val) { m_message = val; }
- void SetWParam(int val) { m_wParam = val; }
- void SetLParam(int val) { m_lParam = val; }
+ void SetPosition(int pos) { m_position = pos; }
+ void SetKey(int k) { m_key = k; }
+ void SetModifiers(int m) { m_modifiers = m; }
+ void SetModificationType(int t) { m_modificationType = t; }
+ void SetText(const wxString& t) { m_text = t; }
+ void SetLength(int len) { m_length = len; }
+ void SetLinesAdded(int num) { m_linesAdded = num; }
+ void SetLine(int val) { m_line = val; }
+ void SetFoldLevelNow(int val) { m_foldLevelNow = val; }
+ void SetFoldLevelPrev(int val) { m_foldLevelPrev = val; }
+ void SetMargin(int val) { m_margin = val; }
+ void SetMessage(int val) { m_message = val; }
+ void SetWParam(int val) { m_wParam = val; }
+ void SetLParam(int val) { m_lParam = val; }
+ void SetListType(int val) { m_listType = val; }
+ void SetX(int val) { m_x = val; }
+ void SetY(int val) { m_y = val; }
+ void SetDragText(const wxString& val) { m_dragText = val; }
+ void SetDragAllowMove(bool val) { m_dragAllowMove = val; }
+#ifdef STC_USE_DND
+ void SetDragResult(wxDragResult val) { m_dragResult = val; }
+#endif
int GetPosition() const { return m_position; }
int GetKey() const { return m_key; }
int GetMessage() const { return m_message; }
int GetWParam() const { return m_wParam; }
int GetLParam() const { return m_lParam; }
+ int GetListType() const { return m_listType; }
+ int GetX() const { return m_x; }
+ int GetY() const { return m_y; }
+ wxString GetDragText() { return m_dragText; }
+ bool GetDragAllowMove() { return m_dragAllowMove; }
+#ifdef STC_USE_DND
+ wxDragResult GetDragResult() { return m_dragResult; }
+#endif
bool GetShift() const;
bool GetControl() const;
bool GetAlt() const;
- void CopyObject(wxObject& obj) const;
+ virtual wxEvent* Clone() const { return new wxStyledTextEvent(*this); }
#ifndef SWIG
private:
int m_message; // wxEVT_STC_MACRORECORD
int m_wParam;
int m_lParam;
+
+ int m_listType;
+ int m_x;
+ int m_y;
+
+ wxString m_dragText; // wxEVT_STC_START_DRAG, wxEVT_STC_DO_DROP
+ bool m_dragAllowMove; // wxEVT_STC_START_DRAG
+
+#if wxUSE_DRAG_AND_DROP
+ wxDragResult m_dragResult; // wxEVT_STC_DRAG_OVER,wxEVT_STC_DO_DROP
+#endif
#endif
};
+
+
#ifndef SWIG
BEGIN_DECLARE_EVENT_TYPES()
- DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_CHANGE, 1650)
- DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_STYLENEEDED, 1651)
- DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_CHARADDED, 1652)
- DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_UPDATEUI, 1653)
- DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_SAVEPOINTREACHED, 1654)
- DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_SAVEPOINTLEFT, 1655)
- DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_ROMODIFYATTEMPT, 1656)
- DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_DOUBLECLICK, 1657)
- DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_MODIFIED, 1658)
- DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_KEY, 1659)
- DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_MACRORECORD, 1660)
- DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_MARGINCLICK, 1661)
- DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_NEEDSHOWN, 1662)
- DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_POSCHANGED, 1663)
+ DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC, wxEVT_STC_CHANGE, 1650)
+ DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC, wxEVT_STC_STYLENEEDED, 1651)
+ DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC, wxEVT_STC_CHARADDED, 1652)
+ DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC, wxEVT_STC_SAVEPOINTREACHED, 1653)
+ DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC, wxEVT_STC_SAVEPOINTLEFT, 1654)
+ DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC, wxEVT_STC_ROMODIFYATTEMPT, 1655)
+ DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC, wxEVT_STC_KEY, 1656)
+ DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC, wxEVT_STC_DOUBLECLICK, 1657)
+ DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC, wxEVT_STC_UPDATEUI, 1658)
+ DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC, wxEVT_STC_MODIFIED, 1659)
+ DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC, wxEVT_STC_MACRORECORD, 1660)
+ DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC, wxEVT_STC_MARGINCLICK, 1661)
+ DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC, wxEVT_STC_NEEDSHOWN, 1662)
+ DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC, wxEVT_STC_PAINTED, 1664)
+ DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC, wxEVT_STC_USERLISTSELECTION, 1665)
+ DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC, wxEVT_STC_URIDROPPED, 1666)
+ DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC, wxEVT_STC_DWELLSTART, 1667)
+ DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC, wxEVT_STC_DWELLEND, 1668)
+ DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC, wxEVT_STC_START_DRAG, 1669)
+ DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC, wxEVT_STC_DRAG_OVER, 1670)
+ DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC, wxEVT_STC_DO_DROP, 1671)
+ DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC, wxEVT_STC_ZOOM, 1672)
+ DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC, wxEVT_STC_HOTSPOT_CLICK, 1673)
+ DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC, wxEVT_STC_HOTSPOT_DCLICK, 1674)
+ DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC, wxEVT_STC_CALLTIP_CLICK, 1675)
+ DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_STC, wxEVT_STC_AUTOCOMP_SELECTION, 1676)
END_DECLARE_EVENT_TYPES()
#else
enum {
wxEVT_STC_CHANGE,
wxEVT_STC_STYLENEEDED,
wxEVT_STC_CHARADDED,
- wxEVT_STC_UPDATEUI,
wxEVT_STC_SAVEPOINTREACHED,
wxEVT_STC_SAVEPOINTLEFT,
wxEVT_STC_ROMODIFYATTEMPT,
+ wxEVT_STC_KEY,
wxEVT_STC_DOUBLECLICK,
+ wxEVT_STC_UPDATEUI,
wxEVT_STC_MODIFIED,
- wxEVT_STC_KEY,
wxEVT_STC_MACRORECORD,
wxEVT_STC_MARGINCLICK,
wxEVT_STC_NEEDSHOWN,
- wxEVT_STC_POSCHANGED
+ wxEVT_STC_PAINTED,
+ wxEVT_STC_USERLISTSELECTION,
+ wxEVT_STC_URIDROPPED,
+ wxEVT_STC_DWELLSTART,
+ wxEVT_STC_DWELLEND,
+ wxEVT_STC_START_DRAG,
+ wxEVT_STC_DRAG_OVER,
+ wxEVT_STC_DO_DROP,
+ wxEVT_STC_ZOOM,
+ wxEVT_STC_HOTSPOT_CLICK,
+ wxEVT_STC_HOTSPOT_DCLICK,
+ wxEVT_STC_CALLTIP_CLICK,
+ wxEVT_STC_AUTOCOMP_SELECTION
};
#endif
#ifndef SWIG
typedef void (wxEvtHandler::*wxStyledTextEventFunction)(wxStyledTextEvent&);
-#define EVT_STC_CHANGE(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_CHANGE, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
-#define EVT_STC_STYLENEEDED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_STYLENEEDED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
-#define EVT_STC_CHARADDED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_CHARADDED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
-#define EVT_STC_UPDATEUI(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_UPDATEUI, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
-#define EVT_STC_SAVEPOINTREACHED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_SAVEPOINTREACHED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
-#define EVT_STC_SAVEPOINTLEFT(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_SAVEPOINTLEFT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
-#define EVT_STC_ROMODIFYATTEMPT(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_ROMODIFYATTEMPT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
-#define EVT_STC_DOUBLECLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DOUBLECLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
-#define EVT_STC_MODIFIED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_MODIFIED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
-#define EVT_STC_KEY(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_KEY, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
-#define EVT_STC_MACRORECORD(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_MACRORECORD, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
-#define EVT_STC_MARGINCLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_MARGINCLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
-#define EVT_STC_NEEDSHOWN(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_NEEDSHOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
-#define EVT_STC_POSCHANGED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_POSCHANGED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ),
-
+#define EVT_STC_CHANGE(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_CHANGE, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
+#define EVT_STC_STYLENEEDED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_STYLENEEDED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
+#define EVT_STC_CHARADDED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_CHARADDED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
+#define EVT_STC_SAVEPOINTREACHED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_SAVEPOINTREACHED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
+#define EVT_STC_SAVEPOINTLEFT(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_SAVEPOINTLEFT, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
+#define EVT_STC_ROMODIFYATTEMPT(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_ROMODIFYATTEMPT, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
+#define EVT_STC_KEY(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_KEY, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
+#define EVT_STC_DOUBLECLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DOUBLECLICK, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
+#define EVT_STC_UPDATEUI(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_UPDATEUI, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
+#define EVT_STC_MODIFIED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_MODIFIED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
+#define EVT_STC_MACRORECORD(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_MACRORECORD, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
+#define EVT_STC_MARGINCLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_MARGINCLICK, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
+#define EVT_STC_NEEDSHOWN(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_NEEDSHOWN, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
+#define EVT_STC_PAINTED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_PAINTED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
+#define EVT_STC_USERLISTSELECTION(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_USERLISTSELECTION, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
+#define EVT_STC_URIDROPPED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_URIDROPPED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
+#define EVT_STC_DWELLSTART(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DWELLSTART, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
+#define EVT_STC_DWELLEND(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DWELLEND, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
+#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 ),
+#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 ),
+#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 ),
+#define EVT_STC_ZOOM(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_ZOOM, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxStyledTextEventFunction, & fn ), (wxObject *) NULL ),
+#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 ),
+#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 ),
+#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 ),
+#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 ),
#endif
//----------------------------------------------------------------------
+// Utility functions used within wxSTC
+
+#ifndef SWIG
+#if wxUSE_UNICODE
+
+WXDLLIMPEXP_STC wxString stc2wx(const char* str);
+WXDLLIMPEXP_STC wxString stc2wx(const char* str, size_t len);
+WXDLLIMPEXP_STC const wxWX2MBbuf wx2stc(const wxString& str);
+
+#else // not UNICODE
+
+inline wxString stc2wx(const char* str) {
+ return wxString(str);
+}
+inline wxString stc2wx(const char* str, size_t len) {
+ return wxString(str, len);
+}
+inline const wxWX2MBbuf wx2stc(const wxString& str) {
+ return str.mbc_str();
+}
+
+#endif // UNICODE
+#endif // SWIG
+
//----------------------------------------------------------------------
#endif