Various changes to reflect current CVS.

Added a separate wxRadioButton demo.
Various tweaks.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@17545 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2002-10-16 22:51:31 +00:00
parent a5b317c973
commit d73361fed5
18 changed files with 338 additions and 49 deletions

View File

@@ -326,6 +326,41 @@ static PyObject *_wrap_delete_wxXmlResource(PyObject *self, PyObject *args, PyOb
return _resultobj;
}
#define wxXmlResource_GetFirstRoot(_swigobj) (_swigobj->GetFirstRoot())
static PyObject *_wrap_wxXmlResource_GetFirstRoot(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxXmlNode * _result;
wxXmlResource * _arg0;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self", NULL };
char _ptemp[128];
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxXmlResource_GetFirstRoot",_kwnames,&_argo0))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxXmlResource_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxXmlResource_GetFirstRoot. Expected _wxXmlResource_p.");
return NULL;
}
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
_result = (wxXmlNode *)wxXmlResource_GetFirstRoot(_arg0);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
} if (_result) {
SWIG_MakePtr(_ptemp, (char *) _result,"_wxXmlNode_p");
_resultobj = Py_BuildValue("s",_ptemp);
} else {
Py_INCREF(Py_None);
_resultobj = Py_None;
}
return _resultobj;
}
#define wxXmlResource_Load(_swigobj,_swigarg0) (_swigobj->Load(_swigarg0))
static PyObject *_wrap_wxXmlResource_Load(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
@@ -5093,6 +5128,7 @@ static PyMethodDef xrccMethods[] = {
{ "wxXmlResource_InitAllHandlers", (PyCFunction) _wrap_wxXmlResource_InitAllHandlers, METH_VARARGS | METH_KEYWORDS },
{ "wxXmlResource_LoadFromString", (PyCFunction) _wrap_wxXmlResource_LoadFromString, METH_VARARGS | METH_KEYWORDS },
{ "wxXmlResource_Load", (PyCFunction) _wrap_wxXmlResource_Load, METH_VARARGS | METH_KEYWORDS },
{ "wxXmlResource_GetFirstRoot", (PyCFunction) _wrap_wxXmlResource_GetFirstRoot, METH_VARARGS | METH_KEYWORDS },
{ "delete_wxXmlResource", (PyCFunction) _wrap_delete_wxXmlResource, METH_VARARGS | METH_KEYWORDS },
{ "new_wxEmptyXmlResource", (PyCFunction) _wrap_new_wxEmptyXmlResource, METH_VARARGS | METH_KEYWORDS },
{ "new_wxXmlResource", (PyCFunction) _wrap_new_wxXmlResource, METH_VARARGS | METH_KEYWORDS },

View File

@@ -81,6 +81,10 @@ public:
~wxXmlResource();
// Gives access to the first root node for
// direct manipulation or querying
wxXmlNode *GetFirstRoot();
// Loads resources from XML files that match given filemask.
// This method understands VFS (see filesys.h).
bool Load(const wxString& filemask);

View File

@@ -59,6 +59,10 @@ class wxXmlResourcePtr(wxObjectPtr):
def __del__(self,xrcc=xrcc):
if self.thisown == 1 :
xrcc.delete_wxXmlResource(self)
def GetFirstRoot(self, *_args, **_kwargs):
val = apply(xrcc.wxXmlResource_GetFirstRoot,(self,) + _args, _kwargs)
if val: val = wxXmlNodePtr(val)
return val
def Load(self, *_args, **_kwargs):
val = apply(xrcc.wxXmlResource_Load,(self,) + _args, _kwargs)
return val

View File

@@ -25,19 +25,8 @@ import images
_treeList = [
# new stuff
('New since last release', [
'RowColSizer',
'Unicode',
'wxFileHistory',
'wxGenericDirCtrl',
'wxImageFromStream',
'wxArtProvider',
'ScrolledPanel',
'wxMenu',
'wxIEHtmlWin',
'wxKeyEvents',
'wxWizard',
'wxXmlResourceHandler',
'wxTimeCtrl',
'wxRadioButton',
]),
# managed windows == things with a caption you can close
@@ -89,6 +78,7 @@ _treeList = [
'wxNotebook',
'wxPopupWindow',
'wxRadioBox',
'wxRadioButton',
'wxSashWindow',
'wxSlider',
'wxScrolledWindow',

View File

@@ -3,10 +3,13 @@ from wxPython.wx import *
#---------------------------------------------------------------------------
RBOX1 = wxNewId()
RBOX2 = wxNewId()
RBUT1 = wxNewId()
RBUT2 = wxNewId()
RBUT3 = wxNewId()
RBUT4 = wxNewId()
RBOX1 = wxNewId()
RBOX2 = wxNewId()
class TestRadioButtons(wxPanel):
def __init__(self, parent, log):
@@ -33,15 +36,6 @@ class TestRadioButtons(wxPanel):
rb.SetToolTip(wxToolTip("This box has no label"))
sizer.Add(rb, 0, wxLEFT|wxRIGHT|wxBOTTOM, 20)
sizer.Add(wxStaticText(self, -1, "These are plain wxRadioButtons"),
0, wxLEFT|wxRIGHT, 20)
sizer.Add(wxRadioButton(self, RBUT1, "wxRadioButton 1"),
0, wxLEFT|wxRIGHT, 20)
sizer.Add(wxRadioButton(self, RBUT2, "wxRadioButton 2"),
0, wxLEFT|wxRIGHT, 20)
EVT_RADIOBUTTON(self, RBUT1, self.EvtRadioButton)
EVT_RADIOBUTTON(self, RBUT2, self.EvtRadioButton)
self.SetSizer(sizer)
@@ -49,7 +43,7 @@ class TestRadioButtons(wxPanel):
self.log.WriteText('EvtRadioBox: %d\n' % event.GetInt())
def EvtRadioButton(self, event):
self.log.write('EvtRadioButton:%d\n' % event.GetInt())
self.log.write('EvtRadioButton:%d\n' % event.GetId())
#---------------------------------------------------------------------------
@@ -57,21 +51,19 @@ def runTest(frame, nb, log):
win = TestRadioButtons(nb, log)
return win
#---------------------------------------------------------------------------
overview = """\
A radio box item is used to select one of number of mutually exclusive choices. It is displayed as a vertical column or horizontal row of labelled buttons.
A radio box item is used to select one of number of mutually exclusive
choices. It is displayed as a vertical column or horizontal row of
labelled buttons.
"""
if __name__ == '__main__':
import sys,os
import run
run.main(['', os.path.basename(sys.argv[0])])

View File

@@ -0,0 +1,118 @@
from wxPython.wx import *
#----------------------------------------------------------------------
class TestPanel( wxPanel ):
def __init__( self, parent, log ):
wxPanel.__init__( self, parent, -1 )
self.log = log
panel = wxPanel( self, -1 )
# 1st group of controls:
self.group1_ctrls = []
radio1 = wxRadioButton( panel, -1, "Radio1", style = wxRB_GROUP )
text1 = wxTextCtrl( panel, -1, "" )
radio2 = wxRadioButton( panel, -1, "Radio2" )
text2 = wxTextCtrl( panel, -1, "" )
radio3 = wxRadioButton( panel, -1, "Radio3" )
text3 = wxTextCtrl( panel, -1, "" )
self.group1_ctrls.append((radio1, text1))
self.group1_ctrls.append((radio2, text2))
self.group1_ctrls.append((radio3, text3))
# 2nd group of controls:
self.group2_ctrls = []
radio4 = wxRadioButton( panel, -1, "Radio1", style = wxRB_GROUP )
text4 = wxTextCtrl( panel, -1, "" )
radio5 = wxRadioButton( panel, -1, "Radio2" )
text5 = wxTextCtrl( panel, -1, "" )
radio6 = wxRadioButton( panel, -1, "Radio3" )
text6 = wxTextCtrl( panel, -1, "" )
self.group2_ctrls.append((radio4, text4))
self.group2_ctrls.append((radio5, text5))
self.group2_ctrls.append((radio6, text6))
# Layout controls on panel:
vs = wxBoxSizer( wxVERTICAL )
box1_title = wxStaticBox( panel, -1, "Group 1" )
box1 = wxStaticBoxSizer( box1_title, wxVERTICAL )
grid1 = wxFlexGridSizer( 0, 2, 0, 0 )
for radio, text in self.group1_ctrls:
grid1.AddWindow( radio, 0, wxALIGN_CENTRE|wxLEFT|wxRIGHT|wxTOP, 5 )
grid1.AddWindow( text, 0, wxALIGN_CENTRE|wxLEFT|wxRIGHT|wxTOP, 5 )
box1.AddSizer( grid1, 0, wxALIGN_CENTRE|wxALL, 5 )
vs.AddSizer( box1, 0, wxALIGN_CENTRE|wxALL, 5 )
box2_title = wxStaticBox( panel, -1, "Group 2" )
box2 = wxStaticBoxSizer( box2_title, wxVERTICAL )
grid2 = wxFlexGridSizer( 0, 2, 0, 0 )
for radio, text in self.group2_ctrls:
grid2.AddWindow( radio, 0, wxALIGN_CENTRE|wxLEFT|wxRIGHT|wxTOP, 5 )
grid2.AddWindow( text, 0, wxALIGN_CENTRE|wxLEFT|wxRIGHT|wxTOP, 5 )
box2.AddSizer( grid2, 0, wxALIGN_CENTRE|wxALL, 5 )
vs.AddSizer( box2, 0, wxALIGN_CENTRE|wxALL, 5 )
panel.SetSizer( vs )
vs.Fit( panel )
panel.Move( (50,50) )
self.panel = panel
# Setup event handling and initial state for controls:
for radio, text in self.group1_ctrls:
EVT_RADIOBUTTON( self, radio.GetId(), self.OnGroup1Select )
for radio, text in self.group2_ctrls:
EVT_RADIOBUTTON( self, radio.GetId(), self.OnGroup2Select )
for radio, text in self.group1_ctrls + self.group2_ctrls:
radio.SetValue(0)
text.Enable(FALSE)
def OnGroup1Select( self, event ):
radio_selected = event.GetEventObject()
self.log.write('Group1 %s selected\n' % radio_selected.GetLabel() )
for radio, text in self.group1_ctrls:
if radio is radio_selected:
text.Enable(TRUE)
else:
text.Enable(FALSE)
def OnGroup2Select( self, event ):
radio_selected = event.GetEventObject()
self.log.write('Group2 %s selected\n' % radio_selected.GetLabel() )
for radio, text in self.group2_ctrls:
if radio is radio_selected:
text.Enable(TRUE)
else:
text.Enable(FALSE)
#----------------------------------------------------------------------
def runTest( frame, nb, log ):
win = TestPanel( nb, log )
return win
#----------------------------------------------------------------------
overview = """
<html>
<P>
This demo shows how individual radio buttons can be used to build
more complicated selection mechanisms...
<P>
It uses 2 groups of wxRadioButtons, where the groups are defined by
instantiation. When a wxRadioButton is created with the <I>wxRB_GROUP</I>
style, all subsequent wxRadioButtons created without it are implicitly
added to that group by the framework.
"""
if __name__ == '__main__':
import sys,os
import run
run.main(['', os.path.basename(sys.argv[0])])

View File

@@ -176,6 +176,13 @@ if CORE_ONLY:
BUILD_DLLWIDGET = 0
BUILD_IEWIN = 0
if debug:
FINAL = 0
HYBRID = 0
if FINAL:
HYBRID = 0
if UNICODE and os.name != 'nt':
print "UNICODE is currently only supported on Win32"
@@ -203,13 +210,6 @@ if os.name == 'nt':
WXPLAT = '__WXMSW__'
GENDIR = 'msw'
if debug:
FINAL = 0
HYBRID = 0
if HYBRID:
FINAL = 0
includes = ['src',
opj(WXDIR, 'lib', 'mswdll' + libFlag()),
opj(WXDIR, 'include'),

View File

@@ -686,6 +686,9 @@ def wxCallAfter(callable, *args, **kw):
evt.kw = kw
wxPostEvent(app, evt)
# an alias
wxRunLater = wxCallAfter
#----------------------------------------------------------------------
class wxPyDeadObjectError(AttributeError):

View File

@@ -725,10 +725,14 @@ public:
'''Append an item to the list control. The entry parameter should be a
sequence with an item for each column'''
if len(entry):
if wx.wxUSE_UNICODE:
cvtfunc = unicode
else:
cvtfunc = str
pos = self.GetItemCount()
self.InsertStringItem(pos, str(entry[0]))
self.InsertStringItem(pos, cvtfunc(entry[0]))
for i in range(1, len(entry)):
self.SetStringItem(pos, i, str(entry[i]))
self.SetStringItem(pos, i, cvtfunc(entry[i]))
return pos
"

View File

@@ -418,6 +418,7 @@ public:
%name(SetWidthFloatFromTag)void SetWidthFloat(const wxHtmlTag& tag);
void SetMinHeight(int h, int align = wxHTML_ALIGN_TOP);
void SetBackgroundColour(const wxColour& clr);
wxColour GetBackgroundColour();
void SetBorder(const wxColour& clr1, const wxColour& clr2);
wxHtmlCell* GetFirstCell();
};
@@ -500,7 +501,7 @@ IMPLEMENT_ABSTRACT_CLASS(wxPyHtmlFilter, wxHtmlFilter);
// And now the version seen by SWIG
%name(wxHtmlFilter) class wxPyHtmlFilter : wxObject {
%name(wxHtmlFilter) class wxPyHtmlFilter : public wxObject {
public:
wxPyHtmlFilter();

View File

@@ -695,10 +695,14 @@ class wxListCtrlPtr(wxControlPtr):
'''Append an item to the list control. The entry parameter should be a
sequence with an item for each column'''
if len(entry):
if wx.wxUSE_UNICODE:
cvtfunc = unicode
else:
cvtfunc = str
pos = self.GetItemCount()
self.InsertStringItem(pos, str(entry[0]))
self.InsertStringItem(pos, cvtfunc(entry[0]))
for i in range(1, len(entry)):
self.SetStringItem(pos, i, str(entry[i]))
self.SetStringItem(pos, i, cvtfunc(entry[i]))
return pos
class wxListCtrl(wxListCtrlPtr):

View File

@@ -3792,6 +3792,36 @@ static PyObject *_wrap_wxHtmlContainerCell_SetBackgroundColour(PyObject *self, P
return _resultobj;
}
#define wxHtmlContainerCell_GetBackgroundColour(_swigobj) (_swigobj->GetBackgroundColour())
static PyObject *_wrap_wxHtmlContainerCell_GetBackgroundColour(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
wxColour * _result;
wxHtmlContainerCell * _arg0;
PyObject * _argo0 = 0;
char *_kwnames[] = { "self", NULL };
char _ptemp[128];
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxHtmlContainerCell_GetBackgroundColour",_kwnames,&_argo0))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxHtmlContainerCell_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxHtmlContainerCell_GetBackgroundColour. Expected _wxHtmlContainerCell_p.");
return NULL;
}
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
_result = new wxColour (wxHtmlContainerCell_GetBackgroundColour(_arg0));
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
} SWIG_MakePtr(_ptemp, (void *) _result,"_wxColour_p");
_resultobj = Py_BuildValue("s",_ptemp);
return _resultobj;
}
#define wxHtmlContainerCell_SetBorder(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetBorder(_swigarg0,_swigarg1))
static PyObject *_wrap_wxHtmlContainerCell_SetBorder(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
@@ -4025,6 +4055,14 @@ static PyObject *_wrap_new_wxHtmlWidgetCell(PyObject *self, PyObject *args, PyOb
return _resultobj;
}
static void *SwigwxPyHtmlFilterTowxObject(void *ptr) {
wxPyHtmlFilter *src;
wxObject *dest;
src = (wxPyHtmlFilter *) ptr;
dest = (wxObject *) src;
return (void *) dest;
}
#define new_wxHtmlFilter() (new wxPyHtmlFilter())
static PyObject *_wrap_new_wxHtmlFilter(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
@@ -6405,6 +6443,7 @@ static PyMethodDef htmlcMethods[] = {
{ "new_wxHtmlColourCell", (PyCFunction) _wrap_new_wxHtmlColourCell, METH_VARARGS | METH_KEYWORDS },
{ "wxHtmlContainerCell_GetFirstCell", (PyCFunction) _wrap_wxHtmlContainerCell_GetFirstCell, METH_VARARGS | METH_KEYWORDS },
{ "wxHtmlContainerCell_SetBorder", (PyCFunction) _wrap_wxHtmlContainerCell_SetBorder, METH_VARARGS | METH_KEYWORDS },
{ "wxHtmlContainerCell_GetBackgroundColour", (PyCFunction) _wrap_wxHtmlContainerCell_GetBackgroundColour, METH_VARARGS | METH_KEYWORDS },
{ "wxHtmlContainerCell_SetBackgroundColour", (PyCFunction) _wrap_wxHtmlContainerCell_SetBackgroundColour, METH_VARARGS | METH_KEYWORDS },
{ "wxHtmlContainerCell_SetMinHeight", (PyCFunction) _wrap_wxHtmlContainerCell_SetMinHeight, METH_VARARGS | METH_KEYWORDS },
{ "wxHtmlContainerCell_SetWidthFloatFromTag", (PyCFunction) _wrap_wxHtmlContainerCell_SetWidthFloatFromTag, METH_VARARGS | METH_KEYWORDS },
@@ -6575,6 +6614,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = {
{ "_wxObject","_wxHtmlPrintout",SwigwxHtmlPrintoutTowxObject},
{ "_wxObject","_wxHtmlDCRenderer",SwigwxHtmlDCRendererTowxObject},
{ "_wxObject","_wxPyHtmlWindow",SwigwxPyHtmlWindowTowxObject},
{ "_wxObject","_wxPyHtmlFilter",SwigwxPyHtmlFilterTowxObject},
{ "_wxObject","_wxHtmlWidgetCell",SwigwxHtmlWidgetCellTowxObject},
{ "_wxObject","_wxHtmlFontCell",SwigwxHtmlFontCellTowxObject},
{ "_wxObject","_wxHtmlColourCell",SwigwxHtmlColourCellTowxObject},

View File

@@ -450,6 +450,10 @@ class wxHtmlContainerCellPtr(wxHtmlCellPtr):
def SetBackgroundColour(self, *_args, **_kwargs):
val = apply(htmlc.wxHtmlContainerCell_SetBackgroundColour,(self,) + _args, _kwargs)
return val
def GetBackgroundColour(self, *_args, **_kwargs):
val = apply(htmlc.wxHtmlContainerCell_GetBackgroundColour,(self,) + _args, _kwargs)
if val: val = wxColourPtr(val) ; val.thisown = 1
return val
def SetBorder(self, *_args, **_kwargs):
val = apply(htmlc.wxHtmlContainerCell_SetBorder,(self,) + _args, _kwargs)
return val
@@ -509,7 +513,7 @@ class wxHtmlWidgetCell(wxHtmlWidgetCellPtr):
class wxHtmlFilterPtr :
class wxHtmlFilterPtr(wxObjectPtr):
def __init__(self,this):
self.this = this
self.thisown = 0

View File

@@ -2069,7 +2069,83 @@ static PyObject *_wrap_wxWizard_ShowPage(PyObject *self, PyObject *args, PyObjec
return _resultobj;
}
#define wxWizard_HasNextPage(_swigobj,_swigarg0) (_swigobj->HasNextPage(_swigarg0))
static PyObject *_wrap_wxWizard_HasNextPage(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
bool _result;
wxWizard * _arg0;
wxWizardPage * _arg1;
PyObject * _argo0 = 0;
PyObject * _argo1 = 0;
char *_kwnames[] = { "self","page", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxWizard_HasNextPage",_kwnames,&_argo0,&_argo1))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWizard_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWizard_HasNextPage. Expected _wxWizard_p.");
return NULL;
}
}
if (_argo1) {
if (_argo1 == Py_None) { _arg1 = NULL; }
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWizardPage_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxWizard_HasNextPage. Expected _wxWizardPage_p.");
return NULL;
}
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
_result = (bool )wxWizard_HasNextPage(_arg0,_arg1);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
} _resultobj = Py_BuildValue("i",_result);
return _resultobj;
}
#define wxWizard_HasPrevPage(_swigobj,_swigarg0) (_swigobj->HasPrevPage(_swigarg0))
static PyObject *_wrap_wxWizard_HasPrevPage(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject * _resultobj;
bool _result;
wxWizard * _arg0;
wxWizardPage * _arg1;
PyObject * _argo0 = 0;
PyObject * _argo1 = 0;
char *_kwnames[] = { "self","page", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxWizard_HasPrevPage",_kwnames,&_argo0,&_argo1))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWizard_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWizard_HasPrevPage. Expected _wxWizard_p.");
return NULL;
}
}
if (_argo1) {
if (_argo1 == Py_None) { _arg1 = NULL; }
else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWizardPage_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxWizard_HasPrevPage. Expected _wxWizardPage_p.");
return NULL;
}
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
_result = (bool )wxWizard_HasPrevPage(_arg0,_arg1);
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
} _resultobj = Py_BuildValue("i",_result);
return _resultobj;
}
static PyMethodDef wizardcMethods[] = {
{ "wxWizard_HasPrevPage", (PyCFunction) _wrap_wxWizard_HasPrevPage, METH_VARARGS | METH_KEYWORDS },
{ "wxWizard_HasNextPage", (PyCFunction) _wrap_wxWizard_HasNextPage, METH_VARARGS | METH_KEYWORDS },
{ "wxWizard_ShowPage", (PyCFunction) _wrap_wxWizard_ShowPage, METH_VARARGS | METH_KEYWORDS },
{ "wxWizard_IsRunning", (PyCFunction) _wrap_wxWizard_IsRunning, METH_VARARGS | METH_KEYWORDS },
{ "wxWizard_FitToPage", (PyCFunction) _wrap_wxWizard_FitToPage, METH_VARARGS | METH_KEYWORDS },

View File

@@ -226,6 +226,12 @@ class wxWizardPtr(wxDialogPtr):
def ShowPage(self, *_args, **_kwargs):
val = apply(wizardc.wxWizard_ShowPage,(self,) + _args, _kwargs)
return val
def HasNextPage(self, *_args, **_kwargs):
val = apply(wizardc.wxWizard_HasNextPage,(self,) + _args, _kwargs)
return val
def HasPrevPage(self, *_args, **_kwargs):
val = apply(wizardc.wxWizard_HasPrevPage,(self,) + _args, _kwargs)
return val
def __repr__(self):
return "<C wxWizard instance at %s>" % (self.this,)
class wxWizard(wxWizardPtr):

View File

@@ -1632,6 +1632,9 @@ def wxCallAfter(callable, *args, **kw):
evt.kw = kw
wxPostEvent(app, evt)
# an alias
wxRunLater = wxCallAfter
#----------------------------------------------------------------------
class wxPyDeadObjectError(AttributeError):

View File

@@ -361,6 +361,9 @@ public:
// page first and return FALSE without changing the page if
// TransferDataFromWindow() returns FALSE - otherwise, returns TRUE
bool ShowPage(wxWizardPage *page, bool goingForward = TRUE);
bool HasNextPage(wxWizardPage* page);
bool HasPrevPage(wxWizardPage* page);
};

View File

@@ -101,6 +101,7 @@ class wxGenStaticText(wxPyControl):
width, height = self.GetClientSize()
dc = wxBufferedPaintDC(self)
dc.SetBackground(wxBrush(self.GetBackgroundColour(), wxSOLID))
dc.SetTextForeground(self.GetForegroundColour())
dc.Clear()
dc.SetFont(self.GetFont())
label = self.GetLabel()