]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/msw/_controls_wrap.cpp
Add some refreshes to try and workaround a display glitch
[wxWidgets.git] / wxPython / src / msw / _controls_wrap.cpp
index 02e8fda0a8c8bfd44c0a841f592724881b758062..4bc958e84e723ade34bcee98cb8ad9794b028306 100644 (file)
@@ -1353,12 +1353,11 @@ static PyObject *_wrap_Button_GetClassDefaultAttributes(PyObject *self, PyObject
         if (PyErr_Occurred()) SWIG_fail;
     }
     {
-        if (!wxPyCheckForApp()) SWIG_fail;
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = wxButton::GetClassDefaultAttributes((wxWindowVariant )arg1);
         
         wxPyEndAllowThreads(__tstate);
-        if (PyErr_Occurred()) SWIG_fail;    
+        if (PyErr_Occurred()) SWIG_fail;
     }
     {
         wxVisualAttributes * resultptr;
@@ -2439,12 +2438,11 @@ static PyObject *_wrap_CheckBox_GetClassDefaultAttributes(PyObject *self, PyObje
         if (PyErr_Occurred()) SWIG_fail;
     }
     {
-        if (!wxPyCheckForApp()) SWIG_fail;
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = wxCheckBox::GetClassDefaultAttributes((wxWindowVariant )arg1);
         
         wxPyEndAllowThreads(__tstate);
-        if (PyErr_Occurred()) SWIG_fail;    
+        if (PyErr_Occurred()) SWIG_fail;
     }
     {
         wxVisualAttributes * resultptr;
@@ -2891,12 +2889,11 @@ static PyObject *_wrap_Choice_GetClassDefaultAttributes(PyObject *self, PyObject
         if (PyErr_Occurred()) SWIG_fail;
     }
     {
-        if (!wxPyCheckForApp()) SWIG_fail;
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = wxChoice::GetClassDefaultAttributes((wxWindowVariant )arg1);
         
         wxPyEndAllowThreads(__tstate);
-        if (PyErr_Occurred()) SWIG_fail;    
+        if (PyErr_Occurred()) SWIG_fail;
     }
     {
         wxVisualAttributes * resultptr;
@@ -3779,12 +3776,11 @@ static PyObject *_wrap_ComboBox_GetClassDefaultAttributes(PyObject *self, PyObje
         if (PyErr_Occurred()) SWIG_fail;
     }
     {
-        if (!wxPyCheckForApp()) SWIG_fail;
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = wxComboBox::GetClassDefaultAttributes((wxWindowVariant )arg1);
         
         wxPyEndAllowThreads(__tstate);
-        if (PyErr_Occurred()) SWIG_fail;    
+        if (PyErr_Occurred()) SWIG_fail;
     }
     {
         wxVisualAttributes * resultptr;
@@ -4307,12 +4303,11 @@ static PyObject *_wrap_Gauge_GetClassDefaultAttributes(PyObject *self, PyObject
         if (PyErr_Occurred()) SWIG_fail;
     }
     {
-        if (!wxPyCheckForApp()) SWIG_fail;
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = wxGauge::GetClassDefaultAttributes((wxWindowVariant )arg1);
         
         wxPyEndAllowThreads(__tstate);
-        if (PyErr_Occurred()) SWIG_fail;    
+        if (PyErr_Occurred()) SWIG_fail;
     }
     {
         wxVisualAttributes * resultptr;
@@ -4633,12 +4628,11 @@ static PyObject *_wrap_StaticBox_GetClassDefaultAttributes(PyObject *self, PyObj
         if (PyErr_Occurred()) SWIG_fail;
     }
     {
-        if (!wxPyCheckForApp()) SWIG_fail;
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = wxStaticBox::GetClassDefaultAttributes((wxWindowVariant )arg1);
         
         wxPyEndAllowThreads(__tstate);
-        if (PyErr_Occurred()) SWIG_fail;    
+        if (PyErr_Occurred()) SWIG_fail;
     }
     {
         wxVisualAttributes * resultptr;
@@ -4907,12 +4901,11 @@ static PyObject *_wrap_StaticLine_GetClassDefaultAttributes(PyObject *self, PyOb
         if (PyErr_Occurred()) SWIG_fail;
     }
     {
-        if (!wxPyCheckForApp()) SWIG_fail;
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = wxStaticLine::GetClassDefaultAttributes((wxWindowVariant )arg1);
         
         wxPyEndAllowThreads(__tstate);
-        if (PyErr_Occurred()) SWIG_fail;    
+        if (PyErr_Occurred()) SWIG_fail;
     }
     {
         wxVisualAttributes * resultptr;
@@ -5169,12 +5162,11 @@ static PyObject *_wrap_StaticText_GetClassDefaultAttributes(PyObject *self, PyOb
         if (PyErr_Occurred()) SWIG_fail;
     }
     {
-        if (!wxPyCheckForApp()) SWIG_fail;
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = wxStaticText::GetClassDefaultAttributes((wxWindowVariant )arg1);
         
         wxPyEndAllowThreads(__tstate);
-        if (PyErr_Occurred()) SWIG_fail;    
+        if (PyErr_Occurred()) SWIG_fail;
     }
     {
         wxVisualAttributes * resultptr;
@@ -5515,12 +5507,11 @@ static PyObject *_wrap_StaticBitmap_GetClassDefaultAttributes(PyObject *self, Py
         if (PyErr_Occurred()) SWIG_fail;
     }
     {
-        if (!wxPyCheckForApp()) SWIG_fail;
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = wxStaticBitmap::GetClassDefaultAttributes((wxWindowVariant )arg1);
         
         wxPyEndAllowThreads(__tstate);
-        if (PyErr_Occurred()) SWIG_fail;    
+        if (PyErr_Occurred()) SWIG_fail;
     }
     {
         wxVisualAttributes * resultptr;
@@ -6523,12 +6514,11 @@ static PyObject *_wrap_ListBox_GetClassDefaultAttributes(PyObject *self, PyObjec
         if (PyErr_Occurred()) SWIG_fail;
     }
     {
-        if (!wxPyCheckForApp()) SWIG_fail;
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = wxListBox::GetClassDefaultAttributes((wxWindowVariant )arg1);
         
         wxPyEndAllowThreads(__tstate);
-        if (PyErr_Occurred()) SWIG_fail;    
+        if (PyErr_Occurred()) SWIG_fail;
     }
     {
         wxVisualAttributes * resultptr;
@@ -7009,28 +6999,10 @@ static PyObject *_wrap_TextCtrlNameStr_get() {
 }
 
 
-static PyObject *_wrap_new_TextAttr__SWIG_0(PyObject *self, PyObject *args) {
+static PyObject *_wrap_new_TextAttr(PyObject *self, PyObject *args, PyObject *kwargs) {
     PyObject *resultobj;
-    wxTextAttr *result;
-    
-    if(!PyArg_ParseTuple(args,(char *)":new_TextAttr")) goto fail;
-    {
-        PyThreadState* __tstate = wxPyBeginAllowThreads();
-        result = (wxTextAttr *)new wxTextAttr();
-        
-        wxPyEndAllowThreads(__tstate);
-        if (PyErr_Occurred()) SWIG_fail;
-    }
-    resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_wxTextAttr, 1);
-    return resultobj;
-    fail:
-    return NULL;
-}
-
-
-static PyObject *_wrap_new_TextAttr__SWIG_1(PyObject *self, PyObject *args) {
-    PyObject *resultobj;
-    wxColour *arg1 = 0 ;
+    wxColour const &arg1_defvalue = wxNullColour ;
+    wxColour *arg1 = (wxColour *) &arg1_defvalue ;
     wxColour const &arg2_defvalue = wxNullColour ;
     wxColour *arg2 = (wxColour *) &arg2_defvalue ;
     wxFont const &arg3_defvalue = wxNullFont ;
@@ -7043,11 +7015,16 @@ static PyObject *_wrap_new_TextAttr__SWIG_1(PyObject *self, PyObject *args) {
     PyObject * obj1 = 0 ;
     PyObject * obj2 = 0 ;
     PyObject * obj3 = 0 ;
+    char *kwnames[] = {
+        (char *) "colText",(char *) "colBack",(char *) "font",(char *) "alignment", NULL 
+    };
     
-    if(!PyArg_ParseTuple(args,(char *)"O|OOO:new_TextAttr",&obj0,&obj1,&obj2,&obj3)) goto fail;
-    {
-        arg1 = &temp1;
-        if ( ! wxColour_helper(obj0, &arg1)) SWIG_fail;
+    if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|OOOO:new_TextAttr",kwnames,&obj0,&obj1,&obj2,&obj3)) goto fail;
+    if (obj0) {
+        {
+            arg1 = &temp1;
+            if ( ! wxColour_helper(obj0, &arg1)) SWIG_fail;
+        }
     }
     if (obj1) {
         {
@@ -7082,61 +7059,6 @@ static PyObject *_wrap_new_TextAttr__SWIG_1(PyObject *self, PyObject *args) {
 }
 
 
-static PyObject *_wrap_new_TextAttr(PyObject *self, PyObject *args) {
-    int argc;
-    PyObject *argv[5];
-    int ii;
-    
-    argc = PyObject_Length(args);
-    for (ii = 0; (ii < argc) && (ii < 4); ii++) {
-        argv[ii] = PyTuple_GetItem(args,ii);
-    }
-    if (argc == 0) {
-        return _wrap_new_TextAttr__SWIG_0(self,args);
-    }
-    if ((argc >= 1) && (argc <= 4)) {
-        int _v;
-        {
-            _v = wxColour_typecheck(argv[0]);
-        }
-        if (_v) {
-            if (argc <= 1) {
-                return _wrap_new_TextAttr__SWIG_1(self,args);
-            }
-            {
-                _v = wxColour_typecheck(argv[1]);
-            }
-            if (_v) {
-                if (argc <= 2) {
-                    return _wrap_new_TextAttr__SWIG_1(self,args);
-                }
-                {
-                    void *ptr;
-                    if (SWIG_ConvertPtr(argv[2], &ptr, SWIGTYPE_p_wxFont, 0) == -1) {
-                        _v = 0;
-                        PyErr_Clear();
-                    } else {
-                        _v = 1;
-                    }
-                }
-                if (_v) {
-                    if (argc <= 3) {
-                        return _wrap_new_TextAttr__SWIG_1(self,args);
-                    }
-                    _v = SWIG_CheckInt(argv[3]);
-                    if (_v) {
-                        return _wrap_new_TextAttr__SWIG_1(self,args);
-                    }
-                }
-            }
-        }
-    }
-    
-    PyErr_SetString(PyExc_TypeError,"No matching function for overloaded 'new_TextAttr'");
-    return NULL;
-}
-
-
 static PyObject *_wrap_delete_TextAttr(PyObject *self, PyObject *args, PyObject *kwargs) {
     PyObject *resultobj;
     wxTextAttr *arg1 = (wxTextAttr *) 0 ;
@@ -9986,12 +9908,11 @@ static PyObject *_wrap_TextCtrl_GetClassDefaultAttributes(PyObject *self, PyObje
         if (PyErr_Occurred()) SWIG_fail;
     }
     {
-        if (!wxPyCheckForApp()) SWIG_fail;
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = wxTextCtrl::GetClassDefaultAttributes((wxWindowVariant )arg1);
         
         wxPyEndAllowThreads(__tstate);
-        if (PyErr_Occurred()) SWIG_fail;    
+        if (PyErr_Occurred()) SWIG_fail;
     }
     {
         wxVisualAttributes * resultptr;
@@ -10593,12 +10514,11 @@ static PyObject *_wrap_ScrollBar_GetClassDefaultAttributes(PyObject *self, PyObj
         if (PyErr_Occurred()) SWIG_fail;
     }
     {
-        if (!wxPyCheckForApp()) SWIG_fail;
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = wxScrollBar::GetClassDefaultAttributes((wxWindowVariant )arg1);
         
         wxPyEndAllowThreads(__tstate);
-        if (PyErr_Occurred()) SWIG_fail;    
+        if (PyErr_Occurred()) SWIG_fail;
     }
     {
         wxVisualAttributes * resultptr;
@@ -11083,12 +11003,11 @@ static PyObject *_wrap_SpinButton_GetClassDefaultAttributes(PyObject *self, PyOb
         if (PyErr_Occurred()) SWIG_fail;
     }
     {
-        if (!wxPyCheckForApp()) SWIG_fail;
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = wxSpinButton::GetClassDefaultAttributes((wxWindowVariant )arg1);
         
         wxPyEndAllowThreads(__tstate);
-        if (PyErr_Occurred()) SWIG_fail;    
+        if (PyErr_Occurred()) SWIG_fail;
     }
     {
         wxVisualAttributes * resultptr;
@@ -11595,12 +11514,11 @@ static PyObject *_wrap_SpinCtrl_GetClassDefaultAttributes(PyObject *self, PyObje
         if (PyErr_Occurred()) SWIG_fail;
     }
     {
-        if (!wxPyCheckForApp()) SWIG_fail;
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = wxSpinCtrl::GetClassDefaultAttributes((wxWindowVariant )arg1);
         
         wxPyEndAllowThreads(__tstate);
-        if (PyErr_Occurred()) SWIG_fail;    
+        if (PyErr_Occurred()) SWIG_fail;
     }
     {
         wxVisualAttributes * resultptr;
@@ -12535,12 +12453,11 @@ static PyObject *_wrap_RadioBox_GetClassDefaultAttributes(PyObject *self, PyObje
         if (PyErr_Occurred()) SWIG_fail;
     }
     {
-        if (!wxPyCheckForApp()) SWIG_fail;
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = wxRadioBox::GetClassDefaultAttributes((wxWindowVariant )arg1);
         
         wxPyEndAllowThreads(__tstate);
-        if (PyErr_Occurred()) SWIG_fail;    
+        if (PyErr_Occurred()) SWIG_fail;
     }
     {
         wxVisualAttributes * resultptr;
@@ -12878,12 +12795,11 @@ static PyObject *_wrap_RadioButton_GetClassDefaultAttributes(PyObject *self, PyO
         if (PyErr_Occurred()) SWIG_fail;
     }
     {
-        if (!wxPyCheckForApp()) SWIG_fail;
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = wxRadioButton::GetClassDefaultAttributes((wxWindowVariant )arg1);
         
         wxPyEndAllowThreads(__tstate);
-        if (PyErr_Occurred()) SWIG_fail;    
+        if (PyErr_Occurred()) SWIG_fail;
     }
     {
         wxVisualAttributes * resultptr;
@@ -13770,12 +13686,11 @@ static PyObject *_wrap_Slider_GetClassDefaultAttributes(PyObject *self, PyObject
         if (PyErr_Occurred()) SWIG_fail;
     }
     {
-        if (!wxPyCheckForApp()) SWIG_fail;
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = wxSlider::GetClassDefaultAttributes((wxWindowVariant )arg1);
         
         wxPyEndAllowThreads(__tstate);
-        if (PyErr_Occurred()) SWIG_fail;    
+        if (PyErr_Occurred()) SWIG_fail;
     }
     {
         wxVisualAttributes * resultptr;
@@ -14174,12 +14089,11 @@ static PyObject *_wrap_ToggleButton_GetClassDefaultAttributes(PyObject *self, Py
         if (PyErr_Occurred()) SWIG_fail;
     }
     {
-        if (!wxPyCheckForApp()) SWIG_fail;
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = wxToggleButton::GetClassDefaultAttributes((wxWindowVariant )arg1);
         
         wxPyEndAllowThreads(__tstate);
-        if (PyErr_Occurred()) SWIG_fail;    
+        if (PyErr_Occurred()) SWIG_fail;
     }
     {
         wxVisualAttributes * resultptr;
@@ -14900,12 +14814,11 @@ static PyObject *_wrap_BookCtrl_GetClassDefaultAttributes(PyObject *self, PyObje
         if (PyErr_Occurred()) SWIG_fail;
     }
     {
-        if (!wxPyCheckForApp()) SWIG_fail;
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = wxBookCtrl::GetClassDefaultAttributes((wxWindowVariant )arg1);
         
         wxPyEndAllowThreads(__tstate);
-        if (PyErr_Occurred()) SWIG_fail;    
+        if (PyErr_Occurred()) SWIG_fail;
     }
     {
         wxVisualAttributes * resultptr;
@@ -15494,12 +15407,11 @@ static PyObject *_wrap_Notebook_GetClassDefaultAttributes(PyObject *self, PyObje
         if (PyErr_Occurred()) SWIG_fail;
     }
     {
-        if (!wxPyCheckForApp()) SWIG_fail;
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = wxNotebook::GetClassDefaultAttributes((wxWindowVariant )arg1);
         
         wxPyEndAllowThreads(__tstate);
-        if (PyErr_Occurred()) SWIG_fail;    
+        if (PyErr_Occurred()) SWIG_fail;
     }
     {
         wxVisualAttributes * resultptr;
@@ -18778,12 +18690,11 @@ static PyObject *_wrap_ToolBar_GetClassDefaultAttributes(PyObject *self, PyObjec
         if (PyErr_Occurred()) SWIG_fail;
     }
     {
-        if (!wxPyCheckForApp()) SWIG_fail;
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = wxToolBar::GetClassDefaultAttributes((wxWindowVariant )arg1);
         
         wxPyEndAllowThreads(__tstate);
-        if (PyErr_Occurred()) SWIG_fail;    
+        if (PyErr_Occurred()) SWIG_fail;
     }
     {
         wxVisualAttributes * resultptr;
@@ -23763,12 +23674,11 @@ static PyObject *_wrap_ListCtrl_GetClassDefaultAttributes(PyObject *self, PyObje
         if (PyErr_Occurred()) SWIG_fail;
     }
     {
-        if (!wxPyCheckForApp()) SWIG_fail;
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = wxPyListCtrl::GetClassDefaultAttributes((wxWindowVariant )arg1);
         
         wxPyEndAllowThreads(__tstate);
-        if (PyErr_Occurred()) SWIG_fail;    
+        if (PyErr_Occurred()) SWIG_fail;
     }
     {
         wxVisualAttributes * resultptr;
@@ -28066,12 +27976,11 @@ static PyObject *_wrap_TreeCtrl_GetClassDefaultAttributes(PyObject *self, PyObje
         if (PyErr_Occurred()) SWIG_fail;
     }
     {
-        if (!wxPyCheckForApp()) SWIG_fail;
         PyThreadState* __tstate = wxPyBeginAllowThreads();
         result = wxPyTreeCtrl::GetClassDefaultAttributes((wxWindowVariant )arg1);
         
         wxPyEndAllowThreads(__tstate);
-        if (PyErr_Occurred()) SWIG_fail;    
+        if (PyErr_Occurred()) SWIG_fail;
     }
     {
         wxVisualAttributes * resultptr;
@@ -31617,7 +31526,7 @@ static PyMethodDef SwigMethods[] = {
         { (char *)"CheckListBox_HitTest", (PyCFunction) _wrap_CheckListBox_HitTest, METH_VARARGS | METH_KEYWORDS },
         { (char *)"CheckListBox_HitTestXY", (PyCFunction) _wrap_CheckListBox_HitTestXY, METH_VARARGS | METH_KEYWORDS },
         { (char *)"CheckListBox_swigregister", CheckListBox_swigregister, METH_VARARGS },
-        { (char *)"new_TextAttr", _wrap_new_TextAttr, METH_VARARGS },
+        { (char *)"new_TextAttr", (PyCFunction) _wrap_new_TextAttr, METH_VARARGS | METH_KEYWORDS },
         { (char *)"delete_TextAttr", (PyCFunction) _wrap_delete_TextAttr, METH_VARARGS | METH_KEYWORDS },
         { (char *)"TextAttr_Init", (PyCFunction) _wrap_TextAttr_Init, METH_VARARGS | METH_KEYWORDS },
         { (char *)"TextAttr_SetTextColour", (PyCFunction) _wrap_TextAttr_SetTextColour, METH_VARARGS | METH_KEYWORDS },