Merged the wxPy_newswig branch into the HEAD branch (main trunk)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24541 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -13,59 +13,43 @@
|
||||
%module wizard
|
||||
|
||||
%{
|
||||
#include "wxPython.h"
|
||||
#include "wx/wxPython/wxPython.h"
|
||||
#include "wx/wxPython/pyclasses.h"
|
||||
#include "wx/wxPython/printfw.h"
|
||||
|
||||
#include <wx/wizard.h>
|
||||
%}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
%include typemaps.i
|
||||
%include my_typemaps.i
|
||||
|
||||
// Import some definitions of other classes, etc.
|
||||
%import _defs.i
|
||||
%import windows.i
|
||||
%import frames.i
|
||||
%import misc.i
|
||||
%import controls.i
|
||||
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
%{
|
||||
// Put some wx default wxChar* values into wxStrings.
|
||||
|
||||
static const wxString wxPyEmptyString(wxT(""));
|
||||
%}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
%import windows.i
|
||||
%pythoncode { wx = core }
|
||||
|
||||
%include _wizard_rename.i
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
enum {
|
||||
wxWIZARD_EX_HELPBUTTON,
|
||||
|
||||
wxEVT_WIZARD_PAGE_CHANGED,
|
||||
wxEVT_WIZARD_PAGE_CHANGING,
|
||||
wxEVT_WIZARD_CANCEL,
|
||||
wxEVT_WIZARD_HELP,
|
||||
wxEVT_WIZARD_FINISHED
|
||||
};
|
||||
|
||||
%constant wxEventType wxEVT_WIZARD_PAGE_CHANGED;
|
||||
%constant wxEventType wxEVT_WIZARD_PAGE_CHANGING;
|
||||
%constant wxEventType wxEVT_WIZARD_CANCEL;
|
||||
%constant wxEventType wxEVT_WIZARD_HELP;
|
||||
%constant wxEventType wxEVT_WIZARD_FINISHED;
|
||||
|
||||
%pragma(python) code = "
|
||||
# wizard events
|
||||
def EVT_WIZARD_PAGE_CHANGED(win, id, func):
|
||||
win.Connect(id, -1, wxEVT_WIZARD_PAGE_CHANGED, func)
|
||||
|
||||
def EVT_WIZARD_PAGE_CHANGING(win, id, func):
|
||||
win.Connect(id, -1, wxEVT_WIZARD_PAGE_CHANGING, func)
|
||||
|
||||
def EVT_WIZARD_CANCEL(win, id, func):
|
||||
win.Connect(id, -1, wxEVT_WIZARD_CANCEL, func)
|
||||
|
||||
def EVT_WIZARD_HELP(win, id, func):
|
||||
win.Connect(id, -1, wxEVT_WIZARD_HELP, func)
|
||||
|
||||
def EVT_WIZARD_FINISHED(win, id, func):
|
||||
win.Connect(id, -1, wxEVT_WIZARD_FINISHED, func)
|
||||
|
||||
"
|
||||
%pythoncode {
|
||||
EVT_WIZARD_PAGE_CHANGED = wx.PyEventBinder( wxEVT_WIZARD_PAGE_CHANGED, 1)
|
||||
EVT_WIZARD_PAGE_CHANGING = wx.PyEventBinder( wxEVT_WIZARD_PAGE_CHANGING, 1)
|
||||
EVT_WIZARD_CANCEL = wx.PyEventBinder( wxEVT_WIZARD_CANCEL, 1)
|
||||
EVT_WIZARD_HELP = wx.PyEventBinder( wxEVT_WIZARD_HELP, 1)
|
||||
EVT_WIZARD_FINISHED = wx.PyEventBinder( wxEVT_WIZARD_FINISHED, 1)
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
@@ -104,9 +88,9 @@ public:
|
||||
// wxWizardPage(wxWizard *parent,
|
||||
// const wxBitmap& bitmap = wxNullBitmap,
|
||||
// const char* resource = NULL);
|
||||
// %name(wxPreWizardPage)wxWizardPage();
|
||||
// %name(PreWizardPage)wxWizardPage();
|
||||
|
||||
%addmethods {
|
||||
%extend {
|
||||
bool Create(wxWizard *parent,
|
||||
const wxBitmap& bitmap = wxNullBitmap,
|
||||
const wxString& resource = wxPyEmptyString) {
|
||||
@@ -210,11 +194,15 @@ IMP_PYCALLBACK_VOID_WXWINBASE(wxPyWizardPage, wxWizardPage, RemoveChild);
|
||||
|
||||
class wxPyWizardPage : public wxWizardPage {
|
||||
public:
|
||||
|
||||
%addtofunc wxPyWizardPage "self._setCallbackInfo(self, PyWizardPage);self._setOORInfo(self)"
|
||||
%addtofunc wxPyWizardPage() ""
|
||||
|
||||
// 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
|
||||
// that no other parameters are needed because the wizard will resize and
|
||||
// reposition the page anyhow
|
||||
%addmethods {
|
||||
%extend {
|
||||
wxPyWizardPage(wxWizard *parent,
|
||||
const wxBitmap* bitmap = &wxNullBitmap,
|
||||
const wxString* resource = &wxPyEmptyString) {
|
||||
@@ -225,9 +213,9 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
%name(wxPrePyWizardPage)wxPyWizardPage();
|
||||
%name(PrePyWizardPage)wxPyWizardPage();
|
||||
|
||||
%addmethods {
|
||||
%extend {
|
||||
bool Create(wxWizard *parent,
|
||||
const wxBitmap& bitmap = wxNullBitmap,
|
||||
const wxString& resource = wxPyEmptyString) {
|
||||
@@ -239,10 +227,6 @@ public:
|
||||
}
|
||||
|
||||
void _setCallbackInfo(PyObject* self, PyObject* _class);
|
||||
%pragma(python) addtomethod = "__init__:self._setCallbackInfo(self, wxPyWizardPage)"
|
||||
|
||||
%pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
|
||||
%pragma(python) addtomethod = "wxPrePyWizardPage:val._setOORInfo(val)"
|
||||
|
||||
void base_DoMoveWindow(int x, int y, int width, int height);
|
||||
void base_DoSetSize(int x, int y, int width, int height,
|
||||
@@ -282,13 +266,17 @@ public:
|
||||
class wxWizardPageSimple : public wxWizardPage
|
||||
{
|
||||
public:
|
||||
|
||||
%addtofunc wxWizardPageSimple "self._setOORInfo(self)"
|
||||
%addtofunc wxWizardPageSimple() ""
|
||||
|
||||
// ctor takes the previous and next pages
|
||||
wxWizardPageSimple(wxWizard *parent,
|
||||
wxWizardPage *prev = NULL,
|
||||
wxWizardPage *next = NULL,
|
||||
const wxBitmap& bitmap = wxNullBitmap,
|
||||
const wxChar* resource = NULL);
|
||||
%name(wxPreWizardPageSimple)wxWizardPageSimple();
|
||||
%name(PreWizardPageSimple)wxWizardPageSimple();
|
||||
|
||||
bool Create(wxWizard *parent = NULL,
|
||||
wxWizardPage *prev = NULL,
|
||||
@@ -296,9 +284,6 @@ public:
|
||||
const wxBitmap& bitmap = wxNullBitmap,
|
||||
const wxChar* resource = NULL);
|
||||
|
||||
%pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
|
||||
%pragma(python) addtomethod = "wxPreWizardPageSimple:val._setOORInfo(val)"
|
||||
|
||||
// the pointers may be also set later - but before starting the wizard
|
||||
void SetPrev(wxWizardPage *prev);
|
||||
void SetNext(wxWizardPage *next);
|
||||
@@ -313,6 +298,9 @@ public:
|
||||
class wxWizard : public wxDialog
|
||||
{
|
||||
public:
|
||||
%addtofunc wxWizard "self._setOORInfo(self)"
|
||||
%addtofunc wxWizard() ""
|
||||
|
||||
// ctor
|
||||
wxWizard(wxWindow *parent,
|
||||
int id = -1,
|
||||
@@ -320,10 +308,7 @@ public:
|
||||
const wxBitmap& bitmap = wxNullBitmap,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
long style = wxDEFAULT_DIALOG_STYLE);
|
||||
%name(wxPreWizard)wxWizard();
|
||||
|
||||
%pragma(python) addtomethod = "__init__:self._setOORInfo(self)"
|
||||
%pragma(python) addtomethod = "wxPreWizard:val._setOORInfo(val)"
|
||||
%name(PreWizard)wxWizard();
|
||||
|
||||
bool Create(wxWindow *parent,
|
||||
int id = -1,
|
||||
@@ -384,10 +369,4 @@ public:
|
||||
%init %{
|
||||
%}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// This file gets appended to the shadow class file.
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
%pragma(python) include="_wizardextras.py";
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user