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')
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')
SendMsg(%s, data.GetDataLen(), (long)data.GetData());''',
0),
SendMsg(%s, data.GetDataLen(), (long)data.GetData());''',
0),
+ 'AppendText' : (0,
+ 'void %s(const wxString& text);',
+
+ '''void %s(const wxString& text) {
+ wxWX2MBbuf buf = (wxWX2MBbuf)wx2stc(text);
+ SendMsg(%s, strlen(buf), (long)(const char*)buf);''',
+ 0),
+
'GetViewWS' : ( 'GetViewWhiteSpace', 0, 0, 0),
'SetViewWS' : ( 'SetViewWhiteSpace', 0, 0, 0),
'GetViewWS' : ( 'GetViewWhiteSpace', 0, 0, 0),
'SetViewWS' : ( 'SetViewWhiteSpace', 0, 0, 0),
'SetSelBack' : ('SetSelBackground', 0, 0, 0),
'SetCaretFore' : ('SetCaretForeground', 0, 0, 0),
'StyleSetFont' : ('StyleSetFaceName', 0, 0, 0),
'SetSelBack' : ('SetSelBackground', 0, 0, 0),
'SetCaretFore' : ('SetCaretForeground', 0, 0, 0),
'StyleSetFont' : ('StyleSetFaceName', 0, 0, 0),
'AssignCmdKey' :
('CmdKeyAssign',
'void %s(int key, int modifiers, int cmd);',
'AssignCmdKey' :
('CmdKeyAssign',
'void %s(int key, int modifiers, int cmd);',
-def processIface(iface, h_tmplt, cpp_tmplt, h_dest, cpp_dest):
+def processIface(iface, h_tmplt, cpp_tmplt, h_dest, cpp_dest, docstr_dest):
# write out destination files
open(h_dest, 'w').write(h_text)
open(cpp_dest, 'w').write(cpp_text)
# write out destination files
open(h_dest, 'w').write(h_text)
open(cpp_dest, 'w').write(cpp_text)
for retType, name, number, param1, param2, docs in methods:
retType = retTypeMap.get(retType, retType)
for retType, name, number, param1, param2, docs in methods:
retType = retTypeMap.get(retType, retType)
- return string.join(defs, '\n'), string.join(imps, '\n')
+ return '\n'.join(defs), '\n'.join(imps), '\n'.join(dstr)
- processIface(IFACE, H_TEMPLATE, CPP_TEMPLATE, H_DEST, CPP_DEST)
+ processIface(IFACE, H_TEMPLATE, CPP_TEMPLATE, H_DEST, CPP_DEST, DOCSTR_DEST)