reSWIGged
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29135 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
7e63a44037
commit
629e65c221
@ -790,11 +790,12 @@ PyObject *wxPyTreeListCtrl_GetNextChild(wxPyTreeListCtrl *self,wxTreeItemId cons
|
||||
} else if (target == Py_None) {
|
||||
Py_DECREF(Py_None);
|
||||
target = o;
|
||||
} else {
|
||||
o2 = target;
|
||||
target = PyTuple_New(1);
|
||||
PyTuple_SetItem(target, 0, o2);
|
||||
|
||||
} else {
|
||||
if (!PyTuple_Check(target)) {
|
||||
o2 = target;
|
||||
target = PyTuple_New(1);
|
||||
PyTuple_SetItem(target, 0, o2);
|
||||
}
|
||||
o3 = PyTuple_New(1);
|
||||
PyTuple_SetItem(o3, 0, o);
|
||||
|
||||
@ -804,7 +805,7 @@ PyObject *wxPyTreeListCtrl_GetNextChild(wxPyTreeListCtrl *self,wxTreeItemId cons
|
||||
Py_DECREF(o3);
|
||||
}
|
||||
return target;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
PyObject *wxPyTreeListCtrl_GetBoundingRect(wxPyTreeListCtrl *self,wxTreeItemId const &item,bool textOnly){
|
||||
|
@ -475,11 +475,12 @@ SWIG_Check_int(PyObject* obj)
|
||||
} else if (target == Py_None) {
|
||||
Py_DECREF(Py_None);
|
||||
target = o;
|
||||
} else {
|
||||
o2 = target;
|
||||
target = PyTuple_New(1);
|
||||
PyTuple_SetItem(target, 0, o2);
|
||||
|
||||
} else {
|
||||
if (!PyTuple_Check(target)) {
|
||||
o2 = target;
|
||||
target = PyTuple_New(1);
|
||||
PyTuple_SetItem(target, 0, o2);
|
||||
}
|
||||
o3 = PyTuple_New(1);
|
||||
PyTuple_SetItem(o3, 0, o);
|
||||
|
||||
@ -489,7 +490,7 @@ SWIG_Check_int(PyObject* obj)
|
||||
Py_DECREF(o3);
|
||||
}
|
||||
return target;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -482,11 +482,12 @@ SWIG_Check_bool(PyObject* obj)
|
||||
} else if (target == Py_None) {
|
||||
Py_DECREF(Py_None);
|
||||
target = o;
|
||||
} else {
|
||||
o2 = target;
|
||||
target = PyTuple_New(1);
|
||||
PyTuple_SetItem(target, 0, o2);
|
||||
|
||||
} else {
|
||||
if (!PyTuple_Check(target)) {
|
||||
o2 = target;
|
||||
target = PyTuple_New(1);
|
||||
PyTuple_SetItem(target, 0, o2);
|
||||
}
|
||||
o3 = PyTuple_New(1);
|
||||
PyTuple_SetItem(o3, 0, o);
|
||||
|
||||
@ -496,7 +497,7 @@ SWIG_Check_bool(PyObject* obj)
|
||||
Py_DECREF(o3);
|
||||
}
|
||||
return target;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -599,11 +599,12 @@ void wxListBox_SetItemFont(wxListBox *self,int item,wxFont const &f){
|
||||
} else if (target == Py_None) {
|
||||
Py_DECREF(Py_None);
|
||||
target = o;
|
||||
} else {
|
||||
o2 = target;
|
||||
target = PyTuple_New(1);
|
||||
PyTuple_SetItem(target, 0, o2);
|
||||
|
||||
} else {
|
||||
if (!PyTuple_Check(target)) {
|
||||
o2 = target;
|
||||
target = PyTuple_New(1);
|
||||
PyTuple_SetItem(target, 0, o2);
|
||||
}
|
||||
o3 = PyTuple_New(1);
|
||||
PyTuple_SetItem(o3, 0, o);
|
||||
|
||||
@ -613,7 +614,7 @@ void wxListBox_SetItemFont(wxListBox *self,int item,wxFont const &f){
|
||||
Py_DECREF(o3);
|
||||
}
|
||||
return target;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -7260,6 +7260,22 @@ class Window(EvtHandler):
|
||||
"""
|
||||
return _core_.Window_GetHandle(*args, **kwargs)
|
||||
|
||||
def AssociateHandle(*args, **kwargs):
|
||||
"""
|
||||
AssociateHandle(self, long handle)
|
||||
|
||||
Associate the window with a new native handle
|
||||
"""
|
||||
return _core_.Window_AssociateHandle(*args, **kwargs)
|
||||
|
||||
def DissociateHandle(*args, **kwargs):
|
||||
"""
|
||||
DissociateHandle(self)
|
||||
|
||||
Dissociate the current native handle from the window
|
||||
"""
|
||||
return _core_.Window_DissociateHandle(*args, **kwargs)
|
||||
|
||||
def HasScrollbar(*args, **kwargs):
|
||||
"""
|
||||
HasScrollbar(self, int orient) -> bool
|
||||
@ -9308,12 +9324,13 @@ class Sizer(Object):
|
||||
|
||||
def Show(*args, **kwargs):
|
||||
"""
|
||||
Show(self, item, bool show=True)
|
||||
Show(self, item, bool show=True, bool recursive=False) -> bool
|
||||
|
||||
Shows or hides an item managed by the sizer. To make a sizer item
|
||||
disappear or reappear, use Show followed by `Layout`. The *item*
|
||||
parameter can be either a window, a sizer, or the zero-based index of
|
||||
the item.
|
||||
the item. Use the recursive parameter to show or hide an item in a
|
||||
subsizer. Returns True if the item was found.
|
||||
"""
|
||||
return _core_.Sizer_Show(*args, **kwargs)
|
||||
|
||||
@ -9328,11 +9345,11 @@ class Sizer(Object):
|
||||
"""
|
||||
return _core_.Sizer_IsShown(*args, **kwargs)
|
||||
|
||||
def Hide(self, item):
|
||||
def Hide(self, item, recursive=False):
|
||||
"""
|
||||
A convenience method for Show(item, False).
|
||||
A convenience method for Show(item, False, recursive).
|
||||
"""
|
||||
self.Show(item, False)
|
||||
return self.Show(item, False, recursive)
|
||||
|
||||
def ShowItems(*args, **kwargs):
|
||||
"""
|
||||
|
@ -865,11 +865,12 @@ PyObject *wxRect_Get(wxRect *self){
|
||||
} else if (target == Py_None) {
|
||||
Py_DECREF(Py_None);
|
||||
target = o;
|
||||
} else {
|
||||
o2 = target;
|
||||
target = PyTuple_New(1);
|
||||
PyTuple_SetItem(target, 0, o2);
|
||||
|
||||
} else {
|
||||
if (!PyTuple_Check(target)) {
|
||||
o2 = target;
|
||||
target = PyTuple_New(1);
|
||||
PyTuple_SetItem(target, 0, o2);
|
||||
}
|
||||
o3 = PyTuple_New(1);
|
||||
PyTuple_SetItem(o3, 0, o);
|
||||
|
||||
@ -879,7 +880,7 @@ PyObject *wxRect_Get(wxRect *self){
|
||||
Py_DECREF(o3);
|
||||
}
|
||||
return target;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void wxPoint2D_Set(wxPoint2D *self,double x,double y){
|
||||
@ -1555,6 +1556,9 @@ bool wxWindow_UnregisterHotKey(wxWindow *self,int hotkeyId){
|
||||
long wxWindow_GetHandle(wxWindow *self){
|
||||
return wxPyGetWinHandle(self);
|
||||
}
|
||||
void wxWindow_AssociateHandle(wxWindow *self,long handle){
|
||||
self->AssociateHandle((WXWidget)handle);
|
||||
}
|
||||
|
||||
wxWindow* wxFindWindowById( long id, const wxWindow *parent = NULL ) {
|
||||
return wxWindow::FindWindowById(id, parent);
|
||||
@ -1908,16 +1912,16 @@ PyObject *wxSizer_GetChildren(wxSizer *self){
|
||||
wxSizerItemList& list = self->GetChildren();
|
||||
return wxPy_ConvertList(&list);
|
||||
}
|
||||
void wxSizer_Show(wxSizer *self,PyObject *item,bool show){
|
||||
bool wxSizer_Show(wxSizer *self,PyObject *item,bool show,bool recursive){
|
||||
bool blocked = wxPyBeginBlockThreads();
|
||||
wxPySizerItemInfo info = wxPySizerItemTypeHelper(item, False, True);
|
||||
wxPyEndBlockThreads(blocked);
|
||||
if ( info.window )
|
||||
self->Show(info.window, show);
|
||||
return self->Show(info.window, show, recursive);
|
||||
else if ( info.sizer )
|
||||
self->Show(info.sizer, show);
|
||||
return self->Show(info.sizer, show, recursive);
|
||||
else if ( info.gotPos )
|
||||
self->Show(info.pos, show);
|
||||
return self->Show(info.pos, show);
|
||||
}
|
||||
bool wxSizer_IsShown(wxSizer *self,PyObject *item){
|
||||
bool blocked = wxPyBeginBlockThreads();
|
||||
@ -27453,6 +27457,60 @@ static PyObject *_wrap_Window_GetHandle(PyObject *, PyObject *args, PyObject *kw
|
||||
}
|
||||
|
||||
|
||||
static PyObject *_wrap_Window_AssociateHandle(PyObject *, PyObject *args, PyObject *kwargs) {
|
||||
PyObject *resultobj;
|
||||
wxWindow *arg1 = (wxWindow *) 0 ;
|
||||
long arg2 ;
|
||||
PyObject * obj0 = 0 ;
|
||||
PyObject * obj1 = 0 ;
|
||||
char *kwnames[] = {
|
||||
(char *) "self",(char *) "handle", NULL
|
||||
};
|
||||
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Window_AssociateHandle",kwnames,&obj0,&obj1)) goto fail;
|
||||
if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxWindow,
|
||||
SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
|
||||
arg2 = (long)SWIG_As_long(obj1);
|
||||
if (PyErr_Occurred()) SWIG_fail;
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
wxWindow_AssociateHandle(arg1,arg2);
|
||||
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
if (PyErr_Occurred()) SWIG_fail;
|
||||
}
|
||||
Py_INCREF(Py_None); resultobj = Py_None;
|
||||
return resultobj;
|
||||
fail:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
static PyObject *_wrap_Window_DissociateHandle(PyObject *, PyObject *args, PyObject *kwargs) {
|
||||
PyObject *resultobj;
|
||||
wxWindow *arg1 = (wxWindow *) 0 ;
|
||||
PyObject * obj0 = 0 ;
|
||||
char *kwnames[] = {
|
||||
(char *) "self", NULL
|
||||
};
|
||||
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:Window_DissociateHandle",kwnames,&obj0)) goto fail;
|
||||
if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxWindow,
|
||||
SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
(arg1)->DissociateHandle();
|
||||
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
if (PyErr_Occurred()) SWIG_fail;
|
||||
}
|
||||
Py_INCREF(Py_None); resultobj = Py_None;
|
||||
return resultobj;
|
||||
fail:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
static PyObject *_wrap_Window_HasScrollbar(PyObject *, PyObject *args, PyObject *kwargs) {
|
||||
PyObject *resultobj;
|
||||
wxWindow *arg1 = (wxWindow *) 0 ;
|
||||
@ -35922,14 +35980,17 @@ static PyObject *_wrap_Sizer_Show(PyObject *, PyObject *args, PyObject *kwargs)
|
||||
wxSizer *arg1 = (wxSizer *) 0 ;
|
||||
PyObject *arg2 = (PyObject *) 0 ;
|
||||
bool arg3 = (bool) True ;
|
||||
bool arg4 = (bool) False ;
|
||||
bool result;
|
||||
PyObject * obj0 = 0 ;
|
||||
PyObject * obj1 = 0 ;
|
||||
PyObject * obj2 = 0 ;
|
||||
PyObject * obj3 = 0 ;
|
||||
char *kwnames[] = {
|
||||
(char *) "self",(char *) "item",(char *) "show", NULL
|
||||
(char *) "self",(char *) "item",(char *) "show",(char *) "recursive", NULL
|
||||
};
|
||||
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:Sizer_Show",kwnames,&obj0,&obj1,&obj2)) goto fail;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OO:Sizer_Show",kwnames,&obj0,&obj1,&obj2,&obj3)) goto fail;
|
||||
if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxSizer,
|
||||
SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
|
||||
arg2 = obj1;
|
||||
@ -35937,14 +35998,20 @@ static PyObject *_wrap_Sizer_Show(PyObject *, PyObject *args, PyObject *kwargs)
|
||||
arg3 = (bool)SWIG_As_bool(obj2);
|
||||
if (PyErr_Occurred()) SWIG_fail;
|
||||
}
|
||||
if (obj3) {
|
||||
arg4 = (bool)SWIG_As_bool(obj3);
|
||||
if (PyErr_Occurred()) SWIG_fail;
|
||||
}
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
wxSizer_Show(arg1,arg2,arg3);
|
||||
result = (bool)wxSizer_Show(arg1,arg2,arg3,arg4);
|
||||
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
if (PyErr_Occurred()) SWIG_fail;
|
||||
}
|
||||
Py_INCREF(Py_None); resultobj = Py_None;
|
||||
{
|
||||
resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj);
|
||||
}
|
||||
return resultobj;
|
||||
fail:
|
||||
return NULL;
|
||||
@ -41132,6 +41199,8 @@ static PyMethodDef SwigMethods[] = {
|
||||
{ (char *)"Window_PopupMenuXY", (PyCFunction) _wrap_Window_PopupMenuXY, METH_VARARGS | METH_KEYWORDS, NULL },
|
||||
{ (char *)"Window_PopupMenu", (PyCFunction) _wrap_Window_PopupMenu, METH_VARARGS | METH_KEYWORDS, NULL },
|
||||
{ (char *)"Window_GetHandle", (PyCFunction) _wrap_Window_GetHandle, METH_VARARGS | METH_KEYWORDS, NULL },
|
||||
{ (char *)"Window_AssociateHandle", (PyCFunction) _wrap_Window_AssociateHandle, METH_VARARGS | METH_KEYWORDS, NULL },
|
||||
{ (char *)"Window_DissociateHandle", (PyCFunction) _wrap_Window_DissociateHandle, METH_VARARGS | METH_KEYWORDS, NULL },
|
||||
{ (char *)"Window_HasScrollbar", (PyCFunction) _wrap_Window_HasScrollbar, METH_VARARGS | METH_KEYWORDS, NULL },
|
||||
{ (char *)"Window_SetScrollbar", (PyCFunction) _wrap_Window_SetScrollbar, METH_VARARGS | METH_KEYWORDS, NULL },
|
||||
{ (char *)"Window_SetScrollPos", (PyCFunction) _wrap_Window_SetScrollPos, METH_VARARGS | METH_KEYWORDS, NULL },
|
||||
|
@ -621,11 +621,12 @@ SWIG_Check_int(PyObject* obj)
|
||||
} else if (target == Py_None) {
|
||||
Py_DECREF(Py_None);
|
||||
target = o;
|
||||
} else {
|
||||
o2 = target;
|
||||
target = PyTuple_New(1);
|
||||
PyTuple_SetItem(target, 0, o2);
|
||||
|
||||
} else {
|
||||
if (!PyTuple_Check(target)) {
|
||||
o2 = target;
|
||||
target = PyTuple_New(1);
|
||||
PyTuple_SetItem(target, 0, o2);
|
||||
}
|
||||
o3 = PyTuple_New(1);
|
||||
PyTuple_SetItem(o3, 0, o);
|
||||
|
||||
@ -635,7 +636,7 @@ SWIG_Check_int(PyObject* obj)
|
||||
Py_DECREF(o3);
|
||||
}
|
||||
return target;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
PyObject *wxPen_GetDashes(wxPen *self){
|
||||
|
@ -205,6 +205,8 @@ class SystemOptionsPtr(SystemOptions):
|
||||
if not hasattr(self,"thisown"): self.thisown = 0
|
||||
self.__class__ = SystemOptions
|
||||
_misc_.SystemOptions_swigregister(SystemOptionsPtr)
|
||||
cvar = _misc_.cvar
|
||||
WINDOW_DEFAULT_VARIANT = cvar.WINDOW_DEFAULT_VARIANT
|
||||
|
||||
def SystemOptions_SetOption(*args, **kwargs):
|
||||
"""SystemOptions_SetOption(String name, String value)"""
|
||||
@ -544,7 +546,6 @@ class MutexGuiLockerPtr(MutexGuiLocker):
|
||||
if not hasattr(self,"thisown"): self.thisown = 0
|
||||
self.__class__ = MutexGuiLocker
|
||||
_misc_.MutexGuiLocker_swigregister(MutexGuiLockerPtr)
|
||||
cvar = _misc_.cvar
|
||||
FileSelectorPromptStr = cvar.FileSelectorPromptStr
|
||||
FileSelectorDefaultWildcardStr = cvar.FileSelectorDefaultWildcardStr
|
||||
DirSelectorPromptStr = cvar.DirSelectorPromptStr
|
||||
@ -3440,6 +3441,14 @@ class DateTime(object):
|
||||
"""GetWeek(self, int numWeek, int weekday=Mon, int flags=Monday_First) -> DateTime"""
|
||||
return _misc_.DateTime_GetWeek(*args, **kwargs)
|
||||
|
||||
SetToTheWeek = wx._deprecated(SetToTheWeek, "SetToTheWeek is deprecated, use (static) SetToWeekOfYear instead")
|
||||
GetWeek = wx._deprecated(GetWeek, "GetWeek is deprecated, use GetWeekOfYear instead")
|
||||
|
||||
def SetToWeekOfYear(*args, **kwargs):
|
||||
"""SetToWeekOfYear(int year, int numWeek, int weekday=Mon) -> DateTime"""
|
||||
return _misc_.DateTime_SetToWeekOfYear(*args, **kwargs)
|
||||
|
||||
SetToWeekOfYear = staticmethod(SetToWeekOfYear)
|
||||
def SetToLastMonthDay(*args, **kwargs):
|
||||
"""SetToLastMonthDay(self, int month=Inv_Month, int year=Inv_Year) -> DateTime"""
|
||||
return _misc_.DateTime_SetToLastMonthDay(*args, **kwargs)
|
||||
@ -3827,6 +3836,10 @@ def DateTimeFromDMY(*args, **kwargs):
|
||||
val.thisown = 1
|
||||
return val
|
||||
|
||||
def DateTime_SetToWeekOfYear(*args, **kwargs):
|
||||
"""DateTime_SetToWeekOfYear(int year, int numWeek, int weekday=Mon) -> DateTime"""
|
||||
return _misc_.DateTime_SetToWeekOfYear(*args, **kwargs)
|
||||
|
||||
class TimeSpan(object):
|
||||
def __repr__(self):
|
||||
return "<%s.%s; proxy of C++ wxTimeSpan instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
|
||||
|
@ -470,6 +470,7 @@ SWIG_Check_int(PyObject* obj)
|
||||
return SWIG_AsVal_int(obj, (int*)0);
|
||||
}
|
||||
|
||||
static const wxString wxPyWINDOW_DEFAULT_VARIANT(wxWINDOW_DEFAULT_VARIANT);
|
||||
|
||||
#include <wx/stockitem.h>
|
||||
|
||||
@ -556,11 +557,12 @@ SWIG_Check_bool(PyObject* obj)
|
||||
} else if (target == Py_None) {
|
||||
Py_DECREF(Py_None);
|
||||
target = o;
|
||||
} else {
|
||||
o2 = target;
|
||||
target = PyTuple_New(1);
|
||||
PyTuple_SetItem(target, 0, o2);
|
||||
|
||||
} else {
|
||||
if (!PyTuple_Check(target)) {
|
||||
o2 = target;
|
||||
target = PyTuple_New(1);
|
||||
PyTuple_SetItem(target, 0, o2);
|
||||
}
|
||||
o3 = PyTuple_New(1);
|
||||
PyTuple_SetItem(o3, 0, o);
|
||||
|
||||
@ -570,7 +572,7 @@ SWIG_Check_bool(PyObject* obj)
|
||||
Py_DECREF(o3);
|
||||
}
|
||||
return target;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -1934,6 +1936,26 @@ static PyObject * SystemSettings_swigregister(PyObject *, PyObject *args) {
|
||||
Py_INCREF(obj);
|
||||
return Py_BuildValue((char *)"");
|
||||
}
|
||||
static int _wrap_WINDOW_DEFAULT_VARIANT_set(PyObject *) {
|
||||
PyErr_SetString(PyExc_TypeError,"Variable WINDOW_DEFAULT_VARIANT is read-only.");
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
static PyObject *_wrap_WINDOW_DEFAULT_VARIANT_get() {
|
||||
PyObject *pyobj;
|
||||
|
||||
{
|
||||
#if wxUSE_UNICODE
|
||||
pyobj = PyUnicode_FromWideChar((&wxPyWINDOW_DEFAULT_VARIANT)->c_str(), (&wxPyWINDOW_DEFAULT_VARIANT)->Len());
|
||||
#else
|
||||
pyobj = PyString_FromStringAndSize((&wxPyWINDOW_DEFAULT_VARIANT)->c_str(), (&wxPyWINDOW_DEFAULT_VARIANT)->Len());
|
||||
#endif
|
||||
}
|
||||
return pyobj;
|
||||
}
|
||||
|
||||
|
||||
static PyObject *_wrap_new_SystemOptions(PyObject *, PyObject *args, PyObject *kwargs) {
|
||||
PyObject *resultobj;
|
||||
wxSystemOptions *result;
|
||||
@ -18802,6 +18824,46 @@ static PyObject *_wrap_DateTime_GetWeek(PyObject *, PyObject *args, PyObject *kw
|
||||
}
|
||||
|
||||
|
||||
static PyObject *_wrap_DateTime_SetToWeekOfYear(PyObject *, PyObject *args, PyObject *kwargs) {
|
||||
PyObject *resultobj;
|
||||
int arg1 ;
|
||||
int arg2 ;
|
||||
int arg3 = (int) wxDateTime::Mon ;
|
||||
wxDateTime result;
|
||||
PyObject * obj0 = 0 ;
|
||||
PyObject * obj1 = 0 ;
|
||||
PyObject * obj2 = 0 ;
|
||||
char *kwnames[] = {
|
||||
(char *) "year",(char *) "numWeek",(char *) "weekday", NULL
|
||||
};
|
||||
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:DateTime_SetToWeekOfYear",kwnames,&obj0,&obj1,&obj2)) goto fail;
|
||||
arg1 = (int)SWIG_As_int(obj0);
|
||||
if (PyErr_Occurred()) SWIG_fail;
|
||||
arg2 = (int)SWIG_As_int(obj1);
|
||||
if (PyErr_Occurred()) SWIG_fail;
|
||||
if (obj2) {
|
||||
arg3 = (int)SWIG_As_int(obj2);
|
||||
if (PyErr_Occurred()) SWIG_fail;
|
||||
}
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
result = wxDateTime::SetToWeekOfYear(arg1,arg2,(wxDateTime::WeekDay )arg3);
|
||||
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
if (PyErr_Occurred()) SWIG_fail;
|
||||
}
|
||||
{
|
||||
wxDateTime * resultptr;
|
||||
resultptr = new wxDateTime((wxDateTime &) result);
|
||||
resultobj = SWIG_NewPointerObj((void *)(resultptr), SWIGTYPE_p_wxDateTime, 1);
|
||||
}
|
||||
return resultobj;
|
||||
fail:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
static PyObject *_wrap_DateTime_SetToLastMonthDay(PyObject *, PyObject *args, PyObject *kwargs) {
|
||||
PyObject *resultobj;
|
||||
wxDateTime *arg1 = (wxDateTime *) 0 ;
|
||||
@ -29029,6 +29091,7 @@ static PyMethodDef SwigMethods[] = {
|
||||
{ (char *)"DateTime_GetLastWeekDay", (PyCFunction) _wrap_DateTime_GetLastWeekDay, METH_VARARGS | METH_KEYWORDS, NULL },
|
||||
{ (char *)"DateTime_SetToTheWeek", (PyCFunction) _wrap_DateTime_SetToTheWeek, METH_VARARGS | METH_KEYWORDS, NULL },
|
||||
{ (char *)"DateTime_GetWeek", (PyCFunction) _wrap_DateTime_GetWeek, METH_VARARGS | METH_KEYWORDS, NULL },
|
||||
{ (char *)"DateTime_SetToWeekOfYear", (PyCFunction) _wrap_DateTime_SetToWeekOfYear, METH_VARARGS | METH_KEYWORDS, NULL },
|
||||
{ (char *)"DateTime_SetToLastMonthDay", (PyCFunction) _wrap_DateTime_SetToLastMonthDay, METH_VARARGS | METH_KEYWORDS, NULL },
|
||||
{ (char *)"DateTime_GetLastMonthDay", (PyCFunction) _wrap_DateTime_GetLastMonthDay, METH_VARARGS | METH_KEYWORDS, NULL },
|
||||
{ (char *)"DateTime_SetToYearDay", (PyCFunction) _wrap_DateTime_SetToYearDay, METH_VARARGS | METH_KEYWORDS, NULL },
|
||||
@ -30136,6 +30199,7 @@ SWIGEXPORT(void) SWIG_init(void) {
|
||||
PyDict_SetItemString(d,"SYS_SCREEN_SMALL", SWIG_From_int((int)wxSYS_SCREEN_SMALL));
|
||||
PyDict_SetItemString(d,"SYS_SCREEN_DESKTOP", SWIG_From_int((int)wxSYS_SCREEN_DESKTOP));
|
||||
PyDict_SetItemString(d,(char*)"cvar", SWIG_globals);
|
||||
SWIG_addvarlink(SWIG_globals,(char*)"WINDOW_DEFAULT_VARIANT",_wrap_WINDOW_DEFAULT_VARIANT_get, _wrap_WINDOW_DEFAULT_VARIANT_set);
|
||||
SWIG_addvarlink(SWIG_globals,(char*)"FileSelectorPromptStr",_wrap_FileSelectorPromptStr_get, _wrap_FileSelectorPromptStr_set);
|
||||
SWIG_addvarlink(SWIG_globals,(char*)"FileSelectorDefaultWildcardStr",_wrap_FileSelectorDefaultWildcardStr_get, _wrap_FileSelectorDefaultWildcardStr_set);
|
||||
SWIG_addvarlink(SWIG_globals,(char*)"DirSelectorPromptStr",_wrap_DirSelectorPromptStr_get, _wrap_DirSelectorPromptStr_set);
|
||||
|
@ -551,11 +551,12 @@ SWIG_Check_bool(PyObject* obj)
|
||||
} else if (target == Py_None) {
|
||||
Py_DECREF(Py_None);
|
||||
target = o;
|
||||
} else {
|
||||
o2 = target;
|
||||
target = PyTuple_New(1);
|
||||
PyTuple_SetItem(target, 0, o2);
|
||||
|
||||
} else {
|
||||
if (!PyTuple_Check(target)) {
|
||||
o2 = target;
|
||||
target = PyTuple_New(1);
|
||||
PyTuple_SetItem(target, 0, o2);
|
||||
}
|
||||
o3 = PyTuple_New(1);
|
||||
PyTuple_SetItem(o3, 0, o);
|
||||
|
||||
@ -565,7 +566,7 @@ SWIG_Check_bool(PyObject* obj)
|
||||
Py_DECREF(o3);
|
||||
}
|
||||
return target;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -149,11 +149,11 @@ class CalendarEvent(_core.CommandEvent):
|
||||
|
||||
def PySetDate(self, date):
|
||||
"""takes datetime.datetime or datetime.date object"""
|
||||
self.SetDate(_py2wx(date))
|
||||
self.SetDate(_pydate2wxdate(date))
|
||||
|
||||
def PyGetDate(self):
|
||||
"""returns datetime.date object"""
|
||||
return _wx2py(self.GetDate())
|
||||
return _wxdate2pydate(self.GetDate())
|
||||
|
||||
|
||||
class CalendarEventPtr(CalendarEvent):
|
||||
@ -476,19 +476,19 @@ class CalendarCtrl(_core.Control):
|
||||
GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes)
|
||||
def PySetDate(self, date):
|
||||
"""takes datetime.datetime or datetime.date object"""
|
||||
self.SetDate(_py2wx(date))
|
||||
self.SetDate(_pydate2wxdate(date))
|
||||
|
||||
def PyGetDate(self):
|
||||
"""returns datetime.date object"""
|
||||
return _wx2py(self.GetDate())
|
||||
return _wxdate2pydate(self.GetDate())
|
||||
|
||||
def PySetLowerDateLimit(self, date):
|
||||
"""takes datetime.datetime or datetime.date object"""
|
||||
self.SetLowerDateLimit(_py2wx(date))
|
||||
self.SetLowerDateLimit(_pydate2wxdate(date))
|
||||
|
||||
def PySetUpperDateLimit(self, date):
|
||||
"""takes datetime.datetime or datetime.date object"""
|
||||
self.SetUpperDateLimit(_py2wx(date))
|
||||
self.SetUpperDateLimit(_pydate2wxdate(date))
|
||||
|
||||
def PySetDateRange(self, lowerdate, upperdate):
|
||||
"""takes datetime.datetime or datetime.date objects"""
|
||||
@ -497,11 +497,11 @@ class CalendarCtrl(_core.Control):
|
||||
|
||||
def PyGetLowerDateLimit(self):
|
||||
"""returns datetime.date object"""
|
||||
return _wx2py(self.GetLowerDateLimit())
|
||||
return _wxdate2pydate(self.GetLowerDateLimit())
|
||||
|
||||
def PyGetUpperDateLimit(self):
|
||||
"""returns datetime.date object"""
|
||||
return _wx2py(self.GetUpperDateLimit())
|
||||
return _wxdate2pydate(self.GetUpperDateLimit())
|
||||
|
||||
|
||||
class CalendarCtrlPtr(CalendarCtrl):
|
||||
@ -540,17 +540,20 @@ def CalendarCtrl_GetClassDefaultAttributes(*args, **kwargs):
|
||||
"""
|
||||
return _calendar.CalendarCtrl_GetClassDefaultAttributes(*args, **kwargs)
|
||||
|
||||
def _py2wx(date):
|
||||
def _pydate2wxdate(date):
|
||||
import datetime
|
||||
assert isinstance(date, (datetime.datetime, datetime.date))
|
||||
tt = date.timetuple()
|
||||
dmy = (tt[2], tt[1]-1, tt[0])
|
||||
return wx.DateTimeFromDMY(*dmy)
|
||||
|
||||
def _wx2py(date):
|
||||
def _wxdate2pydate(date):
|
||||
import datetime
|
||||
assert isinstance(date, wx.DateTime)
|
||||
ymd = map(int, date.FormatISODate().split('-'))
|
||||
return datetime.date(*ymd)
|
||||
if date.IsValid():
|
||||
ymd = map(int, date.FormatISODate().split('-'))
|
||||
return datetime.date(*ymd)
|
||||
else:
|
||||
return None
|
||||
|
||||
|
||||
|
@ -1203,11 +1203,12 @@ void wxGridCellAttr__setOORInfo(wxGridCellAttr *self,PyObject *_self){
|
||||
} else if (target == Py_None) {
|
||||
Py_DECREF(Py_None);
|
||||
target = o;
|
||||
} else {
|
||||
o2 = target;
|
||||
target = PyTuple_New(1);
|
||||
PyTuple_SetItem(target, 0, o2);
|
||||
|
||||
} else {
|
||||
if (!PyTuple_Check(target)) {
|
||||
o2 = target;
|
||||
target = PyTuple_New(1);
|
||||
PyTuple_SetItem(target, 0, o2);
|
||||
}
|
||||
o3 = PyTuple_New(1);
|
||||
PyTuple_SetItem(o3, 0, o);
|
||||
|
||||
@ -1217,7 +1218,7 @@ void wxGridCellAttr__setOORInfo(wxGridCellAttr *self,PyObject *_self){
|
||||
Py_DECREF(o3);
|
||||
}
|
||||
return target;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void wxGridCellAttrProvider__setOORInfo(wxGridCellAttrProvider *self,PyObject *_self){
|
||||
|
@ -561,11 +561,12 @@ private:
|
||||
} else if (target == Py_None) {
|
||||
Py_DECREF(Py_None);
|
||||
target = o;
|
||||
} else {
|
||||
o2 = target;
|
||||
target = PyTuple_New(1);
|
||||
PyTuple_SetItem(target, 0, o2);
|
||||
|
||||
} else {
|
||||
if (!PyTuple_Check(target)) {
|
||||
o2 = target;
|
||||
target = PyTuple_New(1);
|
||||
PyTuple_SetItem(target, 0, o2);
|
||||
}
|
||||
o3 = PyTuple_New(1);
|
||||
PyTuple_SetItem(o3, 0, o);
|
||||
|
||||
@ -575,7 +576,7 @@ private:
|
||||
Py_DECREF(o3);
|
||||
}
|
||||
return target;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -553,11 +553,12 @@ bool wxPyWizardPage_Create(wxPyWizardPage *self,wxWizard *parent,wxBitmap const
|
||||
} else if (target == Py_None) {
|
||||
Py_DECREF(Py_None);
|
||||
target = o;
|
||||
} else {
|
||||
o2 = target;
|
||||
target = PyTuple_New(1);
|
||||
PyTuple_SetItem(target, 0, o2);
|
||||
|
||||
} else {
|
||||
if (!PyTuple_Check(target)) {
|
||||
o2 = target;
|
||||
target = PyTuple_New(1);
|
||||
PyTuple_SetItem(target, 0, o2);
|
||||
}
|
||||
o3 = PyTuple_New(1);
|
||||
PyTuple_SetItem(o3, 0, o);
|
||||
|
||||
@ -567,7 +568,7 @@ bool wxPyWizardPage_Create(wxPyWizardPage *self,wxWizard *parent,wxBitmap const
|
||||
Py_DECREF(o3);
|
||||
}
|
||||
return target;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -7260,6 +7260,22 @@ class Window(EvtHandler):
|
||||
"""
|
||||
return _core_.Window_GetHandle(*args, **kwargs)
|
||||
|
||||
def AssociateHandle(*args, **kwargs):
|
||||
"""
|
||||
AssociateHandle(self, long handle)
|
||||
|
||||
Associate the window with a new native handle
|
||||
"""
|
||||
return _core_.Window_AssociateHandle(*args, **kwargs)
|
||||
|
||||
def DissociateHandle(*args, **kwargs):
|
||||
"""
|
||||
DissociateHandle(self)
|
||||
|
||||
Dissociate the current native handle from the window
|
||||
"""
|
||||
return _core_.Window_DissociateHandle(*args, **kwargs)
|
||||
|
||||
def OnPaint(*args, **kwargs):
|
||||
"""OnPaint(self, PaintEvent event)"""
|
||||
return _core_.Window_OnPaint(*args, **kwargs)
|
||||
@ -9377,12 +9393,13 @@ class Sizer(Object):
|
||||
|
||||
def Show(*args, **kwargs):
|
||||
"""
|
||||
Show(self, item, bool show=True)
|
||||
Show(self, item, bool show=True, bool recursive=False) -> bool
|
||||
|
||||
Shows or hides an item managed by the sizer. To make a sizer item
|
||||
disappear or reappear, use Show followed by `Layout`. The *item*
|
||||
parameter can be either a window, a sizer, or the zero-based index of
|
||||
the item.
|
||||
the item. Use the recursive parameter to show or hide an item in a
|
||||
subsizer. Returns True if the item was found.
|
||||
"""
|
||||
return _core_.Sizer_Show(*args, **kwargs)
|
||||
|
||||
@ -9397,11 +9414,11 @@ class Sizer(Object):
|
||||
"""
|
||||
return _core_.Sizer_IsShown(*args, **kwargs)
|
||||
|
||||
def Hide(self, item):
|
||||
def Hide(self, item, recursive=False):
|
||||
"""
|
||||
A convenience method for Show(item, False).
|
||||
A convenience method for Show(item, False, recursive).
|
||||
"""
|
||||
self.Show(item, False)
|
||||
return self.Show(item, False, recursive)
|
||||
|
||||
def ShowItems(*args, **kwargs):
|
||||
"""
|
||||
|
@ -205,6 +205,8 @@ class SystemOptionsPtr(SystemOptions):
|
||||
if not hasattr(self,"thisown"): self.thisown = 0
|
||||
self.__class__ = SystemOptions
|
||||
_misc_.SystemOptions_swigregister(SystemOptionsPtr)
|
||||
cvar = _misc_.cvar
|
||||
WINDOW_DEFAULT_VARIANT = cvar.WINDOW_DEFAULT_VARIANT
|
||||
|
||||
def SystemOptions_SetOption(*args, **kwargs):
|
||||
"""SystemOptions_SetOption(String name, String value)"""
|
||||
@ -544,7 +546,6 @@ class MutexGuiLockerPtr(MutexGuiLocker):
|
||||
if not hasattr(self,"thisown"): self.thisown = 0
|
||||
self.__class__ = MutexGuiLocker
|
||||
_misc_.MutexGuiLocker_swigregister(MutexGuiLockerPtr)
|
||||
cvar = _misc_.cvar
|
||||
FileSelectorPromptStr = cvar.FileSelectorPromptStr
|
||||
FileSelectorDefaultWildcardStr = cvar.FileSelectorDefaultWildcardStr
|
||||
DirSelectorPromptStr = cvar.DirSelectorPromptStr
|
||||
@ -3440,6 +3441,14 @@ class DateTime(object):
|
||||
"""GetWeek(self, int numWeek, int weekday=Mon, int flags=Monday_First) -> DateTime"""
|
||||
return _misc_.DateTime_GetWeek(*args, **kwargs)
|
||||
|
||||
SetToTheWeek = wx._deprecated(SetToTheWeek, "SetToTheWeek is deprecated, use (static) SetToWeekOfYear instead")
|
||||
GetWeek = wx._deprecated(GetWeek, "GetWeek is deprecated, use GetWeekOfYear instead")
|
||||
|
||||
def SetToWeekOfYear(*args, **kwargs):
|
||||
"""SetToWeekOfYear(int year, int numWeek, int weekday=Mon) -> DateTime"""
|
||||
return _misc_.DateTime_SetToWeekOfYear(*args, **kwargs)
|
||||
|
||||
SetToWeekOfYear = staticmethod(SetToWeekOfYear)
|
||||
def SetToLastMonthDay(*args, **kwargs):
|
||||
"""SetToLastMonthDay(self, int month=Inv_Month, int year=Inv_Year) -> DateTime"""
|
||||
return _misc_.DateTime_SetToLastMonthDay(*args, **kwargs)
|
||||
@ -3827,6 +3836,10 @@ def DateTimeFromDMY(*args, **kwargs):
|
||||
val.thisown = 1
|
||||
return val
|
||||
|
||||
def DateTime_SetToWeekOfYear(*args, **kwargs):
|
||||
"""DateTime_SetToWeekOfYear(int year, int numWeek, int weekday=Mon) -> DateTime"""
|
||||
return _misc_.DateTime_SetToWeekOfYear(*args, **kwargs)
|
||||
|
||||
class TimeSpan(object):
|
||||
def __repr__(self):
|
||||
return "<%s.%s; proxy of C++ wxTimeSpan instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
|
||||
|
@ -149,11 +149,11 @@ class CalendarEvent(_core.CommandEvent):
|
||||
|
||||
def PySetDate(self, date):
|
||||
"""takes datetime.datetime or datetime.date object"""
|
||||
self.SetDate(_py2wx(date))
|
||||
self.SetDate(_pydate2wxdate(date))
|
||||
|
||||
def PyGetDate(self):
|
||||
"""returns datetime.date object"""
|
||||
return _wx2py(self.GetDate())
|
||||
return _wxdate2pydate(self.GetDate())
|
||||
|
||||
|
||||
class CalendarEventPtr(CalendarEvent):
|
||||
@ -476,19 +476,19 @@ class CalendarCtrl(_core.Control):
|
||||
GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes)
|
||||
def PySetDate(self, date):
|
||||
"""takes datetime.datetime or datetime.date object"""
|
||||
self.SetDate(_py2wx(date))
|
||||
self.SetDate(_pydate2wxdate(date))
|
||||
|
||||
def PyGetDate(self):
|
||||
"""returns datetime.date object"""
|
||||
return _wx2py(self.GetDate())
|
||||
return _wxdate2pydate(self.GetDate())
|
||||
|
||||
def PySetLowerDateLimit(self, date):
|
||||
"""takes datetime.datetime or datetime.date object"""
|
||||
self.SetLowerDateLimit(_py2wx(date))
|
||||
self.SetLowerDateLimit(_pydate2wxdate(date))
|
||||
|
||||
def PySetUpperDateLimit(self, date):
|
||||
"""takes datetime.datetime or datetime.date object"""
|
||||
self.SetUpperDateLimit(_py2wx(date))
|
||||
self.SetUpperDateLimit(_pydate2wxdate(date))
|
||||
|
||||
def PySetDateRange(self, lowerdate, upperdate):
|
||||
"""takes datetime.datetime or datetime.date objects"""
|
||||
@ -497,11 +497,11 @@ class CalendarCtrl(_core.Control):
|
||||
|
||||
def PyGetLowerDateLimit(self):
|
||||
"""returns datetime.date object"""
|
||||
return _wx2py(self.GetLowerDateLimit())
|
||||
return _wxdate2pydate(self.GetLowerDateLimit())
|
||||
|
||||
def PyGetUpperDateLimit(self):
|
||||
"""returns datetime.date object"""
|
||||
return _wx2py(self.GetUpperDateLimit())
|
||||
return _wxdate2pydate(self.GetUpperDateLimit())
|
||||
|
||||
|
||||
class CalendarCtrlPtr(CalendarCtrl):
|
||||
@ -540,17 +540,20 @@ def CalendarCtrl_GetClassDefaultAttributes(*args, **kwargs):
|
||||
"""
|
||||
return _calendar.CalendarCtrl_GetClassDefaultAttributes(*args, **kwargs)
|
||||
|
||||
def _py2wx(date):
|
||||
def _pydate2wxdate(date):
|
||||
import datetime
|
||||
assert isinstance(date, (datetime.datetime, datetime.date))
|
||||
tt = date.timetuple()
|
||||
dmy = (tt[2], tt[1]-1, tt[0])
|
||||
return wx.DateTimeFromDMY(*dmy)
|
||||
|
||||
def _wx2py(date):
|
||||
def _wxdate2pydate(date):
|
||||
import datetime
|
||||
assert isinstance(date, wx.DateTime)
|
||||
ymd = map(int, date.FormatISODate().split('-'))
|
||||
return datetime.date(*ymd)
|
||||
if date.IsValid():
|
||||
ymd = map(int, date.FormatISODate().split('-'))
|
||||
return datetime.date(*ymd)
|
||||
else:
|
||||
return None
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user