Lots of little changes.

Added wrappers for the new wxGrid, and beginings of the demo of it.
Changed version number


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7063 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2000-04-05 18:29:28 +00:00
parent 8474223c94
commit 787b465cf0
28 changed files with 16860 additions and 3956 deletions

View File

@@ -50,7 +50,7 @@ below.)
include/wx/msw/setup.h and edit it for the options you want. At a
minimum you should set the following:
wxUSE_NEW_GRID 0
wxUSE_NEW_GRID 1
wxUSE_GLOBAL_MEMORY_OPERATORS 0
wxUSE_LIBTIFF 1

View File

@@ -2,7 +2,7 @@ CHANGES.txt for wxPython
----------------------------------------------------------------------
New in 2.1.14
New in 2.1.16
-------------
Fixed wxTreeCtrl.HitTest to return both the tree item as well as the
@@ -16,6 +16,15 @@ Fixed some problems in OGL. Also wxShape.SetClientData and
Added wxListCtrl.SortItems and changed the demo to show how to use it.
Plugged a memory leak.
Wrapped the new wxGrid and friends. The old wxGrid class is no longer
available. There are some incompatibilities, and unfortunately the
new classes are not documented yet, (however the methods are more
consistent with each other now so you may be able to guess pretty
good...)

View File

@@ -0,0 +1,141 @@
from wxPython.wx import *
from wxPython.grid import *
#---------------------------------------------------------------------------
class SimpleGrid(wxGrid):
def __init__(self, parent, log):
wxGrid.__init__(self, parent, -1)
self.log = log
self.CreateGrid(16, 16)
self.SetColSize(3, 200)
self.SetRowSize(4, 45)
self.SetCellValue(0, 0, "First cell")
self.SetCellValue(1, 1, "Another cell")
self.SetCellValue(2, 2, "Yet another cell")
self.SetCellFont(0, 0, wxFont(12, wxROMAN, wxITALIC, wxNORMAL))
self.SetCellTextColour(1, 1, wxRED)
self.SetCellBackgroundColour(2, 2, wxCYAN)
# test all the events
EVT_GRID_CELL_LEFT_CLICK(self, self.OnCellLeftClick)
EVT_GRID_CELL_RIGHT_CLICK(self, self.OnCellRightClick)
EVT_GRID_CELL_LEFT_DCLICK(self, self.OnCellLeftDClick)
EVT_GRID_CELL_RIGHT_DCLICK(self, self.OnCellRightDClick)
EVT_GRID_LABEL_LEFT_CLICK(self, self.OnLabelLeftClick)
EVT_GRID_LABEL_RIGHT_CLICK(self, self.OnLabelRightClick)
EVT_GRID_LABEL_LEFT_DCLICK(self, self.OnLabelLeftDClick)
EVT_GRID_LABEL_RIGHT_DCLICK(self, self.OnLabelRightDClick)
EVT_GRID_ROW_SIZE(self, self.OnRowSize)
EVT_GRID_COL_SIZE(self, self.OnColSize)
EVT_GRID_RANGE_SELECT(self, self.OnRangeSelect)
EVT_GRID_CELL_CHANGE(self, self.OnCellChange)
EVT_GRID_SELECT_CELL(self, self.OnSelectCell)
EVT_GRID_EDITOR_SHOWN(self, self.OnEditorShown)
EVT_GRID_EDITOR_HIDDEN(self, self.OnEditorHidden)
def OnCellLeftClick(self, evt):
self.log.write("OnCellLeftClick: (%d,%d) %s\n" %
(evt.GetRow(), evt.GetCol(), evt.GetPosition()))
evt.Skip()
def OnCellRightClick(self, evt):
self.log.write("OnCellRightClick: (%d,%d) %s\n" %
(evt.GetRow(), evt.GetCol(), evt.GetPosition()))
evt.Skip()
def OnCellLeftDClick(self, evt):
self.log.write("OnCellLeftDClick: (%d,%d) %s\n" %
(evt.GetRow(), evt.GetCol(), evt.GetPosition()))
evt.Skip()
def OnCellRightDClick(self, evt):
self.log.write("OnCellRightDClick: (%d,%d) %s\n" %
(evt.GetRow(), evt.GetCol(), evt.GetPosition()))
evt.Skip()
def OnLabelLeftClick(self, evt):
self.log.write("OnLabelLeftClick: (%d,%d) %s\n" %
(evt.GetRow(), evt.GetCol(), evt.GetPosition()))
evt.Skip()
def OnLabelRightClick(self, evt):
self.log.write("OnLabelRightClick: (%d,%d) %s\n" %
(evt.GetRow(), evt.GetCol(), evt.GetPosition()))
evt.Skip()
def OnLabelLeftDClick(self, evt):
self.log.write("OnLabelLeftDClick: (%d,%d) %s\n" %
(evt.GetRow(), evt.GetCol(), evt.GetPosition()))
evt.Skip()
def OnLabelRightDClick(self, evt):
self.log.write("OnLabelRightDClick: (%d,%d) %s\n" %
(evt.GetRow(), evt.GetCol(), evt.GetPosition()))
evt.Skip()
def OnRowSize(self, evt):
self.log.write("OnRowSize: row %d, %s\n" %
(evt.GetRowOrCol(), evt.GetPosition()))
evt.Skip()
def OnColSize(self, evt):
self.log.write("OnColSize: col %d, %s\n" %
(evt.GetRowOrCol(), evt.GetPosition()))
evt.Skip()
def OnRangeSelect(self, evt):
if evt.Selecting():
self.log.write("OnRangeSelect: top-left %s, bottom-right %s\n" %
(evt.GetTopLeftCoords(), evt.GetBottomRightCoords()))
evt.Skip()
def OnCellChange(self, evt):
self.log.write("OnCellChange: (%d,%d) %s\n" %
(evt.GetRow(), evt.GetCol(), evt.GetPosition()))
evt.Skip()
def OnSelectCell(self, evt):
self.log.write("OnSelectCell: (%d,%d) %s\n" %
(evt.GetRow(), evt.GetCol(), evt.GetPosition()))
evt.Skip()
def OnEditorShown(self, evt):
self.log.write("OnEditorShown: (%d,%d) %s\n" %
(evt.GetRow(), evt.GetCol(), evt.GetPosition()))
evt.Skip()
def OnEditorHidden(self, evt):
self.log.write("OnEditorHidden: (%d,%d) %s\n" %
(evt.GetRow(), evt.GetCol(), evt.GetPosition()))
evt.Skip()
#---------------------------------------------------------------------------
class TestFrame(wxFrame):
def __init__(self, parent, log):
wxFrame.__init__(self, parent, -1, "Simple Grid Demo", size=(640,480))
grid = SimpleGrid(self, log)
#---------------------------------------------------------------------------
if __name__ == '__main__':
import sys
app = wxPySimpleApp()
frame = TestFrame(None, sys.stdout)
frame.Show(true)
app.MainLoop()
#---------------------------------------------------------------------------

View File

@@ -21,7 +21,7 @@ _useSplitter = true
_useNestedSplitter = true
_treeList = [
('New since last release', []),
('New since last release', ['wxGrid']),
('Managed Windows', ['wxFrame', 'wxDialog', 'wxMiniFrame']),

View File

@@ -3,56 +3,44 @@ from wxPython.wx import *
#---------------------------------------------------------------------------
class TestGrid(wxGrid):
buttonDefs = {
814 : ('GridSimple', 'Simple wxGrid, catching all events'),
815 : ('GridCustEdRend', 'wxGrid showing custom Editors and Renderers'),
816 : ('GridCustTable', 'wxGrid using a custom Table'),
817 : ('GridHugeTable', 'A wxGrid with a HUGE table (100M cells!)'),
}
class ButtonPanel(wxPanel):
def __init__(self, parent, log):
wxGrid.__init__(self, parent, -1)
wxPanel.__init__(self, parent, -1)
self.log = log
self.CreateGrid(16, 16)
self.SetColumnWidth(3, 200)
self.SetRowHeight(4, 45)
self.SetCellValue("First cell", 0, 0)
self.SetCellValue("Another cell", 1, 1)
self.SetCellValue("Yet another cell", 2, 2)
self.SetCellTextFont(wxFont(12, wxROMAN, wxITALIC, wxNORMAL), 0, 0)
self.SetCellTextColour(wxRED, 1, 1)
self.SetCellBackgroundColour(wxCYAN, 2, 2)
self.UpdateDimensions()
self.AdjustScrollbars()
box = wxBoxSizer(wxVERTICAL)
box.Add(20, 30)
keys = buttonDefs.keys()
keys.sort()
for k in keys:
text = buttonDefs[k][1]
btn = wxButton(self, k, text)
box.Add(btn, 0, wxALIGN_CENTER|wxALL, 15)
EVT_BUTTON(self, k, self.OnButton)
EVT_GRID_SELECT_CELL(self, self.OnSelectCell)
EVT_GRID_CELL_CHANGE(self, self.OnCellChange)
EVT_GRID_CELL_LCLICK(self, self.OnCellClick)
EVT_GRID_LABEL_LCLICK(self, self.OnLabelClick)
self.SetEditInPlace(true)
#print self.GetCells()
self.SetAutoLayout(true)
self.SetSizer(box)
def OnSelectCell(self, event):
self.log.WriteText("OnSelectCell: (%d, %d)\n" % (event.m_row, event.m_col))
def OnButton(self, evt):
modName = buttonDefs[evt.GetId()][0]
module = __import__(modName)
frame = module.TestFrame(self, self.log)
frame.Show(true)
def OnCellChange(self, event):
self.log.WriteText("OnCellChange: (%d, %d)\n" % (event.m_row, event.m_col))
def OnCellClick(self, event):
self.log.WriteText("OnCellClick: (%d, %d)\n" % (event.m_row, event.m_col))
def OnLabelClick(self, event):
self.log.WriteText("OnLabelClick: (%d, %d)\n" % (event.m_row, event.m_col))
#if event.m_row >= 10:
# self.SetLabelValue(wxVERTICAL, 'XX', event.m_row)
# self.Refresh()
#else:
# size = self.GetLabelSize(wxVERTICAL)
# print size
# self.SetLabelSize(wxVERTICAL, size+10)
# self.Refresh()
#---------------------------------------------------------------------------
def runTest(frame, nb, log):
win = TestGrid(nb, log)
win = ButtonPanel(nb, log)
return win
#---------------------------------------------------------------------------
@@ -66,22 +54,6 @@ def runTest(frame, nb, log):
overview = """\
wxGrid is a class for displaying and editing tabular information.
wxGrid()
-----------------
wxGrid(wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style=0, const wxString& name="grid")
Constructor. Before using a wxGrid object, you must call CreateGrid to set up the required rows and columns.
This demo shows various ways of using the ** NEW ** wxGrid. For more details see wxPython/demo/Grid*.py.
"""

View File

@@ -119,7 +119,7 @@ import sys, os, string, getopt
# This is really the wxPython version number, and will be placed in the
# Makefiles for use with the distribution related targets.
__version__ = '2.1.14'
__version__ = '2.1.15'
#----------------------------------------------------------------------------

View File

@@ -14,7 +14,7 @@
"""
In this module you will find wxGridSizer and wxFlexGridSizer.
wxGridSizer arrainges its items in a grid in which all the widths and
heights are the same. wxFlexgridSizer allows different widths and
heights are the same. wxFlexGridSizer allows different widths and
heights, and you can also specify rows and/or columns that are
growable. See the demo for a couple examples for how to use them.
"""

View File

@@ -6658,7 +6658,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_class_wxTreeCtrl","_wxTreeCtrl",0},
{ "_wxMask","_class_wxMask",0},
{ "_wxToolTip","_class_wxToolTip",0},
{ "_wxGrid","_class_wxGrid",0},
{ "_wxPNGHandler","_class_wxPNGHandler",0},
{ "_class_wxStyledTextCtrl","_wxStyledTextCtrl",0},
{ "_class_wxColourData","_wxColourData",0},
@@ -6727,7 +6726,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_wxTextDataObject","_class_wxTextDataObject",0},
{ "_class_wxKeyEvent","_wxKeyEvent",0},
{ "_class_wxToolTip","_wxToolTip",0},
{ "_class_wxGrid","_wxGrid",0},
{ "_class_wxPNGHandler","_wxPNGHandler",0},
{ "_wxColour","_class_wxColour",0},
{ "_class_wxDialog","_wxDialog",0},
@@ -6762,7 +6760,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_class_wxEvent","_wxEvent",0},
{ "_wxCheckListBox","_class_wxCheckListBox",0},
{ "_wxSplitterEvent","_class_wxSplitterEvent",0},
{ "_wxGridEvent","_class_wxGridEvent",0},
{ "_wxRect","_class_wxRect",0},
{ "_wxCommandEvent","_class_wxStyledTextEvent",SwigwxStyledTextEventTowxCommandEvent},
{ "_wxCommandEvent","_wxStyledTextEvent",SwigwxStyledTextEventTowxCommandEvent},
@@ -6887,7 +6884,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_class_wxPoint","_wxPoint",0},
{ "_wxRealPoint","_class_wxRealPoint",0},
{ "_class_wxRadioBox","_wxRadioBox",0},
{ "_wxGridCell","_class_wxGridCell",0},
{ "_class_wxBoxSizer","_wxBoxSizer",0},
{ "_signed_short","_WXTYPE",0},
{ "_signed_short","_short",0},
@@ -7024,7 +7020,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_wxGauge","_class_wxGauge",0},
{ "_class_wxCheckListBox","_wxCheckListBox",0},
{ "_class_wxBusyInfo","_wxBusyInfo",0},
{ "_class_wxGridEvent","_wxGridEvent",0},
{ "_class_wxCommandEvent","_class_wxStyledTextEvent",SwigwxStyledTextEventTowxCommandEvent},
{ "_class_wxCommandEvent","_wxStyledTextEvent",SwigwxStyledTextEventTowxCommandEvent},
{ "_class_wxCommandEvent","_wxCommandEvent",0},
@@ -7032,7 +7027,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_class_wxSizeEvent","_wxSizeEvent",0},
{ "_class_wxListCtrl","_wxListCtrl",0},
{ "_wxCustomDataObject","_class_wxCustomDataObject",0},
{ "_class_wxGridCell","_wxGridCell",0},
{ "_class_wxSize","_wxSize",0},
{ "_class_wxBitmap","_wxBitmap",0},
{ "_class_wxMemoryDC","_wxMemoryDC",0},

View File

@@ -1 +1 @@
ver = '2.1.14'
ver = '2.1.15'

View File

@@ -0,0 +1,19 @@
# Stuff these names into the wx namespace so wxPyConstructObject can find them
wx.wxGridEventPtr = wxGridEventPtr
wx.wxGridSizeEventPtr = wxGridSizeEventPtr
wx.wxGridRangeSelectEventPtr = wxGridRangeSelectEventPtr
wx.wxGridCellRendererPtr = wxGridCellRendererPtr
wx.wxPyGridCellRendererPtr = wxPyGridCellRendererPtr
wx.wxGridCellEditorPtr = wxGridCellEditorPtr
wx.wxPyGridCellEditorPtr = wxPyGridCellEditorPtr
wx.wxGridCellAttrPtr = wxGridCellAttrPtr
wx.wxGridCellAttrProviderPtr = wxGridCellAttrProviderPtr
wx.wxPyGridCellAttrProviderPtr = wxPyGridCellAttrProviderPtr
wx.wxGridTableBasePtr = wxGridTableBasePtr
wx.wxPyGridTableBasePtr = wxPyGridTableBasePtr
wx.wxGridTableMessagePtr = wxGridTableMessagePtr
wx.wxGridCellCoordsPtr = wxGridCellCoordsPtr
wx.wxGridPtr = wxGridPtr

View File

@@ -5,7 +5,7 @@ MODULE = 'wxc'
SWIGFILES = ['wx.i', 'windows.i', 'windows2.i', 'windows3.i', 'events.i',
'misc.i', 'misc2.i', 'gdi.i', 'mdi.i', 'controls.i',
'controls2.i', 'cmndlgs.i', 'stattool.i', 'frames.i',
'image.i', 'printfw.i', 'sizers.i', 'clip_dnd.i', #'grid.i',
'image.i', 'printfw.i', 'sizers.i', 'clip_dnd.i', 'grid.i',
]
PYFILES = ['__init__.py', '__version__.py']
@@ -119,5 +119,6 @@ rpm:
OTHERRULES = OTHERRULES + """
$(GENCODEDIR)/wx.py : _extras.py
$(GENCODEDIR)/grid.py : _gridextras.py
"""

View File

@@ -151,9 +151,12 @@ bool wxPyDataObjectSimple::GetDataHere(void *buf) {
if (m_myInst.findCallback("GetDataHere")) {
PyObject* ro;
ro = m_myInst.callCallbackObj(Py_BuildValue("()"));
if (ro) {
rval = (ro != Py_None && PyString_Check(ro));
if (rval)
memcpy(buf, PyString_AsString(ro), PyString_Size(ro));
Py_DECREF(ro);
}
}
wxPySaveThread(doSave);
return rval;
@@ -266,8 +269,11 @@ wxBitmap wxPyBitmapDataObject::GetBitmap() {
PyObject* ro;
wxBitmap* ptr;
ro = m_myInst.callCallbackObj(Py_BuildValue("()"));
if (ro) {
if (!SWIG_GetPtrObj(ro, (void **)&ptr, "_wxBitmap_p"))
rval = ptr;
Py_DECREF(ro);
}
}
wxPySaveThread(doSave);
return *rval;

File diff suppressed because it is too large Load Diff

View File

@@ -390,16 +390,17 @@ void wxPyCallbackHelper::setSelf(PyObject* self, int incref) {
}
bool wxPyCallbackHelper::findCallback(const wxString& name) {
m_lastFound = NULL;
bool wxPyCallbackHelper::findCallback(const wxString& name) const {
wxPyCallbackHelper* self = (wxPyCallbackHelper*)this; // cast away const
self->m_lastFound = NULL;
if (m_self && PyObject_HasAttrString(m_self, (char*)name.c_str()))
m_lastFound = PyObject_GetAttrString(m_self, (char*)name.c_str());
self->m_lastFound = PyObject_GetAttrString(m_self, (char*)name.c_str());
return m_lastFound != NULL;
}
int wxPyCallbackHelper::callCallback(PyObject* argTuple) {
int wxPyCallbackHelper::callCallback(PyObject* argTuple) const {
PyObject* result;
int retval = FALSE;
@@ -414,7 +415,7 @@ int wxPyCallbackHelper::callCallback(PyObject* argTuple) {
// Invoke the Python callable object, returning the raw PyObject return
// value. Caller should DECREF the return value and also call PyEval_SaveThread.
PyObject* wxPyCallbackHelper::callCallbackObj(PyObject* argTuple) {
PyObject* wxPyCallbackHelper::callCallbackObj(PyObject* argTuple) const {
PyObject* result;
result = PyEval_CallObject(m_lastFound, argTuple);

View File

@@ -162,7 +162,7 @@ private:
// overridable in wxPython, a new subclass is created that contains a
// wxPyCallbackHelper.
//
// **** This class should be combined with wxPyCallback defined above.
// TODO: This class should be combined with wxPyCallback defined above.
//
class HELPEREXPORT wxPyCallbackHelper {
@@ -174,9 +174,9 @@ public:
void setSelf(PyObject* self, int incref=TRUE);
bool findCallback(const wxString& name);
int callCallback(PyObject* argTuple);
PyObject* callCallbackObj(PyObject* argTuple);
bool findCallback(const wxString& name) const;
int callCallback(PyObject* argTuple) const;
PyObject* callCallbackObj(PyObject* argTuple) const;
private:
PyObject* m_self;
@@ -704,7 +704,10 @@ public:
if (m_myInst.findCallback(#CBNAME)) { \
PyObject* ro; \
ro = m_myInst.callCallbackObj(Py_BuildValue("()")); \
if (ro) { \
rval = PyString_AsString(PyObject_Str(ro)); \
Py_DECREF(ro); \
} \
} \
else \
rval = PCLASS::CBNAME(); \
@@ -728,7 +731,10 @@ public:
if (m_myInst.findCallback(#CBNAME)) { \
PyObject* ro; \
ro = m_myInst.callCallbackObj(Py_BuildValue("()")); \
if (ro) { \
rval = PyString_AsString(PyObject_Str(ro)); \
Py_DECREF(ro); \
} \
} \
wxPySaveThread(doSave); \
return rval; \
@@ -779,8 +785,11 @@ public:
PyObject* ro; \
wxSize* ptr; \
ro = m_myInst.callCallbackObj(Py_BuildValue("()")); \
if (ro) { \
if (! SWIG_GetPtrObj(ro, (void **)&ptr, "_wxSize_p")) \
rval = *ptr; \
Py_DECREF(ro); \
} \
} \
wxPySaveThread(doSave); \
return rval; \
@@ -944,8 +953,11 @@ public:
PyObject* ro; \
wxDataFormat* ptr; \
ro = m_myInst.callCallbackObj(Py_BuildValue("(i)", a)); \
if (ro) { \
if (! SWIG_GetPtrObj(ro, (void **)&ptr, "_wxDataFormat_p")) \
rval = *ptr; \
Py_DECREF(ro); \
} \
} \
else \
rval = PCLASS::CBNAME(a); \
@@ -957,7 +969,48 @@ public:
}
//---------------------------------------------------------------------------
#define DEC_PYCALLBACK__constany(CBNAME, Type) \
void CBNAME(const Type& a); \
void base_##CBNAME(const Type& a);
#define IMP_PYCALLBACK__constany(CLASS, PCLASS, CBNAME, Type) \
void CLASS::CBNAME(const Type& a) { \
bool doSave = wxPyRestoreThread(); \
if (m_myInst.findCallback(#CBNAME)) \
m_myInst.callCallback(Py_BuildValue("(O)", \
wxPyConstructObject((void*)&a, #Type))); \
else \
PCLASS::CBNAME(a); \
wxPySaveThread(doSave); \
} \
void CLASS::base_##CBNAME(const Type& a) { \
PCLASS::CBNAME(a); \
}
//---------------------------------------------------------------------------
#define DEC_PYCALLBACK__any(CBNAME, Type) \
void CBNAME(Type& a); \
void base_##CBNAME(Type& a);
#define IMP_PYCALLBACK__any(CLASS, PCLASS, CBNAME, Type) \
void CLASS::CBNAME(Type& a) { \
bool doSave = wxPyRestoreThread(); \
if (m_myInst.findCallback(#CBNAME)) \
m_myInst.callCallback(Py_BuildValue("(O)", \
wxPyConstructObject(&a, #Type))); \
else \
PCLASS::CBNAME(a); \
wxPySaveThread(doSave); \
} \
void CLASS::base_##CBNAME(Type& a) { \
PCLASS::CBNAME(a); \
}
//---------------------------------------------------------------------------
#endif

View File

@@ -137,9 +137,12 @@ bool wxPyDataObjectSimple::GetDataHere(void *buf) {
if (m_myInst.findCallback("GetDataHere")) {
PyObject* ro;
ro = m_myInst.callCallbackObj(Py_BuildValue("()"));
if (ro) {
rval = (ro != Py_None && PyString_Check(ro));
if (rval)
memcpy(buf, PyString_AsString(ro), PyString_Size(ro));
Py_DECREF(ro);
}
}
wxPySaveThread(doSave);
return rval;
@@ -192,8 +195,11 @@ wxBitmap wxPyBitmapDataObject::GetBitmap() {
PyObject* ro;
wxBitmap* ptr;
ro = m_myInst.callCallbackObj(Py_BuildValue("()"));
if (ro) {
if (!SWIG_GetPtrObj(ro, (void **)&ptr, "_wxBitmap_p"))
rval = ptr;
Py_DECREF(ro);
}
}
wxPySaveThread(doSave);
return *rval;

View File

@@ -111,7 +111,7 @@ static char* wxStringErrorMsg = "string type is required for parameter";
extern wxValidator wxPyDefaultValidator;
int wxCALLBACK wxPyTreeCtrl_SortItems(long item1, long item2, long funcPtr) {
int wxCALLBACK wxPyListCtrl_SortItems(long item1, long item2, long funcPtr) {
int retval = 0;
PyObject* func = (PyObject*)funcPtr;
bool doSave = wxPyRestoreThread();
@@ -4542,7 +4542,7 @@ static bool wxListCtrl_SortItems(wxListCtrl *self,PyObject * func) {
if (!PyCallable_Check(func))
return FALSE;
return self->SortItems(wxPyTreeCtrl_SortItems, (long)func);
return self->SortItems(wxPyListCtrl_SortItems, (long)func);
}
static PyObject *_wrap_wxListCtrl_SortItems(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -131,7 +131,10 @@ public:
if (self->m_myInst.findCallback("Clone")) {
PyObject* ro;
ro = self->m_myInst.callCallbackObj(Py_BuildValue("()"));
if (ro) {
SWIG_GetPtrObj(ro, (void **)&ptr, "_wxPyValidator_p");
Py_DECREF(ro);
}
}
// This is very dangerous!!! But is the only way I could find
// to squash a memory leak. Currently it is okay, but if the

File diff suppressed because it is too large Load Diff

View File

@@ -13,378 +13,6 @@ from controls import *
from events import *
import wx
class wxGridCellPtr :
def __init__(self,this):
self.this = this
self.thisown = 0
def __del__(self,windows2c=windows2c):
if self.thisown == 1 :
windows2c.delete_wxGridCell(self)
def GetTextValue(self, *_args, **_kwargs):
val = apply(windows2c.wxGridCell_GetTextValue,(self,) + _args, _kwargs)
return val
def SetTextValue(self, *_args, **_kwargs):
val = apply(windows2c.wxGridCell_SetTextValue,(self,) + _args, _kwargs)
return val
def GetFont(self, *_args, **_kwargs):
val = apply(windows2c.wxGridCell_GetFont,(self,) + _args, _kwargs)
if val: val = wxFontPtr(val)
return val
def SetFont(self, *_args, **_kwargs):
val = apply(windows2c.wxGridCell_SetFont,(self,) + _args, _kwargs)
return val
def GetTextColour(self, *_args, **_kwargs):
val = apply(windows2c.wxGridCell_GetTextColour,(self,) + _args, _kwargs)
if val: val = wxColourPtr(val)
return val
def SetTextColour(self, *_args, **_kwargs):
val = apply(windows2c.wxGridCell_SetTextColour,(self,) + _args, _kwargs)
return val
def GetBackgroundColour(self, *_args, **_kwargs):
val = apply(windows2c.wxGridCell_GetBackgroundColour,(self,) + _args, _kwargs)
if val: val = wxColourPtr(val)
return val
def SetBackgroundColour(self, *_args, **_kwargs):
val = apply(windows2c.wxGridCell_SetBackgroundColour,(self,) + _args, _kwargs)
return val
def GetBackgroundBrush(self, *_args, **_kwargs):
val = apply(windows2c.wxGridCell_GetBackgroundBrush,(self,) + _args, _kwargs)
if val: val = wxBrushPtr(val)
return val
def GetAlignment(self, *_args, **_kwargs):
val = apply(windows2c.wxGridCell_GetAlignment,(self,) + _args, _kwargs)
return val
def SetAlignment(self, *_args, **_kwargs):
val = apply(windows2c.wxGridCell_SetAlignment,(self,) + _args, _kwargs)
return val
def GetCellBitmap(self, *_args, **_kwargs):
val = apply(windows2c.wxGridCell_GetCellBitmap,(self,) + _args, _kwargs)
if val: val = wxBitmapPtr(val)
return val
def SetCellBitmap(self, *_args, **_kwargs):
val = apply(windows2c.wxGridCell_SetCellBitmap,(self,) + _args, _kwargs)
return val
def __repr__(self):
return "<C wxGridCell instance at %s>" % (self.this,)
class wxGridCell(wxGridCellPtr):
def __init__(self,*_args,**_kwargs):
self.this = apply(windows2c.new_wxGridCell,_args,_kwargs)
self.thisown = 1
class wxGridPtr(wxPanelPtr):
def __init__(self,this):
self.this = this
self.thisown = 0
def AdjustScrollbars(self, *_args, **_kwargs):
val = apply(windows2c.wxGrid_AdjustScrollbars,(self,) + _args, _kwargs)
return val
def AppendCols(self, *_args, **_kwargs):
val = apply(windows2c.wxGrid_AppendCols,(self,) + _args, _kwargs)
return val
def AppendRows(self, *_args, **_kwargs):
val = apply(windows2c.wxGrid_AppendRows,(self,) + _args, _kwargs)
return val
def BeginBatch(self, *_args, **_kwargs):
val = apply(windows2c.wxGrid_BeginBatch,(self,) + _args, _kwargs)
return val
def CellHitTest(self, *_args, **_kwargs):
val = apply(windows2c.wxGrid_CellHitTest,(self,) + _args, _kwargs)
return val
def CreateGrid(self, *_args, **_kwargs):
val = apply(windows2c.wxGrid_CreateGrid,(self,) + _args, _kwargs)
return val
def CurrentCellVisible(self, *_args, **_kwargs):
val = apply(windows2c.wxGrid_CurrentCellVisible,(self,) + _args, _kwargs)
return val
def DeleteCols(self, *_args, **_kwargs):
val = apply(windows2c.wxGrid_DeleteCols,(self,) + _args, _kwargs)
return val
def DeleteRows(self, *_args, **_kwargs):
val = apply(windows2c.wxGrid_DeleteRows,(self,) + _args, _kwargs)
return val
def EndBatch(self, *_args, **_kwargs):
val = apply(windows2c.wxGrid_EndBatch,(self,) + _args, _kwargs)
return val
def GetBatchCount(self, *_args, **_kwargs):
val = apply(windows2c.wxGrid_GetBatchCount,(self,) + _args, _kwargs)
return val
def GetCell(self, *_args, **_kwargs):
val = apply(windows2c.wxGrid_GetCell,(self,) + _args, _kwargs)
if val: val = wxGridCellPtr(val)
return val
def GetCellAlignment(self, *_args, **_kwargs):
val = apply(windows2c.wxGrid_GetCellAlignment,(self,) + _args, _kwargs)
return val
def GetDefCellAlignment(self, *_args, **_kwargs):
val = apply(windows2c.wxGrid_GetDefCellAlignment,(self,) + _args, _kwargs)
return val
def GetCellBackgroundColour(self, *_args, **_kwargs):
val = apply(windows2c.wxGrid_GetCellBackgroundColour,(self,) + _args, _kwargs)
if val: val = wxColourPtr(val)
return val
def GetDefCellBackgroundColour(self, *_args, **_kwargs):
val = apply(windows2c.wxGrid_GetDefCellBackgroundColour,(self,) + _args, _kwargs)
if val: val = wxColourPtr(val)
return val
def GetCells(self, *_args, **_kwargs):
val = apply(windows2c.wxGrid_GetCells,(self,) + _args, _kwargs)
return val
def GetCellTextColour(self, *_args, **_kwargs):
val = apply(windows2c.wxGrid_GetCellTextColour,(self,) + _args, _kwargs)
if val: val = wxColourPtr(val)
return val
def GetDefCellTextColour(self, *_args, **_kwargs):
val = apply(windows2c.wxGrid_GetDefCellTextColour,(self,) + _args, _kwargs)
if val: val = wxColourPtr(val)
return val
def GetCellTextFont(self, *_args, **_kwargs):
val = apply(windows2c.wxGrid_GetCellTextFont,(self,) + _args, _kwargs)
if val: val = wxFontPtr(val)
return val
def GetDefCellTextFont(self, *_args, **_kwargs):
val = apply(windows2c.wxGrid_GetDefCellTextFont,(self,) + _args, _kwargs)
if val: val = wxFontPtr(val)
return val
def GetCellValue(self, *_args, **_kwargs):
val = apply(windows2c.wxGrid_GetCellValue,(self,) + _args, _kwargs)
return val
def GetCols(self, *_args, **_kwargs):
val = apply(windows2c.wxGrid_GetCols,(self,) + _args, _kwargs)
return val
def GetColumnWidth(self, *_args, **_kwargs):
val = apply(windows2c.wxGrid_GetColumnWidth,(self,) + _args, _kwargs)
return val
def GetCurrentRect(self, *_args, **_kwargs):
val = apply(windows2c.wxGrid_GetCurrentRect,(self,) + _args, _kwargs)
if val: val = wxRectPtr(val) ; val.thisown = 1
return val
def GetCursorColumn(self, *_args, **_kwargs):
val = apply(windows2c.wxGrid_GetCursorColumn,(self,) + _args, _kwargs)
return val
def GetCursorRow(self, *_args, **_kwargs):
val = apply(windows2c.wxGrid_GetCursorRow,(self,) + _args, _kwargs)
return val
def GetEditable(self, *_args, **_kwargs):
val = apply(windows2c.wxGrid_GetEditable,(self,) + _args, _kwargs)
return val
def GetHorizScrollBar(self, *_args, **_kwargs):
val = apply(windows2c.wxGrid_GetHorizScrollBar,(self,) + _args, _kwargs)
if val: val = wxScrollBarPtr(val)
return val
def GetLabelAlignment(self, *_args, **_kwargs):
val = apply(windows2c.wxGrid_GetLabelAlignment,(self,) + _args, _kwargs)
return val
def GetLabelBackgroundColour(self, *_args, **_kwargs):
val = apply(windows2c.wxGrid_GetLabelBackgroundColour,(self,) + _args, _kwargs)
if val: val = wxColourPtr(val)
return val
def GetLabelSize(self, *_args, **_kwargs):
val = apply(windows2c.wxGrid_GetLabelSize,(self,) + _args, _kwargs)
return val
def GetLabelTextColour(self, *_args, **_kwargs):
val = apply(windows2c.wxGrid_GetLabelTextColour,(self,) + _args, _kwargs)
if val: val = wxColourPtr(val)
return val
def GetLabelTextFont(self, *_args, **_kwargs):
val = apply(windows2c.wxGrid_GetLabelTextFont,(self,) + _args, _kwargs)
if val: val = wxFontPtr(val)
return val
def GetLabelValue(self, *_args, **_kwargs):
val = apply(windows2c.wxGrid_GetLabelValue,(self,) + _args, _kwargs)
return val
def GetRowHeight(self, *_args, **_kwargs):
val = apply(windows2c.wxGrid_GetRowHeight,(self,) + _args, _kwargs)
return val
def GetRows(self, *_args, **_kwargs):
val = apply(windows2c.wxGrid_GetRows,(self,) + _args, _kwargs)
return val
def GetScrollPosX(self, *_args, **_kwargs):
val = apply(windows2c.wxGrid_GetScrollPosX,(self,) + _args, _kwargs)
return val
def GetScrollPosY(self, *_args, **_kwargs):
val = apply(windows2c.wxGrid_GetScrollPosY,(self,) + _args, _kwargs)
return val
def GetTextItem(self, *_args, **_kwargs):
val = apply(windows2c.wxGrid_GetTextItem,(self,) + _args, _kwargs)
if val: val = wxTextCtrlPtr(val)
return val
def GetVertScrollBar(self, *_args, **_kwargs):
val = apply(windows2c.wxGrid_GetVertScrollBar,(self,) + _args, _kwargs)
if val: val = wxScrollBarPtr(val)
return val
def InsertCols(self, *_args, **_kwargs):
val = apply(windows2c.wxGrid_InsertCols,(self,) + _args, _kwargs)
return val
def InsertRows(self, *_args, **_kwargs):
val = apply(windows2c.wxGrid_InsertRows,(self,) + _args, _kwargs)
return val
def OnActivate(self, *_args, **_kwargs):
val = apply(windows2c.wxGrid_OnActivate,(self,) + _args, _kwargs)
return val
def SetCellAlignment(self, *_args, **_kwargs):
val = apply(windows2c.wxGrid_SetCellAlignment,(self,) + _args, _kwargs)
return val
def SetDefCellAlignment(self, *_args, **_kwargs):
val = apply(windows2c.wxGrid_SetDefCellAlignment,(self,) + _args, _kwargs)
return val
def SetCellBackgroundColour(self, *_args, **_kwargs):
val = apply(windows2c.wxGrid_SetCellBackgroundColour,(self,) + _args, _kwargs)
return val
def SetDefCellBackgroundColour(self, *_args, **_kwargs):
val = apply(windows2c.wxGrid_SetDefCellBackgroundColour,(self,) + _args, _kwargs)
return val
def SetCellTextColour(self, *_args, **_kwargs):
val = apply(windows2c.wxGrid_SetCellTextColour,(self,) + _args, _kwargs)
return val
def SetDefCellTextColour(self, *_args, **_kwargs):
val = apply(windows2c.wxGrid_SetDefCellTextColour,(self,) + _args, _kwargs)
return val
def SetCellTextFont(self, *_args, **_kwargs):
val = apply(windows2c.wxGrid_SetCellTextFont,(self,) + _args, _kwargs)
return val
def SetDefCellTextFont(self, *_args, **_kwargs):
val = apply(windows2c.wxGrid_SetDefCellTextFont,(self,) + _args, _kwargs)
return val
def SetCellValue(self, *_args, **_kwargs):
val = apply(windows2c.wxGrid_SetCellValue,(self,) + _args, _kwargs)
return val
def SetColumnWidth(self, *_args, **_kwargs):
val = apply(windows2c.wxGrid_SetColumnWidth,(self,) + _args, _kwargs)
return val
def SetDividerPen(self, *_args, **_kwargs):
val = apply(windows2c.wxGrid_SetDividerPen,(self,) + _args, _kwargs)
return val
def SetEditable(self, *_args, **_kwargs):
val = apply(windows2c.wxGrid_SetEditable,(self,) + _args, _kwargs)
return val
def SetGridCursor(self, *_args, **_kwargs):
val = apply(windows2c.wxGrid_SetGridCursor,(self,) + _args, _kwargs)
return val
def SetLabelAlignment(self, *_args, **_kwargs):
val = apply(windows2c.wxGrid_SetLabelAlignment,(self,) + _args, _kwargs)
return val
def SetLabelBackgroundColour(self, *_args, **_kwargs):
val = apply(windows2c.wxGrid_SetLabelBackgroundColour,(self,) + _args, _kwargs)
return val
def SetLabelSize(self, *_args, **_kwargs):
val = apply(windows2c.wxGrid_SetLabelSize,(self,) + _args, _kwargs)
return val
def SetLabelTextColour(self, *_args, **_kwargs):
val = apply(windows2c.wxGrid_SetLabelTextColour,(self,) + _args, _kwargs)
return val
def SetLabelTextFont(self, *_args, **_kwargs):
val = apply(windows2c.wxGrid_SetLabelTextFont,(self,) + _args, _kwargs)
return val
def SetLabelValue(self, *_args, **_kwargs):
val = apply(windows2c.wxGrid_SetLabelValue,(self,) + _args, _kwargs)
return val
def SetRowHeight(self, *_args, **_kwargs):
val = apply(windows2c.wxGrid_SetRowHeight,(self,) + _args, _kwargs)
return val
def UpdateDimensions(self, *_args, **_kwargs):
val = apply(windows2c.wxGrid_UpdateDimensions,(self,) + _args, _kwargs)
return val
def GetEditInPlace(self, *_args, **_kwargs):
val = apply(windows2c.wxGrid_GetEditInPlace,(self,) + _args, _kwargs)
return val
def SetEditInPlace(self, *_args, **_kwargs):
val = apply(windows2c.wxGrid_SetEditInPlace,(self,) + _args, _kwargs)
return val
def __repr__(self):
return "<C wxGrid instance at %s>" % (self.this,)
class wxGrid(wxGridPtr):
def __init__(self,*_args,**_kwargs):
self.this = apply(windows2c.new_wxGrid,_args,_kwargs)
self.thisown = 1
wx._StdWindowCallbacks(self)
wx._checkForCallback(self, 'OnSelectCell', wxEVT_GRID_SELECT_CELL)
wx._checkForCallback(self, 'OnCreateCell', wxEVT_GRID_CREATE_CELL)
wx._checkForCallback(self, 'OnChangeLabels', wxEVT_GRID_CHANGE_LABELS)
wx._checkForCallback(self, 'OnChangeSelectionLabel', wxEVT_GRID_CHANGE_SEL_LABEL)
wx._checkForCallback(self, 'OnCellChange', wxEVT_GRID_CELL_CHANGE)
wx._checkForCallback(self, 'OnCellLeftClick', wxEVT_GRID_CELL_LCLICK)
wx._checkForCallback(self, 'OnCellRightClick', wxEVT_GRID_CELL_RCLICK)
wx._checkForCallback(self, 'OnLabelLeftClick', wxEVT_GRID_LABEL_LCLICK)
wx._checkForCallback(self, 'OnLabelRightClick', wxEVT_GRID_LABEL_RCLICK)
class wxGridEventPtr(wxEventPtr):
def __init__(self,this):
self.this = this
self.thisown = 0
def GetRow(self, *_args, **_kwargs):
val = apply(windows2c.wxGridEvent_GetRow,(self,) + _args, _kwargs)
return val
def GetCol(self, *_args, **_kwargs):
val = apply(windows2c.wxGridEvent_GetCol,(self,) + _args, _kwargs)
return val
def GetPosition(self, *_args, **_kwargs):
val = apply(windows2c.wxGridEvent_GetPosition,(self,) + _args, _kwargs)
if val: val = wxPointPtr(val) ; val.thisown = 1
return val
def ControlDown(self, *_args, **_kwargs):
val = apply(windows2c.wxGridEvent_ControlDown,(self,) + _args, _kwargs)
return val
def ShiftDown(self, *_args, **_kwargs):
val = apply(windows2c.wxGridEvent_ShiftDown,(self,) + _args, _kwargs)
return val
def GetCell(self, *_args, **_kwargs):
val = apply(windows2c.wxGridEvent_GetCell,(self,) + _args, _kwargs)
if val: val = wxGridCellPtr(val)
return val
def __setattr__(self,name,value):
if name == "m_row" :
windows2c.wxGridEvent_m_row_set(self,value)
return
if name == "m_col" :
windows2c.wxGridEvent_m_col_set(self,value)
return
if name == "m_x" :
windows2c.wxGridEvent_m_x_set(self,value)
return
if name == "m_y" :
windows2c.wxGridEvent_m_y_set(self,value)
return
if name == "m_control" :
windows2c.wxGridEvent_m_control_set(self,value)
return
if name == "m_shift" :
windows2c.wxGridEvent_m_shift_set(self,value)
return
if name == "m_cell" :
windows2c.wxGridEvent_m_cell_set(self,value.this)
return
self.__dict__[name] = value
def __getattr__(self,name):
if name == "m_row" :
return windows2c.wxGridEvent_m_row_get(self)
if name == "m_col" :
return windows2c.wxGridEvent_m_col_get(self)
if name == "m_x" :
return windows2c.wxGridEvent_m_x_get(self)
if name == "m_y" :
return windows2c.wxGridEvent_m_y_get(self)
if name == "m_control" :
return windows2c.wxGridEvent_m_control_get(self)
if name == "m_shift" :
return windows2c.wxGridEvent_m_shift_get(self)
if name == "m_cell" :
return wxGridCellPtr(windows2c.wxGridEvent_m_cell_get(self))
raise AttributeError,name
def __repr__(self):
return "<C wxGridEvent instance at %s>" % (self.this,)
class wxGridEvent(wxGridEventPtr):
def __init__(self,this):
self.this = this
class wxNotebookEventPtr(wxNotifyEventPtr):
def __init__(self,this):
self.this = this
@@ -622,18 +250,6 @@ class wxTaskBarIcon(wxTaskBarIconPtr):
#-------------- VARIABLE WRAPPERS ------------------
wxGRID_TEXT_CTRL = windows2c.wxGRID_TEXT_CTRL
wxGRID_HSCROLL = windows2c.wxGRID_HSCROLL
wxGRID_VSCROLL = windows2c.wxGRID_VSCROLL
wxEVT_GRID_SELECT_CELL = windows2c.wxEVT_GRID_SELECT_CELL
wxEVT_GRID_CREATE_CELL = windows2c.wxEVT_GRID_CREATE_CELL
wxEVT_GRID_CHANGE_LABELS = windows2c.wxEVT_GRID_CHANGE_LABELS
wxEVT_GRID_CHANGE_SEL_LABEL = windows2c.wxEVT_GRID_CHANGE_SEL_LABEL
wxEVT_GRID_CELL_CHANGE = windows2c.wxEVT_GRID_CELL_CHANGE
wxEVT_GRID_CELL_LCLICK = windows2c.wxEVT_GRID_CELL_LCLICK
wxEVT_GRID_CELL_RCLICK = windows2c.wxEVT_GRID_CELL_RCLICK
wxEVT_GRID_LABEL_LCLICK = windows2c.wxEVT_GRID_LABEL_LCLICK
wxEVT_GRID_LABEL_RCLICK = windows2c.wxEVT_GRID_LABEL_RCLICK
wxEVT_TASKBAR_MOVE = windows2c.wxEVT_TASKBAR_MOVE
wxEVT_TASKBAR_LEFT_DOWN = windows2c.wxEVT_TASKBAR_LEFT_DOWN
wxEVT_TASKBAR_LEFT_UP = windows2c.wxEVT_TASKBAR_LEFT_UP

View File

@@ -1771,7 +1771,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_wxNotifyEvent","_class_wxNotifyEvent",0},
{ "_class_wxToolBarBase","_wxToolBarBase",0},
{ "_wxMask","_class_wxMask",0},
{ "_wxGrid","_class_wxGrid",0},
{ "_wxPen","_class_wxPen",0},
{ "_wxUpdateUIEvent","_class_wxUpdateUIEvent",0},
{ "_byte","_unsigned_char",0},
@@ -1821,7 +1820,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_class_wxMask","_wxMask",0},
{ "_wxTextDataObject","_class_wxTextDataObject",0},
{ "_class_wxKeyEvent","_wxKeyEvent",0},
{ "_class_wxGrid","_wxGrid",0},
{ "_wxColour","_class_wxColour",0},
{ "_class_wxDialog","_wxDialog",0},
{ "_class_wxFileDataObject","_wxFileDataObject",0},
@@ -1856,7 +1854,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_class_wxEvent","_wxEvent",0},
{ "_wxCheckListBox","_class_wxCheckListBox",0},
{ "_wxSplitterEvent","_class_wxSplitterEvent",0},
{ "_wxGridEvent","_class_wxGridEvent",0},
{ "_wxRect","_class_wxRect",0},
{ "_wxCommandEvent","_class_wxSashEvent",SwigwxSashEventTowxCommandEvent},
{ "_wxCommandEvent","_wxSashEvent",SwigwxSashEventTowxCommandEvent},
@@ -1961,7 +1958,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_class_wxPoint","_wxPoint",0},
{ "_wxRealPoint","_class_wxRealPoint",0},
{ "_class_wxRadioBox","_wxRadioBox",0},
{ "_wxGridCell","_class_wxGridCell",0},
{ "_signed_short","_WXTYPE",0},
{ "_signed_short","_short",0},
{ "_wxMemoryDC","_class_wxMemoryDC",0},
@@ -2073,14 +2069,12 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_wxGauge","_class_wxGauge",0},
{ "_class_wxCheckListBox","_wxCheckListBox",0},
{ "_class_wxBusyInfo","_wxBusyInfo",0},
{ "_class_wxGridEvent","_wxGridEvent",0},
{ "_class_wxCommandEvent","_class_wxSashEvent",SwigwxSashEventTowxCommandEvent},
{ "_class_wxCommandEvent","_wxSashEvent",SwigwxSashEventTowxCommandEvent},
{ "_class_wxCommandEvent","_wxCommandEvent",0},
{ "_class_wxClientDC","_wxClientDC",0},
{ "_class_wxSizeEvent","_wxSizeEvent",0},
{ "_wxCustomDataObject","_class_wxCustomDataObject",0},
{ "_class_wxGridCell","_wxGridCell",0},
{ "_class_wxSize","_wxSize",0},
{ "_class_wxBitmap","_wxBitmap",0},
{ "_class_wxMemoryDC","_wxMemoryDC",0},

View File

@@ -635,6 +635,7 @@ extern "C" SWIGEXPORT(void) initimagec();
extern "C" SWIGEXPORT(void) initprintfwc();
extern "C" SWIGEXPORT(void) initsizersc();
extern "C" SWIGEXPORT(void) initclip_dndc();
extern "C" SWIGEXPORT(void) initgridc();
#ifdef __cplusplus
extern "C" {
#endif
@@ -1731,7 +1732,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_class_wxTreeCtrl","_wxTreeCtrl",0},
{ "_wxMask","_class_wxMask",0},
{ "_wxToolTip","_class_wxToolTip",0},
{ "_wxGrid","_class_wxGrid",0},
{ "_wxPNGHandler","_class_wxPNGHandler",0},
{ "_class_wxColourData","_wxColourData",0},
{ "_class_wxPageSetupDialogData","_wxPageSetupDialogData",0},
@@ -1799,7 +1799,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_wxTextDataObject","_class_wxTextDataObject",0},
{ "_class_wxKeyEvent","_wxKeyEvent",0},
{ "_class_wxToolTip","_wxToolTip",0},
{ "_class_wxGrid","_wxGrid",0},
{ "_class_wxPNGHandler","_wxPNGHandler",0},
{ "_wxColour","_class_wxColour",0},
{ "_class_wxDialog","_wxDialog",0},
@@ -1832,7 +1831,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_class_wxEvent","_wxEvent",0},
{ "_wxCheckListBox","_class_wxCheckListBox",0},
{ "_wxSplitterEvent","_class_wxSplitterEvent",0},
{ "_wxGridEvent","_class_wxGridEvent",0},
{ "_wxRect","_class_wxRect",0},
{ "_wxCommandEvent","_class_wxCommandEvent",0},
{ "_wxSizeEvent","_class_wxSizeEvent",0},
@@ -1954,7 +1952,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_class_wxPoint","_wxPoint",0},
{ "_wxRealPoint","_class_wxRealPoint",0},
{ "_class_wxRadioBox","_wxRadioBox",0},
{ "_wxGridCell","_class_wxGridCell",0},
{ "_class_wxBoxSizer","_wxBoxSizer",0},
{ "_signed_short","_WXTYPE",0},
{ "_signed_short","_short",0},
@@ -2088,13 +2085,11 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_wxGauge","_class_wxGauge",0},
{ "_class_wxCheckListBox","_wxCheckListBox",0},
{ "_class_wxBusyInfo","_wxBusyInfo",0},
{ "_class_wxGridEvent","_wxGridEvent",0},
{ "_class_wxCommandEvent","_wxCommandEvent",0},
{ "_class_wxClientDC","_wxClientDC",0},
{ "_class_wxSizeEvent","_wxSizeEvent",0},
{ "_class_wxListCtrl","_wxListCtrl",0},
{ "_wxCustomDataObject","_class_wxCustomDataObject",0},
{ "_class_wxGridCell","_wxGridCell",0},
{ "_class_wxSize","_wxSize",0},
{ "_class_wxBitmap","_wxBitmap",0},
{ "_class_wxMemoryDC","_wxMemoryDC",0},
@@ -2840,6 +2835,7 @@ SWIGEXPORT(void) initwxc() {
initprintfwc();
initsizersc();
initclip_dndc();
initgridc();
{
int i;
for (i = 0; _swig_mapping[i].n1; i++)

View File

@@ -109,7 +109,10 @@ public:
if (self->m_myInst.findCallback("Clone")) {
PyObject* ro;
ro = self->m_myInst.callCallbackObj(Py_BuildValue("()"));
if (ro) {
SWIG_GetPtrObj(ro, (void **)&ptr, "_wxPyValidator_p");
Py_DECREF(ro);
}
}
// This is very dangerous!!! But is the only way I could find
// to squash a memory leak. Currently it is okay, but if the

View File

@@ -14,7 +14,9 @@
%{
#include "helpers.h"
#ifdef OLD_GRID
#include <wx/grid.h>
#endif
#include <wx/notebook.h>
#include <wx/splitter.h>
#ifdef __WXMSW__
@@ -39,7 +41,7 @@
//---------------------------------------------------------------------------
//#ifdef OLD_GRID
#ifdef OLD_GRID
enum {
wxGRID_TEXT_CTRL,
@@ -236,7 +238,7 @@ enum {
wxEVT_GRID_LABEL_RCLICK,
};
//#endif
#endif
//---------------------------------------------------------------------------

View File

@@ -135,6 +135,7 @@ extern "C" SWIGEXPORT(void) initimagec();
extern "C" SWIGEXPORT(void) initprintfwc();
extern "C" SWIGEXPORT(void) initsizersc();
extern "C" SWIGEXPORT(void) initclip_dndc();
extern "C" SWIGEXPORT(void) initgridc();
%}
@@ -164,6 +165,7 @@ extern "C" SWIGEXPORT(void) initclip_dndc();
initprintfwc();
initsizersc();
initclip_dndc();
initgridc();
%}
//----------------------------------------------------------------------

View File

@@ -1,3 +1,3 @@
wxpicon ICON "wxp.ico"
aa_wxpicon ICON "wxp.ico"
#include "wx/msw/wx.rc"
#include "wx/html/msw/wxhtml.rc"