X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e45b3f17a2448ba87d4abef6df120b58364d88e4..8e190f0ed9c242e6df5fd4dd99fdaf6c9dea1cda:/src/stc/gen_iface.py?ds=sidebyside diff --git a/src/stc/gen_iface.py b/src/stc/gen_iface.py index 4e0afbb129..37bae5033d 100644 --- a/src/stc/gen_iface.py +++ b/src/stc/gen_iface.py @@ -21,7 +21,7 @@ H_TEMPLATE = os.path.abspath('./stc.h.in') CPP_TEMPLATE = os.path.abspath('./stc.cpp.in') H_DEST = os.path.abspath('../../include/wx/stc/stc.h') CPP_DEST = os.path.abspath('./stc.cpp') -DOCSTR_DEST = os.path.abspath('../../../wxPython/contrib/stc/_stc_gendocs.i') +DOCSTR_DEST = os.path.abspath('../../wxPython/contrib/stc/_stc_gendocs.i') # Value prefixes to convert @@ -293,7 +293,12 @@ methodOverrideMap = { 'AutoCGetTypeSeparator' : ('AutoCompGetTypeSeparator', 0, 0, 0), 'AutoCSetTypeSeparator' : ('AutoCompSetTypeSeparator', 0, 0, 0), 'AutoCGetCurrent' : ('AutoCompGetCurrent', 0, 0, 0), - + 'AutoCSetMaxWidth' : ('AutoCompSetMaxWidth', 0, 0, 0), + 'AutoCGetMaxWidth' : ('AutoCompGetMaxWidth', 0, 0, 0), + 'AutoCSetMaxHeight' : ('AutoCompSetMaxHeight', 0, 0, 0), + 'AutoCGetMaxHeight' : ('AutoCompGetMaxHeight', 0, 0, 0), + 'AutoCGetMaxHeight' : ('AutoCompGetMaxHeight', 0, 0, 0), + 'RegisterImage' : (0, '''void %s(int type, const wxBitmap& bmp);''', @@ -483,7 +488,9 @@ methodOverrideMap = { 'SetHotspotActiveFore' : ('SetHotspotActiveForeground', 0, 0, 0), 'SetHotspotActiveBack' : ('SetHotspotActiveBackground', 0, 0, 0), - + + 'GetCaretLineBack' : ('GetCaretLineBackground', 0, 0, 0), + 'SetCaretLineBack' : ('SetCaretLineBackground', 0, 0, 0), 'ReplaceTarget' : (0, @@ -519,7 +526,45 @@ methodOverrideMap = { 'TargetAsUTF8' : ( None, 0, 0, 0), 'SetLengthForEncode' : ( None, 0, 0, 0), 'EncodedFromUTF8' : ( None, 0, 0, 0), - + + + 'GetProperty' : + (0, + 'wxString %s(const wxString& key);', + + '''wxString %s(const wxString& key) { + int len = SendMsg(SCI_GETPROPERTY, (long)(const char*)wx2stc(key), 0); + if (!len) return wxEmptyString; + + wxMemoryBuffer mbuf(len+1); + char* buf = (char*)mbuf.GetWriteBuf(len+1); + SendMsg(%s, (long)(const char*)wx2stc(key), (long)buf); + mbuf.UngetWriteBuf(len); + mbuf.AppendByte(0); + return stc2wx(buf);''', + ("Retrieve a 'property' value previously set with SetProperty.",)), + + 'GetPropertyExpanded' : + (0, + 'wxString %s(const wxString& key);', + + '''wxString %s(const wxString& key) { + int len = SendMsg(SCI_GETPROPERTYEXPANDED, (long)(const char*)wx2stc(key), 0); + if (!len) return wxEmptyString; + + wxMemoryBuffer mbuf(len+1); + char* buf = (char*)mbuf.GetWriteBuf(len+1); + SendMsg(%s, (long)(const char*)wx2stc(key), (long)buf); + mbuf.UngetWriteBuf(len); + mbuf.AppendByte(0); + return stc2wx(buf);''', + ("Retrieve a 'property' value previously set with SetProperty,", + "with '$()' variable replacement on returned buffer.")), + + 'GetPropertyInt' : (0, 0, 0, + ("Retrieve a 'property' value previously set with SetProperty,", + "interpreted as an int AFTER any '$()' variable replacement.")), + 'GetDocPointer' : (0,