mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-06 20:10:08 +01:00
Merge branch 'wx-updates'
This commit is contained in:
@@ -65,6 +65,7 @@ def run():
|
||||
wxXmlResource::Get()->InitAllHandlers();
|
||||
""")
|
||||
|
||||
module.addHeaderCode('#include <wx/animate.h>')
|
||||
module.addHeaderCode('#include <wx/xrc/xmlres.h>')
|
||||
module.addHeaderCode('#include <wx/fs_mem.h>')
|
||||
module.addHeaderCode('#include "wxpybuffer.h"')
|
||||
@@ -72,6 +73,7 @@ def run():
|
||||
module.insertItem(0, etgtools.WigCode("""\
|
||||
// forward declarations
|
||||
class wxAnimation;
|
||||
class wxAnimationCtrl;
|
||||
"""))
|
||||
|
||||
#-----------------------------------------------------------------
|
||||
@@ -147,6 +149,7 @@ def run():
|
||||
# Just ignore it for now.
|
||||
c.find('GetFilePath').ignore()
|
||||
|
||||
c.find('GetAnimation.ctrl').type = 'wxAnimationCtrl *'
|
||||
|
||||
#-----------------------------------------------------------------
|
||||
module.addPyFunction('EmptyXmlResource', '(flags=XRC_USE_LOCALE, domain="")',
|
||||
|
||||
26
etg/grid.py
26
etg/grid.py
@@ -606,6 +606,32 @@ def run():
|
||||
|
||||
c.find('GetGridWindowOffset').findOverload('int &x').ignore()
|
||||
|
||||
|
||||
# Custom code to deal with the wxGridBlockCoordsVector return type of these
|
||||
# methods. It's a wxVector, which we'll just convert to a list.
|
||||
|
||||
# TODO: There are a few of these now to we ought to either wrap wxVector, or add
|
||||
# something in tweaker_tools to make adding code like this easier and more
|
||||
# automated.
|
||||
code = """\
|
||||
wxPyThreadBlocker blocker;
|
||||
PyObject* result = PyList_New(0);
|
||||
wxGridBlockCoordsVector vector = self->{method}();
|
||||
for (size_t idx=0; idx < vector.size(); idx++) {{
|
||||
PyObject* obj;
|
||||
wxGridBlockCoords* item = new wxGridBlockCoords(vector[idx]);
|
||||
obj = wxPyConstructObject((void*)item, "wxGridBlockCoords", true);
|
||||
PyList_Append(result, obj);
|
||||
Py_DECREF(obj);
|
||||
}}
|
||||
return result;
|
||||
"""
|
||||
c.find('GetSelectedRowBlocks').type = 'PyObject*'
|
||||
c.find('GetSelectedRowBlocks').setCppCode(code.format(method='GetSelectedRowBlocks'))
|
||||
c.find('GetSelectedColBlocks').type = 'PyObject*'
|
||||
c.find('GetSelectedColBlocks').setCppCode(code.format(method='GetSelectedColBlocks'))
|
||||
|
||||
|
||||
#-----------------------------------------------------------------
|
||||
c = module.find('wxGridUpdateLocker')
|
||||
c.addPrivateCopyCtor()
|
||||
|
||||
Reference in New Issue
Block a user