]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/mac/_controls_wrap.cpp
Missed header, -1->wxID_ANY replacements.
[wxWidgets.git] / wxPython / src / mac / _controls_wrap.cpp
index 5558feed4dfb0b97787f0455b8a38ed641c15e98..47d957c02863c4f9e2f7fccd189db70c4333d5af 100644 (file)
@@ -895,6 +895,7 @@ PyObject *wxPyTreeCtrl_GetSelections(wxPyTreeCtrl *self){
                 wxTreeItemId *tii = new wxTreeItemId(array.Item(x));
                 PyObject* item = wxPyConstructObject((void*)tii, wxT("wxTreeItemId"), True);
                 PyList_Append(rval, item);
+                Py_DECREF(item);
             }
             wxPyEndBlockThreads(blocked);
             return rval;
@@ -945,6 +946,7 @@ public:
                 const wxString& name = wxPyControlNameStr)
         : wxControl(parent, id, pos, size, style, validator, name) {}
 
+    void SetBestSize(const wxSize& size) { wxControl::SetBestSize(size); }
 
     DEC_PYCALLBACK_VOID_INT4(DoMoveWindow);
     DEC_PYCALLBACK_VOID_INT5(DoSetSize);
@@ -970,8 +972,9 @@ public:
     DEC_PYCALLBACK_VOID_WXWINBASE(AddChild);
     DEC_PYCALLBACK_VOID_WXWINBASE(RemoveChild);
 
-    DEC_PYCALLBACK_BOOL_(ShouldInheritColours);
+    DEC_PYCALLBACK_BOOL_const(ShouldInheritColours);
     DEC_PYCALLBACK__COLOUR(ApplyParentThemeBackground);
+    DEC_PYCALLBACK_VIZATTR_(GetDefaultAttributes);
     
     PYPRIVATE;
 };
@@ -1002,8 +1005,9 @@ IMP_PYCALLBACK_SIZE_const(wxPyControl, wxControl, GetMaxSize);
 IMP_PYCALLBACK_VOID_WXWINBASE(wxPyControl, wxControl, AddChild);
 IMP_PYCALLBACK_VOID_WXWINBASE(wxPyControl, wxControl, RemoveChild);
 
-IMP_PYCALLBACK_BOOL_(wxPyControl, wxControl, ShouldInheritColours);
+IMP_PYCALLBACK_BOOL_const(wxPyControl, wxControl, ShouldInheritColours);
 IMP_PYCALLBACK__COLOUR(wxPyControl, wxControl, ApplyParentThemeBackground);
+IMP_PYCALLBACK_VIZATTR_(wxPyControl, wxControl, GetDefaultAttributes);
 
 
 
@@ -7231,20 +7235,26 @@ static PyObject *_wrap_TextAttr_SetLeftIndent(PyObject *self, PyObject *args, Py
     PyObject *resultobj;
     wxTextAttr *arg1 = (wxTextAttr *) 0 ;
     int arg2 ;
+    int arg3 = (int) 0 ;
     PyObject * obj0 = 0 ;
     PyObject * obj1 = 0 ;
+    PyObject * obj2 = 0 ;
     char *kwnames[] = {
-        (char *) "self",(char *) "indent", NULL 
+        (char *) "self",(char *) "indent",(char *) "subIndent", NULL 
     };
     
-    if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:TextAttr_SetLeftIndent",kwnames,&obj0,&obj1)) goto fail;
+    if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:TextAttr_SetLeftIndent",kwnames,&obj0,&obj1,&obj2)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxTextAttr,
     SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
     arg2 = (int) SWIG_AsInt(obj1); 
     if (PyErr_Occurred()) SWIG_fail;
+    if (obj2) {
+        arg3 = (int) SWIG_AsInt(obj2); 
+        if (PyErr_Occurred()) SWIG_fail;
+    }
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
-        (arg1)->SetLeftIndent(arg2);
+        (arg1)->SetLeftIndent(arg2,arg3);
         
         wxPyEndAllowThreads(__tstate);
         if (PyErr_Occurred()) SWIG_fail;
@@ -7721,6 +7731,32 @@ static PyObject *_wrap_TextAttr_GetLeftIndent(PyObject *self, PyObject *args, Py
 }
 
 
+static PyObject *_wrap_TextAttr_GetLeftSubIndent(PyObject *self, PyObject *args, PyObject *kwargs) {
+    PyObject *resultobj;
+    wxTextAttr *arg1 = (wxTextAttr *) 0 ;
+    long result;
+    PyObject * obj0 = 0 ;
+    char *kwnames[] = {
+        (char *) "self", NULL 
+    };
+    
+    if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:TextAttr_GetLeftSubIndent",kwnames,&obj0)) goto fail;
+    if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxTextAttr,
+    SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
+    {
+        PyThreadState* __tstate = wxPyBeginAllowThreads();
+        result = (long)((wxTextAttr const *)arg1)->GetLeftSubIndent();
+        
+        wxPyEndAllowThreads(__tstate);
+        if (PyErr_Occurred()) SWIG_fail;
+    }
+    resultobj = SWIG_FromLong((long)result);
+    return resultobj;
+    fail:
+    return NULL;
+}
+
+
 static PyObject *_wrap_TextAttr_GetRightIndent(PyObject *self, PyObject *args, PyObject *kwargs) {
     PyObject *resultobj;
     wxTextAttr *arg1 = (wxTextAttr *) 0 ;
@@ -28844,6 +28880,38 @@ static PyObject *_wrap_PyControl__setCallbackInfo(PyObject *self, PyObject *args
 }
 
 
+static PyObject *_wrap_PyControl_SetBestSize(PyObject *self, PyObject *args, PyObject *kwargs) {
+    PyObject *resultobj;
+    wxPyControl *arg1 = (wxPyControl *) 0 ;
+    wxSize *arg2 = 0 ;
+    wxSize temp2 ;
+    PyObject * obj0 = 0 ;
+    PyObject * obj1 = 0 ;
+    char *kwnames[] = {
+        (char *) "self",(char *) "size", NULL 
+    };
+    
+    if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:PyControl_SetBestSize",kwnames,&obj0,&obj1)) goto fail;
+    if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxPyControl,
+    SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
+    {
+        arg2 = &temp2;
+        if ( ! wxSize_helper(obj1, &arg2)) SWIG_fail;
+    }
+    {
+        PyThreadState* __tstate = wxPyBeginAllowThreads();
+        (arg1)->SetBestSize((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_PyControl_base_DoMoveWindow(PyObject *self, PyObject *args, PyObject *kwargs) {
     PyObject *resultobj;
     wxPyControl *arg1 = (wxPyControl *) 0 ;
@@ -29442,7 +29510,7 @@ static PyObject *_wrap_PyControl_base_ShouldInheritColours(PyObject *self, PyObj
     SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
     {
         PyThreadState* __tstate = wxPyBeginAllowThreads();
-        result = (bool)(arg1)->base_ShouldInheritColours();
+        result = (bool)((wxPyControl const *)arg1)->base_ShouldInheritColours();
         
         wxPyEndAllowThreads(__tstate);
         if (PyErr_Occurred()) SWIG_fail;
@@ -29488,6 +29556,36 @@ static PyObject *_wrap_PyControl_base_ApplyParentThemeBackground(PyObject *self,
 }
 
 
+static PyObject *_wrap_PyControl_base_GetDefaultAttributes(PyObject *self, PyObject *args, PyObject *kwargs) {
+    PyObject *resultobj;
+    wxPyControl *arg1 = (wxPyControl *) 0 ;
+    wxVisualAttributes result;
+    PyObject * obj0 = 0 ;
+    char *kwnames[] = {
+        (char *) "self", NULL 
+    };
+    
+    if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:PyControl_base_GetDefaultAttributes",kwnames,&obj0)) goto fail;
+    if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxPyControl,
+    SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
+    {
+        PyThreadState* __tstate = wxPyBeginAllowThreads();
+        result = (arg1)->base_GetDefaultAttributes();
+        
+        wxPyEndAllowThreads(__tstate);
+        if (PyErr_Occurred()) SWIG_fail;
+    }
+    {
+        wxVisualAttributes * resultptr;
+        resultptr = new wxVisualAttributes((wxVisualAttributes &) result);
+        resultobj = SWIG_NewPointerObj((void *)(resultptr), SWIGTYPE_p_wxVisualAttributes, 1);
+    }
+    return resultobj;
+    fail:
+    return NULL;
+}
+
+
 static PyObject * PyControl_swigregister(PyObject *self, PyObject *args) {
     PyObject *obj;
     if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL;
@@ -31084,6 +31182,7 @@ static PyMethodDef SwigMethods[] = {
         { (char *)"TextAttr_GetAlignment", (PyCFunction) _wrap_TextAttr_GetAlignment, METH_VARARGS | METH_KEYWORDS },
         { (char *)"TextAttr_GetTabs", (PyCFunction) _wrap_TextAttr_GetTabs, METH_VARARGS | METH_KEYWORDS },
         { (char *)"TextAttr_GetLeftIndent", (PyCFunction) _wrap_TextAttr_GetLeftIndent, METH_VARARGS | METH_KEYWORDS },
+        { (char *)"TextAttr_GetLeftSubIndent", (PyCFunction) _wrap_TextAttr_GetLeftSubIndent, METH_VARARGS | METH_KEYWORDS },
         { (char *)"TextAttr_GetRightIndent", (PyCFunction) _wrap_TextAttr_GetRightIndent, METH_VARARGS | METH_KEYWORDS },
         { (char *)"TextAttr_GetFlags", (PyCFunction) _wrap_TextAttr_GetFlags, METH_VARARGS | METH_KEYWORDS },
         { (char *)"TextAttr_IsDefault", (PyCFunction) _wrap_TextAttr_IsDefault, METH_VARARGS | METH_KEYWORDS },
@@ -31696,6 +31795,7 @@ static PyMethodDef SwigMethods[] = {
         { (char *)"new_PyControl", (PyCFunction) _wrap_new_PyControl, METH_VARARGS | METH_KEYWORDS },
         { (char *)"new_PrePyControl", (PyCFunction) _wrap_new_PrePyControl, METH_VARARGS | METH_KEYWORDS },
         { (char *)"PyControl__setCallbackInfo", (PyCFunction) _wrap_PyControl__setCallbackInfo, METH_VARARGS | METH_KEYWORDS },
+        { (char *)"PyControl_SetBestSize", (PyCFunction) _wrap_PyControl_SetBestSize, METH_VARARGS | METH_KEYWORDS },
         { (char *)"PyControl_base_DoMoveWindow", (PyCFunction) _wrap_PyControl_base_DoMoveWindow, METH_VARARGS | METH_KEYWORDS },
         { (char *)"PyControl_base_DoSetSize", (PyCFunction) _wrap_PyControl_base_DoSetSize, METH_VARARGS | METH_KEYWORDS },
         { (char *)"PyControl_base_DoSetClientSize", (PyCFunction) _wrap_PyControl_base_DoSetClientSize, METH_VARARGS | METH_KEYWORDS },
@@ -31716,6 +31816,7 @@ static PyMethodDef SwigMethods[] = {
         { (char *)"PyControl_base_RemoveChild", (PyCFunction) _wrap_PyControl_base_RemoveChild, METH_VARARGS | METH_KEYWORDS },
         { (char *)"PyControl_base_ShouldInheritColours", (PyCFunction) _wrap_PyControl_base_ShouldInheritColours, METH_VARARGS | METH_KEYWORDS },
         { (char *)"PyControl_base_ApplyParentThemeBackground", (PyCFunction) _wrap_PyControl_base_ApplyParentThemeBackground, METH_VARARGS | METH_KEYWORDS },
+        { (char *)"PyControl_base_GetDefaultAttributes", (PyCFunction) _wrap_PyControl_base_GetDefaultAttributes, METH_VARARGS | METH_KEYWORDS },
         { (char *)"PyControl_swigregister", PyControl_swigregister, METH_VARARGS },
         { (char *)"new_HelpEvent", (PyCFunction) _wrap_new_HelpEvent, METH_VARARGS | METH_KEYWORDS },
         { (char *)"HelpEvent_GetPosition", (PyCFunction) _wrap_HelpEvent_GetPosition, METH_VARARGS | METH_KEYWORDS },