From: Robin Dunn Date: Thu, 27 Sep 2001 02:11:47 +0000 (+0000) Subject: Various updates, changes for wxTopLevelWindow, fixes for X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/ecc08ead918856a70559204f9b5daacc49385eaa Various updates, changes for wxTopLevelWindow, fixes for wxPen.SetDashes, etc. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11710 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/wxPython/demo/wxOGL.py b/wxPython/demo/wxOGL.py index a13bee893a..c9e5f69917 100644 --- a/wxPython/demo/wxOGL.py +++ b/wxPython/demo/wxOGL.py @@ -196,6 +196,13 @@ class TestWindow(wxShapeCanvas): self.diagram.Destroy() + def OnBeginDragLeft(self, x, y, keys): + self.log.write("OnBeginDragLeft: %s, %s, %s\n" % (x, y, keys)) + + def OnEndDragLeft(self, x, y, keys): + self.log.write("OnEndDragLeft: %s, %s, %s\n" % (x, y, keys)) + + #---------------------------------------------------------------------- def runTest(frame, nb, log): diff --git a/wxPython/demo/wxScrolledWindow.py b/wxPython/demo/wxScrolledWindow.py index c3163fcaa7..ca1f8f6619 100644 --- a/wxPython/demo/wxScrolledWindow.py +++ b/wxPython/demo/wxScrolledWindow.py @@ -89,6 +89,8 @@ class MyCanvas(wxScrolledWindow): pen = wxPen("DARK ORCHID", 1, style) if style == wxUSER_DASH: pen.SetDashes([0, 1, 2, 3, 4, 5, 6, 7, 8]) + pen.SetColour("RED") + dc.SetPen(pen) dc.DrawLine(300, y, 400, y) y = y + 10 diff --git a/wxPython/demo/wxTreeCtrl.py b/wxPython/demo/wxTreeCtrl.py index eff938a684..03a346d05f 100644 --- a/wxPython/demo/wxTreeCtrl.py +++ b/wxPython/demo/wxTreeCtrl.py @@ -34,16 +34,16 @@ class TestTreeCtrlPanel(wxPanel): , self.log) - #import images - #il = wxImageList(16, 16) - #idx1 = il.Add(images.getSmilesBitmap()) - #idx2 = il.Add(images.getOpenBitmap()) - #idx3 = il.Add(images.getNewBitmap()) - #idx4 = il.Add(images.getCopyBitmap()) - #idx5 = il.Add(images.getPasteBitmap()) + ##import images + ##il = wxImageList(16, 16) + ##idx1 = il.Add(images.getSmilesBitmap()) + ##idx2 = il.Add(images.getOpenBitmap()) + ##idx3 = il.Add(images.getNewBitmap()) + ##idx4 = il.Add(images.getCopyBitmap()) + ##idx5 = il.Add(images.getPasteBitmap()) - #self.tree.SetImageList(il) - #self.il = il + ##self.tree.SetImageList(il) + ##self.il = il # NOTE: For some reason tree items have to have a data object in # order to be sorted. Since our compare just uses the labels @@ -51,18 +51,18 @@ class TestTreeCtrlPanel(wxPanel): self.root = self.tree.AddRoot("The Root Item") self.tree.SetPyData(self.root, None) - #self.tree.SetItemImage(self.root, idx1) + ##self.tree.SetItemImage(self.root, idx1) for x in range(15): child = self.tree.AppendItem(self.root, "Item %d" % x) self.tree.SetPyData(child, None) - #self.tree.SetItemImage(child, idx2) - #self.tree.SetItemSelectedImage(child, idx3) + ##self.tree.SetItemImage(child, idx2, wxTreeItemIcon_Expanded) + ##self.tree.SetItemSelectedImage(child, idx3) for y in range(5): last = self.tree.AppendItem(child, "item %d-%s" % (x, chr(ord("a")+y))) self.tree.SetPyData(last, None) - #self.tree.SetItemImage(last, idx4) - #self.tree.SetItemSelectedImage(last, idx5) + ##self.tree.SetItemImage(last, idx4) + ##self.tree.SetItemSelectedImage(last, idx5) for z in range(5): item = self.tree.AppendItem(last, "item %d-%s-%d" % (x, chr(ord("a")+y), z)) self.tree.SetPyData(item, None) diff --git a/wxPython/src/_defs.i b/wxPython/src/_defs.i index 905c7d0ce3..e148c21622 100644 --- a/wxPython/src/_defs.i +++ b/wxPython/src/_defs.i @@ -468,6 +468,19 @@ enum { wxWS_EX_VALIDATE_RECURSIVELY, + + // Mapping modes (as per Windows) + wxMM_TEXT, + wxMM_LOMETRIC, + wxMM_HIMETRIC, + wxMM_LOENGLISH, + wxMM_HIENGLISH, + wxMM_TWIPS, + wxMM_ISOTROPIC, + wxMM_ANISOTROPIC, + wxMM_POINTS, + wxMM_METRIC, + }; diff --git a/wxPython/src/_extras.py b/wxPython/src/_extras.py index 01c385eeb5..cc7b8ce623 100644 --- a/wxPython/src/_extras.py +++ b/wxPython/src/_extras.py @@ -579,7 +579,7 @@ NULL = None # For backwards compatibility only. You should really be wxColor = wxColour wxNamedColor = wxNamedColour - +wxPen = wxPyPen # backwards compatibility wxNoRefBitmap = wxBitmap diff --git a/wxPython/src/controls2.i b/wxPython/src/controls2.i index 8090773f39..11e599148c 100644 --- a/wxPython/src/controls2.i +++ b/wxPython/src/controls2.i @@ -985,6 +985,7 @@ public: wxTreeItemId GetItem(); wxTreeItemId GetOldItem(); wxPoint GetPoint(); + const wxKeyEvent& GetKeyEvent(); int GetCode(); const wxString& GetLabel(); }; diff --git a/wxPython/src/frames.i b/wxPython/src/frames.i index 86c9ad7fe6..f115e7f05a 100644 --- a/wxPython/src/frames.i +++ b/wxPython/src/frames.i @@ -41,11 +41,73 @@ enum { wxFULLSCREEN_NOSTATUSBAR, wxFULLSCREEN_NOBORDER, wxFULLSCREEN_NOCAPTION, - wxFULLSCREEN_ALL + wxFULLSCREEN_ALL, + + wxTOPLEVEL_EX_DIALOG, +}; + + +//---------------------------------------------------------------------- + + +class wxTopLevelWindow : public wxWindow +{ +public: + // construction + wxTopLevelWindow(wxWindow *parent, + wxWindowID id, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_FRAME_STYLE, + const char* name = "frame"); + %name(wxPreTopLevelWindow)wxTopLevelWindow(); + + bool Create(wxWindow *parent, + wxWindowID id, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_FRAME_STYLE, + const char* name = "frame"); + + + // maximize = TRUE => maximize, otherwise - restore + virtual void Maximize(bool maximize = TRUE); + + // undo Maximize() or Iconize() + virtual void Restore(); + + // iconize = TRUE => iconize, otherwise - restore + virtual void Iconize(bool iconize = TRUE); + + // return TRUE if the frame is maximized + virtual bool IsMaximized() const; + + // return TRUE if the frame is iconized + virtual bool IsIconized() const; + + // get the frame icon + const wxIcon& GetIcon() const; + + // set the frame icon + virtual void SetIcon(const wxIcon& icon); + + + // maximize the window to cover entire screen + virtual bool ShowFullScreen(bool show, long style = wxFULLSCREEN_ALL); + + // return TRUE if the frame is in fullscreen mode + virtual bool IsFullScreen() const; + + virtual void SetTitle(const wxString& title); + virtual wxString GetTitle() const; }; +//---------------------------------------------------------------------- -class wxFrame : public wxWindow { + +class wxFrame : public wxTopLevelWindow { public: wxFrame(wxWindow* parent, const wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, @@ -60,41 +122,82 @@ public: long style = wxDEFAULT_FRAME_STYLE, char* name = "frame"); - void Centre(int direction = wxBOTH); + wxPoint GetClientAreaOrigin(); + + void SetMenuBar(wxMenuBar *menubar); + wxMenuBar *GetMenuBar(); + + + // call this to simulate a menu command + bool Command(int id); + + // process menu command: returns TRUE if processed + bool ProcessCommand(int id); + + // create the main status bar wxStatusBar* CreateStatusBar(int number = 1, long style = wxST_SIZEGRIP, wxWindowID id = -1, char* name = "statusBar"); - wxToolBar* CreateToolBar(long style = wxNO_BORDER|wxTB_HORIZONTAL|wxTB_FLAT, - wxWindowID id = -1, - char* name = "toolBar"); - - const wxIcon& GetIcon(); - wxMenuBar* GetMenuBar(); - wxStatusBar* GetStatusBar(); - wxString GetTitle(); - wxToolBar* GetToolBar(); - void Iconize(bool iconize); - bool IsIconized(); - void Maximize(bool maximize); - bool IsMaximized(); - void Restore(); - void SetAcceleratorTable(const wxAcceleratorTable& accel); - void SetIcon(const wxIcon& icon); - void SetMenuBar(wxMenuBar* menuBar); - void SetStatusBar(wxStatusBar *statusBar); - void SetStatusText(const wxString& text, int number = 0); - void SetStatusWidths(int LCOUNT, int* choices); // uses typemap - void SetTitle(const wxString& title); - void SetToolBar(wxToolBar* toolbar); - void MakeModal(bool modal = TRUE); - wxPoint GetClientAreaOrigin() const; - bool Command(int id); - bool ProcessCommand(int id); - bool ShowFullScreen(bool show, long style = wxFULLSCREEN_ALL); - bool IsFullScreen(); + + // get the main status bar + wxStatusBar *GetStatusBar(); + + // sets the main status bar + void SetStatusBar(wxStatusBar *statBar); + + // forward these to status bar + virtual void SetStatusText(const wxString &text, int number = 0); + virtual void SetStatusWidths(int LCOUNT, int* choices); // uses typemap + + + // create main toolbar + virtual wxToolBar* CreateToolBar(long style = wxNO_BORDER|wxTB_HORIZONTAL, + wxWindowID id = -1, + const char* name = "toolBar"); + + // get/set the main toolbar + virtual wxToolBar *GetToolBar() const { return m_frameToolBar; } + virtual void SetToolBar(wxToolBar *toolbar) { m_frameToolBar = toolbar; } + +}; + +//--------------------------------------------------------------------------- + +class wxDialog : public wxTopLevelWindow { +public: + wxDialog(wxWindow* parent, + const wxWindowID id, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_DIALOG_STYLE, + const char* name = "dialogBox"); + %name(wxPreDialog)wxDialog(); + + bool Create(wxWindow* parent, + const wxWindowID id, + const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_DIALOG_STYLE, + const char* name = "dialogBox"); + + void Centre(int direction = wxBOTH); + void EndModal(int retCode); + void SetModal(bool flag); + bool IsModal(); + int ShowModal(); + + int GetReturnCode(); + void SetReturnCode(int retCode); + + wxSizer* CreateTextSizer( const wxString &message ); + wxSizer* CreateButtonSizer( long flags ); + }; + //--------------------------------------------------------------------------- class wxMiniFrame : public wxFrame { diff --git a/wxPython/src/gdi.i b/wxPython/src/gdi.i index ffcb6744b3..f80dd7e1ca 100644 --- a/wxPython/src/gdi.i +++ b/wxPython/src/gdi.i @@ -87,8 +87,8 @@ public: #endif wxBitmap GetSubBitmap( const wxRect& rect ); -#ifdef __WXMSW__ bool CopyFromIcon(const wxIcon& icon); +#ifdef __WXMSW__ bool CopyFromCursor(const wxCursor& cursor); int GetQuality(); void SetQuality(int q); @@ -598,7 +598,6 @@ public: //---------------------------------------------------------------------- - class wxPen : public wxGDIObject { public: wxPen(wxColour& colour, int width=1, int style=wxSOLID); @@ -618,7 +617,7 @@ public: void SetWidth(int width); // **** This one needs to return a list of ints (wxDash) - int GetDashes(wxDash **dashes); + //int GetDashes(wxDash **dashes); void SetDashes(int LCOUNT, wxDash* choices); #ifdef __WXMSW__ @@ -628,6 +627,42 @@ public: }; + +%{ +class wxPyPen : public wxPen { +public: + wxPyPen(wxColour& colour, int width=1, int style=wxSOLID) + : wxPen(colour, width, style) + { m_dash = NULL; } + ~wxPyPen() { + if (m_dash) + delete m_dash; + } + + void SetDashes(int nb_dashes, const wxDash *dash) { + m_dash = new wxDash[nb_dashes]; + for (int i=0; i= 1009 + if (! PyString_Check(o) && ! PyUnicode_Check(o)) { + PyErr_SetString(PyExc_TypeError, "Expected a list of string or unicode objects."); + return NULL; + } + + char* buff; + int length; + if (PyString_AsStringAndSize(o, &buff, &length) == -1) + return NULL; + temp[x] = wxString(buff, length); +#else if (! PyString_Check(o)) { PyErr_SetString(PyExc_TypeError, "Expected a list of strings."); return NULL; } temp[x] = PyString_AsString(o); +#endif } return temp; } diff --git a/wxPython/src/msw/controls2.cpp b/wxPython/src/msw/controls2.cpp index 8dd9848ba1..f8f918fc9a 100644 --- a/wxPython/src/msw/controls2.cpp +++ b/wxPython/src/msw/controls2.cpp @@ -6586,6 +6586,42 @@ static PyObject *_wrap_wxTreeEvent_GetPoint(PyObject *self, PyObject *args, PyOb return _resultobj; } +#define wxTreeEvent_GetKeyEvent(_swigobj) (_swigobj->GetKeyEvent()) +static PyObject *_wrap_wxTreeEvent_GetKeyEvent(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxKeyEvent * _result; + wxTreeEvent * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTreeEvent_GetKeyEvent",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTreeEvent_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTreeEvent_GetKeyEvent. Expected _wxTreeEvent_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + const wxKeyEvent & _result_ref = wxTreeEvent_GetKeyEvent(_arg0); + _result = (wxKeyEvent *) &_result_ref; + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxKeyEvent_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + #define wxTreeEvent_GetCode(_swigobj) (_swigobj->GetCode()) static PyObject *_wrap_wxTreeEvent_GetCode(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -9722,6 +9758,7 @@ static PyMethodDef controls2cMethods[] = { { "new_wxTreeCtrl", (PyCFunction) _wrap_new_wxTreeCtrl, METH_VARARGS | METH_KEYWORDS }, { "wxTreeEvent_GetLabel", (PyCFunction) _wrap_wxTreeEvent_GetLabel, METH_VARARGS | METH_KEYWORDS }, { "wxTreeEvent_GetCode", (PyCFunction) _wrap_wxTreeEvent_GetCode, METH_VARARGS | METH_KEYWORDS }, + { "wxTreeEvent_GetKeyEvent", (PyCFunction) _wrap_wxTreeEvent_GetKeyEvent, METH_VARARGS | METH_KEYWORDS }, { "wxTreeEvent_GetPoint", (PyCFunction) _wrap_wxTreeEvent_GetPoint, METH_VARARGS | METH_KEYWORDS }, { "wxTreeEvent_GetOldItem", (PyCFunction) _wrap_wxTreeEvent_GetOldItem, METH_VARARGS | METH_KEYWORDS }, { "wxTreeEvent_GetItem", (PyCFunction) _wrap_wxTreeEvent_GetItem, METH_VARARGS | METH_KEYWORDS }, diff --git a/wxPython/src/msw/controls2.py b/wxPython/src/msw/controls2.py index b9c67e124c..0a83b3438f 100644 --- a/wxPython/src/msw/controls2.py +++ b/wxPython/src/msw/controls2.py @@ -838,6 +838,10 @@ class wxTreeEventPtr(wxNotifyEventPtr): val = apply(controls2c.wxTreeEvent_GetPoint,(self,) + _args, _kwargs) if val: val = wxPointPtr(val) ; val.thisown = 1 return val + def GetKeyEvent(self, *_args, **_kwargs): + val = apply(controls2c.wxTreeEvent_GetKeyEvent,(self,) + _args, _kwargs) + if val: val = wxKeyEventPtr(val) + return val def GetCode(self, *_args, **_kwargs): val = apply(controls2c.wxTreeEvent_GetCode,(self,) + _args, _kwargs) return val diff --git a/wxPython/src/msw/frames.cpp b/wxPython/src/msw/frames.cpp index 8883e08fa5..00289c36bc 100644 --- a/wxPython/src/msw/frames.cpp +++ b/wxPython/src/msw/frames.cpp @@ -94,34 +94,34 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { #ifdef __cplusplus extern "C" { #endif -static void *SwigwxFrameTowxWindow(void *ptr) { - wxFrame *src; +static void *SwigwxTopLevelWindowTowxWindow(void *ptr) { + wxTopLevelWindow *src; wxWindow *dest; - src = (wxFrame *) ptr; + src = (wxTopLevelWindow *) ptr; dest = (wxWindow *) src; return (void *) dest; } -static void *SwigwxFrameTowxEvtHandler(void *ptr) { - wxFrame *src; +static void *SwigwxTopLevelWindowTowxEvtHandler(void *ptr) { + wxTopLevelWindow *src; wxEvtHandler *dest; - src = (wxFrame *) ptr; + src = (wxTopLevelWindow *) ptr; dest = (wxEvtHandler *) src; return (void *) dest; } -static void *SwigwxFrameTowxObject(void *ptr) { - wxFrame *src; +static void *SwigwxTopLevelWindowTowxObject(void *ptr) { + wxTopLevelWindow *src; wxObject *dest; - src = (wxFrame *) ptr; + src = (wxTopLevelWindow *) ptr; dest = (wxObject *) src; return (void *) dest; } -#define new_wxFrame(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6) (new wxFrame(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6)) -static PyObject *_wrap_new_wxFrame(PyObject *self, PyObject *args, PyObject *kwargs) { +#define new_wxTopLevelWindow(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6) (new wxTopLevelWindow(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6)) +static PyObject *_wrap_new_wxTopLevelWindow(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxFrame * _result; + wxTopLevelWindow * _result; wxWindow * _arg0; wxWindowID _arg1; wxString * _arg2; @@ -139,12 +139,12 @@ static PyObject *_wrap_new_wxFrame(PyObject *self, PyObject *args, PyObject *kwa char _ptemp[128]; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiO|OOls:new_wxFrame",_kwnames,&_argo0,&_arg1,&_obj2,&_obj3,&_obj4,&_arg5,&_arg6)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiO|OOls:new_wxTopLevelWindow",_kwnames,&_argo0,&_arg1,&_obj2,&_obj3,&_obj4,&_arg5,&_arg6)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxFrame. Expected _wxWindow_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxTopLevelWindow. Expected _wxWindow_p."); return NULL; } } @@ -180,12 +180,12 @@ static PyObject *_wrap_new_wxFrame(PyObject *self, PyObject *args, PyObject *kwa } { wxPy_BEGIN_ALLOW_THREADS; - _result = (wxFrame *)new_wxFrame(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,_arg6); + _result = (wxTopLevelWindow *)new_wxTopLevelWindow(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,_arg6); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; } if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxFrame_p"); + SWIG_MakePtr(_ptemp, (char *) _result,"_wxTopLevelWindow_p"); _resultobj = Py_BuildValue("s",_ptemp); } else { Py_INCREF(Py_None); @@ -198,24 +198,24 @@ static PyObject *_wrap_new_wxFrame(PyObject *self, PyObject *args, PyObject *kwa return _resultobj; } -#define new_wxPreFrame() (new wxFrame()) -static PyObject *_wrap_new_wxPreFrame(PyObject *self, PyObject *args, PyObject *kwargs) { +#define new_wxPreTopLevelWindow() (new wxTopLevelWindow()) +static PyObject *_wrap_new_wxPreTopLevelWindow(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxFrame * _result; + wxTopLevelWindow * _result; char *_kwnames[] = { NULL }; char _ptemp[128]; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPreFrame",_kwnames)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPreTopLevelWindow",_kwnames)) return NULL; { wxPy_BEGIN_ALLOW_THREADS; - _result = (wxFrame *)new_wxPreFrame(); + _result = (wxTopLevelWindow *)new_wxPreTopLevelWindow(); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; } if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxFrame_p"); + SWIG_MakePtr(_ptemp, (char *) _result,"_wxTopLevelWindow_p"); _resultobj = Py_BuildValue("s",_ptemp); } else { Py_INCREF(Py_None); @@ -224,11 +224,11 @@ static PyObject *_wrap_new_wxPreFrame(PyObject *self, PyObject *args, PyObject * return _resultobj; } -#define wxFrame_Create(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6) (_swigobj->Create(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6)) -static PyObject *_wrap_wxFrame_Create(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxTopLevelWindow_Create(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6) (_swigobj->Create(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6)) +static PyObject *_wrap_wxTopLevelWindow_Create(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; bool _result; - wxFrame * _arg0; + wxTopLevelWindow * _arg0; wxWindow * _arg1; wxWindowID _arg2; wxString * _arg3; @@ -246,19 +246,19 @@ static PyObject *_wrap_wxFrame_Create(PyObject *self, PyObject *args, PyObject * char *_kwnames[] = { "self","parent","id","title","pos","size","style","name", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOiO|OOls:wxFrame_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_obj5,&_arg6,&_arg7)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOiO|OOls:wxTopLevelWindow_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_obj5,&_arg6,&_arg7)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFrame_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFrame_Create. Expected _wxFrame_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTopLevelWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTopLevelWindow_Create. Expected _wxTopLevelWindow_p."); return NULL; } } if (_argo1) { if (_argo1 == Py_None) { _arg1 = NULL; } else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxFrame_Create. Expected _wxWindow_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTopLevelWindow_Create. Expected _wxWindow_p."); return NULL; } } @@ -294,7 +294,7 @@ static PyObject *_wrap_wxFrame_Create(PyObject *self, PyObject *args, PyObject * } { wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxFrame_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,_arg7); + _result = (bool )wxTopLevelWindow_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,_arg7); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; @@ -306,27 +306,29 @@ static PyObject *_wrap_wxFrame_Create(PyObject *self, PyObject *args, PyObject * return _resultobj; } -#define wxFrame_Centre(_swigobj,_swigarg0) (_swigobj->Centre(_swigarg0)) -static PyObject *_wrap_wxFrame_Centre(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxTopLevelWindow_Maximize(_swigobj,_swigarg0) (_swigobj->Maximize(_swigarg0)) +static PyObject *_wrap_wxTopLevelWindow_Maximize(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxFrame * _arg0; - int _arg1 = (int ) wxBOTH; + wxTopLevelWindow * _arg0; + bool _arg1 = (bool ) TRUE; PyObject * _argo0 = 0; - char *_kwnames[] = { "self","direction", NULL }; + int tempbool1 = (int) TRUE; + char *_kwnames[] = { "self","maximize", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxFrame_Centre",_kwnames,&_argo0,&_arg1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxTopLevelWindow_Maximize",_kwnames,&_argo0,&tempbool1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFrame_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFrame_Centre. Expected _wxFrame_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTopLevelWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTopLevelWindow_Maximize. Expected _wxTopLevelWindow_p."); return NULL; } } + _arg1 = (bool ) tempbool1; { wxPy_BEGIN_ALLOW_THREADS; - wxFrame_Centre(_arg0,_arg1); + wxTopLevelWindow_Maximize(_arg0,_arg1); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; @@ -335,360 +337,939 @@ static PyObject *_wrap_wxFrame_Centre(PyObject *self, PyObject *args, PyObject * return _resultobj; } -#define wxFrame_CreateStatusBar(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->CreateStatusBar(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) -static PyObject *_wrap_wxFrame_CreateStatusBar(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxTopLevelWindow_Restore(_swigobj) (_swigobj->Restore()) +static PyObject *_wrap_wxTopLevelWindow_Restore(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxStatusBar * _result; - wxFrame * _arg0; - int _arg1 = (int ) 1; - long _arg2 = (long ) wxST_SIZEGRIP; - wxWindowID _arg3 = (wxWindowID ) -1; - char * _arg4 = (char *) "statusBar"; + wxTopLevelWindow * _arg0; PyObject * _argo0 = 0; - char *_kwnames[] = { "self","number","style","id","name", NULL }; + char *_kwnames[] = { "self", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|ilis:wxFrame_CreateStatusBar",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3,&_arg4)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTopLevelWindow_Restore",_kwnames,&_argo0)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFrame_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFrame_CreateStatusBar. Expected _wxFrame_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTopLevelWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTopLevelWindow_Restore. Expected _wxTopLevelWindow_p."); return NULL; } } { wxPy_BEGIN_ALLOW_THREADS; - _result = (wxStatusBar *)wxFrame_CreateStatusBar(_arg0,_arg1,_arg2,_arg3,_arg4); + wxTopLevelWindow_Restore(_arg0); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -}{ _resultobj = wxPyMake_wxObject(_result); } +} Py_INCREF(Py_None); + _resultobj = Py_None; return _resultobj; } -#define wxFrame_CreateToolBar(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->CreateToolBar(_swigarg0,_swigarg1,_swigarg2)) -static PyObject *_wrap_wxFrame_CreateToolBar(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxTopLevelWindow_Iconize(_swigobj,_swigarg0) (_swigobj->Iconize(_swigarg0)) +static PyObject *_wrap_wxTopLevelWindow_Iconize(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxToolBar * _result; - wxFrame * _arg0; - long _arg1 = (long ) wxNO_BORDER|wxTB_HORIZONTAL|wxTB_FLAT; - wxWindowID _arg2 = (wxWindowID ) -1; - char * _arg3 = (char *) "toolBar"; + wxTopLevelWindow * _arg0; + bool _arg1 = (bool ) TRUE; PyObject * _argo0 = 0; - char *_kwnames[] = { "self","style","id","name", NULL }; + int tempbool1 = (int) TRUE; + char *_kwnames[] = { "self","iconize", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|lis:wxFrame_CreateToolBar",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxTopLevelWindow_Iconize",_kwnames,&_argo0,&tempbool1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFrame_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFrame_CreateToolBar. Expected _wxFrame_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTopLevelWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTopLevelWindow_Iconize. Expected _wxTopLevelWindow_p."); return NULL; } } + _arg1 = (bool ) tempbool1; { wxPy_BEGIN_ALLOW_THREADS; - _result = (wxToolBar *)wxFrame_CreateToolBar(_arg0,_arg1,_arg2,_arg3); + wxTopLevelWindow_Iconize(_arg0,_arg1); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -}{ _resultobj = wxPyMake_wxObject(_result); } +} Py_INCREF(Py_None); + _resultobj = Py_None; return _resultobj; } -#define wxFrame_GetIcon(_swigobj) (_swigobj->GetIcon()) -static PyObject *_wrap_wxFrame_GetIcon(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxTopLevelWindow_IsMaximized(_swigobj) (_swigobj->IsMaximized()) +static PyObject *_wrap_wxTopLevelWindow_IsMaximized(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxIcon * _result; - wxFrame * _arg0; + bool _result; + wxTopLevelWindow * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFrame_GetIcon",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTopLevelWindow_IsMaximized",_kwnames,&_argo0)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFrame_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFrame_GetIcon. Expected _wxFrame_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTopLevelWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTopLevelWindow_IsMaximized. Expected _wxTopLevelWindow_p."); return NULL; } } { wxPy_BEGIN_ALLOW_THREADS; - const wxIcon & _result_ref = wxFrame_GetIcon(_arg0); - _result = (wxIcon *) &_result_ref; + _result = (bool )wxTopLevelWindow_IsMaximized(_arg0); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxIcon_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +} _resultobj = Py_BuildValue("i",_result); return _resultobj; } -#define wxFrame_GetMenuBar(_swigobj) (_swigobj->GetMenuBar()) -static PyObject *_wrap_wxFrame_GetMenuBar(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxTopLevelWindow_IsIconized(_swigobj) (_swigobj->IsIconized()) +static PyObject *_wrap_wxTopLevelWindow_IsIconized(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxMenuBar * _result; - wxFrame * _arg0; + bool _result; + wxTopLevelWindow * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFrame_GetMenuBar",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTopLevelWindow_IsIconized",_kwnames,&_argo0)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFrame_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFrame_GetMenuBar. Expected _wxFrame_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTopLevelWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTopLevelWindow_IsIconized. Expected _wxTopLevelWindow_p."); return NULL; } } { wxPy_BEGIN_ALLOW_THREADS; - _result = (wxMenuBar *)wxFrame_GetMenuBar(_arg0); + _result = (bool )wxTopLevelWindow_IsIconized(_arg0); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -}{ _resultobj = wxPyMake_wxObject(_result); } +} _resultobj = Py_BuildValue("i",_result); return _resultobj; } -#define wxFrame_GetStatusBar(_swigobj) (_swigobj->GetStatusBar()) -static PyObject *_wrap_wxFrame_GetStatusBar(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxTopLevelWindow_GetIcon(_swigobj) (_swigobj->GetIcon()) +static PyObject *_wrap_wxTopLevelWindow_GetIcon(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxStatusBar * _result; - wxFrame * _arg0; + wxIcon * _result; + wxTopLevelWindow * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFrame_GetStatusBar",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTopLevelWindow_GetIcon",_kwnames,&_argo0)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFrame_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFrame_GetStatusBar. Expected _wxFrame_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTopLevelWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTopLevelWindow_GetIcon. Expected _wxTopLevelWindow_p."); return NULL; } } { wxPy_BEGIN_ALLOW_THREADS; - _result = (wxStatusBar *)wxFrame_GetStatusBar(_arg0); + const wxIcon & _result_ref = wxTopLevelWindow_GetIcon(_arg0); + _result = (wxIcon *) &_result_ref; wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -}{ _resultobj = wxPyMake_wxObject(_result); } +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxIcon_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } return _resultobj; } -#define wxFrame_GetTitle(_swigobj) (_swigobj->GetTitle()) -static PyObject *_wrap_wxFrame_GetTitle(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxTopLevelWindow_SetIcon(_swigobj,_swigarg0) (_swigobj->SetIcon(_swigarg0)) +static PyObject *_wrap_wxTopLevelWindow_SetIcon(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxString * _result; - wxFrame * _arg0; + wxTopLevelWindow * _arg0; + wxIcon * _arg1; PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","icon", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFrame_GetTitle",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxTopLevelWindow_SetIcon",_kwnames,&_argo0,&_argo1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFrame_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFrame_GetTitle. Expected _wxFrame_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTopLevelWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTopLevelWindow_SetIcon. Expected _wxTopLevelWindow_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxIcon_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxTopLevelWindow_SetIcon. Expected _wxIcon_p."); return NULL; } } { wxPy_BEGIN_ALLOW_THREADS; - _result = new wxString (wxFrame_GetTitle(_arg0)); + wxTopLevelWindow_SetIcon(_arg0,*_arg1); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -}{ - _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); -} -{ - delete _result; -} +} Py_INCREF(Py_None); + _resultobj = Py_None; return _resultobj; } -#define wxFrame_GetToolBar(_swigobj) (_swigobj->GetToolBar()) -static PyObject *_wrap_wxFrame_GetToolBar(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxTopLevelWindow_SetTitle(_swigobj,_swigarg0) (_swigobj->SetTitle(_swigarg0)) +static PyObject *_wrap_wxTopLevelWindow_SetTitle(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxToolBar * _result; - wxFrame * _arg0; + wxTopLevelWindow * _arg0; + wxString * _arg1; PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","title", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFrame_GetToolBar",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxTopLevelWindow_SetTitle",_kwnames,&_argo0,&_obj1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFrame_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFrame_GetToolBar. Expected _wxFrame_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTopLevelWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTopLevelWindow_SetTitle. Expected _wxTopLevelWindow_p."); return NULL; } } { - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxToolBar *)wxFrame_GetToolBar(_arg0); - - wxPy_END_ALLOW_THREADS; - if (PyErr_Occurred()) return NULL; -}{ _resultobj = wxPyMake_wxObject(_result); } - return _resultobj; -} - -#define wxFrame_Iconize(_swigobj,_swigarg0) (_swigobj->Iconize(_swigarg0)) -static PyObject *_wrap_wxFrame_Iconize(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxFrame * _arg0; - bool _arg1; - PyObject * _argo0 = 0; - int tempbool1; - char *_kwnames[] = { "self","iconize", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxFrame_Iconize",_kwnames,&_argo0,&tempbool1)) +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFrame_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFrame_Iconize. Expected _wxFrame_p."); + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; - } } - _arg1 = (bool ) tempbool1; + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} { wxPy_BEGIN_ALLOW_THREADS; - wxFrame_Iconize(_arg0,_arg1); + wxTopLevelWindow_SetTitle(_arg0,*_arg1); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; +{ + if (_obj1) + delete _arg1; +} return _resultobj; } -#define wxFrame_IsIconized(_swigobj) (_swigobj->IsIconized()) -static PyObject *_wrap_wxFrame_IsIconized(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxTopLevelWindow_GetTitle(_swigobj) (_swigobj->GetTitle()) +static PyObject *_wrap_wxTopLevelWindow_GetTitle(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - bool _result; - wxFrame * _arg0; + wxString * _result; + wxTopLevelWindow * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFrame_IsIconized",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxTopLevelWindow_GetTitle",_kwnames,&_argo0)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFrame_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFrame_IsIconized. Expected _wxFrame_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxTopLevelWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxTopLevelWindow_GetTitle. Expected _wxTopLevelWindow_p."); return NULL; } } { wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxFrame_IsIconized(_arg0); + _result = new wxString (wxTopLevelWindow_GetTitle(_arg0)); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} _resultobj = Py_BuildValue("i",_result); +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} return _resultobj; } -#define wxFrame_Maximize(_swigobj,_swigarg0) (_swigobj->Maximize(_swigarg0)) -static PyObject *_wrap_wxFrame_Maximize(PyObject *self, PyObject *args, PyObject *kwargs) { +static void *SwigwxFrameTowxTopLevelWindow(void *ptr) { + wxFrame *src; + wxTopLevelWindow *dest; + src = (wxFrame *) ptr; + dest = (wxTopLevelWindow *) src; + return (void *) dest; +} + +static void *SwigwxFrameTowxWindow(void *ptr) { + wxFrame *src; + wxWindow *dest; + src = (wxFrame *) ptr; + dest = (wxWindow *) src; + return (void *) dest; +} + +static void *SwigwxFrameTowxEvtHandler(void *ptr) { + wxFrame *src; + wxEvtHandler *dest; + src = (wxFrame *) ptr; + dest = (wxEvtHandler *) src; + return (void *) dest; +} + +static void *SwigwxFrameTowxObject(void *ptr) { + wxFrame *src; + wxObject *dest; + src = (wxFrame *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + +#define new_wxFrame(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6) (new wxFrame(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6)) +static PyObject *_wrap_new_wxFrame(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxFrame * _arg0; - bool _arg1; + wxFrame * _result; + wxWindow * _arg0; + wxWindowID _arg1; + wxString * _arg2; + wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg4 = (wxSize *) &wxDefaultSize; + long _arg5 = (long ) wxDEFAULT_FRAME_STYLE; + char * _arg6 = (char *) "frame"; PyObject * _argo0 = 0; - int tempbool1; - char *_kwnames[] = { "self","maximize", NULL }; + PyObject * _obj2 = 0; + wxPoint temp; + PyObject * _obj3 = 0; + wxSize temp0; + PyObject * _obj4 = 0; + char *_kwnames[] = { "parent","id","title","pos","size","style","name", NULL }; + char _ptemp[128]; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxFrame_Maximize",_kwnames,&_argo0,&tempbool1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiO|OOls:new_wxFrame",_kwnames,&_argo0,&_arg1,&_obj2,&_obj3,&_obj4,&_arg5,&_arg6)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFrame_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFrame_Maximize. Expected _wxFrame_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxFrame. Expected _wxWindow_p."); return NULL; } } - _arg1 = (bool ) tempbool1; { - wxPy_BEGIN_ALLOW_THREADS; - wxFrame_Maximize(_arg0,_arg1); +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif +} + if (_obj3) +{ + _arg3 = &temp; + if (! wxPoint_helper(_obj3, &_arg3)) + return NULL; +} + if (_obj4) +{ + _arg4 = &temp0; + if (! wxSize_helper(_obj4, &_arg4)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxFrame *)new_wxFrame(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,_arg6); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxFrame_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } +{ + if (_obj2) + delete _arg2; +} + return _resultobj; +} + +#define new_wxPreFrame() (new wxFrame()) +static PyObject *_wrap_new_wxPreFrame(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFrame * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPreFrame",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxFrame *)new_wxPreFrame(); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxFrame_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxFrame_Create(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6) (_swigobj->Create(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6)) +static PyObject *_wrap_wxFrame_Create(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxFrame * _arg0; + wxWindow * _arg1; + wxWindowID _arg2; + wxString * _arg3; + wxPoint * _arg4 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg5 = (wxSize *) &wxDefaultSize; + long _arg6 = (long ) wxDEFAULT_FRAME_STYLE; + char * _arg7 = (char *) "frame"; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + PyObject * _obj3 = 0; + wxPoint temp; + PyObject * _obj4 = 0; + wxSize temp0; + PyObject * _obj5 = 0; + char *_kwnames[] = { "self","parent","id","title","pos","size","style","name", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOiO|OOls:wxFrame_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_obj5,&_arg6,&_arg7)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFrame_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFrame_Create. Expected _wxFrame_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxFrame_Create. Expected _wxWindow_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg3 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj3)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); +#endif +} + if (_obj4) +{ + _arg4 = &temp; + if (! wxPoint_helper(_obj4, &_arg4)) + return NULL; +} + if (_obj5) +{ + _arg5 = &temp0; + if (! wxSize_helper(_obj5, &_arg5)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxFrame_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,_arg7); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); +{ + if (_obj3) + delete _arg3; +} + return _resultobj; +} + +#define wxFrame_GetClientAreaOrigin(_swigobj) (_swigobj->GetClientAreaOrigin()) +static PyObject *_wrap_wxFrame_GetClientAreaOrigin(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPoint * _result; + wxFrame * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFrame_GetClientAreaOrigin",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFrame_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFrame_GetClientAreaOrigin. Expected _wxFrame_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = new wxPoint (wxFrame_GetClientAreaOrigin(_arg0)); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} SWIG_MakePtr(_ptemp, (void *) _result,"_wxPoint_p"); + _resultobj = Py_BuildValue("s",_ptemp); + return _resultobj; +} + +#define wxFrame_SetMenuBar(_swigobj,_swigarg0) (_swigobj->SetMenuBar(_swigarg0)) +static PyObject *_wrap_wxFrame_SetMenuBar(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFrame * _arg0; + wxMenuBar * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","menubar", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFrame_SetMenuBar",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFrame_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFrame_SetMenuBar. Expected _wxFrame_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxMenuBar_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxFrame_SetMenuBar. Expected _wxMenuBar_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxFrame_SetMenuBar(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxFrame_GetMenuBar(_swigobj) (_swigobj->GetMenuBar()) +static PyObject *_wrap_wxFrame_GetMenuBar(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxMenuBar * _result; + wxFrame * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFrame_GetMenuBar",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFrame_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFrame_GetMenuBar. Expected _wxFrame_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxMenuBar *)wxFrame_GetMenuBar(_arg0); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +}{ _resultobj = wxPyMake_wxObject(_result); } + return _resultobj; +} + +#define wxFrame_Command(_swigobj,_swigarg0) (_swigobj->Command(_swigarg0)) +static PyObject *_wrap_wxFrame_Command(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxFrame * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","id", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxFrame_Command",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFrame_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFrame_Command. Expected _wxFrame_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxFrame_Command(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxFrame_ProcessCommand(_swigobj,_swigarg0) (_swigobj->ProcessCommand(_swigarg0)) +static PyObject *_wrap_wxFrame_ProcessCommand(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxFrame * _arg0; + int _arg1; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","id", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxFrame_ProcessCommand",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFrame_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFrame_ProcessCommand. Expected _wxFrame_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxFrame_ProcessCommand(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxFrame_CreateStatusBar(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->CreateStatusBar(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) +static PyObject *_wrap_wxFrame_CreateStatusBar(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStatusBar * _result; + wxFrame * _arg0; + int _arg1 = (int ) 1; + long _arg2 = (long ) wxST_SIZEGRIP; + wxWindowID _arg3 = (wxWindowID ) -1; + char * _arg4 = (char *) "statusBar"; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","number","style","id","name", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|ilis:wxFrame_CreateStatusBar",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3,&_arg4)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFrame_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFrame_CreateStatusBar. Expected _wxFrame_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxStatusBar *)wxFrame_CreateStatusBar(_arg0,_arg1,_arg2,_arg3,_arg4); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +}{ _resultobj = wxPyMake_wxObject(_result); } + return _resultobj; +} + +#define wxFrame_GetStatusBar(_swigobj) (_swigobj->GetStatusBar()) +static PyObject *_wrap_wxFrame_GetStatusBar(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxStatusBar * _result; + wxFrame * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFrame_GetStatusBar",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFrame_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFrame_GetStatusBar. Expected _wxFrame_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxStatusBar *)wxFrame_GetStatusBar(_arg0); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +}{ _resultobj = wxPyMake_wxObject(_result); } + return _resultobj; +} + +#define wxFrame_SetStatusBar(_swigobj,_swigarg0) (_swigobj->SetStatusBar(_swigarg0)) +static PyObject *_wrap_wxFrame_SetStatusBar(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFrame * _arg0; + wxStatusBar * _arg1; + PyObject * _argo0 = 0; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","statBar", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFrame_SetStatusBar",_kwnames,&_argo0,&_argo1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFrame_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFrame_SetStatusBar. Expected _wxFrame_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxStatusBar_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxFrame_SetStatusBar. Expected _wxStatusBar_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxFrame_SetStatusBar(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxFrame_SetStatusText(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetStatusText(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxFrame_SetStatusText(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFrame * _arg0; + wxString * _arg1; + int _arg2 = (int ) 0; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","text","number", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|i:wxFrame_SetStatusText",_kwnames,&_argo0,&_obj1,&_arg2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFrame_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFrame_SetStatusText. Expected _wxFrame_p."); + return NULL; + } + } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxFrame_SetStatusText(_arg0,*_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + if (_obj1) + delete _arg1; +} + return _resultobj; +} + +#define wxFrame_SetStatusWidths(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetStatusWidths(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxFrame_SetStatusWidths(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFrame * _arg0; + int _arg1; + int * _arg2; + PyObject * _argo0 = 0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","choices", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFrame_SetStatusWidths",_kwnames,&_argo0,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFrame_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFrame_SetStatusWidths. Expected _wxFrame_p."); + return NULL; + } + } + if (_obj2) +{ + _arg2 = int_LIST_helper(_obj2); + if (_arg2 == NULL) { + return NULL; + } +} +{ + if (_obj2) { + _arg1 = PyList_Size(_obj2); + } + else { + _arg1 = 0; + } +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxFrame_SetStatusWidths(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + delete [] _arg2; +} + return _resultobj; +} + +#define wxFrame_CreateToolBar(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->CreateToolBar(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_wxFrame_CreateToolBar(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxToolBar * _result; + wxFrame * _arg0; + long _arg1 = (long ) wxNO_BORDER|wxTB_HORIZONTAL; + wxWindowID _arg2 = (wxWindowID ) -1; + char * _arg3 = (char *) "toolBar"; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","style","id","name", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|lis:wxFrame_CreateToolBar",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFrame_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFrame_CreateToolBar. Expected _wxFrame_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxToolBar *)wxFrame_CreateToolBar(_arg0,_arg1,_arg2,_arg3); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} Py_INCREF(Py_None); - _resultobj = Py_None; +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } -#define wxFrame_IsMaximized(_swigobj) (_swigobj->IsMaximized()) -static PyObject *_wrap_wxFrame_IsMaximized(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxFrame_GetToolBar(_swigobj) (_swigobj->GetToolBar()) +static PyObject *_wrap_wxFrame_GetToolBar(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - bool _result; + wxToolBar * _result; wxFrame * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFrame_IsMaximized",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFrame_GetToolBar",_kwnames,&_argo0)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFrame_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFrame_IsMaximized. Expected _wxFrame_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFrame_GetToolBar. Expected _wxFrame_p."); return NULL; } } { wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxFrame_IsMaximized(_arg0); + _result = (wxToolBar *)wxFrame_GetToolBar(_arg0); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} _resultobj = Py_BuildValue("i",_result); +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } -#define wxFrame_Restore(_swigobj) (_swigobj->Restore()) -static PyObject *_wrap_wxFrame_Restore(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxFrame_SetToolBar(_swigobj,_swigarg0) (_swigobj->SetToolBar(_swigarg0)) +static PyObject *_wrap_wxFrame_SetToolBar(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxFrame * _arg0; + wxToolBar * _arg1; PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; + PyObject * _argo1 = 0; + char *_kwnames[] = { "self","toolbar", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFrame_Restore",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFrame_SetToolBar",_kwnames,&_argo0,&_argo1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFrame_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFrame_Restore. Expected _wxFrame_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFrame_SetToolBar. Expected _wxFrame_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxToolBar_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxFrame_SetToolBar. Expected _wxToolBar_p."); return NULL; } } { wxPy_BEGIN_ALLOW_THREADS; - wxFrame_Restore(_arg0); + wxFrame_SetToolBar(_arg0,_arg1); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; @@ -697,72 +1278,86 @@ static PyObject *_wrap_wxFrame_Restore(PyObject *self, PyObject *args, PyObject return _resultobj; } -#define wxFrame_SetAcceleratorTable(_swigobj,_swigarg0) (_swigobj->SetAcceleratorTable(_swigarg0)) -static PyObject *_wrap_wxFrame_SetAcceleratorTable(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxFrame_ShowFullScreen(_swigobj,_swigarg0,_swigarg1) (_swigobj->ShowFullScreen(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxFrame_ShowFullScreen(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; + bool _result; wxFrame * _arg0; - wxAcceleratorTable * _arg1; + bool _arg1; + long _arg2 = (long ) (wxFULLSCREEN_ALL); PyObject * _argo0 = 0; - PyObject * _argo1 = 0; - char *_kwnames[] = { "self","accel", NULL }; + int tempbool1; + char *_kwnames[] = { "self","show","style", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFrame_SetAcceleratorTable",_kwnames,&_argo0,&_argo1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|l:wxFrame_ShowFullScreen",_kwnames,&_argo0,&tempbool1,&_arg2)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFrame_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFrame_SetAcceleratorTable. Expected _wxFrame_p."); - return NULL; - } - } - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxAcceleratorTable_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxFrame_SetAcceleratorTable. Expected _wxAcceleratorTable_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFrame_ShowFullScreen. Expected _wxFrame_p."); return NULL; } } + _arg1 = (bool ) tempbool1; { wxPy_BEGIN_ALLOW_THREADS; - wxFrame_SetAcceleratorTable(_arg0,*_arg1); + _result = (bool )wxFrame_ShowFullScreen(_arg0,_arg1,_arg2); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} Py_INCREF(Py_None); - _resultobj = Py_None; +} _resultobj = Py_BuildValue("i",_result); return _resultobj; } -#define wxFrame_SetIcon(_swigobj,_swigarg0) (_swigobj->SetIcon(_swigarg0)) -static PyObject *_wrap_wxFrame_SetIcon(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxFrame_IsFullScreen(_swigobj) (_swigobj->IsFullScreen()) +static PyObject *_wrap_wxFrame_IsFullScreen(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; + bool _result; wxFrame * _arg0; - wxIcon * _arg1; PyObject * _argo0 = 0; - PyObject * _argo1 = 0; - char *_kwnames[] = { "self","icon", NULL }; + char *_kwnames[] = { "self", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFrame_SetIcon",_kwnames,&_argo0,&_argo1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFrame_IsFullScreen",_kwnames,&_argo0)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFrame_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFrame_SetIcon. Expected _wxFrame_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFrame_IsFullScreen. Expected _wxFrame_p."); return NULL; } } - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxIcon_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxFrame_SetIcon. Expected _wxIcon_p."); +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxFrame_IsFullScreen(_arg0); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + +#define wxFrame_Raise(_swigobj) (_swigobj->Raise()) +static PyObject *_wrap_wxFrame_Raise(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxFrame * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFrame_Raise",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFrame_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFrame_Raise. Expected _wxFrame_p."); return NULL; } } { wxPy_BEGIN_ALLOW_THREADS; - wxFrame_SetIcon(_arg0,*_arg1); + wxFrame_Raise(_arg0); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; @@ -771,35 +1366,35 @@ static PyObject *_wrap_wxFrame_SetIcon(PyObject *self, PyObject *args, PyObject return _resultobj; } -#define wxFrame_SetMenuBar(_swigobj,_swigarg0) (_swigobj->SetMenuBar(_swigarg0)) -static PyObject *_wrap_wxFrame_SetMenuBar(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxFrame_SetAcceleratorTable(_swigobj,_swigarg0) (_swigobj->SetAcceleratorTable(_swigarg0)) +static PyObject *_wrap_wxFrame_SetAcceleratorTable(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxFrame * _arg0; - wxMenuBar * _arg1; + wxAcceleratorTable * _arg1; PyObject * _argo0 = 0; PyObject * _argo1 = 0; - char *_kwnames[] = { "self","menuBar", NULL }; + char *_kwnames[] = { "self","accel", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFrame_SetMenuBar",_kwnames,&_argo0,&_argo1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFrame_SetAcceleratorTable",_kwnames,&_argo0,&_argo1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFrame_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFrame_SetMenuBar. Expected _wxFrame_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFrame_SetAcceleratorTable. Expected _wxFrame_p."); return NULL; } } if (_argo1) { if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxMenuBar_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxFrame_SetMenuBar. Expected _wxMenuBar_p."); + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxAcceleratorTable_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxFrame_SetAcceleratorTable. Expected _wxAcceleratorTable_p."); return NULL; } } { wxPy_BEGIN_ALLOW_THREADS; - wxFrame_SetMenuBar(_arg0,_arg1); + wxFrame_SetAcceleratorTable(_arg0,*_arg1); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; @@ -808,226 +1403,338 @@ static PyObject *_wrap_wxFrame_SetMenuBar(PyObject *self, PyObject *args, PyObje return _resultobj; } -#define wxFrame_SetStatusBar(_swigobj,_swigarg0) (_swigobj->SetStatusBar(_swigarg0)) -static PyObject *_wrap_wxFrame_SetStatusBar(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxFrame_MakeModal(_swigobj,_swigarg0) (_swigobj->MakeModal(_swigarg0)) +static PyObject *_wrap_wxFrame_MakeModal(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxFrame * _arg0; - wxStatusBar * _arg1; + bool _arg1 = (bool ) TRUE; PyObject * _argo0 = 0; - PyObject * _argo1 = 0; - char *_kwnames[] = { "self","statusBar", NULL }; + int tempbool1 = (int) TRUE; + char *_kwnames[] = { "self","modal", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFrame_SetStatusBar",_kwnames,&_argo0,&_argo1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxFrame_MakeModal",_kwnames,&_argo0,&tempbool1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFrame_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFrame_SetStatusBar. Expected _wxFrame_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFrame_MakeModal. Expected _wxFrame_p."); return NULL; } } - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxStatusBar_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxFrame_SetStatusBar. Expected _wxStatusBar_p."); + _arg1 = (bool ) tempbool1; +{ + wxPy_BEGIN_ALLOW_THREADS; + wxFrame_MakeModal(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +static void *SwigwxDialogTowxTopLevelWindow(void *ptr) { + wxDialog *src; + wxTopLevelWindow *dest; + src = (wxDialog *) ptr; + dest = (wxTopLevelWindow *) src; + return (void *) dest; +} + +static void *SwigwxDialogTowxWindow(void *ptr) { + wxDialog *src; + wxWindow *dest; + src = (wxDialog *) ptr; + dest = (wxWindow *) src; + return (void *) dest; +} + +static void *SwigwxDialogTowxEvtHandler(void *ptr) { + wxDialog *src; + wxEvtHandler *dest; + src = (wxDialog *) ptr; + dest = (wxEvtHandler *) src; + return (void *) dest; +} + +static void *SwigwxDialogTowxObject(void *ptr) { + wxDialog *src; + wxObject *dest; + src = (wxDialog *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + +#define new_wxDialog(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6) (new wxDialog(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6)) +static PyObject *_wrap_new_wxDialog(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDialog * _result; + wxWindow * _arg0; + wxWindowID _arg1; + wxString * _arg2; + wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg4 = (wxSize *) &wxDefaultSize; + long _arg5 = (long ) wxDEFAULT_DIALOG_STYLE; + char * _arg6 = (char *) "dialogBox"; + PyObject * _argo0 = 0; + PyObject * _obj2 = 0; + wxPoint temp; + PyObject * _obj3 = 0; + wxSize temp0; + PyObject * _obj4 = 0; + char *_kwnames[] = { "parent","id","title","pos","size","style","name", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiO|OOls:new_wxDialog",_kwnames,&_argo0,&_arg1,&_obj2,&_obj3,&_obj4,&_arg5,&_arg6)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxDialog. Expected _wxWindow_p."); return NULL; } } +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg2 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj2)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); +#endif +} + if (_obj3) +{ + _arg3 = &temp; + if (! wxPoint_helper(_obj3, &_arg3)) + return NULL; +} + if (_obj4) +{ + _arg4 = &temp0; + if (! wxSize_helper(_obj4, &_arg4)) + return NULL; +} { wxPy_BEGIN_ALLOW_THREADS; - wxFrame_SetStatusBar(_arg0,_arg1); + _result = (wxDialog *)new_wxDialog(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,_arg6); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} Py_INCREF(Py_None); - _resultobj = Py_None; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxDialog_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } +{ + if (_obj2) + delete _arg2; +} return _resultobj; } -#define wxFrame_SetStatusText(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetStatusText(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxFrame_SetStatusText(PyObject *self, PyObject *args, PyObject *kwargs) { +#define new_wxPreDialog() (new wxDialog()) +static PyObject *_wrap_new_wxPreDialog(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxFrame * _arg0; - wxString * _arg1; - int _arg2 = (int ) 0; + wxDialog * _result; + char *_kwnames[] = { NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPreDialog",_kwnames)) + return NULL; +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxDialog *)new_wxPreDialog(); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxDialog_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define wxDialog_Create(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6) (_swigobj->Create(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6)) +static PyObject *_wrap_wxDialog_Create(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxDialog * _arg0; + wxWindow * _arg1; + wxWindowID _arg2; + wxString * _arg3; + wxPoint * _arg4 = (wxPoint *) &wxDefaultPosition; + wxSize * _arg5 = (wxSize *) &wxDefaultSize; + long _arg6 = (long ) wxDEFAULT_DIALOG_STYLE; + char * _arg7 = (char *) "dialogBox"; PyObject * _argo0 = 0; - PyObject * _obj1 = 0; - char *_kwnames[] = { "self","text","number", NULL }; + PyObject * _argo1 = 0; + PyObject * _obj3 = 0; + wxPoint temp; + PyObject * _obj4 = 0; + wxSize temp0; + PyObject * _obj5 = 0; + char *_kwnames[] = { "self","parent","id","title","pos","size","style","name", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO|i:wxFrame_SetStatusText",_kwnames,&_argo0,&_obj1,&_arg2)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOiO|OOls:wxDialog_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_obj5,&_arg6,&_arg7)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFrame_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFrame_SetStatusText. Expected _wxFrame_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDialog_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDialog_Create. Expected _wxDialog_p."); + return NULL; + } + } + if (_argo1) { + if (_argo1 == Py_None) { _arg1 = NULL; } + else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDialog_Create. Expected _wxWindow_p."); return NULL; } } { #if PYTHON_API_VERSION >= 1009 char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); + _arg3 = new wxString(tmpPtr, tmpSize); #else - if (!PyString_Check(_obj1)) { + if (!PyString_Check(_obj3)) { PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); return NULL; } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); + _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); #endif +} + if (_obj4) +{ + _arg4 = &temp; + if (! wxPoint_helper(_obj4, &_arg4)) + return NULL; +} + if (_obj5) +{ + _arg5 = &temp0; + if (! wxSize_helper(_obj5, &_arg5)) + return NULL; } { wxPy_BEGIN_ALLOW_THREADS; - wxFrame_SetStatusText(_arg0,*_arg1,_arg2); + _result = (bool )wxDialog_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,_arg7); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} Py_INCREF(Py_None); - _resultobj = Py_None; +} _resultobj = Py_BuildValue("i",_result); { - if (_obj1) - delete _arg1; + if (_obj3) + delete _arg3; } return _resultobj; } -#define wxFrame_SetStatusWidths(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetStatusWidths(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxFrame_SetStatusWidths(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxDialog_Centre(_swigobj,_swigarg0) (_swigobj->Centre(_swigarg0)) +static PyObject *_wrap_wxDialog_Centre(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxFrame * _arg0; - int _arg1; - int * _arg2; + wxDialog * _arg0; + int _arg1 = (int ) wxBOTH; PyObject * _argo0 = 0; - PyObject * _obj2 = 0; - char *_kwnames[] = { "self","choices", NULL }; + char *_kwnames[] = { "self","direction", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFrame_SetStatusWidths",_kwnames,&_argo0,&_obj2)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxDialog_Centre",_kwnames,&_argo0,&_arg1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFrame_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFrame_SetStatusWidths. Expected _wxFrame_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDialog_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDialog_Centre. Expected _wxDialog_p."); return NULL; } } - if (_obj2) -{ - _arg2 = int_LIST_helper(_obj2); - if (_arg2 == NULL) { - return NULL; - } -} -{ - if (_obj2) { - _arg1 = PyList_Size(_obj2); - } - else { - _arg1 = 0; - } -} { wxPy_BEGIN_ALLOW_THREADS; - wxFrame_SetStatusWidths(_arg0,_arg1,_arg2); + wxDialog_Centre(_arg0,_arg1); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; -{ - delete [] _arg2; -} return _resultobj; } -#define wxFrame_SetTitle(_swigobj,_swigarg0) (_swigobj->SetTitle(_swigarg0)) -static PyObject *_wrap_wxFrame_SetTitle(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxDialog_EndModal(_swigobj,_swigarg0) (_swigobj->EndModal(_swigarg0)) +static PyObject *_wrap_wxDialog_EndModal(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxFrame * _arg0; - wxString * _arg1; + wxDialog * _arg0; + int _arg1; PyObject * _argo0 = 0; - PyObject * _obj1 = 0; - char *_kwnames[] = { "self","title", NULL }; + char *_kwnames[] = { "self","retCode", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFrame_SetTitle",_kwnames,&_argo0,&_obj1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxDialog_EndModal",_kwnames,&_argo0,&_arg1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFrame_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFrame_SetTitle. Expected _wxFrame_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDialog_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDialog_EndModal. Expected _wxDialog_p."); return NULL; } } -{ -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif -} { wxPy_BEGIN_ALLOW_THREADS; - wxFrame_SetTitle(_arg0,*_arg1); + wxDialog_EndModal(_arg0,_arg1); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; } Py_INCREF(Py_None); _resultobj = Py_None; -{ - if (_obj1) - delete _arg1; -} return _resultobj; } -#define wxFrame_SetToolBar(_swigobj,_swigarg0) (_swigobj->SetToolBar(_swigarg0)) -static PyObject *_wrap_wxFrame_SetToolBar(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxDialog_SetModal(_swigobj,_swigarg0) (_swigobj->SetModal(_swigarg0)) +static PyObject *_wrap_wxDialog_SetModal(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxFrame * _arg0; - wxToolBar * _arg1; + wxDialog * _arg0; + bool _arg1; PyObject * _argo0 = 0; - PyObject * _argo1 = 0; - char *_kwnames[] = { "self","toolbar", NULL }; + int tempbool1; + char *_kwnames[] = { "self","flag", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxFrame_SetToolBar",_kwnames,&_argo0,&_argo1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxDialog_SetModal",_kwnames,&_argo0,&tempbool1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFrame_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFrame_SetToolBar. Expected _wxFrame_p."); - return NULL; - } - } - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxToolBar_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxFrame_SetToolBar. Expected _wxToolBar_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDialog_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDialog_SetModal. Expected _wxDialog_p."); return NULL; } } + _arg1 = (bool ) tempbool1; { wxPy_BEGIN_ALLOW_THREADS; - wxFrame_SetToolBar(_arg0,_arg1); + wxDialog_SetModal(_arg0,_arg1); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; @@ -1036,89 +1743,83 @@ static PyObject *_wrap_wxFrame_SetToolBar(PyObject *self, PyObject *args, PyObje return _resultobj; } -#define wxFrame_MakeModal(_swigobj,_swigarg0) (_swigobj->MakeModal(_swigarg0)) -static PyObject *_wrap_wxFrame_MakeModal(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxDialog_IsModal(_swigobj) (_swigobj->IsModal()) +static PyObject *_wrap_wxDialog_IsModal(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxFrame * _arg0; - bool _arg1 = (bool ) TRUE; + bool _result; + wxDialog * _arg0; PyObject * _argo0 = 0; - int tempbool1 = (int) TRUE; - char *_kwnames[] = { "self","modal", NULL }; + char *_kwnames[] = { "self", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxFrame_MakeModal",_kwnames,&_argo0,&tempbool1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxDialog_IsModal",_kwnames,&_argo0)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFrame_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFrame_MakeModal. Expected _wxFrame_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDialog_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDialog_IsModal. Expected _wxDialog_p."); return NULL; } } - _arg1 = (bool ) tempbool1; { wxPy_BEGIN_ALLOW_THREADS; - wxFrame_MakeModal(_arg0,_arg1); + _result = (bool )wxDialog_IsModal(_arg0); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} Py_INCREF(Py_None); - _resultobj = Py_None; +} _resultobj = Py_BuildValue("i",_result); return _resultobj; } -#define wxFrame_GetClientAreaOrigin(_swigobj) (_swigobj->GetClientAreaOrigin()) -static PyObject *_wrap_wxFrame_GetClientAreaOrigin(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxDialog_ShowModal(_swigobj) (_swigobj->ShowModal()) +static PyObject *_wrap_wxDialog_ShowModal(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - wxPoint * _result; - wxFrame * _arg0; + int _result; + wxDialog * _arg0; PyObject * _argo0 = 0; char *_kwnames[] = { "self", NULL }; - char _ptemp[128]; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFrame_GetClientAreaOrigin",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxDialog_ShowModal",_kwnames,&_argo0)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFrame_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFrame_GetClientAreaOrigin. Expected _wxFrame_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDialog_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDialog_ShowModal. Expected _wxDialog_p."); return NULL; } } { wxPy_BEGIN_ALLOW_THREADS; - _result = new wxPoint (wxFrame_GetClientAreaOrigin(_arg0)); + _result = (int )wxDialog_ShowModal(_arg0); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} SWIG_MakePtr(_ptemp, (void *) _result,"_wxPoint_p"); - _resultobj = Py_BuildValue("s",_ptemp); +} _resultobj = Py_BuildValue("i",_result); return _resultobj; } -#define wxFrame_Command(_swigobj,_swigarg0) (_swigobj->Command(_swigarg0)) -static PyObject *_wrap_wxFrame_Command(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxDialog_GetReturnCode(_swigobj) (_swigobj->GetReturnCode()) +static PyObject *_wrap_wxDialog_GetReturnCode(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - bool _result; - wxFrame * _arg0; - int _arg1; + int _result; + wxDialog * _arg0; PyObject * _argo0 = 0; - char *_kwnames[] = { "self","id", NULL }; + char *_kwnames[] = { "self", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxFrame_Command",_kwnames,&_argo0,&_arg1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxDialog_GetReturnCode",_kwnames,&_argo0)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFrame_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFrame_Command. Expected _wxFrame_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDialog_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDialog_GetReturnCode. Expected _wxDialog_p."); return NULL; } } { wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxFrame_Command(_arg0,_arg1); + _result = (int )wxDialog_GetReturnCode(_arg0); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; @@ -1126,92 +1827,113 @@ static PyObject *_wrap_wxFrame_Command(PyObject *self, PyObject *args, PyObject return _resultobj; } -#define wxFrame_ProcessCommand(_swigobj,_swigarg0) (_swigobj->ProcessCommand(_swigarg0)) -static PyObject *_wrap_wxFrame_ProcessCommand(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxDialog_SetReturnCode(_swigobj,_swigarg0) (_swigobj->SetReturnCode(_swigarg0)) +static PyObject *_wrap_wxDialog_SetReturnCode(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - bool _result; - wxFrame * _arg0; + wxDialog * _arg0; int _arg1; PyObject * _argo0 = 0; - char *_kwnames[] = { "self","id", NULL }; + char *_kwnames[] = { "self","retCode", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxFrame_ProcessCommand",_kwnames,&_argo0,&_arg1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxDialog_SetReturnCode",_kwnames,&_argo0,&_arg1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFrame_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFrame_ProcessCommand. Expected _wxFrame_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDialog_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDialog_SetReturnCode. Expected _wxDialog_p."); return NULL; } } { wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxFrame_ProcessCommand(_arg0,_arg1); + wxDialog_SetReturnCode(_arg0,_arg1); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} _resultobj = Py_BuildValue("i",_result); +} Py_INCREF(Py_None); + _resultobj = Py_None; return _resultobj; } -#define wxFrame_ShowFullScreen(_swigobj,_swigarg0,_swigarg1) (_swigobj->ShowFullScreen(_swigarg0,_swigarg1)) -static PyObject *_wrap_wxFrame_ShowFullScreen(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxDialog_CreateTextSizer(_swigobj,_swigarg0) (_swigobj->CreateTextSizer(_swigarg0)) +static PyObject *_wrap_wxDialog_CreateTextSizer(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - bool _result; - wxFrame * _arg0; - bool _arg1; - long _arg2 = (long ) (wxFULLSCREEN_ALL); + wxSizer * _result; + wxDialog * _arg0; + wxString * _arg1; PyObject * _argo0 = 0; - int tempbool1; - char *_kwnames[] = { "self","show","style", NULL }; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","message", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|l:wxFrame_ShowFullScreen",_kwnames,&_argo0,&tempbool1,&_arg2)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxDialog_CreateTextSizer",_kwnames,&_argo0,&_obj1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFrame_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFrame_ShowFullScreen. Expected _wxFrame_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDialog_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDialog_CreateTextSizer. Expected _wxDialog_p."); return NULL; } } - _arg1 = (bool ) tempbool1; +{ +#if PYTHON_API_VERSION >= 1009 + char* tmpPtr; int tmpSize; + if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) + return NULL; + _arg1 = new wxString(tmpPtr, tmpSize); +#else + if (!PyString_Check(_obj1)) { + PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); + return NULL; + } + _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); +#endif +} { wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxFrame_ShowFullScreen(_arg0,_arg1,_arg2); + _result = (wxSizer *)wxDialog_CreateTextSizer(_arg0,*_arg1); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} _resultobj = Py_BuildValue("i",_result); +}{ _resultobj = wxPyMake_wxObject(_result); } +{ + if (_obj1) + delete _arg1; +} return _resultobj; } -#define wxFrame_IsFullScreen(_swigobj) (_swigobj->IsFullScreen()) -static PyObject *_wrap_wxFrame_IsFullScreen(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxDialog_CreateButtonSizer(_swigobj,_swigarg0) (_swigobj->CreateButtonSizer(_swigarg0)) +static PyObject *_wrap_wxDialog_CreateButtonSizer(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; - bool _result; - wxFrame * _arg0; + wxSizer * _result; + wxDialog * _arg0; + long _arg1; PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; + char *_kwnames[] = { "self","flags", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxFrame_IsFullScreen",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol:wxDialog_CreateButtonSizer",_kwnames,&_argo0,&_arg1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxFrame_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxFrame_IsFullScreen. Expected _wxFrame_p."); + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDialog_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDialog_CreateButtonSizer. Expected _wxDialog_p."); return NULL; } } { wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxFrame_IsFullScreen(_arg0); + _result = (wxSizer *)wxDialog_CreateButtonSizer(_arg0,_arg1); wxPy_END_ALLOW_THREADS; if (PyErr_Occurred()) return NULL; -} _resultobj = Py_BuildValue("i",_result); +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } @@ -1223,6 +1945,14 @@ static void *SwigwxMiniFrameTowxFrame(void *ptr) { return (void *) dest; } +static void *SwigwxMiniFrameTowxTopLevelWindow(void *ptr) { + wxMiniFrame *src; + wxTopLevelWindow *dest; + src = (wxMiniFrame *) ptr; + dest = (wxTopLevelWindow *) src; + return (void *) dest; +} + static void *SwigwxMiniFrameTowxWindow(void *ptr) { wxMiniFrame *src; wxWindow *dest; @@ -1443,6 +2173,14 @@ static void *SwigwxTipWindowTowxFrame(void *ptr) { return (void *) dest; } +static void *SwigwxTipWindowTowxTopLevelWindow(void *ptr) { + wxTipWindow *src; + wxTopLevelWindow *dest; + src = (wxTipWindow *) ptr; + dest = (wxTopLevelWindow *) src; + return (void *) dest; +} + static void *SwigwxTipWindowTowxWindow(void *ptr) { wxTipWindow *src; wxWindow *dest; @@ -1532,36 +2270,51 @@ static PyMethodDef framescMethods[] = { { "wxMiniFrame_Create", (PyCFunction) _wrap_wxMiniFrame_Create, METH_VARARGS | METH_KEYWORDS }, { "new_wxPreMiniFrame", (PyCFunction) _wrap_new_wxPreMiniFrame, METH_VARARGS | METH_KEYWORDS }, { "new_wxMiniFrame", (PyCFunction) _wrap_new_wxMiniFrame, METH_VARARGS | METH_KEYWORDS }, + { "wxDialog_CreateButtonSizer", (PyCFunction) _wrap_wxDialog_CreateButtonSizer, METH_VARARGS | METH_KEYWORDS }, + { "wxDialog_CreateTextSizer", (PyCFunction) _wrap_wxDialog_CreateTextSizer, METH_VARARGS | METH_KEYWORDS }, + { "wxDialog_SetReturnCode", (PyCFunction) _wrap_wxDialog_SetReturnCode, METH_VARARGS | METH_KEYWORDS }, + { "wxDialog_GetReturnCode", (PyCFunction) _wrap_wxDialog_GetReturnCode, METH_VARARGS | METH_KEYWORDS }, + { "wxDialog_ShowModal", (PyCFunction) _wrap_wxDialog_ShowModal, METH_VARARGS | METH_KEYWORDS }, + { "wxDialog_IsModal", (PyCFunction) _wrap_wxDialog_IsModal, METH_VARARGS | METH_KEYWORDS }, + { "wxDialog_SetModal", (PyCFunction) _wrap_wxDialog_SetModal, METH_VARARGS | METH_KEYWORDS }, + { "wxDialog_EndModal", (PyCFunction) _wrap_wxDialog_EndModal, METH_VARARGS | METH_KEYWORDS }, + { "wxDialog_Centre", (PyCFunction) _wrap_wxDialog_Centre, METH_VARARGS | METH_KEYWORDS }, + { "wxDialog_Create", (PyCFunction) _wrap_wxDialog_Create, METH_VARARGS | METH_KEYWORDS }, + { "new_wxPreDialog", (PyCFunction) _wrap_new_wxPreDialog, METH_VARARGS | METH_KEYWORDS }, + { "new_wxDialog", (PyCFunction) _wrap_new_wxDialog, METH_VARARGS | METH_KEYWORDS }, + { "wxFrame_MakeModal", (PyCFunction) _wrap_wxFrame_MakeModal, METH_VARARGS | METH_KEYWORDS }, + { "wxFrame_SetAcceleratorTable", (PyCFunction) _wrap_wxFrame_SetAcceleratorTable, METH_VARARGS | METH_KEYWORDS }, + { "wxFrame_Raise", (PyCFunction) _wrap_wxFrame_Raise, METH_VARARGS | METH_KEYWORDS }, { "wxFrame_IsFullScreen", (PyCFunction) _wrap_wxFrame_IsFullScreen, METH_VARARGS | METH_KEYWORDS }, { "wxFrame_ShowFullScreen", (PyCFunction) _wrap_wxFrame_ShowFullScreen, METH_VARARGS | METH_KEYWORDS }, - { "wxFrame_ProcessCommand", (PyCFunction) _wrap_wxFrame_ProcessCommand, METH_VARARGS | METH_KEYWORDS }, - { "wxFrame_Command", (PyCFunction) _wrap_wxFrame_Command, METH_VARARGS | METH_KEYWORDS }, - { "wxFrame_GetClientAreaOrigin", (PyCFunction) _wrap_wxFrame_GetClientAreaOrigin, METH_VARARGS | METH_KEYWORDS }, - { "wxFrame_MakeModal", (PyCFunction) _wrap_wxFrame_MakeModal, METH_VARARGS | METH_KEYWORDS }, { "wxFrame_SetToolBar", (PyCFunction) _wrap_wxFrame_SetToolBar, METH_VARARGS | METH_KEYWORDS }, - { "wxFrame_SetTitle", (PyCFunction) _wrap_wxFrame_SetTitle, METH_VARARGS | METH_KEYWORDS }, + { "wxFrame_GetToolBar", (PyCFunction) _wrap_wxFrame_GetToolBar, METH_VARARGS | METH_KEYWORDS }, + { "wxFrame_CreateToolBar", (PyCFunction) _wrap_wxFrame_CreateToolBar, METH_VARARGS | METH_KEYWORDS }, { "wxFrame_SetStatusWidths", (PyCFunction) _wrap_wxFrame_SetStatusWidths, METH_VARARGS | METH_KEYWORDS }, { "wxFrame_SetStatusText", (PyCFunction) _wrap_wxFrame_SetStatusText, METH_VARARGS | METH_KEYWORDS }, { "wxFrame_SetStatusBar", (PyCFunction) _wrap_wxFrame_SetStatusBar, METH_VARARGS | METH_KEYWORDS }, - { "wxFrame_SetMenuBar", (PyCFunction) _wrap_wxFrame_SetMenuBar, METH_VARARGS | METH_KEYWORDS }, - { "wxFrame_SetIcon", (PyCFunction) _wrap_wxFrame_SetIcon, METH_VARARGS | METH_KEYWORDS }, - { "wxFrame_SetAcceleratorTable", (PyCFunction) _wrap_wxFrame_SetAcceleratorTable, METH_VARARGS | METH_KEYWORDS }, - { "wxFrame_Restore", (PyCFunction) _wrap_wxFrame_Restore, METH_VARARGS | METH_KEYWORDS }, - { "wxFrame_IsMaximized", (PyCFunction) _wrap_wxFrame_IsMaximized, METH_VARARGS | METH_KEYWORDS }, - { "wxFrame_Maximize", (PyCFunction) _wrap_wxFrame_Maximize, METH_VARARGS | METH_KEYWORDS }, - { "wxFrame_IsIconized", (PyCFunction) _wrap_wxFrame_IsIconized, METH_VARARGS | METH_KEYWORDS }, - { "wxFrame_Iconize", (PyCFunction) _wrap_wxFrame_Iconize, METH_VARARGS | METH_KEYWORDS }, - { "wxFrame_GetToolBar", (PyCFunction) _wrap_wxFrame_GetToolBar, METH_VARARGS | METH_KEYWORDS }, - { "wxFrame_GetTitle", (PyCFunction) _wrap_wxFrame_GetTitle, METH_VARARGS | METH_KEYWORDS }, { "wxFrame_GetStatusBar", (PyCFunction) _wrap_wxFrame_GetStatusBar, METH_VARARGS | METH_KEYWORDS }, - { "wxFrame_GetMenuBar", (PyCFunction) _wrap_wxFrame_GetMenuBar, METH_VARARGS | METH_KEYWORDS }, - { "wxFrame_GetIcon", (PyCFunction) _wrap_wxFrame_GetIcon, METH_VARARGS | METH_KEYWORDS }, - { "wxFrame_CreateToolBar", (PyCFunction) _wrap_wxFrame_CreateToolBar, METH_VARARGS | METH_KEYWORDS }, { "wxFrame_CreateStatusBar", (PyCFunction) _wrap_wxFrame_CreateStatusBar, METH_VARARGS | METH_KEYWORDS }, - { "wxFrame_Centre", (PyCFunction) _wrap_wxFrame_Centre, METH_VARARGS | METH_KEYWORDS }, + { "wxFrame_ProcessCommand", (PyCFunction) _wrap_wxFrame_ProcessCommand, METH_VARARGS | METH_KEYWORDS }, + { "wxFrame_Command", (PyCFunction) _wrap_wxFrame_Command, METH_VARARGS | METH_KEYWORDS }, + { "wxFrame_GetMenuBar", (PyCFunction) _wrap_wxFrame_GetMenuBar, METH_VARARGS | METH_KEYWORDS }, + { "wxFrame_SetMenuBar", (PyCFunction) _wrap_wxFrame_SetMenuBar, METH_VARARGS | METH_KEYWORDS }, + { "wxFrame_GetClientAreaOrigin", (PyCFunction) _wrap_wxFrame_GetClientAreaOrigin, METH_VARARGS | METH_KEYWORDS }, { "wxFrame_Create", (PyCFunction) _wrap_wxFrame_Create, METH_VARARGS | METH_KEYWORDS }, { "new_wxPreFrame", (PyCFunction) _wrap_new_wxPreFrame, METH_VARARGS | METH_KEYWORDS }, { "new_wxFrame", (PyCFunction) _wrap_new_wxFrame, METH_VARARGS | METH_KEYWORDS }, + { "wxTopLevelWindow_GetTitle", (PyCFunction) _wrap_wxTopLevelWindow_GetTitle, METH_VARARGS | METH_KEYWORDS }, + { "wxTopLevelWindow_SetTitle", (PyCFunction) _wrap_wxTopLevelWindow_SetTitle, METH_VARARGS | METH_KEYWORDS }, + { "wxTopLevelWindow_SetIcon", (PyCFunction) _wrap_wxTopLevelWindow_SetIcon, METH_VARARGS | METH_KEYWORDS }, + { "wxTopLevelWindow_GetIcon", (PyCFunction) _wrap_wxTopLevelWindow_GetIcon, METH_VARARGS | METH_KEYWORDS }, + { "wxTopLevelWindow_IsIconized", (PyCFunction) _wrap_wxTopLevelWindow_IsIconized, METH_VARARGS | METH_KEYWORDS }, + { "wxTopLevelWindow_IsMaximized", (PyCFunction) _wrap_wxTopLevelWindow_IsMaximized, METH_VARARGS | METH_KEYWORDS }, + { "wxTopLevelWindow_Iconize", (PyCFunction) _wrap_wxTopLevelWindow_Iconize, METH_VARARGS | METH_KEYWORDS }, + { "wxTopLevelWindow_Restore", (PyCFunction) _wrap_wxTopLevelWindow_Restore, METH_VARARGS | METH_KEYWORDS }, + { "wxTopLevelWindow_Maximize", (PyCFunction) _wrap_wxTopLevelWindow_Maximize, METH_VARARGS | METH_KEYWORDS }, + { "wxTopLevelWindow_Create", (PyCFunction) _wrap_wxTopLevelWindow_Create, METH_VARARGS | METH_KEYWORDS }, + { "new_wxPreTopLevelWindow", (PyCFunction) _wrap_new_wxPreTopLevelWindow, METH_VARARGS | METH_KEYWORDS }, + { "new_wxTopLevelWindow", (PyCFunction) _wrap_new_wxTopLevelWindow, METH_VARARGS | METH_KEYWORDS }, { NULL, NULL } }; #ifdef __cplusplus @@ -1591,6 +2344,10 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_size_t","_int",0}, { "_size_t","_wxWindowID",0}, { "_size_t","_uint",0}, + { "_wxTopLevelWindow","_wxTipWindow",SwigwxTipWindowTowxTopLevelWindow}, + { "_wxTopLevelWindow","_wxMiniFrame",SwigwxMiniFrameTowxTopLevelWindow}, + { "_wxTopLevelWindow","_wxDialog",SwigwxDialogTowxTopLevelWindow}, + { "_wxTopLevelWindow","_wxFrame",SwigwxFrameTowxTopLevelWindow}, { "_uint","_wxCoord",0}, { "_uint","_wxPrintQuality",0}, { "_uint","_time_t",0}, @@ -1620,7 +2377,9 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_unsigned_short","_short",0}, { "_wxObject","_wxTipWindow",SwigwxTipWindowTowxObject}, { "_wxObject","_wxMiniFrame",SwigwxMiniFrameTowxObject}, + { "_wxObject","_wxDialog",SwigwxDialogTowxObject}, { "_wxObject","_wxFrame",SwigwxFrameTowxObject}, + { "_wxObject","_wxTopLevelWindow",SwigwxTopLevelWindowTowxObject}, { "_signed_short","_WXTYPE",0}, { "_signed_short","_short",0}, { "_unsigned_char","_byte",0}, @@ -1672,10 +2431,14 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxCoord","_wxPrintQuality",0}, { "_wxEvtHandler","_wxTipWindow",SwigwxTipWindowTowxEvtHandler}, { "_wxEvtHandler","_wxMiniFrame",SwigwxMiniFrameTowxEvtHandler}, + { "_wxEvtHandler","_wxDialog",SwigwxDialogTowxEvtHandler}, { "_wxEvtHandler","_wxFrame",SwigwxFrameTowxEvtHandler}, + { "_wxEvtHandler","_wxTopLevelWindow",SwigwxTopLevelWindowTowxEvtHandler}, { "_wxWindow","_wxTipWindow",SwigwxTipWindowTowxWindow}, { "_wxWindow","_wxMiniFrame",SwigwxMiniFrameTowxWindow}, + { "_wxWindow","_wxDialog",SwigwxDialogTowxWindow}, { "_wxWindow","_wxFrame",SwigwxFrameTowxWindow}, + { "_wxWindow","_wxTopLevelWindow",SwigwxTopLevelWindowTowxWindow}, {0,0,0}}; static PyObject *SWIG_globals; @@ -1693,6 +2456,7 @@ SWIGEXPORT(void) initframesc() { PyDict_SetItemString(d,"wxFULLSCREEN_NOBORDER", PyInt_FromLong((long) wxFULLSCREEN_NOBORDER)); PyDict_SetItemString(d,"wxFULLSCREEN_NOCAPTION", PyInt_FromLong((long) wxFULLSCREEN_NOCAPTION)); PyDict_SetItemString(d,"wxFULLSCREEN_ALL", PyInt_FromLong((long) wxFULLSCREEN_ALL)); + PyDict_SetItemString(d,"wxTOPLEVEL_EX_DIALOG", PyInt_FromLong((long) wxTOPLEVEL_EX_DIALOG)); { int i; for (i = 0; _swig_mapping[i].n1; i++) diff --git a/wxPython/src/msw/frames.py b/wxPython/src/msw/frames.py index 71a24418d8..d606d12801 100644 --- a/wxPython/src/msw/frames.py +++ b/wxPython/src/msw/frames.py @@ -15,61 +15,84 @@ from controls import * from events import * import wx -class wxFramePtr(wxWindowPtr): +class wxTopLevelWindowPtr(wxWindowPtr): def __init__(self,this): self.this = this self.thisown = 0 def Create(self, *_args, **_kwargs): - val = apply(framesc.wxFrame_Create,(self,) + _args, _kwargs) + val = apply(framesc.wxTopLevelWindow_Create,(self,) + _args, _kwargs) return val - def Centre(self, *_args, **_kwargs): - val = apply(framesc.wxFrame_Centre,(self,) + _args, _kwargs) + def Maximize(self, *_args, **_kwargs): + val = apply(framesc.wxTopLevelWindow_Maximize,(self,) + _args, _kwargs) return val - def CreateStatusBar(self, *_args, **_kwargs): - val = apply(framesc.wxFrame_CreateStatusBar,(self,) + _args, _kwargs) + def Restore(self, *_args, **_kwargs): + val = apply(framesc.wxTopLevelWindow_Restore,(self,) + _args, _kwargs) return val - def CreateToolBar(self, *_args, **_kwargs): - val = apply(framesc.wxFrame_CreateToolBar,(self,) + _args, _kwargs) + def Iconize(self, *_args, **_kwargs): + val = apply(framesc.wxTopLevelWindow_Iconize,(self,) + _args, _kwargs) + return val + def IsMaximized(self, *_args, **_kwargs): + val = apply(framesc.wxTopLevelWindow_IsMaximized,(self,) + _args, _kwargs) + return val + def IsIconized(self, *_args, **_kwargs): + val = apply(framesc.wxTopLevelWindow_IsIconized,(self,) + _args, _kwargs) return val def GetIcon(self, *_args, **_kwargs): - val = apply(framesc.wxFrame_GetIcon,(self,) + _args, _kwargs) + val = apply(framesc.wxTopLevelWindow_GetIcon,(self,) + _args, _kwargs) if val: val = wxIconPtr(val) return val - def GetMenuBar(self, *_args, **_kwargs): - val = apply(framesc.wxFrame_GetMenuBar,(self,) + _args, _kwargs) + def SetIcon(self, *_args, **_kwargs): + val = apply(framesc.wxTopLevelWindow_SetIcon,(self,) + _args, _kwargs) return val - def GetStatusBar(self, *_args, **_kwargs): - val = apply(framesc.wxFrame_GetStatusBar,(self,) + _args, _kwargs) + def SetTitle(self, *_args, **_kwargs): + val = apply(framesc.wxTopLevelWindow_SetTitle,(self,) + _args, _kwargs) return val def GetTitle(self, *_args, **_kwargs): - val = apply(framesc.wxFrame_GetTitle,(self,) + _args, _kwargs) - return val - def GetToolBar(self, *_args, **_kwargs): - val = apply(framesc.wxFrame_GetToolBar,(self,) + _args, _kwargs) + val = apply(framesc.wxTopLevelWindow_GetTitle,(self,) + _args, _kwargs) return val - def Iconize(self, *_args, **_kwargs): - val = apply(framesc.wxFrame_Iconize,(self,) + _args, _kwargs) + def __repr__(self): + return "" % (self.this,) +class wxTopLevelWindow(wxTopLevelWindowPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(framesc.new_wxTopLevelWindow,_args,_kwargs) + self.thisown = 1 + + + +def wxPreTopLevelWindow(*_args,**_kwargs): + val = wxTopLevelWindowPtr(apply(framesc.new_wxPreTopLevelWindow,_args,_kwargs)) + val.thisown = 1 + return val + + +class wxFramePtr(wxTopLevelWindowPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def Create(self, *_args, **_kwargs): + val = apply(framesc.wxFrame_Create,(self,) + _args, _kwargs) return val - def IsIconized(self, *_args, **_kwargs): - val = apply(framesc.wxFrame_IsIconized,(self,) + _args, _kwargs) + def GetClientAreaOrigin(self, *_args, **_kwargs): + val = apply(framesc.wxFrame_GetClientAreaOrigin,(self,) + _args, _kwargs) + if val: val = wxPointPtr(val) ; val.thisown = 1 return val - def Maximize(self, *_args, **_kwargs): - val = apply(framesc.wxFrame_Maximize,(self,) + _args, _kwargs) + def SetMenuBar(self, *_args, **_kwargs): + val = apply(framesc.wxFrame_SetMenuBar,(self,) + _args, _kwargs) return val - def IsMaximized(self, *_args, **_kwargs): - val = apply(framesc.wxFrame_IsMaximized,(self,) + _args, _kwargs) + def GetMenuBar(self, *_args, **_kwargs): + val = apply(framesc.wxFrame_GetMenuBar,(self,) + _args, _kwargs) return val - def Restore(self, *_args, **_kwargs): - val = apply(framesc.wxFrame_Restore,(self,) + _args, _kwargs) + def Command(self, *_args, **_kwargs): + val = apply(framesc.wxFrame_Command,(self,) + _args, _kwargs) return val - def SetAcceleratorTable(self, *_args, **_kwargs): - val = apply(framesc.wxFrame_SetAcceleratorTable,(self,) + _args, _kwargs) + def ProcessCommand(self, *_args, **_kwargs): + val = apply(framesc.wxFrame_ProcessCommand,(self,) + _args, _kwargs) return val - def SetIcon(self, *_args, **_kwargs): - val = apply(framesc.wxFrame_SetIcon,(self,) + _args, _kwargs) + def CreateStatusBar(self, *_args, **_kwargs): + val = apply(framesc.wxFrame_CreateStatusBar,(self,) + _args, _kwargs) return val - def SetMenuBar(self, *_args, **_kwargs): - val = apply(framesc.wxFrame_SetMenuBar,(self,) + _args, _kwargs) + def GetStatusBar(self, *_args, **_kwargs): + val = apply(framesc.wxFrame_GetStatusBar,(self,) + _args, _kwargs) return val def SetStatusBar(self, *_args, **_kwargs): val = apply(framesc.wxFrame_SetStatusBar,(self,) + _args, _kwargs) @@ -80,31 +103,30 @@ class wxFramePtr(wxWindowPtr): def SetStatusWidths(self, *_args, **_kwargs): val = apply(framesc.wxFrame_SetStatusWidths,(self,) + _args, _kwargs) return val - def SetTitle(self, *_args, **_kwargs): - val = apply(framesc.wxFrame_SetTitle,(self,) + _args, _kwargs) + def CreateToolBar(self, *_args, **_kwargs): + val = apply(framesc.wxFrame_CreateToolBar,(self,) + _args, _kwargs) + return val + def GetToolBar(self, *_args, **_kwargs): + val = apply(framesc.wxFrame_GetToolBar,(self,) + _args, _kwargs) return val def SetToolBar(self, *_args, **_kwargs): val = apply(framesc.wxFrame_SetToolBar,(self,) + _args, _kwargs) return val - def MakeModal(self, *_args, **_kwargs): - val = apply(framesc.wxFrame_MakeModal,(self,) + _args, _kwargs) - return val - def GetClientAreaOrigin(self, *_args, **_kwargs): - val = apply(framesc.wxFrame_GetClientAreaOrigin,(self,) + _args, _kwargs) - if val: val = wxPointPtr(val) ; val.thisown = 1 - return val - def Command(self, *_args, **_kwargs): - val = apply(framesc.wxFrame_Command,(self,) + _args, _kwargs) - return val - def ProcessCommand(self, *_args, **_kwargs): - val = apply(framesc.wxFrame_ProcessCommand,(self,) + _args, _kwargs) - return val def ShowFullScreen(self, *_args, **_kwargs): val = apply(framesc.wxFrame_ShowFullScreen,(self,) + _args, _kwargs) return val def IsFullScreen(self, *_args, **_kwargs): val = apply(framesc.wxFrame_IsFullScreen,(self,) + _args, _kwargs) return val + def Raise(self, *_args, **_kwargs): + val = apply(framesc.wxFrame_Raise,(self,) + _args, _kwargs) + return val + def SetAcceleratorTable(self, *_args, **_kwargs): + val = apply(framesc.wxFrame_SetAcceleratorTable,(self,) + _args, _kwargs) + return val + def MakeModal(self, *_args, **_kwargs): + val = apply(framesc.wxFrame_MakeModal,(self,) + _args, _kwargs) + return val def __repr__(self): return "" % (self.this,) class wxFrame(wxFramePtr): @@ -120,6 +142,55 @@ def wxPreFrame(*_args,**_kwargs): return val +class wxDialogPtr(wxTopLevelWindowPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def Create(self, *_args, **_kwargs): + val = apply(framesc.wxDialog_Create,(self,) + _args, _kwargs) + return val + def Centre(self, *_args, **_kwargs): + val = apply(framesc.wxDialog_Centre,(self,) + _args, _kwargs) + return val + def EndModal(self, *_args, **_kwargs): + val = apply(framesc.wxDialog_EndModal,(self,) + _args, _kwargs) + return val + def SetModal(self, *_args, **_kwargs): + val = apply(framesc.wxDialog_SetModal,(self,) + _args, _kwargs) + return val + def IsModal(self, *_args, **_kwargs): + val = apply(framesc.wxDialog_IsModal,(self,) + _args, _kwargs) + return val + def ShowModal(self, *_args, **_kwargs): + val = apply(framesc.wxDialog_ShowModal,(self,) + _args, _kwargs) + return val + def GetReturnCode(self, *_args, **_kwargs): + val = apply(framesc.wxDialog_GetReturnCode,(self,) + _args, _kwargs) + return val + def SetReturnCode(self, *_args, **_kwargs): + val = apply(framesc.wxDialog_SetReturnCode,(self,) + _args, _kwargs) + return val + def CreateTextSizer(self, *_args, **_kwargs): + val = apply(framesc.wxDialog_CreateTextSizer,(self,) + _args, _kwargs) + return val + def CreateButtonSizer(self, *_args, **_kwargs): + val = apply(framesc.wxDialog_CreateButtonSizer,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxDialog(wxDialogPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(framesc.new_wxDialog,_args,_kwargs) + self.thisown = 1 + + + +def wxPreDialog(*_args,**_kwargs): + val = wxDialogPtr(apply(framesc.new_wxPreDialog,_args,_kwargs)) + val.thisown = 1 + return val + + class wxMiniFramePtr(wxFramePtr): def __init__(self,this): self.this = this @@ -170,3 +241,4 @@ wxFULLSCREEN_NOSTATUSBAR = framesc.wxFULLSCREEN_NOSTATUSBAR wxFULLSCREEN_NOBORDER = framesc.wxFULLSCREEN_NOBORDER wxFULLSCREEN_NOCAPTION = framesc.wxFULLSCREEN_NOCAPTION wxFULLSCREEN_ALL = framesc.wxFULLSCREEN_ALL +wxTOPLEVEL_EX_DIALOG = framesc.wxTOPLEVEL_EX_DIALOG diff --git a/wxPython/src/msw/gdi.cpp b/wxPython/src/msw/gdi.cpp index 49fc9bf852..5709a89d5e 100644 --- a/wxPython/src/msw/gdi.cpp +++ b/wxPython/src/msw/gdi.cpp @@ -186,6 +186,27 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { wxColour* wxNamedColour(const wxString& colorName) { return new wxColour(colorName); } + +class wxPyPen : public wxPen { +public: + wxPyPen(wxColour& colour, int width=1, int style=wxSOLID) + : wxPen(colour, width, style) + { m_dash = NULL; } + ~wxPyPen() { + if (m_dash) + delete m_dash; + } + + void SetDashes(int nb_dashes, const wxDash *dash) { + m_dash = new wxDash[nb_dashes]; + for (int i=0; iGetDashes(_swigarg0)) -static PyObject *_wrap_wxPen_GetDashes(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - int _result; - wxPen * _arg0; - wxDash ** _arg1; - PyObject * _argo0 = 0; - PyObject * _argo1 = 0; - char *_kwnames[] = { "self","dashes", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPen_GetDashes",_kwnames,&_argo0,&_argo1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPen_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPen_GetDashes. Expected _wxPen_p."); - return NULL; - } - } - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxDash_pp")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPen_GetDashes. Expected _wxDash_pp."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxPen_GetDashes(_arg0,_arg1); - - wxPy_END_ALLOW_THREADS; - if (PyErr_Occurred()) return NULL; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - #define wxPen_SetDashes(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetDashes(_swigarg0,_swigarg1)) static PyObject *_wrap_wxPen_SetDashes(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -5622,6 +5606,143 @@ static PyObject *_wrap_wxPen_SetStipple(PyObject *self, PyObject *args, PyObject return _resultobj; } +static void *SwigwxPyPenTowxPen(void *ptr) { + wxPyPen *src; + wxPen *dest; + src = (wxPyPen *) ptr; + dest = (wxPen *) src; + return (void *) dest; +} + +static void *SwigwxPyPenTowxGDIObject(void *ptr) { + wxPyPen *src; + wxGDIObject *dest; + src = (wxPyPen *) ptr; + dest = (wxGDIObject *) src; + return (void *) dest; +} + +static void *SwigwxPyPenTowxObject(void *ptr) { + wxPyPen *src; + wxObject *dest; + src = (wxPyPen *) ptr; + dest = (wxObject *) src; + return (void *) dest; +} + +#define new_wxPyPen(_swigarg0,_swigarg1,_swigarg2) (new wxPyPen(_swigarg0,_swigarg1,_swigarg2)) +static PyObject *_wrap_new_wxPyPen(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyPen * _result; + wxColour * _arg0; + int _arg1 = (int ) 1; + int _arg2 = (int ) wxSOLID; + wxColour temp; + PyObject * _obj0 = 0; + char *_kwnames[] = { "colour","width","style", NULL }; + char _ptemp[128]; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|ii:new_wxPyPen",_kwnames,&_obj0,&_arg1,&_arg2)) + return NULL; +{ + _arg0 = &temp; + if (! wxColour_helper(_obj0, &_arg0)) + return NULL; +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxPyPen *)new_wxPyPen(*_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} if (_result) { + SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyPen_p"); + _resultobj = Py_BuildValue("s",_ptemp); + } else { + Py_INCREF(Py_None); + _resultobj = Py_None; + } + return _resultobj; +} + +#define delete_wxPyPen(_swigobj) (delete _swigobj) +static PyObject *_wrap_delete_wxPyPen(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyPen * _arg0; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:delete_wxPyPen",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyPen_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of delete_wxPyPen. Expected _wxPyPen_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + delete_wxPyPen(_arg0); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxPyPen_SetDashes(_swigobj,_swigarg0,_swigarg1) (_swigobj->SetDashes(_swigarg0,_swigarg1)) +static PyObject *_wrap_wxPyPen_SetDashes(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxPyPen * _arg0; + int _arg1; + wxDash * _arg2; + PyObject * _argo0 = 0; + PyObject * _obj2 = 0; + char *_kwnames[] = { "self","choices", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPyPen_SetDashes",_kwnames,&_argo0,&_obj2)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxPyPen_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxPyPen_SetDashes. Expected _wxPyPen_p."); + return NULL; + } + } + if (_obj2) +{ + _arg2 = (wxDash*)byte_LIST_helper(_obj2); + if (_arg2 == NULL) { + return NULL; + } +} +{ + if (_obj2) { + _arg1 = PyList_Size(_obj2); + } + else { + _arg1 = 0; + } +} +{ + wxPy_BEGIN_ALLOW_THREADS; + wxPyPen_SetDashes(_arg0,_arg1,_arg2); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} Py_INCREF(Py_None); + _resultobj = Py_None; +{ + delete [] _arg2; +} + return _resultobj; +} + static void *SwigwxPenListTowxObject(void *ptr) { wxPenList *src; wxObject *dest; @@ -11614,10 +11735,12 @@ static PyMethodDef gdicMethods[] = { { "wxPenList_RemovePen", (PyCFunction) _wrap_wxPenList_RemovePen, METH_VARARGS | METH_KEYWORDS }, { "wxPenList_FindOrCreatePen", (PyCFunction) _wrap_wxPenList_FindOrCreatePen, METH_VARARGS | METH_KEYWORDS }, { "wxPenList_AddPen", (PyCFunction) _wrap_wxPenList_AddPen, METH_VARARGS | METH_KEYWORDS }, + { "wxPyPen_SetDashes", (PyCFunction) _wrap_wxPyPen_SetDashes, METH_VARARGS | METH_KEYWORDS }, + { "delete_wxPyPen", (PyCFunction) _wrap_delete_wxPyPen, METH_VARARGS | METH_KEYWORDS }, + { "new_wxPyPen", (PyCFunction) _wrap_new_wxPyPen, METH_VARARGS | METH_KEYWORDS }, { "wxPen_SetStipple", (PyCFunction) _wrap_wxPen_SetStipple, METH_VARARGS | METH_KEYWORDS }, { "wxPen_GetStipple", (PyCFunction) _wrap_wxPen_GetStipple, METH_VARARGS | METH_KEYWORDS }, { "wxPen_SetDashes", (PyCFunction) _wrap_wxPen_SetDashes, METH_VARARGS | METH_KEYWORDS }, - { "wxPen_GetDashes", (PyCFunction) _wrap_wxPen_GetDashes, METH_VARARGS | METH_KEYWORDS }, { "wxPen_SetWidth", (PyCFunction) _wrap_wxPen_SetWidth, METH_VARARGS | METH_KEYWORDS }, { "wxPen_SetStyle", (PyCFunction) _wrap_wxPen_SetStyle, METH_VARARGS | METH_KEYWORDS }, { "wxPen_SetJoin", (PyCFunction) _wrap_wxPen_SetJoin, METH_VARARGS | METH_KEYWORDS }, @@ -11770,12 +11893,14 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPrintQuality","_EBool",0}, { "_wxPrintQuality","_size_t",0}, { "_wxPrintQuality","_time_t",0}, + { "_wxPen","_wxPyPen",SwigwxPyPenTowxPen}, { "_byte","_unsigned_char",0}, { "_long","_unsigned_long",0}, { "_long","_signed_long",0}, { "_wxGDIObject","_wxRegion",SwigwxRegionTowxGDIObject}, { "_wxGDIObject","_wxPalette",SwigwxPaletteTowxGDIObject}, { "_wxGDIObject","_wxBrush",SwigwxBrushTowxGDIObject}, + { "_wxGDIObject","_wxPyPen",SwigwxPyPenTowxGDIObject}, { "_wxGDIObject","_wxPen",SwigwxPenTowxGDIObject}, { "_wxGDIObject","_wxFont",SwigwxFontTowxGDIObject}, { "_wxGDIObject","_wxCursor",SwigwxCursorTowxGDIObject}, @@ -11835,6 +11960,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxObject","_wxBrushList",SwigwxBrushListTowxObject}, { "_wxObject","_wxBrush",SwigwxBrushTowxObject}, { "_wxObject","_wxPenList",SwigwxPenListTowxObject}, + { "_wxObject","_wxPyPen",SwigwxPyPenTowxObject}, { "_wxObject","_wxPen",SwigwxPenTowxObject}, { "_wxObject","_wxColourDatabase",SwigwxColourDatabaseTowxObject}, { "_wxObject","_wxColour",SwigwxColourTowxObject}, diff --git a/wxPython/src/msw/gdi.py b/wxPython/src/msw/gdi.py index 7beaa65361..d93f9670c9 100644 --- a/wxPython/src/msw/gdi.py +++ b/wxPython/src/msw/gdi.py @@ -512,9 +512,6 @@ class wxPenPtr(wxGDIObjectPtr): def SetWidth(self, *_args, **_kwargs): val = apply(gdic.wxPen_SetWidth,(self,) + _args, _kwargs) return val - def GetDashes(self, *_args, **_kwargs): - val = apply(gdic.wxPen_GetDashes,(self,) + _args, _kwargs) - return val def SetDashes(self, *_args, **_kwargs): val = apply(gdic.wxPen_SetDashes,(self,) + _args, _kwargs) return val @@ -535,6 +532,26 @@ class wxPen(wxPenPtr): +class wxPyPenPtr(wxPenPtr): + def __init__(self,this): + self.this = this + self.thisown = 0 + def __del__(self,gdic=gdic): + if self.thisown == 1 : + gdic.delete_wxPyPen(self) + def SetDashes(self, *_args, **_kwargs): + val = apply(gdic.wxPyPen_SetDashes,(self,) + _args, _kwargs) + return val + def __repr__(self): + return "" % (self.this,) +class wxPyPen(wxPyPenPtr): + def __init__(self,*_args,**_kwargs): + self.this = apply(gdic.new_wxPyPen,_args,_kwargs) + self.thisown = 1 + + + + class wxPenListPtr(wxObjectPtr): def __init__(self,this): self.this = this diff --git a/wxPython/src/msw/utils.cpp b/wxPython/src/msw/utils.cpp index a2ea9a7eee..8abd02e4d7 100644 --- a/wxPython/src/msw/utils.cpp +++ b/wxPython/src/msw/utils.cpp @@ -3552,40 +3552,6 @@ static PyObject *_wrap_wxDateTime_SetToWeekDay(PyObject *self, PyObject *args, P return _resultobj; } -#define wxDateTime_GetWeekDay(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3) (_swigobj->GetWeekDay(_swigarg0,_swigarg1,_swigarg2,_swigarg3)) -static PyObject *_wrap_wxDateTime_GetWeekDay(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxDateTime * _result; - wxDateTime * _arg0; - wxDateTime::WeekDay _arg1; - int _arg2 = (int ) 1; - wxDateTime::Month _arg3 = (wxDateTime::Month ) wxDateTime::Inv_Month; - int _arg4 = (int ) wxDateTime::Inv_Year; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self","weekday","n","month","year", NULL }; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi|iii:wxDateTime_GetWeekDay",_kwnames,&_argo0,&_arg1,&_arg2,&_arg3,&_arg4)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_GetWeekDay. Expected _wxDateTime_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = new wxDateTime (wxDateTime_GetWeekDay(_arg0,_arg1,_arg2,_arg3,_arg4)); - - wxPy_END_ALLOW_THREADS; - if (PyErr_Occurred()) return NULL; -} SWIG_MakePtr(_ptemp, (void *) _result,"_wxDateTime_p"); - _resultobj = Py_BuildValue("s",_ptemp); - return _resultobj; -} - #define wxDateTime_SetToLastWeekDay(_swigobj,_swigarg0,_swigarg1,_swigarg2) (_swigobj->SetToLastWeekDay(_swigarg0,_swigarg1,_swigarg2)) static PyObject *_wrap_wxDateTime_SetToLastWeekDay(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -4346,6 +4312,43 @@ static PyObject *_wrap_wxDateTime_GetDay(PyObject *self, PyObject *args, PyObjec return _resultobj; } +#define wxDateTime_GetWeekDay(_swigobj,_swigarg0) (_swigobj->GetWeekDay(_swigarg0)) +static PyObject *_wrap_wxDateTime_GetWeekDay(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxDateTime::WeekDay _result; + wxDateTime * _arg0; + wxDateTime::TimeZone * _arg1 = (wxDateTime::TimeZone *) &LOCAL; + PyObject * _argo0 = 0; + PyObject * _obj1 = 0; + char *_kwnames[] = { "self","tz", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|O:wxDateTime_GetWeekDay",_kwnames,&_argo0,&_obj1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDateTime_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDateTime_GetWeekDay. Expected _wxDateTime_p."); + return NULL; + } + } + if (_obj1) +{ + _arg1 = new wxDateTime::TimeZone((wxDateTime::TZ)PyInt_AsLong(_obj1)); +} +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (wxDateTime::WeekDay )wxDateTime_GetWeekDay(_arg0,*_arg1); + + wxPy_END_ALLOW_THREADS; + if (PyErr_Occurred()) return NULL; +} _resultobj = Py_BuildValue("i",_result); +{ + if (_arg1) delete _arg1; +} + return _resultobj; +} + #define wxDateTime_GetHour(_swigobj,_swigarg0) (_swigobj->GetHour(_swigarg0)) static PyObject *_wrap_wxDateTime_GetHour(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -7775,6 +7778,7 @@ static PyMethodDef utilscMethods[] = { { "wxDateTime_GetSecond", (PyCFunction) _wrap_wxDateTime_GetSecond, METH_VARARGS | METH_KEYWORDS }, { "wxDateTime_GetMinute", (PyCFunction) _wrap_wxDateTime_GetMinute, METH_VARARGS | METH_KEYWORDS }, { "wxDateTime_GetHour", (PyCFunction) _wrap_wxDateTime_GetHour, METH_VARARGS | METH_KEYWORDS }, + { "wxDateTime_GetWeekDay", (PyCFunction) _wrap_wxDateTime_GetWeekDay, METH_VARARGS | METH_KEYWORDS }, { "wxDateTime_GetDay", (PyCFunction) _wrap_wxDateTime_GetDay, METH_VARARGS | METH_KEYWORDS }, { "wxDateTime_GetMonth", (PyCFunction) _wrap_wxDateTime_GetMonth, METH_VARARGS | METH_KEYWORDS }, { "wxDateTime_GetYear", (PyCFunction) _wrap_wxDateTime_GetYear, METH_VARARGS | METH_KEYWORDS }, @@ -7798,7 +7802,6 @@ static PyMethodDef utilscMethods[] = { { "wxDateTime_SetToTheWeek", (PyCFunction) _wrap_wxDateTime_SetToTheWeek, METH_VARARGS | METH_KEYWORDS }, { "wxDateTime_GetLastWeekDay", (PyCFunction) _wrap_wxDateTime_GetLastWeekDay, METH_VARARGS | METH_KEYWORDS }, { "wxDateTime_SetToLastWeekDay", (PyCFunction) _wrap_wxDateTime_SetToLastWeekDay, METH_VARARGS | METH_KEYWORDS }, - { "wxDateTime_GetWeekDay", (PyCFunction) _wrap_wxDateTime_GetWeekDay, METH_VARARGS | METH_KEYWORDS }, { "wxDateTime_SetToWeekDay", (PyCFunction) _wrap_wxDateTime_SetToWeekDay, METH_VARARGS | METH_KEYWORDS }, { "wxDateTime_GetPrevWeekDay", (PyCFunction) _wrap_wxDateTime_GetPrevWeekDay, METH_VARARGS | METH_KEYWORDS }, { "wxDateTime_SetToPrevWeekDay", (PyCFunction) _wrap_wxDateTime_SetToPrevWeekDay, METH_VARARGS | METH_KEYWORDS }, diff --git a/wxPython/src/msw/utils.py b/wxPython/src/msw/utils.py index be380ee5a4..3234a60c62 100644 --- a/wxPython/src/msw/utils.py +++ b/wxPython/src/msw/utils.py @@ -338,10 +338,6 @@ class wxDateTimePtr : def SetToWeekDay(self, *_args, **_kwargs): val = apply(utilsc.wxDateTime_SetToWeekDay,(self,) + _args, _kwargs) return val - def GetWeekDay(self, *_args, **_kwargs): - val = apply(utilsc.wxDateTime_GetWeekDay,(self,) + _args, _kwargs) - if val: val = wxDateTimePtr(val) ; val.thisown = 1 - return val def SetToLastWeekDay(self, *_args, **_kwargs): val = apply(utilsc.wxDateTime_SetToLastWeekDay,(self,) + _args, _kwargs) return val @@ -421,6 +417,9 @@ class wxDateTimePtr : def GetDay(self, *_args, **_kwargs): val = apply(utilsc.wxDateTime_GetDay,(self,) + _args, _kwargs) return val + def GetWeekDay(self, *_args, **_kwargs): + val = apply(utilsc.wxDateTime_GetWeekDay,(self,) + _args, _kwargs) + return val def GetHour(self, *_args, **_kwargs): val = apply(utilsc.wxDateTime_GetHour,(self,) + _args, _kwargs) return val diff --git a/wxPython/src/msw/windows.cpp b/wxPython/src/msw/windows.cpp index b1e106ce9e..80a811f400 100644 --- a/wxPython/src/msw/windows.cpp +++ b/wxPython/src/msw/windows.cpp @@ -5972,684 +5972,6 @@ static PyObject *_wrap_wxPanel_SetDefaultItem(PyObject *self, PyObject *args, Py return _resultobj; } -static void *SwigwxDialogTowxPanel(void *ptr) { - wxDialog *src; - wxPanel *dest; - src = (wxDialog *) ptr; - dest = (wxPanel *) src; - return (void *) dest; -} - -static void *SwigwxDialogTowxWindow(void *ptr) { - wxDialog *src; - wxWindow *dest; - src = (wxDialog *) ptr; - dest = (wxWindow *) src; - return (void *) dest; -} - -static void *SwigwxDialogTowxEvtHandler(void *ptr) { - wxDialog *src; - wxEvtHandler *dest; - src = (wxDialog *) ptr; - dest = (wxEvtHandler *) src; - return (void *) dest; -} - -static void *SwigwxDialogTowxObject(void *ptr) { - wxDialog *src; - wxObject *dest; - src = (wxDialog *) ptr; - dest = (wxObject *) src; - return (void *) dest; -} - -#define new_wxDialog(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6) (new wxDialog(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6)) -static PyObject *_wrap_new_wxDialog(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxDialog * _result; - wxWindow * _arg0; - wxWindowID _arg1; - wxString * _arg2; - wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition; - wxSize * _arg4 = (wxSize *) &wxDefaultSize; - long _arg5 = (long ) wxDEFAULT_DIALOG_STYLE; - char * _arg6 = (char *) "dialogBox"; - PyObject * _argo0 = 0; - PyObject * _obj2 = 0; - wxPoint temp; - PyObject * _obj3 = 0; - wxSize temp0; - PyObject * _obj4 = 0; - char *_kwnames[] = { "parent","id","title","pos","size","style","name", NULL }; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiO|OOls:new_wxDialog",_kwnames,&_argo0,&_arg1,&_obj2,&_obj3,&_obj4,&_arg5,&_arg6)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of new_wxDialog. Expected _wxWindow_p."); - return NULL; - } - } -{ -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj2) && !PyUnicode_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj2, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg2 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj2)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg2 = new wxString(PyString_AS_STRING(_obj2), PyString_GET_SIZE(_obj2)); -#endif -} - if (_obj3) -{ - _arg3 = &temp; - if (! wxPoint_helper(_obj3, &_arg3)) - return NULL; -} - if (_obj4) -{ - _arg4 = &temp0; - if (! wxSize_helper(_obj4, &_arg4)) - return NULL; -} -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxDialog *)new_wxDialog(_arg0,_arg1,*_arg2,*_arg3,*_arg4,_arg5,_arg6); - - wxPy_END_ALLOW_THREADS; - if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxDialog_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } -{ - if (_obj2) - delete _arg2; -} - return _resultobj; -} - -#define new_wxPreDialog() (new wxDialog()) -static PyObject *_wrap_new_wxPreDialog(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxDialog * _result; - char *_kwnames[] = { NULL }; - char _ptemp[128]; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,":new_wxPreDialog",_kwnames)) - return NULL; -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxDialog *)new_wxPreDialog(); - - wxPy_END_ALLOW_THREADS; - if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxDialog_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } - return _resultobj; -} - -#define wxDialog_Create(_swigobj,_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6) (_swigobj->Create(_swigarg0,_swigarg1,_swigarg2,_swigarg3,_swigarg4,_swigarg5,_swigarg6)) -static PyObject *_wrap_wxDialog_Create(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - wxDialog * _arg0; - wxWindow * _arg1; - wxWindowID _arg2; - wxString * _arg3; - wxPoint * _arg4 = (wxPoint *) &wxDefaultPosition; - wxSize * _arg5 = (wxSize *) &wxDefaultSize; - long _arg6 = (long ) wxDEFAULT_DIALOG_STYLE; - char * _arg7 = (char *) "dialogBox"; - PyObject * _argo0 = 0; - PyObject * _argo1 = 0; - PyObject * _obj3 = 0; - wxPoint temp; - PyObject * _obj4 = 0; - wxSize temp0; - PyObject * _obj5 = 0; - char *_kwnames[] = { "self","parent","id","title","pos","size","style","name", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOiO|OOls:wxDialog_Create",_kwnames,&_argo0,&_argo1,&_arg2,&_obj3,&_obj4,&_obj5,&_arg6,&_arg7)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDialog_Create. Expected _wxDialog_p."); - return NULL; - } - } - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxWindow_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxDialog_Create. Expected _wxWindow_p."); - return NULL; - } - } -{ -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj3) && !PyUnicode_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj3, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg3 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj3)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg3 = new wxString(PyString_AS_STRING(_obj3), PyString_GET_SIZE(_obj3)); -#endif -} - if (_obj4) -{ - _arg4 = &temp; - if (! wxPoint_helper(_obj4, &_arg4)) - return NULL; -} - if (_obj5) -{ - _arg5 = &temp0; - if (! wxSize_helper(_obj5, &_arg5)) - return NULL; -} -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxDialog_Create(_arg0,_arg1,_arg2,*_arg3,*_arg4,*_arg5,_arg6,_arg7); - - wxPy_END_ALLOW_THREADS; - if (PyErr_Occurred()) return NULL; -} _resultobj = Py_BuildValue("i",_result); -{ - if (_obj3) - delete _arg3; -} - return _resultobj; -} - -#define wxDialog_Centre(_swigobj,_swigarg0) (_swigobj->Centre(_swigarg0)) -static PyObject *_wrap_wxDialog_Centre(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxDialog * _arg0; - int _arg1 = (int ) wxBOTH; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self","direction", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxDialog_Centre",_kwnames,&_argo0,&_arg1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDialog_Centre. Expected _wxDialog_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxDialog_Centre(_arg0,_arg1); - - wxPy_END_ALLOW_THREADS; - if (PyErr_Occurred()) return NULL; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxDialog_EndModal(_swigobj,_swigarg0) (_swigobj->EndModal(_swigarg0)) -static PyObject *_wrap_wxDialog_EndModal(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxDialog * _arg0; - int _arg1; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self","retCode", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxDialog_EndModal",_kwnames,&_argo0,&_arg1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDialog_EndModal. Expected _wxDialog_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxDialog_EndModal(_arg0,_arg1); - - wxPy_END_ALLOW_THREADS; - if (PyErr_Occurred()) return NULL; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxDialog_GetTitle(_swigobj) (_swigobj->GetTitle()) -static PyObject *_wrap_wxDialog_GetTitle(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxString * _result; - wxDialog * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxDialog_GetTitle",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDialog_GetTitle. Expected _wxDialog_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = new wxString (wxDialog_GetTitle(_arg0)); - - wxPy_END_ALLOW_THREADS; - if (PyErr_Occurred()) return NULL; -}{ - _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); -} -{ - delete _result; -} - return _resultobj; -} - -#define wxDialog_Iconize(_swigobj,_swigarg0) (_swigobj->Iconize(_swigarg0)) -static PyObject *_wrap_wxDialog_Iconize(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxDialog * _arg0; - bool _arg1; - PyObject * _argo0 = 0; - int tempbool1; - char *_kwnames[] = { "self","iconize", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxDialog_Iconize",_kwnames,&_argo0,&tempbool1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDialog_Iconize. Expected _wxDialog_p."); - return NULL; - } - } - _arg1 = (bool ) tempbool1; -{ - wxPy_BEGIN_ALLOW_THREADS; - wxDialog_Iconize(_arg0,_arg1); - - wxPy_END_ALLOW_THREADS; - if (PyErr_Occurred()) return NULL; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxDialog_IsIconized(_swigobj) (_swigobj->IsIconized()) -static PyObject *_wrap_wxDialog_IsIconized(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - wxDialog * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxDialog_IsIconized",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDialog_IsIconized. Expected _wxDialog_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxDialog_IsIconized(_arg0); - - wxPy_END_ALLOW_THREADS; - if (PyErr_Occurred()) return NULL; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxDialog_SetModal(_swigobj,_swigarg0) (_swigobj->SetModal(_swigarg0)) -static PyObject *_wrap_wxDialog_SetModal(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxDialog * _arg0; - bool _arg1; - PyObject * _argo0 = 0; - int tempbool1; - char *_kwnames[] = { "self","flag", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxDialog_SetModal",_kwnames,&_argo0,&tempbool1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDialog_SetModal. Expected _wxDialog_p."); - return NULL; - } - } - _arg1 = (bool ) tempbool1; -{ - wxPy_BEGIN_ALLOW_THREADS; - wxDialog_SetModal(_arg0,_arg1); - - wxPy_END_ALLOW_THREADS; - if (PyErr_Occurred()) return NULL; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxDialog_IsModal(_swigobj) (_swigobj->IsModal()) -static PyObject *_wrap_wxDialog_IsModal(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - wxDialog * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxDialog_IsModal",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDialog_IsModal. Expected _wxDialog_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxDialog_IsModal(_arg0); - - wxPy_END_ALLOW_THREADS; - if (PyErr_Occurred()) return NULL; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxDialog_SetTitle(_swigobj,_swigarg0) (_swigobj->SetTitle(_swigarg0)) -static PyObject *_wrap_wxDialog_SetTitle(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxDialog * _arg0; - wxString * _arg1; - PyObject * _argo0 = 0; - PyObject * _obj1 = 0; - char *_kwnames[] = { "self","title", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxDialog_SetTitle",_kwnames,&_argo0,&_obj1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDialog_SetTitle. Expected _wxDialog_p."); - return NULL; - } - } -{ -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif -} -{ - wxPy_BEGIN_ALLOW_THREADS; - wxDialog_SetTitle(_arg0,*_arg1); - - wxPy_END_ALLOW_THREADS; - if (PyErr_Occurred()) return NULL; -} Py_INCREF(Py_None); - _resultobj = Py_None; -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -#define wxDialog_Show(_swigobj,_swigarg0) (_swigobj->Show(_swigarg0)) -static PyObject *_wrap_wxDialog_Show(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - wxDialog * _arg0; - bool _arg1; - PyObject * _argo0 = 0; - int tempbool1; - char *_kwnames[] = { "self","show", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxDialog_Show",_kwnames,&_argo0,&tempbool1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDialog_Show. Expected _wxDialog_p."); - return NULL; - } - } - _arg1 = (bool ) tempbool1; -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxDialog_Show(_arg0,_arg1); - - wxPy_END_ALLOW_THREADS; - if (PyErr_Occurred()) return NULL; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxDialog_ShowModal(_swigobj) (_swigobj->ShowModal()) -static PyObject *_wrap_wxDialog_ShowModal(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - int _result; - wxDialog * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxDialog_ShowModal",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDialog_ShowModal. Expected _wxDialog_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxDialog_ShowModal(_arg0); - - wxPy_END_ALLOW_THREADS; - if (PyErr_Occurred()) return NULL; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxDialog_GetReturnCode(_swigobj) (_swigobj->GetReturnCode()) -static PyObject *_wrap_wxDialog_GetReturnCode(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - int _result; - wxDialog * _arg0; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxDialog_GetReturnCode",_kwnames,&_argo0)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDialog_GetReturnCode. Expected _wxDialog_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (int )wxDialog_GetReturnCode(_arg0); - - wxPy_END_ALLOW_THREADS; - if (PyErr_Occurred()) return NULL; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - -#define wxDialog_SetReturnCode(_swigobj,_swigarg0) (_swigobj->SetReturnCode(_swigarg0)) -static PyObject *_wrap_wxDialog_SetReturnCode(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxDialog * _arg0; - int _arg1; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self","retCode", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxDialog_SetReturnCode",_kwnames,&_argo0,&_arg1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDialog_SetReturnCode. Expected _wxDialog_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - wxDialog_SetReturnCode(_arg0,_arg1); - - wxPy_END_ALLOW_THREADS; - if (PyErr_Occurred()) return NULL; -} Py_INCREF(Py_None); - _resultobj = Py_None; - return _resultobj; -} - -#define wxDialog_CreateTextSizer(_swigobj,_swigarg0) (_swigobj->CreateTextSizer(_swigarg0)) -static PyObject *_wrap_wxDialog_CreateTextSizer(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxSizer * _result; - wxDialog * _arg0; - wxString * _arg1; - PyObject * _argo0 = 0; - PyObject * _obj1 = 0; - char *_kwnames[] = { "self","message", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxDialog_CreateTextSizer",_kwnames,&_argo0,&_obj1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDialog_CreateTextSizer. Expected _wxDialog_p."); - return NULL; - } - } -{ -#if PYTHON_API_VERSION >= 1009 - char* tmpPtr; int tmpSize; - if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1) - return NULL; - _arg1 = new wxString(tmpPtr, tmpSize); -#else - if (!PyString_Check(_obj1)) { - PyErr_SetString(PyExc_TypeError, wxStringErrorMsg); - return NULL; - } - _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1)); -#endif -} -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxSizer *)wxDialog_CreateTextSizer(_arg0,*_arg1); - - wxPy_END_ALLOW_THREADS; - if (PyErr_Occurred()) return NULL; -}{ _resultobj = wxPyMake_wxObject(_result); } -{ - if (_obj1) - delete _arg1; -} - return _resultobj; -} - -#define wxDialog_CreateButtonSizer(_swigobj,_swigarg0) (_swigobj->CreateButtonSizer(_swigarg0)) -static PyObject *_wrap_wxDialog_CreateButtonSizer(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - wxSizer * _result; - wxDialog * _arg0; - long _arg1; - PyObject * _argo0 = 0; - char *_kwnames[] = { "self","flags", NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Ol:wxDialog_CreateButtonSizer",_kwnames,&_argo0,&_arg1)) - return NULL; - if (_argo0) { - if (_argo0 == Py_None) { _arg0 = NULL; } - else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxDialog_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxDialog_CreateButtonSizer. Expected _wxDialog_p."); - return NULL; - } - } -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (wxSizer *)wxDialog_CreateButtonSizer(_arg0,_arg1); - - wxPy_END_ALLOW_THREADS; - if (PyErr_Occurred()) return NULL; -}{ _resultobj = wxPyMake_wxObject(_result); } - return _resultobj; -} - static void *SwigwxScrolledWindowTowxPanel(void *ptr) { wxScrolledWindow *src; wxPanel *dest; @@ -11174,23 +10496,6 @@ static PyMethodDef windowscMethods[] = { { "wxScrolledWindow_Create", (PyCFunction) _wrap_wxScrolledWindow_Create, METH_VARARGS | METH_KEYWORDS }, { "new_wxPreScrolledWindow", (PyCFunction) _wrap_new_wxPreScrolledWindow, METH_VARARGS | METH_KEYWORDS }, { "new_wxScrolledWindow", (PyCFunction) _wrap_new_wxScrolledWindow, METH_VARARGS | METH_KEYWORDS }, - { "wxDialog_CreateButtonSizer", (PyCFunction) _wrap_wxDialog_CreateButtonSizer, METH_VARARGS | METH_KEYWORDS }, - { "wxDialog_CreateTextSizer", (PyCFunction) _wrap_wxDialog_CreateTextSizer, METH_VARARGS | METH_KEYWORDS }, - { "wxDialog_SetReturnCode", (PyCFunction) _wrap_wxDialog_SetReturnCode, METH_VARARGS | METH_KEYWORDS }, - { "wxDialog_GetReturnCode", (PyCFunction) _wrap_wxDialog_GetReturnCode, METH_VARARGS | METH_KEYWORDS }, - { "wxDialog_ShowModal", (PyCFunction) _wrap_wxDialog_ShowModal, METH_VARARGS | METH_KEYWORDS }, - { "wxDialog_Show", (PyCFunction) _wrap_wxDialog_Show, METH_VARARGS | METH_KEYWORDS }, - { "wxDialog_SetTitle", (PyCFunction) _wrap_wxDialog_SetTitle, METH_VARARGS | METH_KEYWORDS }, - { "wxDialog_IsModal", (PyCFunction) _wrap_wxDialog_IsModal, METH_VARARGS | METH_KEYWORDS }, - { "wxDialog_SetModal", (PyCFunction) _wrap_wxDialog_SetModal, METH_VARARGS | METH_KEYWORDS }, - { "wxDialog_IsIconized", (PyCFunction) _wrap_wxDialog_IsIconized, METH_VARARGS | METH_KEYWORDS }, - { "wxDialog_Iconize", (PyCFunction) _wrap_wxDialog_Iconize, METH_VARARGS | METH_KEYWORDS }, - { "wxDialog_GetTitle", (PyCFunction) _wrap_wxDialog_GetTitle, METH_VARARGS | METH_KEYWORDS }, - { "wxDialog_EndModal", (PyCFunction) _wrap_wxDialog_EndModal, METH_VARARGS | METH_KEYWORDS }, - { "wxDialog_Centre", (PyCFunction) _wrap_wxDialog_Centre, METH_VARARGS | METH_KEYWORDS }, - { "wxDialog_Create", (PyCFunction) _wrap_wxDialog_Create, METH_VARARGS | METH_KEYWORDS }, - { "new_wxPreDialog", (PyCFunction) _wrap_new_wxPreDialog, METH_VARARGS | METH_KEYWORDS }, - { "new_wxDialog", (PyCFunction) _wrap_new_wxDialog, METH_VARARGS | METH_KEYWORDS }, { "wxPanel_SetDefaultItem", (PyCFunction) _wrap_wxPanel_SetDefaultItem, METH_VARARGS | METH_KEYWORDS }, { "wxPanel_GetDefaultItem", (PyCFunction) _wrap_wxPanel_GetDefaultItem, METH_VARARGS | METH_KEYWORDS }, { "wxPanel_InitDialog", (PyCFunction) _wrap_wxPanel_InitDialog, METH_VARARGS | METH_KEYWORDS }, @@ -11392,7 +10697,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_size_t","_wxWindowID",0}, { "_size_t","_uint",0}, { "_wxPanel","_wxScrolledWindow",SwigwxScrolledWindowTowxPanel}, - { "_wxPanel","_wxDialog",SwigwxDialogTowxPanel}, { "_uint","_wxCoord",0}, { "_uint","_wxPrintQuality",0}, { "_uint","_time_t",0}, @@ -11424,7 +10728,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxObject","_wxMenuBar",SwigwxMenuBarTowxObject}, { "_wxObject","_wxMenu",SwigwxMenuTowxObject}, { "_wxObject","_wxScrolledWindow",SwigwxScrolledWindowTowxObject}, - { "_wxObject","_wxDialog",SwigwxDialogTowxObject}, { "_wxObject","_wxPanel",SwigwxPanelTowxObject}, { "_wxObject","_wxWindow",SwigwxWindowTowxObject}, { "_wxObject","_wxPyValidator",SwigwxPyValidatorTowxObject}, @@ -11481,14 +10784,12 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxEvtHandler","_wxMenuBar",SwigwxMenuBarTowxEvtHandler}, { "_wxEvtHandler","_wxMenu",SwigwxMenuTowxEvtHandler}, { "_wxEvtHandler","_wxScrolledWindow",SwigwxScrolledWindowTowxEvtHandler}, - { "_wxEvtHandler","_wxDialog",SwigwxDialogTowxEvtHandler}, { "_wxEvtHandler","_wxPanel",SwigwxPanelTowxEvtHandler}, { "_wxEvtHandler","_wxWindow",SwigwxWindowTowxEvtHandler}, { "_wxEvtHandler","_wxPyValidator",SwigwxPyValidatorTowxEvtHandler}, { "_wxEvtHandler","_wxValidator",SwigwxValidatorTowxEvtHandler}, { "_wxWindow","_wxMenuBar",SwigwxMenuBarTowxWindow}, { "_wxWindow","_wxScrolledWindow",SwigwxScrolledWindowTowxWindow}, - { "_wxWindow","_wxDialog",SwigwxDialogTowxWindow}, { "_wxWindow","_wxPanel",SwigwxPanelTowxWindow}, {0,0,0}}; diff --git a/wxPython/src/msw/windows.py b/wxPython/src/msw/windows.py index 78d8b5a804..fd84b68863 100644 --- a/wxPython/src/msw/windows.py +++ b/wxPython/src/msw/windows.py @@ -600,70 +600,6 @@ def wxPrePanel(*_args,**_kwargs): return val -class wxDialogPtr(wxPanelPtr): - def __init__(self,this): - self.this = this - self.thisown = 0 - def Create(self, *_args, **_kwargs): - val = apply(windowsc.wxDialog_Create,(self,) + _args, _kwargs) - return val - def Centre(self, *_args, **_kwargs): - val = apply(windowsc.wxDialog_Centre,(self,) + _args, _kwargs) - return val - def EndModal(self, *_args, **_kwargs): - val = apply(windowsc.wxDialog_EndModal,(self,) + _args, _kwargs) - return val - def GetTitle(self, *_args, **_kwargs): - val = apply(windowsc.wxDialog_GetTitle,(self,) + _args, _kwargs) - return val - def Iconize(self, *_args, **_kwargs): - val = apply(windowsc.wxDialog_Iconize,(self,) + _args, _kwargs) - return val - def IsIconized(self, *_args, **_kwargs): - val = apply(windowsc.wxDialog_IsIconized,(self,) + _args, _kwargs) - return val - def SetModal(self, *_args, **_kwargs): - val = apply(windowsc.wxDialog_SetModal,(self,) + _args, _kwargs) - return val - def IsModal(self, *_args, **_kwargs): - val = apply(windowsc.wxDialog_IsModal,(self,) + _args, _kwargs) - return val - def SetTitle(self, *_args, **_kwargs): - val = apply(windowsc.wxDialog_SetTitle,(self,) + _args, _kwargs) - return val - def Show(self, *_args, **_kwargs): - val = apply(windowsc.wxDialog_Show,(self,) + _args, _kwargs) - return val - def ShowModal(self, *_args, **_kwargs): - val = apply(windowsc.wxDialog_ShowModal,(self,) + _args, _kwargs) - return val - def GetReturnCode(self, *_args, **_kwargs): - val = apply(windowsc.wxDialog_GetReturnCode,(self,) + _args, _kwargs) - return val - def SetReturnCode(self, *_args, **_kwargs): - val = apply(windowsc.wxDialog_SetReturnCode,(self,) + _args, _kwargs) - return val - def CreateTextSizer(self, *_args, **_kwargs): - val = apply(windowsc.wxDialog_CreateTextSizer,(self,) + _args, _kwargs) - return val - def CreateButtonSizer(self, *_args, **_kwargs): - val = apply(windowsc.wxDialog_CreateButtonSizer,(self,) + _args, _kwargs) - return val - def __repr__(self): - return "" % (self.this,) -class wxDialog(wxDialogPtr): - def __init__(self,*_args,**_kwargs): - self.this = apply(windowsc.new_wxDialog,_args,_kwargs) - self.thisown = 1 - - - -def wxPreDialog(*_args,**_kwargs): - val = wxDialogPtr(apply(windowsc.new_wxPreDialog,_args,_kwargs)) - val.thisown = 1 - return val - - class wxScrolledWindowPtr(wxPanelPtr): def __init__(self,this): self.this = this diff --git a/wxPython/src/msw/wx.cpp b/wxPython/src/msw/wx.cpp index 61274261aa..257180ea85 100644 --- a/wxPython/src/msw/wx.cpp +++ b/wxPython/src/msw/wx.cpp @@ -2169,6 +2169,16 @@ SWIGEXPORT(void) initwxc() { PyDict_SetItemString(d,"wxJOY_BUTTON4", PyInt_FromLong((long) wxJOY_BUTTON4)); PyDict_SetItemString(d,"wxJOY_BUTTON_ANY", PyInt_FromLong((long) wxJOY_BUTTON_ANY)); PyDict_SetItemString(d,"wxWS_EX_VALIDATE_RECURSIVELY", PyInt_FromLong((long) wxWS_EX_VALIDATE_RECURSIVELY)); + PyDict_SetItemString(d,"wxMM_TEXT", PyInt_FromLong((long) wxMM_TEXT)); + PyDict_SetItemString(d,"wxMM_LOMETRIC", PyInt_FromLong((long) wxMM_LOMETRIC)); + PyDict_SetItemString(d,"wxMM_HIMETRIC", PyInt_FromLong((long) wxMM_HIMETRIC)); + PyDict_SetItemString(d,"wxMM_LOENGLISH", PyInt_FromLong((long) wxMM_LOENGLISH)); + PyDict_SetItemString(d,"wxMM_HIENGLISH", PyInt_FromLong((long) wxMM_HIENGLISH)); + PyDict_SetItemString(d,"wxMM_TWIPS", PyInt_FromLong((long) wxMM_TWIPS)); + PyDict_SetItemString(d,"wxMM_ISOTROPIC", PyInt_FromLong((long) wxMM_ISOTROPIC)); + PyDict_SetItemString(d,"wxMM_ANISOTROPIC", PyInt_FromLong((long) wxMM_ANISOTROPIC)); + PyDict_SetItemString(d,"wxMM_POINTS", PyInt_FromLong((long) wxMM_POINTS)); + PyDict_SetItemString(d,"wxMM_METRIC", PyInt_FromLong((long) wxMM_METRIC)); PyDict_SetItemString(d,"wxDEFAULT", PyInt_FromLong((long) wxDEFAULT)); PyDict_SetItemString(d,"wxDECORATIVE", PyInt_FromLong((long) wxDECORATIVE)); PyDict_SetItemString(d,"wxROMAN", PyInt_FromLong((long) wxROMAN)); diff --git a/wxPython/src/msw/wx.py b/wxPython/src/msw/wx.py index 39b9db97e5..d112c77830 100644 --- a/wxPython/src/msw/wx.py +++ b/wxPython/src/msw/wx.py @@ -434,6 +434,16 @@ wxJOY_BUTTON3 = wxc.wxJOY_BUTTON3 wxJOY_BUTTON4 = wxc.wxJOY_BUTTON4 wxJOY_BUTTON_ANY = wxc.wxJOY_BUTTON_ANY wxWS_EX_VALIDATE_RECURSIVELY = wxc.wxWS_EX_VALIDATE_RECURSIVELY +wxMM_TEXT = wxc.wxMM_TEXT +wxMM_LOMETRIC = wxc.wxMM_LOMETRIC +wxMM_HIMETRIC = wxc.wxMM_HIMETRIC +wxMM_LOENGLISH = wxc.wxMM_LOENGLISH +wxMM_HIENGLISH = wxc.wxMM_HIENGLISH +wxMM_TWIPS = wxc.wxMM_TWIPS +wxMM_ISOTROPIC = wxc.wxMM_ISOTROPIC +wxMM_ANISOTROPIC = wxc.wxMM_ANISOTROPIC +wxMM_POINTS = wxc.wxMM_POINTS +wxMM_METRIC = wxc.wxMM_METRIC wxDEFAULT = wxc.wxDEFAULT wxDECORATIVE = wxc.wxDECORATIVE wxROMAN = wxc.wxROMAN @@ -1399,7 +1409,7 @@ NULL = None # For backwards compatibility only. You should really be wxColor = wxColour wxNamedColor = wxNamedColour - +wxPen = wxPyPen # backwards compatibility wxNoRefBitmap = wxBitmap diff --git a/wxPython/src/utils.i b/wxPython/src/utils.i index 100f7a1160..dc975a7938 100644 --- a/wxPython/src/utils.i +++ b/wxPython/src/utils.i @@ -516,10 +516,10 @@ public: int n = 1, Month month = Inv_Month, int year = Inv_Year); - wxDateTime GetWeekDay(WeekDay weekday, - int n = 1, - Month month = Inv_Month, - int year = Inv_Year); +// wxDateTime GetWeekDay(WeekDay weekday, +// int n = 1, +// Month month = Inv_Month, +// int year = Inv_Year); // sets to the last weekday in the given month, year bool SetToLastWeekDay(WeekDay weekday, diff --git a/wxPython/src/windows.i b/wxPython/src/windows.i index c75d8aeaab..4905945433 100644 --- a/wxPython/src/windows.i +++ b/wxPython/src/windows.i @@ -256,7 +256,7 @@ public: void Layout(); bool LoadFromResource(wxWindow* parent, const wxString& resourceName, const wxResourceTable* resourceTable = NULL); void Lower(); - void MakeModal(bool flag); + void MakeModal(bool flag=TRUE); %name(MoveXY)void Move(int x, int y); void Move(const wxPoint& point); @@ -377,6 +377,8 @@ public: static int NextControlId(int id); static int PrevControlId(int id); + void SetAcceleratorTable(const wxAcceleratorTable& accel); + wxAcceleratorTable *GetAcceleratorTable(); }; @@ -436,46 +438,6 @@ public: //--------------------------------------------------------------------------- -class wxDialog : public wxPanel { -public: - wxDialog(wxWindow* parent, - const wxWindowID id, - const wxString& title, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = wxDEFAULT_DIALOG_STYLE, - const char* name = "dialogBox"); - %name(wxPreDialog)wxDialog(); - - bool Create(wxWindow* parent, - const wxWindowID id, - const wxString& title, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = wxDEFAULT_DIALOG_STYLE, - const char* name = "dialogBox"); - - void Centre(int direction = wxBOTH); - void EndModal(int retCode); - wxString GetTitle(); - void Iconize(bool iconize); - bool IsIconized(); - void SetModal(bool flag); - bool IsModal(); - void SetTitle(const wxString& title); - bool Show(bool show); - int ShowModal(); - - int GetReturnCode(); - void SetReturnCode(int retCode); - - wxSizer* CreateTextSizer( const wxString &message ); - wxSizer* CreateButtonSizer( long flags ); - -}; - -//--------------------------------------------------------------------------- - // TODO: Add wrappers for the wxScrollHelper class, make wxScrolledWindow // derive from it and wxPanel.