reSWIGged
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27897 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -5671,6 +5671,15 @@ class Window(EvtHandler):
|
||||
"""
|
||||
return _core_.Window_MoveXY(*args, **kwargs)
|
||||
|
||||
def SetBestFittingSize(*args, **kwargs):
|
||||
"""
|
||||
SetBestFittingSize(self, Size size=DefaultSize)
|
||||
|
||||
A 'Smart' SetSize that will fill in default size components with the
|
||||
window's *best size* values. Also set's the minsize for use with sizers.
|
||||
"""
|
||||
return _core_.Window_SetBestFittingSize(*args, **kwargs)
|
||||
|
||||
def Raise(*args, **kwargs):
|
||||
"""
|
||||
Raise(self)
|
||||
@@ -6772,16 +6781,17 @@ class Window(EvtHandler):
|
||||
Sets the background colour of the window. Returns True if the colour
|
||||
was changed. The background colour is usually painted by the default
|
||||
EVT_ERASE_BACKGROUND event handler function under Windows and
|
||||
automatically under GTK.
|
||||
automatically under GTK. Using `wx.NullColour` will reset the window
|
||||
to the default background colour.
|
||||
|
||||
Note that setting the background colour may not cause an immediate
|
||||
refresh, so you may wish to call ClearBackground or Refresh after
|
||||
refresh, so you may wish to call `ClearBackground` or `Refresh` after
|
||||
calling this function.
|
||||
|
||||
Use this function with care under GTK+ as the new appearance of the
|
||||
window might not look equally well when used with themes, i.e GTK+'s
|
||||
ability to change its look as the user wishes with run-time loadable
|
||||
modules.
|
||||
Using this function will disable attempts to use themes for this
|
||||
window, if the system supports them. Use with care since usually the
|
||||
themes represent the appearance chosen by the user to be used for all
|
||||
applications on the system.
|
||||
"""
|
||||
return _core_.Window_SetBackgroundColour(*args, **kwargs)
|
||||
|
||||
@@ -8171,6 +8181,25 @@ class Control(Window):
|
||||
"""
|
||||
return _core_.Control_SetLabel(*args, **kwargs)
|
||||
|
||||
def GetAdjustMinSizeFlag(*args, **kwargs):
|
||||
"""
|
||||
GetAdjustMinSizeFlag(self) -> bool
|
||||
|
||||
Returns whether the minsize should be adjusted for this control when
|
||||
`SetLabel` or `SetFont` are called.
|
||||
"""
|
||||
return _core_.Control_GetAdjustMinSizeFlag(*args, **kwargs)
|
||||
|
||||
def SetAdjustMinSizeFlag(*args, **kwargs):
|
||||
"""
|
||||
SetAdjustMinSizeFlag(self, bool adjust)
|
||||
|
||||
By default controls will readjust their size and minsize when
|
||||
`SetLabel` or `SetFont` are called. This flag will allow you to
|
||||
control this behavior.
|
||||
"""
|
||||
return _core_.Control_SetAdjustMinSizeFlag(*args, **kwargs)
|
||||
|
||||
def GetClassDefaultAttributes(*args, **kwargs):
|
||||
"""
|
||||
GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
|
||||
|
@@ -22337,6 +22337,41 @@ static PyObject *_wrap_Window_MoveXY(PyObject *self, PyObject *args, PyObject *k
|
||||
}
|
||||
|
||||
|
||||
static PyObject *_wrap_Window_SetBestFittingSize(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject *resultobj;
|
||||
wxWindow *arg1 = (wxWindow *) 0 ;
|
||||
wxSize const &arg2_defvalue = wxDefaultSize ;
|
||||
wxSize *arg2 = (wxSize *) &arg2_defvalue ;
|
||||
wxSize temp2 ;
|
||||
PyObject * obj0 = 0 ;
|
||||
PyObject * obj1 = 0 ;
|
||||
char *kwnames[] = {
|
||||
(char *) "self",(char *) "size", NULL
|
||||
};
|
||||
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:Window_SetBestFittingSize",kwnames,&obj0,&obj1)) goto fail;
|
||||
if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxWindow,
|
||||
SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
|
||||
if (obj1) {
|
||||
{
|
||||
arg2 = &temp2;
|
||||
if ( ! wxSize_helper(obj1, &arg2)) SWIG_fail;
|
||||
}
|
||||
}
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
(arg1)->SetBestFittingSize((wxSize const &)*arg2);
|
||||
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
if (PyErr_Occurred()) SWIG_fail;
|
||||
}
|
||||
Py_INCREF(Py_None); resultobj = Py_None;
|
||||
return resultobj;
|
||||
fail:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
static PyObject *_wrap_Window_Raise(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject *resultobj;
|
||||
wxWindow *arg1 = (wxWindow *) 0 ;
|
||||
@@ -33060,6 +33095,63 @@ static PyObject *_wrap_Control_SetLabel(PyObject *self, PyObject *args, PyObject
|
||||
}
|
||||
|
||||
|
||||
static PyObject *_wrap_Control_GetAdjustMinSizeFlag(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject *resultobj;
|
||||
wxControl *arg1 = (wxControl *) 0 ;
|
||||
bool result;
|
||||
PyObject * obj0 = 0 ;
|
||||
char *kwnames[] = {
|
||||
(char *) "self", NULL
|
||||
};
|
||||
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:Control_GetAdjustMinSizeFlag",kwnames,&obj0)) goto fail;
|
||||
if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxControl,
|
||||
SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
result = (bool)(arg1)->GetAdjustMinSizeFlag();
|
||||
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
if (PyErr_Occurred()) SWIG_fail;
|
||||
}
|
||||
{
|
||||
resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj);
|
||||
}
|
||||
return resultobj;
|
||||
fail:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
static PyObject *_wrap_Control_SetAdjustMinSizeFlag(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject *resultobj;
|
||||
wxControl *arg1 = (wxControl *) 0 ;
|
||||
bool arg2 ;
|
||||
PyObject * obj0 = 0 ;
|
||||
PyObject * obj1 = 0 ;
|
||||
char *kwnames[] = {
|
||||
(char *) "self",(char *) "adjust", NULL
|
||||
};
|
||||
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Control_SetAdjustMinSizeFlag",kwnames,&obj0,&obj1)) goto fail;
|
||||
if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxControl,
|
||||
SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
|
||||
arg2 = (bool) SWIG_AsBool(obj1);
|
||||
if (PyErr_Occurred()) SWIG_fail;
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
(arg1)->SetAdjustMinSizeFlag(arg2);
|
||||
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
if (PyErr_Occurred()) SWIG_fail;
|
||||
}
|
||||
Py_INCREF(Py_None); resultobj = Py_None;
|
||||
return resultobj;
|
||||
fail:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
static PyObject *_wrap_Control_GetClassDefaultAttributes(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject *resultobj;
|
||||
int arg1 = (int) wxWINDOW_VARIANT_NORMAL ;
|
||||
@@ -40586,6 +40678,7 @@ static PyMethodDef SwigMethods[] = {
|
||||
{ (char *)"Window_SetSizeWH", (PyCFunction) _wrap_Window_SetSizeWH, METH_VARARGS | METH_KEYWORDS },
|
||||
{ (char *)"Window_Move", (PyCFunction) _wrap_Window_Move, METH_VARARGS | METH_KEYWORDS },
|
||||
{ (char *)"Window_MoveXY", (PyCFunction) _wrap_Window_MoveXY, METH_VARARGS | METH_KEYWORDS },
|
||||
{ (char *)"Window_SetBestFittingSize", (PyCFunction) _wrap_Window_SetBestFittingSize, METH_VARARGS | METH_KEYWORDS },
|
||||
{ (char *)"Window_Raise", (PyCFunction) _wrap_Window_Raise, METH_VARARGS | METH_KEYWORDS },
|
||||
{ (char *)"Window_Lower", (PyCFunction) _wrap_Window_Lower, METH_VARARGS | METH_KEYWORDS },
|
||||
{ (char *)"Window_SetClientSize", (PyCFunction) _wrap_Window_SetClientSize, METH_VARARGS | METH_KEYWORDS },
|
||||
@@ -40893,6 +40986,8 @@ static PyMethodDef SwigMethods[] = {
|
||||
{ (char *)"Control_Command", (PyCFunction) _wrap_Control_Command, METH_VARARGS | METH_KEYWORDS },
|
||||
{ (char *)"Control_GetLabel", (PyCFunction) _wrap_Control_GetLabel, METH_VARARGS | METH_KEYWORDS },
|
||||
{ (char *)"Control_SetLabel", (PyCFunction) _wrap_Control_SetLabel, METH_VARARGS | METH_KEYWORDS },
|
||||
{ (char *)"Control_GetAdjustMinSizeFlag", (PyCFunction) _wrap_Control_GetAdjustMinSizeFlag, METH_VARARGS | METH_KEYWORDS },
|
||||
{ (char *)"Control_SetAdjustMinSizeFlag", (PyCFunction) _wrap_Control_SetAdjustMinSizeFlag, METH_VARARGS | METH_KEYWORDS },
|
||||
{ (char *)"Control_GetClassDefaultAttributes", (PyCFunction) _wrap_Control_GetClassDefaultAttributes, METH_VARARGS | METH_KEYWORDS },
|
||||
{ (char *)"Control_swigregister", Control_swigregister, METH_VARARGS },
|
||||
{ (char *)"ItemContainer_Append", (PyCFunction) _wrap_ItemContainer_Append, METH_VARARGS | METH_KEYWORDS },
|
||||
|
@@ -1252,6 +1252,11 @@ public:
|
||||
PyObject* ro;
|
||||
ro = wxPyCBH_callCallbackObj(m_myInst, Py_BuildValue("(ii)",row,col));
|
||||
if (ro) {
|
||||
if (!PyString_Check(ro) && !PyUnicode_Check(ro)) {
|
||||
PyObject* old = ro;
|
||||
ro = PyObject_Str(ro);
|
||||
Py_DECREF(old);
|
||||
}
|
||||
rval = Py2wxString(ro);
|
||||
Py_DECREF(ro);
|
||||
}
|
||||
@@ -1381,7 +1386,7 @@ bool wxGridCellCoords_helper(PyObject* source, wxGridCellCoords** obj) {
|
||||
|
||||
bool wxGridCellCoords_typecheck(PyObject* source) {
|
||||
void* ptr;
|
||||
|
||||
|
||||
if (wxPySwigInstance_Check(source) &&
|
||||
wxPyConvertSwigPtr(source, (void **)&ptr, wxT("wxGridCellCoords")))
|
||||
return True;
|
||||
@@ -1389,7 +1394,7 @@ bool wxGridCellCoords_typecheck(PyObject* source) {
|
||||
PyErr_Clear();
|
||||
if (PySequence_Check(source) && PySequence_Length(source) == 2)
|
||||
return True;
|
||||
|
||||
|
||||
return False;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user