class wxPyShapeEvtHandler : public wxObject {
public:
%pythonAppend wxPyShapeEvtHandler "self._setOORandCallbackInfo(PyShapeEvtHandler)"
-
+ %typemap(out) wxPyShapeEvtHandler*; // turn off this typemap
+
wxPyShapeEvtHandler(wxPyShapeEvtHandler *prev = NULL,
wxPyShape *shape = NULL);
+ %typemap(out) wxPyShapeEvtHandler* { $result = wxPyMake_wxShapeEvtHandler($1, $owner); }
+
+
void _setCallbackInfo(PyObject* self, PyObject* _class);
%extend {
void _setOORInfo(PyObject* _self) {
- if (!self->GetClientObject())
- self->SetClientObject(new wxPyOORClientData(_self));
+ self->SetClientObject(new wxPyOORClientData(_self));
}
}
%pythoncode {
class wxPyShape : public wxPyShapeEvtHandler {
public:
%pythonAppend wxPyShape "self._setOORandCallbackInfo(PyShape)"
-
+ %typemap(out) wxPyShape*; // turn off this typemap
+
wxPyShape(wxPyShapeCanvas *can = NULL);
+ %typemap(out) wxPyShape* { $result = wxPyMake_wxShapeEvtHandler($1, $owner); }
+
void _setCallbackInfo(PyObject* self, PyObject* _class);
void GetBoundingBoxMax(double *OUTPUT, double *OUTPUT);
class wxPyShapeCanvas : public wxScrolledWindow {
public:
%pythonAppend wxPyShapeCanvas "self._setOORandCallbackInfo(PyShapeCanvas)"
-
+ %typemap(out) wxPyShapeCanvas*; // turn off this typemap
+
wxPyShapeCanvas(wxWindow* parent = NULL, wxWindowID id = -1,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxBORDER,
const wxString& name = wxPyShapeCanvasNameStr);
+ %typemap(out) wxPyShapeCanvas* { $result = wxPyMake_wxObject($1, $owner); }
+
void _setCallbackInfo(PyObject* self, PyObject* _class);
%pythoncode {
def _setOORandCallbackInfo(self, _class):
class wxPyDivisionShape : public wxPyCompositeShape {
public:
%pythonAppend wxPyDivisionShape "self._setOORandCallbackInfo(PyDivisionShape)"
+ %typemap(out) wxPyDivisionShape*; // turn off this typemap
wxPyDivisionShape();
+ %typemap(out) wxPyDivisionShape* { $result = wxPyMake_wxShapeEvtHandler($1, $owner); }
+
void _setCallbackInfo(PyObject* self, PyObject* _class);
void AdjustBottom(double bottom, bool test);
%pythonAppend wxPyApp
"self._setCallbackInfo(self, PyApp)
self._setOORInfo(self)";
+ %typemap(out) wxPyApp*; // turn off this typemap
DocStr(wxPyApp,
"Create a new application object, starting the bootstrap process.", "");
~wxPyApp();
+ // Turn it back on again
+ %typemap(out) wxPyApp* { $result = wxPyMake_wxObject($1, $owner); }
+
+
void _setCallbackInfo(PyObject* self, PyObject* _class);
public:
%pythonAppend wxButton "self._setOORInfo(self)"
%pythonAppend wxButton() ""
+ %typemap(out) wxButton*; // turn off this typemap
DocCtorStr(
"Precreate a Button for 2-phase creation.", "",
PreButton);
+ // Turn it back on again
+ %typemap(out) wxButton* { $result = wxPyMake_wxObject($1, $owner); }
+
+
DocDeclStr(
bool , Create(wxWindow* parent, wxWindowID id=-1,
const wxString& label=wxPyEmptyString,
public:
%pythonAppend wxBitmapButton "self._setOORInfo(self)"
%pythonAppend wxBitmapButton() ""
+ %typemap(out) wxBitmapButton*; // turn off this typemap
DocCtorStr(
wxBitmapButton(wxWindow* parent, wxWindowID id=-1,
"Precreate a BitmapButton for 2-phase creation.", "",
PreBitmapButton);
+ // Turn it back on again
+ %typemap(out) wxBitmapButton* { $result = wxPyMake_wxObject($1, $owner); }
+
+
DocDeclStr(
bool , Create(wxWindow* parent, wxWindowID id=-1,
const wxBitmap& bitmap = wxNullBitmap,
public:
%pythonAppend wxControl "self._setOORInfo(self)"
%pythonAppend wxControl() ""
+ %typemap(out) wxControl*; // turn off this typemap
DocCtorStr(
wxControl(wxWindow *parent,
"Precreate a Control control for 2-phase creation", "",
PreControl);
+ // Turn it back on again
+ %typemap(out) wxControl* { $result = wxPyMake_wxObject($1, $owner); }
+
+
DocDeclStr(
bool , Create(wxWindow *parent,
wxWindowID id=-1,
// wxEvtHandler: the base class for all objects handling wxWindows events
class wxEvtHandler : public wxObject {
public:
+ // turn off this typemap
+ %typemap(out) wxEvtHandler*;
+
wxEvtHandler();
+ // Turn it back on again
+ %typemap(out) wxEvtHandler* { $result = wxPyMake_wxObject($1, $owner); }
+
wxEvtHandler* GetNextHandler();
wxEvtHandler* GetPreviousHandler();
void SetNextHandler(wxEvtHandler* handler);
%extend {
void _setOORInfo(PyObject* _self) {
if (_self && _self != Py_None) {
- if (!self->GetClientObject())
- self->SetClientObject(new wxPyOORClientData(_self));
+ self->SetClientObject(new wxPyOORClientData(_self));
}
else {
wxPyOORClientData* data = (wxPyOORClientData*)self->GetClientObject();
public:
%pythonAppend wxMDIChildFrame "self._setOORInfo(self)"
%pythonAppend wxMDIChildFrame() ""
+ %typemap(out) wxMDIChildFrame*; // turn off this typemap
wxMDIChildFrame(wxMDIParentFrame* parent,
const wxWindowID id=-1,
const wxString& name = wxPyFrameNameStr);
%name(PreMDIChildFrame)wxMDIChildFrame();
+ // Turn it back on again
+ %typemap(out) wxMDIChildFrame* { $result = wxPyMake_wxObject($1, $owner); }
+
bool Create(wxMDIParentFrame* parent,
const wxWindowID id=-1,
const wxString& title = wxPyEmptyString,
public:
%pythonAppend wxMDIClientWindow "self._setOORInfo(self)"
%pythonAppend wxMDIClientWindow() ""
+ %typemap(out) wxMDIClientWindow*; // turn off this typemap
wxMDIClientWindow(wxMDIParentFrame* parent, long style = 0);
%name(PreMDIClientWindow)wxMDIClientWindow();
+ // Turn it back on again
+ %typemap(out) wxMDIClientWindow* { $result = wxPyMake_wxObject($1, $owner); }
+
bool Create(wxMDIParentFrame* parent, long style = 0);
};
{
public:
%pythonAppend wxMenu "self._setOORInfo(self)"
+ %typemap(out) wxMenu*; // turn off this typemap
+
wxMenu(const wxString& title = wxPyEmptyString, long style = 0);
+ // Turn it back on again
+ %typemap(out) wxMenu* { $result = wxPyMake_wxObject($1, $owner); }
+
// append any kind of item (normal/check/radio/separator)
wxMenuItem* Append(int id,
const wxString& text,
{
public:
%pythonAppend wxMenuBar "self._setOORInfo(self)"
+ %typemap(out) wxMenuBar*; // turn off this typemap
+
wxMenuBar(long style = 0);
+ // Turn it back on again
+ %typemap(out) wxMenuBar* { $result = wxPyMake_wxObject($1, $owner); }
// append a menu to the end of menubar, return True if ok
virtual bool Append(wxMenu *menu, const wxString& title);
public:
%pythonAppend wxNotebook "self._setOORInfo(self)"
%pythonAppend wxNotebook() ""
+ %typemap(out) wxNotebook*; // turn off this typemap
wxNotebook(wxWindow *parent,
wxWindowID id=-1,
const wxString& name = wxPyNOTEBOOK_NAME);
%name(PreNotebook)wxNotebook();
+ // Turn it back on again
+ %typemap(out) wxNotebook* { $result = wxPyMake_wxObject($1, $owner); }
+
bool Create(wxWindow *parent,
wxWindowID id=-1,
const wxPoint& pos = wxDefaultPosition,
public:
%pythonAppend wxPanel "self._setOORInfo(self)"
%pythonAppend wxPanel() ""
+ %typemap(out) wxPanel*; // turn off this typemap
wxPanel(wxWindow* parent,
const wxWindowID id=-1,
const wxString& name = wxPyPanelNameStr);
%name(PrePanel)wxPanel();
+ // Turn it back on again
+ %typemap(out) wxPanel* { $result = wxPyMake_wxObject($1, $owner); }
+
bool Create(wxWindow* parent,
const wxWindowID id=-1,
const wxPoint& pos = wxDefaultPosition,
public:
%pythonAppend wxScrolledWindow "self._setOORInfo(self)"
%pythonAppend wxScrolledWindow() ""
+ %typemap(out) wxScrolledWindow*; // turn off this typemap
wxScrolledWindow(wxWindow* parent,
const wxWindowID id = -1,
const wxString& name = wxPyPanelNameStr);
%name(PreScrolledWindow)wxScrolledWindow();
+ // Turn it back on again
+ %typemap(out) wxScrolledWindow* { $result = wxPyMake_wxObject($1, $owner); }
+
bool Create(wxWindow* parent,
const wxWindowID id = -1,
const wxPoint& pos = wxDefaultPosition,
public:
%pythonAppend wxStaticBox "self._setOORInfo(self)"
%pythonAppend wxStaticBox() ""
+ %typemap(out) wxStaticBox*; // turn off this typemap
wxStaticBox(wxWindow* parent, wxWindowID id=-1,
const wxString& label = wxPyEmptyString,
const wxString& name = wxPyStaticBoxNameStr);
%name(PreStaticBox)wxStaticBox();
+ // Turn it back on again
+ %typemap(out) wxStaticBox* { $result = wxPyMake_wxObject($1, $owner); }
+
bool Create(wxWindow* parent, wxWindowID id=-1,
const wxString& label = wxPyEmptyString,
const wxPoint& pos = wxDefaultPosition,
public:
%pythonAppend wxStatusBar "self._setOORInfo(self)"
%pythonAppend wxStatusBar() ""
+ %typemap(out) wxStatusBar*; // turn off this typemap
wxStatusBar(wxWindow* parent, wxWindowID id = -1,
long style = wxDEFAULT_STATUSBAR_STYLE,
const wxString& name = wxPyStatusLineNameStr);
%name(PreStatusBar)wxStatusBar();
+ // Turn it back on again
+ %typemap(out) wxStatusBar* { $result = wxPyMake_wxObject($1, $owner); }
+
bool Create(wxWindow* parent, wxWindowID id=-1,
long style = wxST_SIZEGRIP,
const wxString& name = wxPyStatusLineNameStr);
public:
%pythonAppend wxTextCtrl "self._setOORInfo(self)"
%pythonAppend wxTextCtrl() ""
+ %typemap(out) wxTextCtrl*; // turn off this typemap
wxTextCtrl(wxWindow* parent, wxWindowID id=-1,
const wxString& value = wxPyEmptyString,
const wxString& name = wxPyTextCtrlNameStr);
%name(PreTextCtrl)wxTextCtrl();
+ // Turn it back on again
+ %typemap(out) wxTextCtrl* { $result = wxPyMake_wxObject($1, $owner); }
+
bool Create(wxWindow* parent, wxWindowID id=-1,
const wxString& value = wxPyEmptyString,
const wxPoint& pos = wxDefaultPosition,
public:
%pythonAppend wxToolBar "self._setOORInfo(self)"
%pythonAppend wxToolBar() ""
-
+ %typemap(out) wxToolBar*; // turn off this typemap
+
wxToolBar(wxWindow *parent,
wxWindowID id=-1,
const wxPoint& pos = wxDefaultPosition,
const wxString& name = wxPyToolBarNameStr);
%name(PreToolBar)wxToolBar();
+ // Turn it back on again
+ %typemap(out) wxToolBar* { $result = wxPyMake_wxObject($1, $owner); }
+
bool Create(wxWindow *parent,
wxWindowID id=-1,
const wxPoint& pos = wxDefaultPosition,
public:
%pythonAppend wxFrame "self._setOORInfo(self)"
%pythonAppend wxFrame() ""
+ %typemap(out) wxFrame*; // turn off this typemap
wxFrame(wxWindow* parent, const wxWindowID id=-1,
const wxString& title = wxPyEmptyString,
const wxString& name = wxPyFrameNameStr);
%name(PreFrame)wxFrame();
+ // Turn it back on again
+ %typemap(out) wxFrame* { $result = wxPyMake_wxObject($1, $owner); }
+
+
bool Create(wxWindow* parent, const wxWindowID id=-1,
const wxString& title = wxPyEmptyString,
const wxPoint& pos = wxDefaultPosition,
public:
%pythonAppend wxDialog "self._setOORInfo(self)"
%pythonAppend wxDialog() ""
+ %typemap(out) wxDialog*; // turn off this typemap
wxDialog(wxWindow* parent,
const wxWindowID id=-1,
const wxString& name = wxPyDialogNameStr);
%name(PreDialog)wxDialog();
+ // Turn it back on again
+ %typemap(out) wxDialog* { $result = wxPyMake_wxObject($1, $owner); }
+
bool Create(wxWindow* parent,
const wxWindowID id=-1,
const wxString& title = wxPyEmptyString,
public:
%pythonAppend wxPyTreeCtrl "self._setOORInfo(self);self._setCallbackInfo(self, TreeCtrl)"
%pythonAppend wxPyTreeCtrl() ""
+ %typemap(out) wxPyTreeCtrl*; // turn off this typemap
wxPyTreeCtrl(wxWindow *parent, wxWindowID id = -1,
const wxPoint& pos = wxDefaultPosition,
const wxString& name = wxPyTreeCtrlNameStr);
%name(PreTreeCtrl)wxPyTreeCtrl();
+ // Turn it back on again
+ %typemap(out) wxPyTreeCtrl* { $result = wxPyMake_wxObject($1, $owner); }
+
bool Create(wxWindow *parent, wxWindowID id = -1,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
{
public:
%pythonAppend wxValidator "self._setOORInfo(self)"
+ %typemap(out) wxValidator*; // turn off this typemap
+
wxValidator();
//~wxValidator();
+ // Turn it back on again
+ %typemap(out) wxValidator* { $result = wxPyMake_wxObject($1, $owner); }
+
// Make a clone of this validator (or return NULL)
wxValidator* Clone();
public:
%pythonAppend wxWindow "self._setOORInfo(self)"
%pythonAppend wxWindow() ""
+ %typemap(out) wxWindow*; // turn off this typemap
DocCtorStr(
wxWindow(wxWindow* parent, const wxWindowID id=-1,
"Precreate a Window for 2-phase creation.", "",
PreWindow);
+ // Turn it back on again
+ %typemap(out) wxWindow* { $result = wxPyMake_wxObject($1, $owner); }
+
DocDeclStr(
bool , Create(wxWindow* parent, const wxWindowID id=-1,
const wxPoint& pos = wxDefaultPosition,
{
public:
%pythonAppend wxGrid "self._setOORInfo(self)"
+ %typemap(out) wxGrid*; // turn off this typemap
wxGrid( wxWindow *parent,
wxWindowID id=-1,
%name(PreGrid) wxGrid();
+
+ // Turn it back on again
+ %typemap(out) wxGrid* { $result = wxPyMake_wxObject($1, $owner); }
+
bool Create( wxWindow *parent,
wxWindowID id=-1,
public:
%pythonAppend wxPyHtmlWindow "self._setCallbackInfo(self, HtmlWindow); self._setOORInfo(self)"
%pythonAppend wxPyHtmlWindow() ""
+ %typemap(out) wxPyHtmlWindow*; // turn off this typemap
wxPyHtmlWindow(wxWindow *parent, int id = -1,
const wxPoint& pos = wxDefaultPosition,
const wxString& name = wxPyHtmlWindowNameStr);
%name(PreHtmlWindow)wxPyHtmlWindow();
+ // Turn it back on again
+ %typemap(out) wxPyHtmlWindow* { $result = wxPyMake_wxObject($1, $owner); }
+
bool Create(wxWindow *parent, int id = -1,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
// to the real derived type, if possible. See wxPyMake_wxObject in
// helpers.cpp
+// NOTE: For those classes that also call _setOORInfo these typemaps should be
+// disabled for the constructor.
+
%typemap(out) wxEvtHandler* { $result = wxPyMake_wxObject($1, $owner); }
%typemap(out) wxMenu* { $result = wxPyMake_wxObject($1, $owner); }
%typemap(out) wxValidator* { $result = wxPyMake_wxObject($1, $owner); }
%typemap(out) wxDC* { $result = wxPyMake_wxObject($1, $owner); }
%typemap(out) wxFSFile* { $result = wxPyMake_wxObject($1, $owner); }
%typemap(out) wxFileSystem* { $result = wxPyMake_wxObject($1, $owner); }
-%typemap(out) wxGridTableBase* { $result = wxPyMake_wxObject($1, $owner); }
%typemap(out) wxImageList* { $result = wxPyMake_wxObject($1, $owner); }
%typemap(out) wxListItem* { $result = wxPyMake_wxObject($1, $owner); }
%typemap(out) wxMenuItem* { $result = wxPyMake_wxObject($1, $owner); }
%typemap(out) wxControl* { $result = wxPyMake_wxObject($1, $owner); }
%typemap(out) wxFrame* { $result = wxPyMake_wxObject($1, $owner); }
%typemap(out) wxGrid* { $result = wxPyMake_wxObject($1, $owner); }
-%typemap(out) wxListCtrl* { $result = wxPyMake_wxObject($1, $owner); }
+//%typemap(out) wxListCtrl* { $result = wxPyMake_wxObject($1, $owner); }
%typemap(out) wxMDIChildFrame* { $result = wxPyMake_wxObject($1, $owner); }
%typemap(out) wxMDIClientWindow* { $result = wxPyMake_wxObject($1, $owner); }
%typemap(out) wxMenuBar* { $result = wxPyMake_wxObject($1, $owner); }
%typemap(out) wxTextCtrl* { $result = wxPyMake_wxObject($1, $owner); }
%typemap(out) wxToolBar* { $result = wxPyMake_wxObject($1, $owner); }
%typemap(out) wxToolBarBase* { $result = wxPyMake_wxObject($1, $owner); }
-%typemap(out) wxTreeCtrl* { $result = wxPyMake_wxObject($1, $owner); }
+//%typemap(out) wxTreeCtrl* { $result = wxPyMake_wxObject($1, $owner); }
%typemap(out) wxPyTreeCtrl* { $result = wxPyMake_wxObject($1, $owner); }
%typemap(out) wxWindow* { $result = wxPyMake_wxObject($1, $owner); }
-%typemap(out) wxHtmlWindow* { $result = wxPyMake_wxObject($1, $owner); }
%typemap(out) wxPyHtmlWindow* { $result = wxPyMake_wxObject($1, $owner); }
%typemap(out) wxWizardPage* { $result = wxPyMake_wxObject($1, $owner); }
+%typemap(out) wxPyWizardPage* { $result = wxPyMake_wxObject($1, $owner); }
%typemap(out) wxPanel* { $result = wxPyMake_wxObject($1, $owner); }
%typemap(out) wxDialog* { $result = wxPyMake_wxObject($1, $owner); }
%typemap(out) wxScrolledWindow* { $result = wxPyMake_wxObject($1, $owner); }
%pythonAppend wxPyWizardPage "self._setCallbackInfo(self, PyWizardPage);self._setOORInfo(self)"
%pythonAppend wxPyWizardPage() ""
+ %typemap(out) wxPyWizardPage*; // turn off this typemap
// ctor accepts an optional bitmap which will be used for this page instead
// of the default one for this wizard (should be of the same size). Notice
%name(PrePyWizardPage)wxPyWizardPage();
+ // Turn it back on again
+ %typemap(out) wxPyWizardPage* { $result = wxPyMake_wxObject($1, $owner); }
+
%extend {
bool Create(wxWizard *parent,
const wxBitmap& bitmap = wxNullBitmap,