X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f2ccce28add4d71f5b2a7456d60c08e1d3b45abf..cc1487e53905bd534dba2099d33ac2142cec7818:/src/stc/gen_iface.py diff --git a/src/stc/gen_iface.py b/src/stc/gen_iface.py index 67df43a358..5c268849a3 100644 --- a/src/stc/gen_iface.py +++ b/src/stc/gen_iface.py @@ -203,6 +203,8 @@ methodOverrideMap = { // convert bmp to a xpm in a string wxMemoryOutputStream strm; wxImage img = bmp.ConvertToImage(); + if (img.HasAlpha()) + img.ConvertAlphaToMask(); img.SaveFile(strm, wxBITMAP_TYPE_XPM); size_t len = strm.GetSize(); char* buff = new char[len+1]; @@ -229,7 +231,8 @@ methodOverrideMap = { 'SetSelBack' : ('SetSelBackground', 0, 0, 0), 'SetCaretFore' : ('SetCaretForeground', 0, 0, 0), 'StyleSetFont' : ('StyleSetFaceName', 0, 0, 0), - + 'StyleSetCharacterSet' : (None, 0, 0, 0), + 'AssignCmdKey' : ('CmdKeyAssign', 'void %s(int key, int modifiers, int cmd);', @@ -290,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);''', @@ -298,6 +306,8 @@ methodOverrideMap = { // convert bmp to a xpm in a string wxMemoryOutputStream strm; wxImage img = bmp.ConvertToImage(); + if (img.HasAlpha()) + img.ConvertAlphaToMask(); img.SaveFile(strm, wxBITMAP_TYPE_XPM); size_t len = strm.GetSize(); char* buff = new char[len+1]; @@ -514,7 +524,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), (long)NULL); + 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), (long)NULL); + 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,