X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/dd1d4b137b0da06b8bce062750809e9631fbb616..7581faf616eef3617152b9ad05b939999f442502:/wxPython/contrib/gizmos/gizmos.i diff --git a/wxPython/contrib/gizmos/gizmos.i b/wxPython/contrib/gizmos/gizmos.i index c1b54e72d3..1af639a5b7 100644 --- a/wxPython/contrib/gizmos/gizmos.i +++ b/wxPython/contrib/gizmos/gizmos.i @@ -14,11 +14,12 @@ %{ -#include "export.h" +#include "wxPython.h" #include #include #include #include +#include %} //--------------------------------------------------------------------------- @@ -35,6 +36,14 @@ //---------------------------------------------------------------------- +%{ + // Put some wx default wxChar* values into wxStrings. + static const wxString wxPyDynamicSashNameStr(wxT("dynamicSashWindow")); + static const wxString wxPyEditableListBoxNameStr(wxT("editableListBox")); +%} + +///---------------------------------------------------------------------- + enum { wxEVT_DYNAMIC_SASH_SPLIT, wxEVT_DYNAMIC_SASH_UNIFY, @@ -124,13 +133,13 @@ public: wxDynamicSashWindow(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxCLIP_CHILDREN | wxDS_MANAGE_SCROLLBARS | wxDS_DRAG_CORNER, - const char* name = "dynamicSashWindow"); + const wxString& name = wxPyDynamicSashNameStr); %name(wxPreDynamicSashWindow)wxDynamicSashWindow(); bool Create(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxCLIP_CHILDREN | wxDS_MANAGE_SCROLLBARS | wxDS_DRAG_CORNER, - const char* name = "dynamicSashWindow"); + const wxString& name = wxPyDynamicSashNameStr); %pragma(python) addtomethod = "__init__:self._setOORInfo(self)" %pragma(python) addtomethod = "wxPreDynamicSashWindow:val._setOORInfo(val)" @@ -153,11 +162,6 @@ def EVT_DYNAMIC_SASH_UNIFY(win, id, func): " //---------------------------------------------------------------------- -enum { - wxEL_ALLOW_NEW, - wxEL_ALLOW_EDIT, - wxEL_ALLOW_DELETE, -}; //---------------------------------------------------------------------- enum { @@ -176,7 +180,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxEL_ALLOW_NEW | wxEL_ALLOW_EDIT | wxEL_ALLOW_DELETE, - const char* name = "editableListBox"); + const wxString& name = wxPyEditableListBoxNameStr); %pragma(python) addtomethod = "__init__:self._setOORInfo(self)" @@ -190,6 +194,13 @@ public: return wxArrayString2PyList_helper(strings); } } + + wxListCtrl* GetListCtrl() { return m_listCtrl; } + wxBitmapButton* GetDelButton() { return m_bDel; } + wxBitmapButton* GetNewButton() { return m_bNew; } + wxBitmapButton* GetUpButton() { return m_bUp; } + wxBitmapButton* GetDownButton() { return m_bDown; } + wxBitmapButton* GetEditButton() { return m_bEdit; } }; @@ -261,8 +272,8 @@ public: wxPyBeginBlockThreads(); if ((found = wxPyCBH_findCallback(m_myInst, "DrawItem"))) { PyObject* dcobj = wxPyMake_wxObject(&dc); - PyObject* idobj = wxPyConstructObject((void*)&id, "wxTreeItemId", FALSE); - PyObject* recobj= wxPyConstructObject((void*)&rect, "wxRect", FALSE); + PyObject* idobj = wxPyConstructObject((void*)&id, wxT("wxTreeItemId"), FALSE); + PyObject* recobj= wxPyConstructObject((void*)&rect, wxT("wxRect"), FALSE); wxPyCBH_callCallback(m_myInst, Py_BuildValue("(OOO)", dcobj, idobj, recobj)); Py_DECREF(dcobj); Py_DECREF(idobj);