X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e14d10b039e68a701a447043a4031cf43e9fa90b..3527f29c8769e09d796c547c0c309f8b86407012:/contrib/include/wx/stc/stc.h diff --git a/contrib/include/wx/stc/stc.h b/contrib/include/wx/stc/stc.h index 2f54e83f76..b02b934cce 100644 --- a/contrib/include/wx/stc/stc.h +++ b/contrib/include/wx/stc/stc.h @@ -25,29 +25,25 @@ #include #ifndef SWIG -/* - * If we're using wx in Dynamic Library format do we - * want wxStyledTextCtrl to be in DLL form as well? - */ -#if defined(WXUSINGDLL) && \ - (defined(WXMAKING_STC_DLL) || defined(WXUSING_STC_DLL)) - -#if defined(WXMAKING_STC_DLL) - // When building the DLL WXSTC_DECLSPEC exports classes -# define WXSTC_DECLSPEC WXEXPORT -#elif defined(WXUSING_STC_DLL) - // When using the DLL WXSTC_DECLSPEC imports classes -# define WXSTC_DECLSPEC WXIMPORT -#endif // defined(WXBUILD_STC_DLL) - -#else -// When building the static library nullify the effect of WXSTC_DECLSPEC -#define WXSTC_DECLSPEC -#endif // WXUSINGDLL && (WXMAKING_STC_DLL || WXUSING_STC_DLL) - +#ifdef WXMAKINGDLL_STC + #define WXDLLIMPEXP_STC WXEXPORT +#elif defined(WXUSINGDLL) + #define WXDLLIMPEXP_STC WXIMPORT +#else // not making nor using DLL + #define WXDLLIMPEXP_STC +#endif #endif // SWIG +// 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? @@ -166,6 +162,7 @@ #define wxSTC_INDIC_TT 2 #define wxSTC_INDIC_DIAGONAL 3 #define wxSTC_INDIC_STRIKE 4 +#define wxSTC_INDIC_HIDDEN 5 #define wxSTC_INDIC0_MASK 0x20 #define wxSTC_INDIC1_MASK 0x40 #define wxSTC_INDIC2_MASK 0x80 @@ -247,6 +244,9 @@ // where most code reside, and the lines after the caret, eg. the body of a function. #define wxSTC_CARET_EVEN 0x08 +// Maximum value of keywordSet parameter of SetKeyWords. +#define wxSTC_KEYWORDSET_MAX 8 + // Notifications // Type of modification and the action which caused the modification. // These are defined as a bit mask to make it easy to specify which notifications are wanted. @@ -331,6 +331,9 @@ #define wxSTC_LEX_POV 39 #define wxSTC_LEX_LOUT 40 #define wxSTC_LEX_ESCRIPT 41 +#define wxSTC_LEX_PS 42 +#define wxSTC_LEX_NSIS 43 +#define wxSTC_LEX_MMIXAL 44 // When a lexer specifies its language as SCLEX_AUTOMATIC it receives a // value assigned in sequence from SCLEX_AUTOMATIC+1. @@ -584,6 +587,8 @@ #define wxSTC_LUA_WORD4 15 #define wxSTC_LUA_WORD5 16 #define wxSTC_LUA_WORD6 17 +#define wxSTC_LUA_WORD7 18 +#define wxSTC_LUA_WORD8 19 // Lexical states for SCLEX_ERRORLIST #define wxSTC_ERR_DEFAULT 0 @@ -805,14 +810,20 @@ #define wxSTC_POV_DEFAULT 0 #define wxSTC_POV_COMMENT 1 #define wxSTC_POV_COMMENTLINE 2 -#define wxSTC_POV_COMMENTDOC 3 -#define wxSTC_POV_NUMBER 4 -#define wxSTC_POV_WORD 5 +#define wxSTC_POV_NUMBER 3 +#define wxSTC_POV_OPERATOR 4 +#define wxSTC_POV_IDENTIFIER 5 #define wxSTC_POV_STRING 6 -#define wxSTC_POV_OPERATOR 7 -#define wxSTC_POV_IDENTIFIER 8 -#define wxSTC_POV_BRACE 9 +#define wxSTC_POV_STRINGEOL 7 +#define wxSTC_POV_DIRECTIVE 8 +#define wxSTC_POV_BADDIRECTIVE 9 #define wxSTC_POV_WORD2 10 +#define wxSTC_POV_WORD3 11 +#define wxSTC_POV_WORD4 12 +#define wxSTC_POV_WORD5 13 +#define wxSTC_POV_WORD6 14 +#define wxSTC_POV_WORD7 15 +#define wxSTC_POV_WORD8 16 // Lexical states for SCLEX_LOUT #define wxSTC_LOUT_DEFAULT 0 @@ -841,10 +852,65 @@ #define wxSTC_ESCRIPT_WORD2 10 #define wxSTC_ESCRIPT_WORD3 11 +// Lexical states for SCLEX_PS +#define wxSTC_PS_DEFAULT 0 +#define wxSTC_PS_COMMENT 1 +#define wxSTC_PS_DSC_COMMENT 2 +#define wxSTC_PS_DSC_VALUE 3 +#define wxSTC_PS_NUMBER 4 +#define wxSTC_PS_NAME 5 +#define wxSTC_PS_KEYWORD 6 +#define wxSTC_PS_LITERAL 7 +#define wxSTC_PS_IMMEVAL 8 +#define wxSTC_PS_PAREN_ARRAY 9 +#define wxSTC_PS_PAREN_DICT 10 +#define wxSTC_PS_PAREN_PROC 11 +#define wxSTC_PS_TEXT 12 +#define wxSTC_PS_HEXSTRING 13 +#define wxSTC_PS_BASE85STRING 14 +#define wxSTC_PS_BADSTRINGCHAR 15 + +// Lexical states for SCLEX_NSIS +#define wxSTC_NSIS_DEFAULT 0 +#define wxSTC_NSIS_COMMENT 1 +#define wxSTC_NSIS_STRINGDQ 2 +#define wxSTC_NSIS_STRINGLQ 3 +#define wxSTC_NSIS_STRINGRQ 4 +#define wxSTC_NSIS_FUNCTION 5 +#define wxSTC_NSIS_VARIABLE 6 +#define wxSTC_NSIS_LABEL 7 +#define wxSTC_NSIS_USERDEFINED 8 +#define wxSTC_NSIS_SECTIONDEF 9 +#define wxSTC_NSIS_SUBSECTIONDEF 10 +#define wxSTC_NSIS_IFDEFINEDEF 11 +#define wxSTC_NSIS_MACRODEF 12 +#define wxSTC_NSIS_STRINGVAR 13 + +// Lexical states for SCLEX_MMIXAL +#define wxSTC_MMIXAL_LEADWS 0 +#define wxSTC_MMIXAL_COMMENT 1 +#define wxSTC_MMIXAL_LABEL 2 +#define wxSTC_MMIXAL_OPCODE 3 +#define wxSTC_MMIXAL_OPCODE_PRE 4 +#define wxSTC_MMIXAL_OPCODE_VALID 5 +#define wxSTC_MMIXAL_OPCODE_UNKNOWN 6 +#define wxSTC_MMIXAL_OPCODE_POST 7 +#define wxSTC_MMIXAL_OPERANDS 8 +#define wxSTC_MMIXAL_NUMBER 9 +#define wxSTC_MMIXAL_REF 10 +#define wxSTC_MMIXAL_CHAR 11 +#define wxSTC_MMIXAL_STRING 12 +#define wxSTC_MMIXAL_REGISTER 13 +#define wxSTC_MMIXAL_HEX 14 +#define wxSTC_MMIXAL_OPERATOR 15 +#define wxSTC_MMIXAL_SYMBOL 16 +#define wxSTC_MMIXAL_INCLUDE 17 + //----------------------------------------- // Commands that can be bound to keystrokes + // Redoes the next action on the undo history. #define wxSTC_CMD_REDO 2011 @@ -1068,14 +1134,18 @@ class WordList; struct SCNotification; #ifndef SWIG -extern WXSTC_DECLSPEC const wxChar* wxSTCNameStr; -class WXSTC_DECLSPEC wxStyledTextCtrl; -class WXSTC_DECLSPEC wxStyledTextEvent; +extern WXDLLIMPEXP_STC const wxChar* wxSTCNameStr; +class WXDLLIMPEXP_STC wxStyledTextCtrl; +class WXDLLIMPEXP_STC wxStyledTextEvent; #endif //---------------------------------------------------------------------- +#ifndef SWIG +class WXDLLIMPEXP_STC wxStyledTextCtrl : public wxControl { +#else class wxStyledTextCtrl : public wxControl { +#endif public: #ifdef SWIG @@ -2023,10 +2093,10 @@ public: bool GetMouseDownCaptures(); // Sets the cursor to one of the SC_CURSOR* values. - void SetCursor(int cursorType); + void SetSTCCursor(int cursorType); // Get cursor type. - int GetCursor(); + int GetSTCCursor(); // Change the way control characters are displayed: // If symbol is < 32, keep the drawn way, else, use the given character. @@ -2214,6 +2284,15 @@ public: // 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 + + //---------------------------------------------------------------------- @@ -2247,7 +2326,7 @@ private: void NotifyParent(SCNotification* scn); DECLARE_EVENT_TABLE() - DECLARE_CLASS(wxStyledTextCtrl) + DECLARE_DYNAMIC_CLASS(wxStyledTextCtrl) protected: @@ -2265,16 +2344,11 @@ protected: //---------------------------------------------------------------------- -// SWIG can't handle "#if" type of conditionals, only "#ifdef" -#ifdef SWIG -#define STC_USE_DND 1 +#ifndef SWIG +class WXDLLIMPEXP_STC wxStyledTextEvent : public wxCommandEvent { #else -#if wxUSE_DRAG_AND_DROP -#define STC_USE_DND 1 -#endif -#endif - class wxStyledTextEvent : public wxCommandEvent { +#endif public: wxStyledTextEvent(wxEventType commandType=0, int id=0); #ifndef SWIG @@ -2373,32 +2447,32 @@ private: #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_SAVEPOINTREACHED, 1653) - DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_SAVEPOINTLEFT, 1654) - DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_ROMODIFYATTEMPT, 1655) - DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_KEY, 1656) - DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_DOUBLECLICK, 1657) - DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_UPDATEUI, 1658) - DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_MODIFIED, 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_LOCAL_EVENT_TYPE(wxEVT_STC_PAINTED, 1664) - DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_USERLISTSELECTION, 1665) - DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_URIDROPPED, 1666) - DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_DWELLSTART, 1667) - DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_DWELLEND, 1668) - DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_START_DRAG, 1669) - DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_DRAG_OVER, 1670) - DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_DO_DROP, 1671) - DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_ZOOM, 1672) - DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_HOTSPOT_CLICK, 1673) - DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_HOTSPOT_DCLICK, 1674) - DECLARE_LOCAL_EVENT_TYPE(wxEVT_STC_CALLTIP_CLICK, 1675) + 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_POSCHANGED, 1663) + 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) END_DECLARE_EVENT_TYPES() #else enum { @@ -2436,32 +2510,32 @@ END_DECLARE_EVENT_TYPES() #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_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_KEY(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_KEY, 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_UPDATEUI(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_UPDATEUI, 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_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_PAINTED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_PAINTED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ), -#define EVT_STC_USERLISTSELECTION(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_USERLISTSELECTION, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ), -#define EVT_STC_URIDROPPED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_URIDROPPED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ), -#define EVT_STC_DWELLSTART(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DWELLSTART, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ), -#define EVT_STC_DWELLEND(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DWELLEND, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ), -#define EVT_STC_START_DRAG(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_START_DRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ), -#define EVT_STC_DRAG_OVER(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DRAG_OVER, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ), -#define EVT_STC_DO_DROP(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DO_DROP, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ), -#define EVT_STC_ZOOM(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_ZOOM, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ), -#define EVT_STC_HOTSPOT_CLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_HOTSPOT_CLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ), -#define EVT_STC_HOTSPOT_DCLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_HOTSPOT_DCLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ), -#define EVT_STC_CALLTIP_CLICK(id, fn)) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_CALLTIP_CLICK id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ), +#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_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_KEY(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_KEY, 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_UPDATEUI(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_UPDATEUI, 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_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_PAINTED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_PAINTED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ), +#define EVT_STC_USERLISTSELECTION(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_USERLISTSELECTION, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ), +#define EVT_STC_URIDROPPED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_URIDROPPED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ), +#define EVT_STC_DWELLSTART(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DWELLSTART, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ), +#define EVT_STC_DWELLEND(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DWELLEND, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ), +#define EVT_STC_START_DRAG(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_START_DRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ), +#define EVT_STC_DRAG_OVER(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DRAG_OVER, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ), +#define EVT_STC_DO_DROP(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_DO_DROP, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ), +#define EVT_STC_ZOOM(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_ZOOM, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ), +#define EVT_STC_HOTSPOT_CLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_HOTSPOT_CLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ), +#define EVT_STC_HOTSPOT_DCLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_HOTSPOT_DCLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ), +#define EVT_STC_CALLTIP_CLICK(id, fn)) DECLARE_EVENT_TABLE_ENTRY( wxEVT_STC_CALLTIP_CLICK id, -1, (wxObjectEventFunction) (wxEventFunction) (wxStyledTextEventFunction) & fn, (wxObject *) NULL ), #endif @@ -2478,13 +2552,14 @@ inline wxString stc2wx(const char* str) { #endif } -inline wxString stc2wx(const char* str, size_t len) { #if wxUSE_UNICODE - return wxString(str, wxConvUTF8, len); +wxString stc2wx(const char* str, size_t len); #else +inline wxString stc2wx(const char* str, size_t len) { return wxString(str, len); -#endif } +#endif + #if wxUSE_UNICODE inline const wxWX2MBbuf wx2stc(const wxString& str) {