From 377d47bdf192ca070bf2ba1cbdd8c8a3589073cf Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Thu, 15 Apr 2004 19:57:59 +0000 Subject: [PATCH] reSWIGged git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26809 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/contrib/gizmos/mac/gizmos_wrap.cpp | 1 + wxPython/src/mac/controls.py | 99 ++ wxPython/src/mac/controls_wrap.cpp | 236 +++- wxPython/src/mac/core.py | 276 ++++- wxPython/src/mac/core_wrap.cpp | 1237 ++++++++++++++++--- wxPython/src/mac/gdi.py | 69 +- wxPython/src/mac/gdi_wrap.cpp | 301 ++++- wxPython/src/mac/grid.py | 2 +- wxPython/src/mac/grid_wrap.cpp | 19 +- wxPython/src/mac/misc_wrap.cpp | 1 + wxPython/src/mac/windows.py | 56 +- wxPython/src/mac/windows_wrap.cpp | 141 ++- 12 files changed, 2093 insertions(+), 345 deletions(-) diff --git a/wxPython/contrib/gizmos/mac/gizmos_wrap.cpp b/wxPython/contrib/gizmos/mac/gizmos_wrap.cpp index edf223da32..b136d84c39 100644 --- a/wxPython/contrib/gizmos/mac/gizmos_wrap.cpp +++ b/wxPython/contrib/gizmos/mac/gizmos_wrap.cpp @@ -1189,6 +1189,7 @@ static PyObject *_wrap_EditableListBox_SetStrings(PyObject *, PyObject *args, Py #else PyObject* str = PyObject_Str(item); #endif + if (PyErr_Occurred()) SWIG_fail; arg2->Add(Py2wxString(str)); Py_DECREF(item); Py_DECREF(str); diff --git a/wxPython/src/mac/controls.py b/wxPython/src/mac/controls.py index eea366ffa1..e15ad396bc 100644 --- a/wxPython/src/mac/controls.py +++ b/wxPython/src/mac/controls.py @@ -944,6 +944,23 @@ class ListBox(core.ControlWithItems): """SetItemFont(int item, Font f)""" return _controls.ListBox_SetItemFont(*args, **kwargs) + def GetClassDefaultAttributes(*args, **kwargs): + """ + GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes + + Get the default attributes for this class. This is useful if + you want to use the same font or colour in your own control as + in a standard control -- which is a much better idea than hard + coding specific colours or fonts which might look completely out + of place on the users system, especially if it uses themes. + + The variant parameter is only relevant under Mac currently and is + ignore under other platforms. Under Mac, it will change the size of the + returned font. See SetWindowVariant for more about this. + """ + return _controls.ListBox_GetClassDefaultAttributes(*args, **kwargs) + + GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes) class ListBoxPtr(ListBox): def __init__(self, this): @@ -959,6 +976,22 @@ def PreListBox(*args, **kwargs): val.thisown = 1 return val +def ListBox_GetClassDefaultAttributes(*args, **kwargs): + """ + ListBox_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes + + Get the default attributes for this class. This is useful if + you want to use the same font or colour in your own control as + in a standard control -- which is a much better idea than hard + coding specific colours or fonts which might look completely out + of place on the users system, especially if it uses themes. + + The variant parameter is only relevant under Mac currently and is + ignore under other platforms. Under Mac, it will change the size of the + returned font. See SetWindowVariant for more about this. + """ + return _controls.ListBox_GetClassDefaultAttributes(*args, **kwargs) + #--------------------------------------------------------------------------- class CheckListBox(ListBox): @@ -3751,6 +3784,23 @@ class ListCtrl(core.Control): """GetMainWindow() -> Window""" return _controls.ListCtrl_GetMainWindow(*args, **kwargs) + def GetClassDefaultAttributes(*args, **kwargs): + """ + GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes + + Get the default attributes for this class. This is useful if + you want to use the same font or colour in your own control as + in a standard control -- which is a much better idea than hard + coding specific colours or fonts which might look completely out + of place on the users system, especially if it uses themes. + + The variant parameter is only relevant under Mac currently and is + ignore under other platforms. Under Mac, it will change the size of the + returned font. See SetWindowVariant for more about this. + """ + return _controls.ListCtrl_GetClassDefaultAttributes(*args, **kwargs) + + GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes) class ListCtrlPtr(ListCtrl): def __init__(self, this): @@ -3765,6 +3815,22 @@ def PreListCtrl(*args, **kwargs): val.thisown = 1 return val +def ListCtrl_GetClassDefaultAttributes(*args, **kwargs): + """ + ListCtrl_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes + + Get the default attributes for this class. This is useful if + you want to use the same font or colour in your own control as + in a standard control -- which is a much better idea than hard + coding specific colours or fonts which might look completely out + of place on the users system, especially if it uses themes. + + The variant parameter is only relevant under Mac currently and is + ignore under other platforms. Under Mac, it will change the size of the + returned font. See SetWindowVariant for more about this. + """ + return _controls.ListCtrl_GetClassDefaultAttributes(*args, **kwargs) + #--------------------------------------------------------------------------- class ListView(ListCtrl): @@ -4400,6 +4466,23 @@ class TreeCtrl(core.Control): """GetBoundingRect(TreeItemId item, bool textOnly=False) -> PyObject""" return _controls.TreeCtrl_GetBoundingRect(*args, **kwargs) + def GetClassDefaultAttributes(*args, **kwargs): + """ + GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes + + Get the default attributes for this class. This is useful if + you want to use the same font or colour in your own control as + in a standard control -- which is a much better idea than hard + coding specific colours or fonts which might look completely out + of place on the users system, especially if it uses themes. + + The variant parameter is only relevant under Mac currently and is + ignore under other platforms. Under Mac, it will change the size of the + returned font. See SetWindowVariant for more about this. + """ + return _controls.TreeCtrl_GetClassDefaultAttributes(*args, **kwargs) + + GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes) class TreeCtrlPtr(TreeCtrl): def __init__(self, this): @@ -4414,6 +4497,22 @@ def PreTreeCtrl(*args, **kwargs): val.thisown = 1 return val +def TreeCtrl_GetClassDefaultAttributes(*args, **kwargs): + """ + TreeCtrl_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes + + Get the default attributes for this class. This is useful if + you want to use the same font or colour in your own control as + in a standard control -- which is a much better idea than hard + coding specific colours or fonts which might look completely out + of place on the users system, especially if it uses themes. + + The variant parameter is only relevant under Mac currently and is + ignore under other platforms. Under Mac, it will change the size of the + returned font. See SetWindowVariant for more about this. + """ + return _controls.TreeCtrl_GetClassDefaultAttributes(*args, **kwargs) + #--------------------------------------------------------------------------- DIRCTRL_DIR_ONLY = _controls.DIRCTRL_DIR_ONLY diff --git a/wxPython/src/mac/controls_wrap.cpp b/wxPython/src/mac/controls_wrap.cpp index a24f18a2f7..2049869681 100644 --- a/wxPython/src/mac/controls_wrap.cpp +++ b/wxPython/src/mac/controls_wrap.cpp @@ -216,8 +216,8 @@ SWIGIMPORT(void) SWIG_Python_InstallConstants(PyObject *d, swig_con #define SWIGTYPE_p_bool swig_types[7] #define SWIGTYPE_p_wxPyTreeItemData swig_types[8] #define SWIGTYPE_p_wxItemContainer swig_types[9] -#define SWIGTYPE_p_wxDirFilterListCtrl swig_types[10] -#define SWIGTYPE_p_wxPyListCtrl swig_types[11] +#define SWIGTYPE_p_wxPyListCtrl swig_types[10] +#define SWIGTYPE_p_wxDirFilterListCtrl swig_types[11] #define SWIGTYPE_p_wxStaticLine swig_types[12] #define SWIGTYPE_p_wxControl swig_types[13] #define SWIGTYPE_p_wxPyControl swig_types[14] @@ -235,62 +235,63 @@ SWIGIMPORT(void) SWIG_Python_InstallConstants(PyObject *d, swig_con #define SWIGTYPE_p_wxDC swig_types[26] #define SWIGTYPE_p_wxListView swig_types[27] #define SWIGTYPE_p_wxIcon swig_types[28] -#define SWIGTYPE_p_wxTextCtrl swig_types[29] -#define SWIGTYPE_p_wxNotebook swig_types[30] -#define SWIGTYPE_p_wxNotifyEvent swig_types[31] -#define SWIGTYPE_p_wxArrayString swig_types[32] -#define SWIGTYPE_p_wxListbook swig_types[33] -#define SWIGTYPE_p_wxStaticBitmap swig_types[34] -#define SWIGTYPE_p_wxSlider swig_types[35] -#define SWIGTYPE_p_wxStaticBox swig_types[36] -#define SWIGTYPE_p_wxArrayInt swig_types[37] -#define SWIGTYPE_p_wxContextHelp swig_types[38] -#define SWIGTYPE_p_long swig_types[39] -#define SWIGTYPE_p_wxEvtHandler swig_types[40] -#define SWIGTYPE_p_wxListEvent swig_types[41] -#define SWIGTYPE_p_wxListBox swig_types[42] +#define SWIGTYPE_p_wxVisualAttributes swig_types[29] +#define SWIGTYPE_p_wxTextCtrl swig_types[30] +#define SWIGTYPE_p_wxNotebook swig_types[31] +#define SWIGTYPE_p_wxNotifyEvent swig_types[32] +#define SWIGTYPE_p_wxArrayString swig_types[33] +#define SWIGTYPE_p_wxListbook swig_types[34] +#define SWIGTYPE_p_wxStaticBitmap swig_types[35] +#define SWIGTYPE_p_wxSlider swig_types[36] +#define SWIGTYPE_p_wxStaticBox swig_types[37] +#define SWIGTYPE_p_wxArrayInt swig_types[38] +#define SWIGTYPE_p_wxContextHelp swig_types[39] +#define SWIGTYPE_p_long swig_types[40] +#define SWIGTYPE_p_wxEvtHandler swig_types[41] +#define SWIGTYPE_p_wxListEvent swig_types[42] #define SWIGTYPE_p_wxCheckListBox swig_types[43] -#define SWIGTYPE_p_wxBookCtrl swig_types[44] -#define SWIGTYPE_p_wxSpinButton swig_types[45] -#define SWIGTYPE_p_wxButton swig_types[46] -#define SWIGTYPE_p_wxBitmapButton swig_types[47] -#define SWIGTYPE_p_wxRect swig_types[48] -#define SWIGTYPE_p_wxContextHelpButton swig_types[49] -#define SWIGTYPE_p_wxRadioBox swig_types[50] -#define SWIGTYPE_p_wxScrollBar swig_types[51] -#define SWIGTYPE_p_char swig_types[52] -#define SWIGTYPE_p_wxTreeItemId swig_types[53] -#define SWIGTYPE_p_wxComboBox swig_types[54] -#define SWIGTYPE_p_wxHelpEvent swig_types[55] -#define SWIGTYPE_p_wxListItem swig_types[56] -#define SWIGTYPE_p_wxNotebookSizer swig_types[57] -#define SWIGTYPE_p_wxSpinEvent swig_types[58] -#define SWIGTYPE_p_wxGenericDragImage swig_types[59] -#define SWIGTYPE_p_wxSpinCtrl swig_types[60] -#define SWIGTYPE_p_wxImageList swig_types[61] -#define SWIGTYPE_p_wxHelpProvider swig_types[62] -#define SWIGTYPE_p_wxTextAttr swig_types[63] -#define SWIGTYPE_p_wxSimpleHelpProvider swig_types[64] -#define SWIGTYPE_p_wxPoint swig_types[65] -#define SWIGTYPE_p_wxListbookEvent swig_types[66] -#define SWIGTYPE_p_wxNotebookEvent swig_types[67] -#define SWIGTYPE_p_wxObject swig_types[68] -#define SWIGTYPE_p_wxCursor swig_types[69] -#define SWIGTYPE_p_wxKeyEvent swig_types[70] -#define SWIGTYPE_p_wxWindow swig_types[71] -#define SWIGTYPE_p_wxString swig_types[72] -#define SWIGTYPE_p_wxBitmap swig_types[73] -#define SWIGTYPE_p_wxTreeEvent swig_types[74] -#define SWIGTYPE_p_wxMouseEvent swig_types[75] -#define SWIGTYPE_p_wxCommandEvent swig_types[76] -#define SWIGTYPE_p_wxStaticText swig_types[77] -#define SWIGTYPE_p_wxControlWithItems swig_types[78] -#define SWIGTYPE_p_wxToolBarToolBase swig_types[79] -#define SWIGTYPE_p_wxColour swig_types[80] -#define SWIGTYPE_p_wxToolBar swig_types[81] -#define SWIGTYPE_p_wxBookCtrlSizer swig_types[82] -#define SWIGTYPE_p_wxValidator swig_types[83] -static swig_type_info *swig_types[85]; +#define SWIGTYPE_p_wxListBox swig_types[44] +#define SWIGTYPE_p_wxBookCtrl swig_types[45] +#define SWIGTYPE_p_wxSpinButton swig_types[46] +#define SWIGTYPE_p_wxButton swig_types[47] +#define SWIGTYPE_p_wxBitmapButton swig_types[48] +#define SWIGTYPE_p_wxRect swig_types[49] +#define SWIGTYPE_p_wxContextHelpButton swig_types[50] +#define SWIGTYPE_p_wxRadioBox swig_types[51] +#define SWIGTYPE_p_wxScrollBar swig_types[52] +#define SWIGTYPE_p_char swig_types[53] +#define SWIGTYPE_p_wxTreeItemId swig_types[54] +#define SWIGTYPE_p_wxComboBox swig_types[55] +#define SWIGTYPE_p_wxHelpEvent swig_types[56] +#define SWIGTYPE_p_wxListItem swig_types[57] +#define SWIGTYPE_p_wxNotebookSizer swig_types[58] +#define SWIGTYPE_p_wxSpinEvent swig_types[59] +#define SWIGTYPE_p_wxGenericDragImage swig_types[60] +#define SWIGTYPE_p_wxSpinCtrl swig_types[61] +#define SWIGTYPE_p_wxImageList swig_types[62] +#define SWIGTYPE_p_wxHelpProvider swig_types[63] +#define SWIGTYPE_p_wxTextAttr swig_types[64] +#define SWIGTYPE_p_wxSimpleHelpProvider swig_types[65] +#define SWIGTYPE_p_wxPoint swig_types[66] +#define SWIGTYPE_p_wxListbookEvent swig_types[67] +#define SWIGTYPE_p_wxNotebookEvent swig_types[68] +#define SWIGTYPE_p_wxObject swig_types[69] +#define SWIGTYPE_p_wxCursor swig_types[70] +#define SWIGTYPE_p_wxKeyEvent swig_types[71] +#define SWIGTYPE_p_wxWindow swig_types[72] +#define SWIGTYPE_p_wxString swig_types[73] +#define SWIGTYPE_p_wxBitmap swig_types[74] +#define SWIGTYPE_p_wxTreeEvent swig_types[75] +#define SWIGTYPE_p_wxMouseEvent swig_types[76] +#define SWIGTYPE_p_wxCommandEvent swig_types[77] +#define SWIGTYPE_p_wxStaticText swig_types[78] +#define SWIGTYPE_p_wxControlWithItems swig_types[79] +#define SWIGTYPE_p_wxToolBarToolBase swig_types[80] +#define SWIGTYPE_p_wxColour swig_types[81] +#define SWIGTYPE_p_wxToolBar swig_types[82] +#define SWIGTYPE_p_wxBookCtrlSizer swig_types[83] +#define SWIGTYPE_p_wxValidator swig_types[84] +static swig_type_info *swig_types[86]; /* -------- TYPES TABLE (END) -------- */ @@ -2443,6 +2444,7 @@ static PyObject *_wrap_new_Choice(PyObject *, PyObject *args, PyObject *kwargs) #else PyObject* str = PyObject_Str(item); #endif + if (PyErr_Occurred()) SWIG_fail; arg5->Add(Py2wxString(str)); Py_DECREF(item); Py_DECREF(str); @@ -2588,6 +2590,7 @@ static PyObject *_wrap_Choice_Create(PyObject *, PyObject *args, PyObject *kwarg #else PyObject* str = PyObject_Str(item); #endif + if (PyErr_Occurred()) SWIG_fail; arg6->Add(Py2wxString(str)); Py_DECREF(item); Py_DECREF(str); @@ -2862,6 +2865,7 @@ static PyObject *_wrap_new_ComboBox(PyObject *, PyObject *args, PyObject *kwargs #else PyObject* str = PyObject_Str(item); #endif + if (PyErr_Occurred()) SWIG_fail; arg6->Add(Py2wxString(str)); Py_DECREF(item); Py_DECREF(str); @@ -3026,6 +3030,7 @@ static PyObject *_wrap_ComboBox_Create(PyObject *, PyObject *args, PyObject *kwa #else PyObject* str = PyObject_Str(item); #endif + if (PyErr_Occurred()) SWIG_fail; arg7->Add(Py2wxString(str)); Py_DECREF(item); Py_DECREF(str); @@ -5128,6 +5133,7 @@ static PyObject *_wrap_new_ListBox(PyObject *, PyObject *args, PyObject *kwargs) #else PyObject* str = PyObject_Str(item); #endif + if (PyErr_Occurred()) SWIG_fail; arg5->Add(Py2wxString(str)); Py_DECREF(item); Py_DECREF(str); @@ -5273,6 +5279,7 @@ static PyObject *_wrap_ListBox_Create(PyObject *, PyObject *args, PyObject *kwar #else PyObject* str = PyObject_Str(item); #endif + if (PyErr_Occurred()) SWIG_fail; arg6->Add(Py2wxString(str)); Py_DECREF(item); Py_DECREF(str); @@ -5410,6 +5417,7 @@ static PyObject *_wrap_ListBox_InsertItems(PyObject *, PyObject *args, PyObject #else PyObject* str = PyObject_Str(item); #endif + if (PyErr_Occurred()) SWIG_fail; arg2->Add(Py2wxString(str)); Py_DECREF(item); Py_DECREF(str); @@ -5466,6 +5474,7 @@ static PyObject *_wrap_ListBox_Set(PyObject *, PyObject *args, PyObject *kwargs) #else PyObject* str = PyObject_Str(item); #endif + if (PyErr_Occurred()) SWIG_fail; arg2->Add(Py2wxString(str)); Py_DECREF(item); Py_DECREF(str); @@ -6001,6 +6010,38 @@ static PyObject *_wrap_ListBox_SetItemFont(PyObject *, PyObject *args, PyObject } +static PyObject *_wrap_ListBox_GetClassDefaultAttributes(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj; + int arg1 = (int) wxWINDOW_VARIANT_NORMAL ; + wxVisualAttributes result; + PyObject * obj0 = 0 ; + char *kwnames[] = { + (char *) "variant", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|O:ListBox_GetClassDefaultAttributes",kwnames,&obj0)) goto fail; + if (obj0) { + arg1 = (wxWindowVariant) SWIG_AsInt(obj0); + if (PyErr_Occurred()) SWIG_fail; + } + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = wxListBox::GetClassDefaultAttributes((wxWindowVariant )arg1); + + 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 * ListBox_swigregister(PyObject *, PyObject *args) { PyObject *obj; if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL; @@ -6073,6 +6114,7 @@ static PyObject *_wrap_new_CheckListBox(PyObject *, PyObject *args, PyObject *kw #else PyObject* str = PyObject_Str(item); #endif + if (PyErr_Occurred()) SWIG_fail; arg5->Add(Py2wxString(str)); Py_DECREF(item); Py_DECREF(str); @@ -6218,6 +6260,7 @@ static PyObject *_wrap_CheckListBox_Create(PyObject *, PyObject *args, PyObject #else PyObject* str = PyObject_Str(item); #endif + if (PyErr_Occurred()) SWIG_fail; arg6->Add(Py2wxString(str)); Py_DECREF(item); Py_DECREF(str); @@ -11019,6 +11062,7 @@ static PyObject *_wrap_new_RadioBox(PyObject *, PyObject *args, PyObject *kwargs #else PyObject* str = PyObject_Str(item); #endif + if (PyErr_Occurred()) SWIG_fail; arg6->Add(Py2wxString(str)); Py_DECREF(item); Py_DECREF(str); @@ -11186,6 +11230,7 @@ static PyObject *_wrap_RadioBox_Create(PyObject *, PyObject *args, PyObject *kwa #else PyObject* str = PyObject_Str(item); #endif + if (PyErr_Occurred()) SWIG_fail; arg7->Add(Py2wxString(str)); Py_DECREF(item); Py_DECREF(str); @@ -22362,6 +22407,38 @@ static PyObject *_wrap_ListCtrl_GetMainWindow(PyObject *, PyObject *args, PyObje } +static PyObject *_wrap_ListCtrl_GetClassDefaultAttributes(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj; + int arg1 = (int) wxWINDOW_VARIANT_NORMAL ; + wxVisualAttributes result; + PyObject * obj0 = 0 ; + char *kwnames[] = { + (char *) "variant", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|O:ListCtrl_GetClassDefaultAttributes",kwnames,&obj0)) goto fail; + if (obj0) { + arg1 = (wxWindowVariant) SWIG_AsInt(obj0); + if (PyErr_Occurred()) SWIG_fail; + } + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = wxPyListCtrl::GetClassDefaultAttributes((wxWindowVariant )arg1); + + 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 * ListCtrl_swigregister(PyObject *, PyObject *args) { PyObject *obj; if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL; @@ -26548,6 +26625,38 @@ static PyObject *_wrap_TreeCtrl_GetBoundingRect(PyObject *, PyObject *args, PyOb } +static PyObject *_wrap_TreeCtrl_GetClassDefaultAttributes(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj; + int arg1 = (int) wxWINDOW_VARIANT_NORMAL ; + wxVisualAttributes result; + PyObject * obj0 = 0 ; + char *kwnames[] = { + (char *) "variant", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|O:TreeCtrl_GetClassDefaultAttributes",kwnames,&obj0)) goto fail; + if (obj0) { + arg1 = (wxWindowVariant) SWIG_AsInt(obj0); + if (PyErr_Occurred()) SWIG_fail; + } + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = wxPyTreeCtrl::GetClassDefaultAttributes((wxWindowVariant )arg1); + + 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 * TreeCtrl_swigregister(PyObject *, PyObject *args) { PyObject *obj; if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL; @@ -29982,6 +30091,7 @@ static PyMethodDef SwigMethods[] = { { (char *)"ListBox_SetItemForegroundColour", (PyCFunction) _wrap_ListBox_SetItemForegroundColour, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"ListBox_SetItemBackgroundColour", (PyCFunction) _wrap_ListBox_SetItemBackgroundColour, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"ListBox_SetItemFont", (PyCFunction) _wrap_ListBox_SetItemFont, METH_VARARGS | METH_KEYWORDS, NULL }, + { (char *)"ListBox_GetClassDefaultAttributes", (PyCFunction) _wrap_ListBox_GetClassDefaultAttributes, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"ListBox_swigregister", ListBox_swigregister, METH_VARARGS, NULL }, { (char *)"new_CheckListBox", (PyCFunction) _wrap_new_CheckListBox, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"new_PreCheckListBox", (PyCFunction) _wrap_new_PreCheckListBox, METH_VARARGS | METH_KEYWORDS, NULL }, @@ -30463,6 +30573,7 @@ static PyMethodDef SwigMethods[] = { { (char *)"ListCtrl_GetItemBackgroundColour", (PyCFunction) _wrap_ListCtrl_GetItemBackgroundColour, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"ListCtrl_SortItems", (PyCFunction) _wrap_ListCtrl_SortItems, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"ListCtrl_GetMainWindow", (PyCFunction) _wrap_ListCtrl_GetMainWindow, METH_VARARGS | METH_KEYWORDS, NULL }, + { (char *)"ListCtrl_GetClassDefaultAttributes", (PyCFunction) _wrap_ListCtrl_GetClassDefaultAttributes, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"ListCtrl_swigregister", ListCtrl_swigregister, METH_VARARGS, NULL }, { (char *)"new_ListView", (PyCFunction) _wrap_new_ListView, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"new_PreListView", (PyCFunction) _wrap_new_PreListView, METH_VARARGS | METH_KEYWORDS, NULL }, @@ -30580,6 +30691,7 @@ static PyMethodDef SwigMethods[] = { { (char *)"TreeCtrl_SortChildren", (PyCFunction) _wrap_TreeCtrl_SortChildren, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"TreeCtrl_HitTest", (PyCFunction) _wrap_TreeCtrl_HitTest, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"TreeCtrl_GetBoundingRect", (PyCFunction) _wrap_TreeCtrl_GetBoundingRect, METH_VARARGS | METH_KEYWORDS, NULL }, + { (char *)"TreeCtrl_GetClassDefaultAttributes", (PyCFunction) _wrap_TreeCtrl_GetClassDefaultAttributes, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"TreeCtrl_swigregister", TreeCtrl_swigregister, METH_VARARGS, NULL }, { (char *)"new_GenericDirCtrl", (PyCFunction) _wrap_new_GenericDirCtrl, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"new_PreGenericDirCtrl", (PyCFunction) _wrap_new_PreGenericDirCtrl, METH_VARARGS | METH_KEYWORDS, NULL }, @@ -31661,8 +31773,8 @@ static swig_type_info _swigt__p_wxGenericDirCtrl[] = {{"_p_wxGenericDirCtrl", 0, static swig_type_info _swigt__p_bool[] = {{"_p_bool", 0, "bool *", 0, 0, 0, 0},{"_p_bool", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}}; static swig_type_info _swigt__p_wxPyTreeItemData[] = {{"_p_wxPyTreeItemData", 0, "wxPyTreeItemData *", 0, 0, 0, 0},{"_p_wxPyTreeItemData", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}}; static swig_type_info _swigt__p_wxItemContainer[] = {{"_p_wxItemContainer", 0, "wxItemContainer *", 0, 0, 0, 0},{"_p_wxComboBox", _p_wxComboBoxTo_p_wxItemContainer, 0, 0, 0, 0, 0},{"_p_wxDirFilterListCtrl", _p_wxDirFilterListCtrlTo_p_wxItemContainer, 0, 0, 0, 0, 0},{"_p_wxChoice", _p_wxChoiceTo_p_wxItemContainer, 0, 0, 0, 0, 0},{"_p_wxControlWithItems", _p_wxControlWithItemsTo_p_wxItemContainer, 0, 0, 0, 0, 0},{"_p_wxListBox", _p_wxListBoxTo_p_wxItemContainer, 0, 0, 0, 0, 0},{"_p_wxCheckListBox", _p_wxCheckListBoxTo_p_wxItemContainer, 0, 0, 0, 0, 0},{"_p_wxItemContainer", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}}; -static swig_type_info _swigt__p_wxDirFilterListCtrl[] = {{"_p_wxDirFilterListCtrl", 0, "wxDirFilterListCtrl *", 0, 0, 0, 0},{"_p_wxDirFilterListCtrl", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}}; static swig_type_info _swigt__p_wxPyListCtrl[] = {{"_p_wxPyListCtrl", 0, "wxPyListCtrl *", 0, 0, 0, 0},{"_p_wxPyListCtrl", 0, 0, 0, 0, 0, 0},{"_p_wxListView", _p_wxListViewTo_p_wxPyListCtrl, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}}; +static swig_type_info _swigt__p_wxDirFilterListCtrl[] = {{"_p_wxDirFilterListCtrl", 0, "wxDirFilterListCtrl *", 0, 0, 0, 0},{"_p_wxDirFilterListCtrl", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}}; static swig_type_info _swigt__p_wxStaticLine[] = {{"_p_wxStaticLine", 0, "wxStaticLine *", 0, 0, 0, 0},{"_p_wxStaticLine", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}}; static swig_type_info _swigt__p_wxControl[] = {{"_p_wxControl", 0, "wxControl *", 0, 0, 0, 0},{"_p_wxBookCtrl", _p_wxBookCtrlTo_p_wxControl, 0, 0, 0, 0, 0},{"_p_wxToolBar", _p_wxToolBarTo_p_wxControl, 0, 0, 0, 0, 0},{"_p_wxToggleButton", _p_wxToggleButtonTo_p_wxControl, 0, 0, 0, 0, 0},{"_p_wxRadioButton", _p_wxRadioButtonTo_p_wxControl, 0, 0, 0, 0, 0},{"_p_wxControl", 0, 0, 0, 0, 0, 0},{"_p_wxPyControl", _p_wxPyControlTo_p_wxControl, 0, 0, 0, 0, 0},{"_p_wxToolBarBase", _p_wxToolBarBaseTo_p_wxControl, 0, 0, 0, 0, 0},{"_p_wxPyListCtrl", _p_wxPyListCtrlTo_p_wxControl, 0, 0, 0, 0, 0},{"_p_wxDirFilterListCtrl", _p_wxDirFilterListCtrlTo_p_wxControl, 0, 0, 0, 0, 0},{"_p_wxComboBox", _p_wxComboBoxTo_p_wxControl, 0, 0, 0, 0, 0},{"_p_wxGenericDirCtrl", _p_wxGenericDirCtrlTo_p_wxControl, 0, 0, 0, 0, 0},{"_p_wxScrollBar", _p_wxScrollBarTo_p_wxControl, 0, 0, 0, 0, 0},{"_p_wxControlWithItems", _p_wxControlWithItemsTo_p_wxControl, 0, 0, 0, 0, 0},{"_p_wxGauge", _p_wxGaugeTo_p_wxControl, 0, 0, 0, 0, 0},{"_p_wxStaticLine", _p_wxStaticLineTo_p_wxControl, 0, 0, 0, 0, 0},{"_p_wxListbook", _p_wxListbookTo_p_wxControl, 0, 0, 0, 0, 0},{"_p_wxPyTreeCtrl", _p_wxPyTreeCtrlTo_p_wxControl, 0, 0, 0, 0, 0},{"_p_wxCheckBox", _p_wxCheckBoxTo_p_wxControl, 0, 0, 0, 0, 0},{"_p_wxRadioBox", _p_wxRadioBoxTo_p_wxControl, 0, 0, 0, 0, 0},{"_p_wxCheckListBox", _p_wxCheckListBoxTo_p_wxControl, 0, 0, 0, 0, 0},{"_p_wxListBox", _p_wxListBoxTo_p_wxControl, 0, 0, 0, 0, 0},{"_p_wxChoice", _p_wxChoiceTo_p_wxControl, 0, 0, 0, 0, 0},{"_p_wxListView", _p_wxListViewTo_p_wxControl, 0, 0, 0, 0, 0},{"_p_wxNotebook", _p_wxNotebookTo_p_wxControl, 0, 0, 0, 0, 0},{"_p_wxStaticBitmap", _p_wxStaticBitmapTo_p_wxControl, 0, 0, 0, 0, 0},{"_p_wxSpinCtrl", _p_wxSpinCtrlTo_p_wxControl, 0, 0, 0, 0, 0},{"_p_wxStaticText", _p_wxStaticTextTo_p_wxControl, 0, 0, 0, 0, 0},{"_p_wxStaticBox", _p_wxStaticBoxTo_p_wxControl, 0, 0, 0, 0, 0},{"_p_wxSlider", _p_wxSliderTo_p_wxControl, 0, 0, 0, 0, 0},{"_p_wxBitmapButton", _p_wxBitmapButtonTo_p_wxControl, 0, 0, 0, 0, 0},{"_p_wxButton", _p_wxButtonTo_p_wxControl, 0, 0, 0, 0, 0},{"_p_wxSpinButton", _p_wxSpinButtonTo_p_wxControl, 0, 0, 0, 0, 0},{"_p_wxContextHelpButton", _p_wxContextHelpButtonTo_p_wxControl, 0, 0, 0, 0, 0},{"_p_wxTextCtrl", _p_wxTextCtrlTo_p_wxControl, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}}; static swig_type_info _swigt__p_wxPyControl[] = {{"_p_wxPyControl", 0, "wxPyControl *", 0, 0, 0, 0},{"_p_wxPyControl", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}}; @@ -31680,6 +31792,7 @@ static swig_type_info _swigt__p_wxSize[] = {{"_p_wxSize", 0, "wxSize *", 0, 0, 0 static swig_type_info _swigt__p_wxDC[] = {{"_p_wxDC", 0, "wxDC *", 0, 0, 0, 0},{"_p_wxDC", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}}; static swig_type_info _swigt__p_wxListView[] = {{"_p_wxListView", 0, "wxListView *", 0, 0, 0, 0},{"_p_wxListView", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}}; static swig_type_info _swigt__p_wxIcon[] = {{"_p_wxIcon", 0, "wxIcon *", 0, 0, 0, 0},{"_p_wxIcon", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}}; +static swig_type_info _swigt__p_wxVisualAttributes[] = {{"_p_wxVisualAttributes", 0, "wxVisualAttributes *", 0, 0, 0, 0},{"_p_wxVisualAttributes", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}}; static swig_type_info _swigt__p_wxTextCtrl[] = {{"_p_wxTextCtrl", 0, "wxTextCtrl *", 0, 0, 0, 0},{"_p_wxTextCtrl", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}}; static swig_type_info _swigt__p_wxNotebook[] = {{"_p_wxNotebook", 0, "wxNotebook *", 0, 0, 0, 0},{"_p_wxNotebook", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}}; static swig_type_info _swigt__p_wxNotifyEvent[] = {{"_p_wxNotifyEvent", 0, "wxNotifyEvent *", 0, 0, 0, 0},{"_p_wxTreeEvent", _p_wxTreeEventTo_p_wxNotifyEvent, 0, 0, 0, 0, 0},{"_p_wxBookCtrlEvent", _p_wxBookCtrlEventTo_p_wxNotifyEvent, 0, 0, 0, 0, 0},{"_p_wxListEvent", _p_wxListEventTo_p_wxNotifyEvent, 0, 0, 0, 0, 0},{"_p_wxSpinEvent", _p_wxSpinEventTo_p_wxNotifyEvent, 0, 0, 0, 0, 0},{"_p_wxNotebookEvent", _p_wxNotebookEventTo_p_wxNotifyEvent, 0, 0, 0, 0, 0},{"_p_wxListbookEvent", _p_wxListbookEventTo_p_wxNotifyEvent, 0, 0, 0, 0, 0},{"_p_wxNotifyEvent", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}}; @@ -31693,8 +31806,8 @@ static swig_type_info _swigt__p_wxContextHelp[] = {{"_p_wxContextHelp", 0, "wxCo static swig_type_info _swigt__p_long[] = {{"_p_long", 0, "long *", 0, 0, 0, 0},{"_p_long", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}}; static swig_type_info _swigt__p_wxEvtHandler[] = {{"_p_wxEvtHandler", 0, "wxEvtHandler *", 0, 0, 0, 0},{"_p_wxBookCtrl", _p_wxBookCtrlTo_p_wxEvtHandler, 0, 0, 0, 0, 0},{"_p_wxMenuBar", _p_wxMenuBarTo_p_wxEvtHandler, 0, 0, 0, 0, 0},{"_p_wxValidator", _p_wxValidatorTo_p_wxEvtHandler, 0, 0, 0, 0, 0},{"_p_wxPyValidator", _p_wxPyValidatorTo_p_wxEvtHandler, 0, 0, 0, 0, 0},{"_p_wxToolBar", _p_wxToolBarTo_p_wxEvtHandler, 0, 0, 0, 0, 0},{"_p_wxToggleButton", _p_wxToggleButtonTo_p_wxEvtHandler, 0, 0, 0, 0, 0},{"_p_wxRadioButton", _p_wxRadioButtonTo_p_wxEvtHandler, 0, 0, 0, 0, 0},{"_p_wxWindow", _p_wxWindowTo_p_wxEvtHandler, 0, 0, 0, 0, 0},{"_p_wxPyControl", _p_wxPyControlTo_p_wxEvtHandler, 0, 0, 0, 0, 0},{"_p_wxControl", _p_wxControlTo_p_wxEvtHandler, 0, 0, 0, 0, 0},{"_p_wxToolBarBase", _p_wxToolBarBaseTo_p_wxEvtHandler, 0, 0, 0, 0, 0},{"_p_wxDirFilterListCtrl", _p_wxDirFilterListCtrlTo_p_wxEvtHandler, 0, 0, 0, 0, 0},{"_p_wxPyListCtrl", _p_wxPyListCtrlTo_p_wxEvtHandler, 0, 0, 0, 0, 0},{"_p_wxComboBox", _p_wxComboBoxTo_p_wxEvtHandler, 0, 0, 0, 0, 0},{"_p_wxPyApp", _p_wxPyAppTo_p_wxEvtHandler, 0, 0, 0, 0, 0},{"_p_wxGenericDirCtrl", _p_wxGenericDirCtrlTo_p_wxEvtHandler, 0, 0, 0, 0, 0},{"_p_wxScrollBar", _p_wxScrollBarTo_p_wxEvtHandler, 0, 0, 0, 0, 0},{"_p_wxControlWithItems", _p_wxControlWithItemsTo_p_wxEvtHandler, 0, 0, 0, 0, 0},{"_p_wxGauge", _p_wxGaugeTo_p_wxEvtHandler, 0, 0, 0, 0, 0},{"_p_wxStaticLine", _p_wxStaticLineTo_p_wxEvtHandler, 0, 0, 0, 0, 0},{"_p_wxEvtHandler", 0, 0, 0, 0, 0, 0},{"_p_wxListbook", _p_wxListbookTo_p_wxEvtHandler, 0, 0, 0, 0, 0},{"_p_wxPyTreeCtrl", _p_wxPyTreeCtrlTo_p_wxEvtHandler, 0, 0, 0, 0, 0},{"_p_wxCheckBox", _p_wxCheckBoxTo_p_wxEvtHandler, 0, 0, 0, 0, 0},{"_p_wxRadioBox", _p_wxRadioBoxTo_p_wxEvtHandler, 0, 0, 0, 0, 0},{"_p_wxCheckListBox", _p_wxCheckListBoxTo_p_wxEvtHandler, 0, 0, 0, 0, 0},{"_p_wxListBox", _p_wxListBoxTo_p_wxEvtHandler, 0, 0, 0, 0, 0},{"_p_wxChoice", _p_wxChoiceTo_p_wxEvtHandler, 0, 0, 0, 0, 0},{"_p_wxListView", _p_wxListViewTo_p_wxEvtHandler, 0, 0, 0, 0, 0},{"_p_wxNotebook", _p_wxNotebookTo_p_wxEvtHandler, 0, 0, 0, 0, 0},{"_p_wxStaticBitmap", _p_wxStaticBitmapTo_p_wxEvtHandler, 0, 0, 0, 0, 0},{"_p_wxSpinCtrl", _p_wxSpinCtrlTo_p_wxEvtHandler, 0, 0, 0, 0, 0},{"_p_wxStaticText", _p_wxStaticTextTo_p_wxEvtHandler, 0, 0, 0, 0, 0},{"_p_wxStaticBox", _p_wxStaticBoxTo_p_wxEvtHandler, 0, 0, 0, 0, 0},{"_p_wxSlider", _p_wxSliderTo_p_wxEvtHandler, 0, 0, 0, 0, 0},{"_p_wxMenu", _p_wxMenuTo_p_wxEvtHandler, 0, 0, 0, 0, 0},{"_p_wxContextHelpButton", _p_wxContextHelpButtonTo_p_wxEvtHandler, 0, 0, 0, 0, 0},{"_p_wxSpinButton", _p_wxSpinButtonTo_p_wxEvtHandler, 0, 0, 0, 0, 0},{"_p_wxButton", _p_wxButtonTo_p_wxEvtHandler, 0, 0, 0, 0, 0},{"_p_wxBitmapButton", _p_wxBitmapButtonTo_p_wxEvtHandler, 0, 0, 0, 0, 0},{"_p_wxTextCtrl", _p_wxTextCtrlTo_p_wxEvtHandler, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}}; static swig_type_info _swigt__p_wxListEvent[] = {{"_p_wxListEvent", 0, "wxListEvent *", 0, 0, 0, 0},{"_p_wxListEvent", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}}; -static swig_type_info _swigt__p_wxListBox[] = {{"_p_wxListBox", 0, "wxListBox *", 0, 0, 0, 0},{"_p_wxListBox", 0, 0, 0, 0, 0, 0},{"_p_wxCheckListBox", _p_wxCheckListBoxTo_p_wxListBox, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}}; static swig_type_info _swigt__p_wxCheckListBox[] = {{"_p_wxCheckListBox", 0, "wxCheckListBox *", 0, 0, 0, 0},{"_p_wxCheckListBox", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}}; +static swig_type_info _swigt__p_wxListBox[] = {{"_p_wxListBox", 0, "wxListBox *", 0, 0, 0, 0},{"_p_wxListBox", 0, 0, 0, 0, 0, 0},{"_p_wxCheckListBox", _p_wxCheckListBoxTo_p_wxListBox, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}}; static swig_type_info _swigt__p_wxBookCtrl[] = {{"_p_wxBookCtrl", 0, "wxBookCtrl *", 0, 0, 0, 0},{"_p_wxListbook", _p_wxListbookTo_p_wxBookCtrl, 0, 0, 0, 0, 0},{"_p_wxBookCtrl", 0, 0, 0, 0, 0, 0},{"_p_wxNotebook", _p_wxNotebookTo_p_wxBookCtrl, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}}; static swig_type_info _swigt__p_wxSpinButton[] = {{"_p_wxSpinButton", 0, "wxSpinButton *", 0, 0, 0, 0},{"_p_wxSpinButton", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}}; static swig_type_info _swigt__p_wxButton[] = {{"_p_wxButton", 0, "wxButton *", 0, 0, 0, 0},{"_p_wxButton", 0, 0, 0, 0, 0, 0},{"_p_wxBitmapButton", _p_wxBitmapButtonTo_p_wxButton, 0, 0, 0, 0, 0},{"_p_wxContextHelpButton", _p_wxContextHelpButtonTo_p_wxButton, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}}; @@ -31747,8 +31860,8 @@ _swigt__p_wxGenericDirCtrl, _swigt__p_bool, _swigt__p_wxPyTreeItemData, _swigt__p_wxItemContainer, -_swigt__p_wxDirFilterListCtrl, _swigt__p_wxPyListCtrl, +_swigt__p_wxDirFilterListCtrl, _swigt__p_wxStaticLine, _swigt__p_wxControl, _swigt__p_wxPyControl, @@ -31766,6 +31879,7 @@ _swigt__p_wxSize, _swigt__p_wxDC, _swigt__p_wxListView, _swigt__p_wxIcon, +_swigt__p_wxVisualAttributes, _swigt__p_wxTextCtrl, _swigt__p_wxNotebook, _swigt__p_wxNotifyEvent, @@ -31779,8 +31893,8 @@ _swigt__p_wxContextHelp, _swigt__p_long, _swigt__p_wxEvtHandler, _swigt__p_wxListEvent, -_swigt__p_wxListBox, _swigt__p_wxCheckListBox, +_swigt__p_wxListBox, _swigt__p_wxBookCtrl, _swigt__p_wxSpinButton, _swigt__p_wxButton, diff --git a/wxPython/src/mac/core.py b/wxPython/src/mac/core.py index bc4641def5..4f9ecc8faf 100644 --- a/wxPython/src/mac/core.py +++ b/wxPython/src/mac/core.py @@ -24,37 +24,12 @@ SIMPLE_BORDER = _core.SIMPLE_BORDER STATIC_BORDER = _core.STATIC_BORDER TRANSPARENT_WINDOW = _core.TRANSPARENT_WINDOW NO_BORDER = _core.NO_BORDER -USER_COLOURS = _core.USER_COLOURS -NO_3D = _core.NO_3D TAB_TRAVERSAL = _core.TAB_TRAVERSAL WANTS_CHARS = _core.WANTS_CHARS POPUP_WINDOW = _core.POPUP_WINDOW CENTER_FRAME = _core.CENTER_FRAME CENTRE_ON_SCREEN = _core.CENTRE_ON_SCREEN CENTER_ON_SCREEN = _core.CENTER_ON_SCREEN -STAY_ON_TOP = _core.STAY_ON_TOP -ICONIZE = _core.ICONIZE -MINIMIZE = _core.MINIMIZE -MAXIMIZE = _core.MAXIMIZE -CLOSE_BOX = _core.CLOSE_BOX -THICK_FRAME = _core.THICK_FRAME -SYSTEM_MENU = _core.SYSTEM_MENU -MINIMIZE_BOX = _core.MINIMIZE_BOX -MAXIMIZE_BOX = _core.MAXIMIZE_BOX -TINY_CAPTION_HORIZ = _core.TINY_CAPTION_HORIZ -TINY_CAPTION_VERT = _core.TINY_CAPTION_VERT -RESIZE_BOX = _core.RESIZE_BOX -RESIZE_BORDER = _core.RESIZE_BORDER -DIALOG_MODAL = _core.DIALOG_MODAL -DIALOG_MODELESS = _core.DIALOG_MODELESS -DIALOG_NO_PARENT = _core.DIALOG_NO_PARENT -DEFAULT_FRAME_STYLE = _core.DEFAULT_FRAME_STYLE -DEFAULT_DIALOG_STYLE = _core.DEFAULT_DIALOG_STYLE -FRAME_TOOL_WINDOW = _core.FRAME_TOOL_WINDOW -FRAME_FLOAT_ON_PARENT = _core.FRAME_FLOAT_ON_PARENT -FRAME_NO_WINDOW_MENU = _core.FRAME_NO_WINDOW_MENU -FRAME_NO_TASKBAR = _core.FRAME_NO_TASKBAR -FRAME_SHAPED = _core.FRAME_SHAPED ED_CLIENT_MARGIN = _core.ED_CLIENT_MARGIN ED_BUTTONS_BOTTOM = _core.ED_BUTTONS_BOTTOM ED_BUTTONS_RIGHT = _core.ED_BUTTONS_RIGHT @@ -285,8 +260,9 @@ SHRINK = _core.SHRINK GROW = _core.GROW EXPAND = _core.EXPAND SHAPED = _core.SHAPED -ADJUST_MINSIZE = _core.ADJUST_MINSIZE +FIXED_MINSIZE = _core.FIXED_MINSIZE TILE = _core.TILE +ADJUST_MINSIZE = _core.ADJUST_MINSIZE BORDER_DEFAULT = _core.BORDER_DEFAULT BORDER_NONE = _core.BORDER_NONE BORDER_STATIC = _core.BORDER_STATIC @@ -747,6 +723,24 @@ class Size(object): """GetHeight() -> int""" return _core.Size_GetHeight(*args, **kwargs) + def IsFullySpecified(*args, **kwargs): + """ + IsFullySpecified() -> bool + + Returns True if both components of the size are non-default values. + """ + return _core.Size_IsFullySpecified(*args, **kwargs) + + def SetDefaults(*args, **kwargs): + """ + SetDefaults(Size size) + + Combine this size with the other one replacing the default + components of this object (i.e. equal to -1) with those of the + other. + """ + return _core.Size_SetDefaults(*args, **kwargs) + def Get(*args, **kwargs): """ Get() -> (width,height) @@ -2097,6 +2091,10 @@ class Image(Object): """GetHeight() -> int""" return _core.Image_GetHeight(*args, **kwargs) + def GetSize(*args, **kwargs): + """GetSize() -> Size""" + return _core.Image_GetSize(*args, **kwargs) + def GetSubImage(*args, **kwargs): """GetSubImage(Rect rect) -> Image""" return _core.Image_GetSubImage(*args, **kwargs) @@ -2274,9 +2272,12 @@ def ImageFromStreamMime(*args, **kwargs): val.thisown = 1 return val -def EmptyImage(*args, **kwargs): - """EmptyImage(int width=0, int height=0, bool clear=True) -> Image""" - val = _core.new_EmptyImage(*args, **kwargs) +def EmptyImage(*args): + """ + EmptyImage(int width=0, int height=0, bool clear=True) -> Image + EmptyImage(Size size, bool clear=True) -> Image + """ + val = _core.new_EmptyImage(*args) val.thisown = 1 return val @@ -4794,8 +4795,9 @@ class PyApp(EvtHandler): """ GetComCtl32Version() -> int - Returns 400, 470, 471 for comctl32.dll 4.00, 4.70, 4.71 or 0 if it - wasn't found at all. Raises an exception on non-Windows platforms. + Returns 400, 470, 471, etc. for comctl32.dll 4.00, 4.70, 4.71 or + 0 if it wasn't found at all. Raises an exception on non-Windows + platforms. """ return _core.PyApp_GetComCtl32Version(*args, **kwargs) @@ -4852,8 +4854,9 @@ def PyApp_GetComCtl32Version(*args, **kwargs): """ PyApp_GetComCtl32Version() -> int - Returns 400, 470, 471 for comctl32.dll 4.00, 4.70, 4.71 or 0 if it - wasn't found at all. Raises an exception on non-Windows platforms. + Returns 400, 470, 471, etc. for comctl32.dll 4.00, 4.70, 4.71 or + 0 if it wasn't found at all. Raises an exception on non-Windows + platforms. """ return _core.PyApp_GetComCtl32Version(*args, **kwargs) @@ -5231,11 +5234,44 @@ def GetAccelFromString(*args, **kwargs): return _core.GetAccelFromString(*args, **kwargs) #--------------------------------------------------------------------------- -WINDOW_VARIANT_DEFAULT = _core.WINDOW_VARIANT_DEFAULT +class VisualAttributes(object): + """struct containing all the visual attributes of a control""" + def __repr__(self): + return "<%s.%s; proxy of C++ wxVisualAttributes instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) + def __init__(self, *args, **kwargs): + """ + __init__() -> VisualAttributes + + struct containing all the visual attributes of a control + """ + newobj = _core.new_VisualAttributes(*args, **kwargs) + self.this = newobj.this + self.thisown = 1 + del newobj.thisown + def __del__(self, destroy=_core.delete_VisualAttributes): + """__del__()""" + try: + if self.thisown: destroy(self) + except: pass + + font = property(_core.VisualAttributes_font_get, _core.VisualAttributes_font_set) + colFg = property(_core.VisualAttributes_colFg_get, _core.VisualAttributes_colFg_set) + colBg = property(_core.VisualAttributes_colBg_get, _core.VisualAttributes_colBg_set) + +class VisualAttributesPtr(VisualAttributes): + def __init__(self, this): + self.this = this + if not hasattr(self,"thisown"): self.thisown = 0 + self.__class__ = VisualAttributes +_core.VisualAttributes_swigregister(VisualAttributesPtr) +NullAcceleratorTable = cvar.NullAcceleratorTable +PanelNameStr = cvar.PanelNameStr + WINDOW_VARIANT_NORMAL = _core.WINDOW_VARIANT_NORMAL WINDOW_VARIANT_SMALL = _core.WINDOW_VARIANT_SMALL WINDOW_VARIANT_MINI = _core.WINDOW_VARIANT_MINI WINDOW_VARIANT_LARGE = _core.WINDOW_VARIANT_LARGE +WINDOW_VARIANT_MAX = _core.WINDOW_VARIANT_MAX class Window(EvtHandler): """ wx.Window is the base class for all windows and represents any visible @@ -5248,8 +5284,8 @@ class Window(EvtHandler): return "<%s.%s; proxy of C++ wxWindow instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): """ - __init__(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, - long style=0, String name=PanelNameStr) -> Window + __init__(Window parent, int id=-1, Point pos=DefaultPosition, + Size size=DefaultSize, long style=0, String name=PanelNameStr) -> Window Construct and show a generic Window. """ @@ -5261,8 +5297,8 @@ class Window(EvtHandler): def Create(*args, **kwargs): """ - Create(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, - long style=0, String name=PanelNameStr) -> bool + Create(Window parent, int id=-1, Point pos=DefaultPosition, + Size size=DefaultSize, long style=0, String name=PanelNameStr) -> bool Create the GUI part of the Window for 2-phase creation mode. """ @@ -5362,7 +5398,7 @@ class Window(EvtHandler): differs from class to class. For frames and dialogs, the value returned is the title. For buttons or static text controls, it is the button text. This function can be useful for meta-programs - (such as testing tools or special-needs access programs) which + such as testing tools or special-needs access programs)which need to identify windows by name. """ return _core.Window_GetLabel(*args, **kwargs) @@ -5380,7 +5416,7 @@ class Window(EvtHandler): """ GetName() -> String - Returns the window's name. This name is not guaranteed to be + Returns the windows name. This name is not guaranteed to be unique; it is up to the programmer to supply an appropriate name in the window constructor or via wx.Window.SetName. """ @@ -5391,7 +5427,13 @@ class Window(EvtHandler): SetWindowVariant(int variant) Sets the variant of the window/font size to use for this window, - if the platform supports variants, (for example, wxMac.) + if the platform supports variants, for example, wxMac. Variant values are: + + wx.WINDOW_VARIANT_NORMAL Normal size + wx.WINDOW_VARIANT_SMALL Smaller size (about 25 % smaller than normal) + wx.WINDOW_VARIANT_MINI Mini size (about 33 % smaller than normal) + wx.WINDOW_VARIANT_LARGE Large size (about 25 % larger than normal) + """ return _core.Window_SetWindowVariant(*args, **kwargs) @@ -5734,10 +5776,11 @@ class Window(EvtHandler): """ return _core.Window_FitInside(*args, **kwargs) - def SetSizeHints(*args, **kwargs): + def SetSizeHints(*args): """ SetSizeHints(int minW, int minH, int maxW=-1, int maxH=-1, int incW=-1, int incH=-1) + SetSizeHints(Size minSize, Size maxSize=DefaultSize, Size incSize=DefaultSize) Allows specification of minimum and maximum window sizes, and window size increments. If a pair of values is not set (or set to -1), the @@ -5745,18 +5788,19 @@ class Window(EvtHandler): will not be able to size the window outside the given bounds. The resizing increments are only significant under Motif or Xt. """ - return _core.Window_SetSizeHints(*args, **kwargs) + return _core.Window_SetSizeHints(*args) - def SetVirtualSizeHints(*args, **kwargs): + def SetVirtualSizeHints(*args): """ SetVirtualSizeHints(int minW, int minH, int maxW=-1, int maxH=-1) + SetVirtualSizeHints(Size minSize, Size maxSize=DefaultSize) Allows specification of minimum and maximum virtual window sizes. If a pair of values is not set (or set to -1), the default values will be used. If this function is called, the user will not be able to size the virtual area of the window outside the given bounds. """ - return _core.Window_SetVirtualSizeHints(*args, **kwargs) + return _core.Window_SetVirtualSizeHints(*args) def GetMinWidth(*args, **kwargs): """GetMinWidth() -> int""" @@ -5778,6 +5822,10 @@ class Window(EvtHandler): """GetMaxSize() -> Size""" return _core.Window_GetMaxSize(*args, **kwargs) + def GetMinSize(*args, **kwargs): + """GetMinSize() -> Size""" + return _core.Window_GetMinSize(*args, **kwargs) + def SetVirtualSize(*args, **kwargs): """ SetVirtualSize(Size size) @@ -6210,6 +6258,49 @@ class Window(EvtHandler): """ return _core.Window_GetValidator(*args, **kwargs) + def Validate(*args, **kwargs): + """ + Validate() -> bool + + Validates the current values of the child controls using their + validators. If the window has wx.WS_EX_VALIDATE_RECURSIVELY + extra style flag set, the method will also call Validate() of all + child windows. Returns false if any of the validations failed. + """ + return _core.Window_Validate(*args, **kwargs) + + def TransferDataToWindow(*args, **kwargs): + """ + TransferDataToWindow() -> bool + + Transfers values to child controls from data areas specified by + their validators. If the window has wx.WS_EX_VALIDATE_RECURSIVELY + extra style flag set, the method will also call + TransferDataToWindow() of all child windows. + """ + return _core.Window_TransferDataToWindow(*args, **kwargs) + + def TransferDataFromWindow(*args, **kwargs): + """ + TransferDataFromWindow() -> bool + + Transfers values from child controls to data areas specified by + their validators. Returns false if a transfer failed. If the + window has wx.WS_EX_VALIDATE_RECURSIVELY extra style flag set, the + method will also call TransferDataFromWindow() of all child + windows. + """ + return _core.Window_TransferDataFromWindow(*args, **kwargs) + + def InitDialog(*args, **kwargs): + """ + InitDialog() + + Sends an EVT_INIT_DIALOG event, whose handler usually transfers + data to the dialog via validators. + """ + return _core.Window_InitDialog(*args, **kwargs) + def SetAcceleratorTable(*args, **kwargs): """ SetAcceleratorTable(AcceleratorTable accel) @@ -6488,6 +6579,36 @@ class Window(EvtHandler): """ return _core.Window_IsExposedRect(*args, **kwargs) + def GetDefaultAttributes(*args, **kwargs): + """ + GetDefaultAttributes() -> VisualAttributes + + Get the default attributes for an instance of this class. This + is useful if you want to use the same font or colour in your own + control as in a standard control -- which is a much better idea + than hard coding specific colours or fonts which might look + completely out of place on the users system, especially if it + uses themes. + """ + return _core.Window_GetDefaultAttributes(*args, **kwargs) + + def GetClassDefaultAttributes(*args, **kwargs): + """ + GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes + + Get the default attributes for this class. This is useful if + you want to use the same font or colour in your own control as + in a standard control -- which is a much better idea than hard + coding specific colours or fonts which might look completely out + of place on the users system, especially if it uses themes. + + The variant parameter is only relevant under Mac currently and is + ignore under other platforms. Under Mac, it will change the size of the + returned font. See SetWindowVariant for more about this. + """ + return _core.Window_GetClassDefaultAttributes(*args, **kwargs) + + GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes) def SetBackgroundColour(*args, **kwargs): """ SetBackgroundColour(Colour colour) -> bool @@ -6508,6 +6629,10 @@ class Window(EvtHandler): """ return _core.Window_SetBackgroundColour(*args, **kwargs) + def SetDefaultBackgroundColour(*args, **kwargs): + """SetDefaultBackgroundColour(Colour colour)""" + return _core.Window_SetDefaultBackgroundColour(*args, **kwargs) + def SetForegroundColour(*args, **kwargs): """ SetForegroundColour(Colour colour) -> bool @@ -6519,6 +6644,10 @@ class Window(EvtHandler): """ return _core.Window_SetForegroundColour(*args, **kwargs) + def SetDefaultForegroundColour(*args, **kwargs): + """SetDefaultForegroundColour(Colour colour)""" + return _core.Window_SetDefaultForegroundColour(*args, **kwargs) + def GetBackgroundColour(*args, **kwargs): """ GetBackgroundColour() -> Colour @@ -6565,6 +6694,10 @@ class Window(EvtHandler): """ return _core.Window_SetFont(*args, **kwargs) + def SetDefaultFont(*args, **kwargs): + """SetDefaultFont(Font font)""" + return _core.Window_SetDefaultFont(*args, **kwargs) + def GetFont(*args, **kwargs): """ GetFont() -> Font @@ -7078,8 +7211,6 @@ class WindowPtr(Window): if not hasattr(self,"thisown"): self.thisown = 0 self.__class__ = Window _core.Window_swigregister(WindowPtr) -NullAcceleratorTable = cvar.NullAcceleratorTable -PanelNameStr = cvar.PanelNameStr def PreWindow(*args, **kwargs): """ @@ -7134,6 +7265,22 @@ def Window_GetCapture(*args, **kwargs): """ return _core.Window_GetCapture(*args, **kwargs) +def Window_GetClassDefaultAttributes(*args, **kwargs): + """ + Window_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes + + Get the default attributes for this class. This is useful if + you want to use the same font or colour in your own control as + in a standard control -- which is a much better idea than hard + coding specific colours or fonts which might look completely out + of place on the users system, especially if it uses themes. + + The variant parameter is only relevant under Mac currently and is + ignore under other platforms. Under Mac, it will change the size of the + returned font. See SetWindowVariant for more about this. + """ + return _core.Window_GetClassDefaultAttributes(*args, **kwargs) + def DLG_PNT(win, point_or_x, y=None): """ Convenience function for converting a Point or (x,y) in @@ -7835,7 +7982,7 @@ class Control(Window): Command(CommandEvent event) Simulates the effect of the user issuing a command to the - item. See wxCommandEvent. + item. See wx.CommandEvent. """ return _core.Control_Command(*args, **kwargs) @@ -7855,6 +8002,23 @@ class Control(Window): """ return _core.Control_SetLabel(*args, **kwargs) + def GetClassDefaultAttributes(*args, **kwargs): + """ + GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes + + Get the default attributes for this class. This is useful if + you want to use the same font or colour in your own control as + in a standard control -- which is a much better idea than hard + coding specific colours or fonts which might look completely out + of place on the users system, especially if it uses themes. + + The variant parameter is only relevant under Mac currently and is + ignore under other platforms. Under Mac, it will change the size of the + returned font. See SetWindowVariant for more about this. + """ + return _core.Control_GetClassDefaultAttributes(*args, **kwargs) + + GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes) class ControlPtr(Control): def __init__(self, this): @@ -7874,6 +8038,22 @@ def PreControl(*args, **kwargs): val.thisown = 1 return val +def Control_GetClassDefaultAttributes(*args, **kwargs): + """ + Control_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes + + Get the default attributes for this class. This is useful if + you want to use the same font or colour in your own control as + in a standard control -- which is a much better idea than hard + coding specific colours or fonts which might look completely out + of place on the users system, especially if it uses themes. + + The variant parameter is only relevant under Mac currently and is + ignore under other platforms. Under Mac, it will change the size of the + returned font. See SetWindowVariant for more about this. + """ + return _core.Control_GetClassDefaultAttributes(*args, **kwargs) + #--------------------------------------------------------------------------- class ItemContainer(object): diff --git a/wxPython/src/mac/core_wrap.cpp b/wxPython/src/mac/core_wrap.cpp index 67dcbf7d50..f830c6f882 100644 --- a/wxPython/src/mac/core_wrap.cpp +++ b/wxPython/src/mac/core_wrap.cpp @@ -242,85 +242,86 @@ SWIGIMPORT(void) SWIG_Python_InstallConstants(PyObject *d, swig_con #define SWIGTYPE_p_wxSize swig_types[33] #define SWIGTYPE_p_wxDC swig_types[34] #define SWIGTYPE_p_wxPySizer swig_types[35] -#define SWIGTYPE_p_wxNotifyEvent swig_types[36] -#define SWIGTYPE_p_wxPyEvent swig_types[37] -#define SWIGTYPE_p_wxPropagationDisabler swig_types[38] -#define SWIGTYPE_p_wxAppTraits swig_types[39] -#define SWIGTYPE_p_wxArrayString swig_types[40] -#define SWIGTYPE_p_wxShowEvent swig_types[41] -#define SWIGTYPE_p_wxToolTip swig_types[42] -#define SWIGTYPE_p_wxMaximizeEvent swig_types[43] -#define SWIGTYPE_p_wxIconizeEvent swig_types[44] -#define SWIGTYPE_p_wxActivateEvent swig_types[45] -#define SWIGTYPE_p_wxMoveEvent swig_types[46] -#define SWIGTYPE_p_wxSizeEvent swig_types[47] -#define SWIGTYPE_p_wxQueryNewPaletteEvent swig_types[48] -#define SWIGTYPE_p_wxWindowCreateEvent swig_types[49] -#define SWIGTYPE_p_wxIdleEvent swig_types[50] -#define SWIGTYPE_p_wxMenuItem swig_types[51] -#define SWIGTYPE_p_wxStaticBox swig_types[52] -#define SWIGTYPE_p_long swig_types[53] -#define SWIGTYPE_p_wxTIFFHandler swig_types[54] -#define SWIGTYPE_p_wxXPMHandler swig_types[55] -#define SWIGTYPE_p_wxPNMHandler swig_types[56] -#define SWIGTYPE_p_wxJPEGHandler swig_types[57] -#define SWIGTYPE_p_wxPCXHandler swig_types[58] -#define SWIGTYPE_p_wxGIFHandler swig_types[59] -#define SWIGTYPE_p_wxPNGHandler swig_types[60] -#define SWIGTYPE_p_wxANIHandler swig_types[61] -#define SWIGTYPE_p_wxMemoryFSHandler swig_types[62] -#define SWIGTYPE_p_wxEvtHandler swig_types[63] -#define SWIGTYPE_p_wxCURHandler swig_types[64] -#define SWIGTYPE_p_wxICOHandler swig_types[65] -#define SWIGTYPE_p_wxBMPHandler swig_types[66] -#define SWIGTYPE_p_wxImageHandler swig_types[67] -#define SWIGTYPE_p_wxFileSystemHandler swig_types[68] -#define SWIGTYPE_p_wxPyFileSystemHandler swig_types[69] -#define SWIGTYPE_p_wxInternetFSHandler swig_types[70] -#define SWIGTYPE_p_wxZipFSHandler swig_types[71] -#define SWIGTYPE_p_wxRect swig_types[72] -#define SWIGTYPE_p_wxGBSpan swig_types[73] -#define SWIGTYPE_p_wxPropagateOnce swig_types[74] -#define SWIGTYPE_p_wxAcceleratorTable swig_types[75] -#define SWIGTYPE_p_char swig_types[76] -#define SWIGTYPE_p_wxGBPosition swig_types[77] -#define SWIGTYPE_p_wxImage swig_types[78] -#define SWIGTYPE_p_wxFrame swig_types[79] -#define SWIGTYPE_p_wxScrollWinEvent swig_types[80] -#define SWIGTYPE_p_wxImageHistogram swig_types[81] -#define SWIGTYPE_p_byte swig_types[82] -#define SWIGTYPE_p_wxPoint swig_types[83] -#define SWIGTYPE_p_wxCursor swig_types[84] -#define SWIGTYPE_p_wxObject swig_types[85] -#define SWIGTYPE_p_wxPyInputStream swig_types[86] -#define SWIGTYPE_p_wxOutputStream swig_types[87] -#define SWIGTYPE_p_wxInputStream swig_types[88] -#define SWIGTYPE_p_wxDateTime swig_types[89] -#define SWIGTYPE_p_wxKeyEvent swig_types[90] -#define SWIGTYPE_p_wxNavigationKeyEvent swig_types[91] -#define SWIGTYPE_p_wxWindowDestroyEvent swig_types[92] -#define SWIGTYPE_p_wxWindow swig_types[93] -#define SWIGTYPE_p_wxMenuBar swig_types[94] -#define SWIGTYPE_p_wxFileSystem swig_types[95] -#define SWIGTYPE_p_wxBitmap swig_types[96] -#define SWIGTYPE_p_wxMenuEvent swig_types[97] -#define SWIGTYPE_p_wxContextMenuEvent swig_types[98] -#define SWIGTYPE_p_unsigned_char swig_types[99] -#define SWIGTYPE_p_wxCloseEvent swig_types[100] -#define SWIGTYPE_p_wxEraseEvent swig_types[101] -#define SWIGTYPE_p_wxMouseEvent swig_types[102] -#define SWIGTYPE_p_wxPyApp swig_types[103] -#define SWIGTYPE_p_wxCommandEvent swig_types[104] -#define SWIGTYPE_p_wxPyCommandEvent swig_types[105] -#define SWIGTYPE_p_wxPyDropTarget swig_types[106] -#define SWIGTYPE_p_wxChildFocusEvent swig_types[107] -#define SWIGTYPE_p_wxFocusEvent swig_types[108] -#define SWIGTYPE_p_wxDropFilesEvent swig_types[109] -#define SWIGTYPE_p_wxControlWithItems swig_types[110] -#define SWIGTYPE_p_wxColour swig_types[111] -#define SWIGTYPE_p_wxValidator swig_types[112] -#define SWIGTYPE_p_wxPyValidator swig_types[113] -static swig_type_info *swig_types[115]; +#define SWIGTYPE_p_wxVisualAttributes swig_types[36] +#define SWIGTYPE_p_wxNotifyEvent swig_types[37] +#define SWIGTYPE_p_wxPyEvent swig_types[38] +#define SWIGTYPE_p_wxPropagationDisabler swig_types[39] +#define SWIGTYPE_p_wxAppTraits swig_types[40] +#define SWIGTYPE_p_wxArrayString swig_types[41] +#define SWIGTYPE_p_wxShowEvent swig_types[42] +#define SWIGTYPE_p_wxToolTip swig_types[43] +#define SWIGTYPE_p_wxMaximizeEvent swig_types[44] +#define SWIGTYPE_p_wxIconizeEvent swig_types[45] +#define SWIGTYPE_p_wxActivateEvent swig_types[46] +#define SWIGTYPE_p_wxMoveEvent swig_types[47] +#define SWIGTYPE_p_wxSizeEvent swig_types[48] +#define SWIGTYPE_p_wxQueryNewPaletteEvent swig_types[49] +#define SWIGTYPE_p_wxWindowCreateEvent swig_types[50] +#define SWIGTYPE_p_wxIdleEvent swig_types[51] +#define SWIGTYPE_p_wxMenuItem swig_types[52] +#define SWIGTYPE_p_wxStaticBox swig_types[53] +#define SWIGTYPE_p_long swig_types[54] +#define SWIGTYPE_p_wxTIFFHandler swig_types[55] +#define SWIGTYPE_p_wxXPMHandler swig_types[56] +#define SWIGTYPE_p_wxPNMHandler swig_types[57] +#define SWIGTYPE_p_wxJPEGHandler swig_types[58] +#define SWIGTYPE_p_wxPCXHandler swig_types[59] +#define SWIGTYPE_p_wxGIFHandler swig_types[60] +#define SWIGTYPE_p_wxPNGHandler swig_types[61] +#define SWIGTYPE_p_wxANIHandler swig_types[62] +#define SWIGTYPE_p_wxMemoryFSHandler swig_types[63] +#define SWIGTYPE_p_wxEvtHandler swig_types[64] +#define SWIGTYPE_p_wxCURHandler swig_types[65] +#define SWIGTYPE_p_wxICOHandler swig_types[66] +#define SWIGTYPE_p_wxBMPHandler swig_types[67] +#define SWIGTYPE_p_wxImageHandler swig_types[68] +#define SWIGTYPE_p_wxFileSystemHandler swig_types[69] +#define SWIGTYPE_p_wxPyFileSystemHandler swig_types[70] +#define SWIGTYPE_p_wxInternetFSHandler swig_types[71] +#define SWIGTYPE_p_wxZipFSHandler swig_types[72] +#define SWIGTYPE_p_wxRect swig_types[73] +#define SWIGTYPE_p_wxGBSpan swig_types[74] +#define SWIGTYPE_p_wxPropagateOnce swig_types[75] +#define SWIGTYPE_p_wxAcceleratorTable swig_types[76] +#define SWIGTYPE_p_char swig_types[77] +#define SWIGTYPE_p_wxGBPosition swig_types[78] +#define SWIGTYPE_p_wxImage swig_types[79] +#define SWIGTYPE_p_wxFrame swig_types[80] +#define SWIGTYPE_p_wxScrollWinEvent swig_types[81] +#define SWIGTYPE_p_wxImageHistogram swig_types[82] +#define SWIGTYPE_p_byte swig_types[83] +#define SWIGTYPE_p_wxPoint swig_types[84] +#define SWIGTYPE_p_wxCursor swig_types[85] +#define SWIGTYPE_p_wxObject swig_types[86] +#define SWIGTYPE_p_wxPyInputStream swig_types[87] +#define SWIGTYPE_p_wxOutputStream swig_types[88] +#define SWIGTYPE_p_wxInputStream swig_types[89] +#define SWIGTYPE_p_wxDateTime swig_types[90] +#define SWIGTYPE_p_wxKeyEvent swig_types[91] +#define SWIGTYPE_p_wxNavigationKeyEvent swig_types[92] +#define SWIGTYPE_p_wxWindowDestroyEvent swig_types[93] +#define SWIGTYPE_p_wxWindow swig_types[94] +#define SWIGTYPE_p_wxMenuBar swig_types[95] +#define SWIGTYPE_p_wxFileSystem swig_types[96] +#define SWIGTYPE_p_wxBitmap swig_types[97] +#define SWIGTYPE_p_wxMenuEvent swig_types[98] +#define SWIGTYPE_p_wxContextMenuEvent swig_types[99] +#define SWIGTYPE_p_unsigned_char swig_types[100] +#define SWIGTYPE_p_wxCloseEvent swig_types[101] +#define SWIGTYPE_p_wxEraseEvent swig_types[102] +#define SWIGTYPE_p_wxMouseEvent swig_types[103] +#define SWIGTYPE_p_wxPyApp swig_types[104] +#define SWIGTYPE_p_wxCommandEvent swig_types[105] +#define SWIGTYPE_p_wxPyCommandEvent swig_types[106] +#define SWIGTYPE_p_wxPyDropTarget swig_types[107] +#define SWIGTYPE_p_wxChildFocusEvent swig_types[108] +#define SWIGTYPE_p_wxFocusEvent swig_types[109] +#define SWIGTYPE_p_wxDropFilesEvent swig_types[110] +#define SWIGTYPE_p_wxControlWithItems swig_types[111] +#define SWIGTYPE_p_wxColour swig_types[112] +#define SWIGTYPE_p_wxValidator swig_types[113] +#define SWIGTYPE_p_wxPyValidator swig_types[114] +static swig_type_info *swig_types[116]; /* -------- TYPES TABLE (END) -------- */ @@ -1093,12 +1094,15 @@ SWIG_CheckUnsignedChar(PyObject* obj) } } -wxImage *new_wxImage(int width,int height,bool clear){ +wxImage *new_wxImage__SWIG_0(int width,int height,bool clear){ if (width > 0 && height > 0) return new wxImage(width, height, clear); else return new wxImage; } +wxImage *new_wxImage__SWIG_1(wxSize const &size,bool clear){ + return new wxImage(size.x, size.y, clear); + } wxImage *new_wxImage(wxBitmap const &bitmap){ return new wxImage(bitmap.ConvertToImage()); } @@ -1112,6 +1116,10 @@ wxImage *new_wxImage(int width,int height,unsigned char *data){ memcpy(copy, data, width*height*3); return new wxImage(width, height, copy, False); } +wxSize wxImage_GetSize(wxImage *self){ + wxSize size(self->GetWidth(), self->GetHeight()); + return size; + } PyObject *wxImage_GetData(wxImage *self){ unsigned char* data = self->GetData(); int len = self->GetWidth() * self->GetHeight() * 3; @@ -1343,16 +1351,18 @@ int PyApp_GetComCtl32Version(){ wxPyRaiseNotImplemented(); return 0; } static const wxString wxPyPanelNameStr(wxPanelNameStr); +wxVisualAttributes *new_wxVisualAttributes(){ return new wxVisualAttributes; } +void delete_wxVisualAttributes(wxVisualAttributes *self){} PyObject *wxWindow_GetChildren(wxWindow *self){ wxWindowList& list = self->GetChildren(); return wxPy_ConvertList(&list); } bool wxWindow_RegisterHotKey(wxWindow *self,int hotkeyId,int modifiers,int keycode){ - - - + #if wxUSE_HOTKEY + return self->RegisterHotKey(hotkeyId, modifiers, keycode); + #else return False; - + #endif } bool wxWindow_UnregisterHotKey(wxWindow *self,int hotkeyId){ @@ -2337,6 +2347,66 @@ static PyObject *_wrap_Size_GetHeight(PyObject *, PyObject *args, PyObject *kwar } +static PyObject *_wrap_Size_IsFullySpecified(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj; + wxSize *arg1 = (wxSize *) 0 ; + bool result; + PyObject * obj0 = 0 ; + char *kwnames[] = { + (char *) "self", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:Size_IsFullySpecified",kwnames,&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxSize, + SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (bool)((wxSize const *)arg1)->IsFullySpecified(); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_Size_SetDefaults(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj; + wxSize *arg1 = (wxSize *) 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:Size_SetDefaults",kwnames,&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxSize, + SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; + { + arg2 = &temp2; + if ( ! wxSize_helper(obj1, &arg2)) SWIG_fail; + } + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + (arg1)->SetDefaults((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_Size_Get(PyObject *, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxSize *arg1 = (wxSize *) 0 ; @@ -8721,7 +8791,7 @@ static PyObject *_wrap_new_ImageFromStreamMime(PyObject *, PyObject *args, PyObj } -static PyObject *_wrap_new_EmptyImage(PyObject *, PyObject *args, PyObject *kwargs) { +static PyObject *_wrap_new_EmptyImage__SWIG_0(PyObject *, PyObject *args) { PyObject *resultobj; int arg1 = (int) 0 ; int arg2 = (int) 0 ; @@ -8730,11 +8800,8 @@ static PyObject *_wrap_new_EmptyImage(PyObject *, PyObject *args, PyObject *kwar PyObject * obj0 = 0 ; PyObject * obj1 = 0 ; PyObject * obj2 = 0 ; - char *kwnames[] = { - (char *) "width",(char *) "height",(char *) "clear", NULL - }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|OOO:new_EmptyImage",kwnames,&obj0,&obj1,&obj2)) goto fail; + if(!PyArg_ParseTuple(args,(char *)"|OOO:new_EmptyImage",&obj0,&obj1,&obj2)) goto fail; if (obj0) { arg1 = (int) SWIG_AsInt(obj0); if (PyErr_Occurred()) SWIG_fail; @@ -8749,7 +8816,7 @@ static PyObject *_wrap_new_EmptyImage(PyObject *, PyObject *args, PyObject *kwar } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (wxImage *)new_wxImage(arg1,arg2,arg3); + result = (wxImage *)new_wxImage__SWIG_0(arg1,arg2,arg3); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; @@ -8761,6 +8828,90 @@ static PyObject *_wrap_new_EmptyImage(PyObject *, PyObject *args, PyObject *kwar } +static PyObject *_wrap_new_EmptyImage__SWIG_1(PyObject *, PyObject *args) { + PyObject *resultobj; + wxSize *arg1 = 0 ; + bool arg2 = (bool) True ; + wxImage *result; + wxSize temp1 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O|O:new_EmptyImage",&obj0,&obj1)) goto fail; + { + arg1 = &temp1; + if ( ! wxSize_helper(obj0, &arg1)) SWIG_fail; + } + if (obj1) { + arg2 = (bool) SWIG_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + } + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (wxImage *)new_wxImage__SWIG_1((wxSize const &)*arg1,arg2); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_wxImage, 1); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_new_EmptyImage(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[4]; + int ii; + + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 3); ii++) { + argv[ii] = PyTuple_GetItem(args,ii); + } + if ((argc >= 0) && (argc <= 3)) { + int _v; + if (argc <= 0) { + return _wrap_new_EmptyImage__SWIG_0(self,args); + } + _v = SWIG_CheckInt(argv[0]); + if (_v) { + if (argc <= 1) { + return _wrap_new_EmptyImage__SWIG_0(self,args); + } + _v = SWIG_CheckInt(argv[1]); + if (_v) { + if (argc <= 2) { + return _wrap_new_EmptyImage__SWIG_0(self,args); + } + _v = SWIG_CheckBool(argv[2]); + if (_v) { + return _wrap_new_EmptyImage__SWIG_0(self,args); + } + } + } + } + if ((argc >= 1) && (argc <= 2)) { + int _v; + { + _v = wxPySimple_typecheck(argv[0], wxT("wxSize"), 2); + } + if (_v) { + if (argc <= 1) { + return _wrap_new_EmptyImage__SWIG_1(self,args); + } + _v = SWIG_CheckBool(argv[1]); + if (_v) { + return _wrap_new_EmptyImage__SWIG_1(self,args); + } + } + } + + PyErr_SetString(PyExc_TypeError,"No matching function for overloaded 'new_EmptyImage'"); + return NULL; +} + + static PyObject *_wrap_new_ImageFromBitmap(PyObject *, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxBitmap *arg1 = 0 ; @@ -9945,6 +10096,36 @@ static PyObject *_wrap_Image_GetHeight(PyObject *, PyObject *args, PyObject *kwa } +static PyObject *_wrap_Image_GetSize(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj; + wxImage *arg1 = (wxImage *) 0 ; + wxSize result; + PyObject * obj0 = 0 ; + char *kwnames[] = { + (char *) "self", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:Image_GetSize",kwnames,&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxImage, + SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = wxImage_GetSize(arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + wxSize * resultptr; + resultptr = new wxSize((wxSize &) result); + resultobj = SWIG_NewPointerObj((void *)(resultptr), SWIGTYPE_p_wxSize, 1); + } + return resultobj; + fail: + return NULL; +} + + static PyObject *_wrap_Image_GetSubImage(PyObject *, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxImage *arg1 = (wxImage *) 0 ; @@ -21098,10 +21279,199 @@ static PyObject *_wrap_PanelNameStr_get() { } +static PyObject *_wrap_new_VisualAttributes(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj; + wxVisualAttributes *result; + char *kwnames[] = { + NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)":new_VisualAttributes",kwnames)) goto fail; + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (wxVisualAttributes *)new_wxVisualAttributes(); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_wxVisualAttributes, 1); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_delete_VisualAttributes(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj; + wxVisualAttributes *arg1 = (wxVisualAttributes *) 0 ; + PyObject * obj0 = 0 ; + char *kwnames[] = { + (char *) "self", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:delete_VisualAttributes",kwnames,&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxVisualAttributes, + SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + delete_wxVisualAttributes(arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_VisualAttributes_font_set(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj; + wxVisualAttributes *arg1 = (wxVisualAttributes *) 0 ; + wxFont *arg2 = (wxFont *) 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char *kwnames[] = { + (char *) "self",(char *) "font", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:VisualAttributes_font_set",kwnames,&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxVisualAttributes, + SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **)(&arg2),SWIGTYPE_p_wxFont, + SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; + if (arg1) (arg1)->font = *arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_VisualAttributes_font_get(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj; + wxVisualAttributes *arg1 = (wxVisualAttributes *) 0 ; + wxFont *result; + PyObject * obj0 = 0 ; + char *kwnames[] = { + (char *) "self", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:VisualAttributes_font_get",kwnames,&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxVisualAttributes, + SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; + result = (wxFont *)& ((arg1)->font); + + resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_wxFont, 0); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_VisualAttributes_colFg_set(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj; + wxVisualAttributes *arg1 = (wxVisualAttributes *) 0 ; + wxColour *arg2 = (wxColour *) 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char *kwnames[] = { + (char *) "self",(char *) "colFg", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:VisualAttributes_colFg_set",kwnames,&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxVisualAttributes, + SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **)(&arg2),SWIGTYPE_p_wxColour, + SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; + if (arg1) (arg1)->colFg = *arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_VisualAttributes_colFg_get(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj; + wxVisualAttributes *arg1 = (wxVisualAttributes *) 0 ; + wxColour *result; + PyObject * obj0 = 0 ; + char *kwnames[] = { + (char *) "self", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:VisualAttributes_colFg_get",kwnames,&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxVisualAttributes, + SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; + result = (wxColour *)& ((arg1)->colFg); + + resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_wxColour, 0); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_VisualAttributes_colBg_set(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj; + wxVisualAttributes *arg1 = (wxVisualAttributes *) 0 ; + wxColour *arg2 = (wxColour *) 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char *kwnames[] = { + (char *) "self",(char *) "colBg", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:VisualAttributes_colBg_set",kwnames,&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxVisualAttributes, + SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **)(&arg2),SWIGTYPE_p_wxColour, + SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; + if (arg1) (arg1)->colBg = *arg2; + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_VisualAttributes_colBg_get(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj; + wxVisualAttributes *arg1 = (wxVisualAttributes *) 0 ; + wxColour *result; + PyObject * obj0 = 0 ; + char *kwnames[] = { + (char *) "self", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:VisualAttributes_colBg_get",kwnames,&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxVisualAttributes, + SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; + result = (wxColour *)& ((arg1)->colBg); + + resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_wxColour, 0); + return resultobj; + fail: + return NULL; +} + + +static PyObject * VisualAttributes_swigregister(PyObject *, PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL; + SWIG_TypeClientData(SWIGTYPE_p_wxVisualAttributes, obj); + Py_INCREF(obj); + return Py_BuildValue((char *)""); +} static PyObject *_wrap_new_Window(PyObject *, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxWindow *arg1 = (wxWindow *) 0 ; - int arg2 ; + int arg2 = (int) (int)-1 ; wxPoint const &arg3_defvalue = wxDefaultPosition ; wxPoint *arg3 = (wxPoint *) &arg3_defvalue ; wxSize const &arg4_defvalue = wxDefaultSize ; @@ -21123,11 +21493,13 @@ static PyObject *_wrap_new_Window(PyObject *, PyObject *args, PyObject *kwargs) (char *) "parent",(char *) "id",(char *) "pos",(char *) "size",(char *) "style",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOOO:new_Window",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OOOOO:new_Window",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg2 = (int const) SWIG_AsInt(obj1); - if (PyErr_Occurred()) SWIG_fail; + if (obj1) { + arg2 = (int const) SWIG_AsInt(obj1); + if (PyErr_Occurred()) SWIG_fail; + } if (obj2) { { arg3 = &temp3; @@ -21203,7 +21575,7 @@ static PyObject *_wrap_Window_Create(PyObject *, PyObject *args, PyObject *kwarg PyObject *resultobj; wxWindow *arg1 = (wxWindow *) 0 ; wxWindow *arg2 = (wxWindow *) 0 ; - int arg3 ; + int arg3 = (int) (int)-1 ; wxPoint const &arg4_defvalue = wxDefaultPosition ; wxPoint *arg4 = (wxPoint *) &arg4_defvalue ; wxSize const &arg5_defvalue = wxDefaultSize ; @@ -21226,13 +21598,15 @@ static PyObject *_wrap_Window_Create(PyObject *, PyObject *args, PyObject *kwarg (char *) "self",(char *) "parent",(char *) "id",(char *) "pos",(char *) "size",(char *) "style",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OOOO:Window_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOOOO:Window_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj1,(void **)(&arg2),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg3 = (int const) SWIG_AsInt(obj2); - if (PyErr_Occurred()) SWIG_fail; + if (obj2) { + arg3 = (int const) SWIG_AsInt(obj2); + if (PyErr_Occurred()) SWIG_fail; + } if (obj3) { { arg4 = &temp4; @@ -22714,7 +23088,7 @@ static PyObject *_wrap_Window_FitInside(PyObject *, PyObject *args, PyObject *kw } -static PyObject *_wrap_Window_SetSizeHints(PyObject *, PyObject *args, PyObject *kwargs) { +static PyObject *_wrap_Window_SetSizeHints__SWIG_0(PyObject *, PyObject *args) { PyObject *resultobj; wxWindow *arg1 = (wxWindow *) 0 ; int arg2 ; @@ -22730,11 +23104,8 @@ static PyObject *_wrap_Window_SetSizeHints(PyObject *, PyObject *args, PyObject PyObject * obj4 = 0 ; PyObject * obj5 = 0 ; PyObject * obj6 = 0 ; - char *kwnames[] = { - (char *) "self",(char *) "minW",(char *) "minH",(char *) "maxW",(char *) "maxH",(char *) "incW",(char *) "incH", NULL - }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OOOO:Window_SetSizeHints",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) goto fail; + if(!PyArg_ParseTuple(args,(char *)"OOO|OOOO:Window_SetSizeHints",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; arg2 = (int) SWIG_AsInt(obj1); @@ -22771,7 +23142,152 @@ static PyObject *_wrap_Window_SetSizeHints(PyObject *, PyObject *args, PyObject } -static PyObject *_wrap_Window_SetVirtualSizeHints(PyObject *, PyObject *args, PyObject *kwargs) { +static PyObject *_wrap_Window_SetSizeHints__SWIG_1(PyObject *, PyObject *args) { + PyObject *resultobj; + wxWindow *arg1 = (wxWindow *) 0 ; + wxSize *arg2 = 0 ; + wxSize const &arg3_defvalue = wxDefaultSize ; + wxSize *arg3 = (wxSize *) &arg3_defvalue ; + wxSize const &arg4_defvalue = wxDefaultSize ; + wxSize *arg4 = (wxSize *) &arg4_defvalue ; + wxSize temp2 ; + wxSize temp3 ; + wxSize temp4 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO|OO:Window_SetSizeHints",&obj0,&obj1,&obj2,&obj3)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxWindow, + SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; + { + arg2 = &temp2; + if ( ! wxSize_helper(obj1, &arg2)) SWIG_fail; + } + if (obj2) { + { + arg3 = &temp3; + if ( ! wxSize_helper(obj2, &arg3)) SWIG_fail; + } + } + if (obj3) { + { + arg4 = &temp4; + if ( ! wxSize_helper(obj3, &arg4)) SWIG_fail; + } + } + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + (arg1)->SetSizeHints((wxSize const &)*arg2,(wxSize const &)*arg3,(wxSize const &)*arg4); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_Window_SetSizeHints(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[8]; + int ii; + + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 7); ii++) { + argv[ii] = PyTuple_GetItem(args,ii); + } + if ((argc >= 2) && (argc <= 4)) { + int _v; + { + void *ptr; + if (SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_wxWindow, 0) == -1) { + _v = 0; + PyErr_Clear(); + } else { + _v = 1; + } + } + if (_v) { + { + _v = wxPySimple_typecheck(argv[1], wxT("wxSize"), 2); + } + if (_v) { + if (argc <= 2) { + return _wrap_Window_SetSizeHints__SWIG_1(self,args); + } + { + _v = wxPySimple_typecheck(argv[2], wxT("wxSize"), 2); + } + if (_v) { + if (argc <= 3) { + return _wrap_Window_SetSizeHints__SWIG_1(self,args); + } + { + _v = wxPySimple_typecheck(argv[3], wxT("wxSize"), 2); + } + if (_v) { + return _wrap_Window_SetSizeHints__SWIG_1(self,args); + } + } + } + } + } + if ((argc >= 3) && (argc <= 7)) { + int _v; + { + void *ptr; + if (SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_wxWindow, 0) == -1) { + _v = 0; + PyErr_Clear(); + } else { + _v = 1; + } + } + if (_v) { + _v = SWIG_CheckInt(argv[1]); + if (_v) { + _v = SWIG_CheckInt(argv[2]); + if (_v) { + if (argc <= 3) { + return _wrap_Window_SetSizeHints__SWIG_0(self,args); + } + _v = SWIG_CheckInt(argv[3]); + if (_v) { + if (argc <= 4) { + return _wrap_Window_SetSizeHints__SWIG_0(self,args); + } + _v = SWIG_CheckInt(argv[4]); + if (_v) { + if (argc <= 5) { + return _wrap_Window_SetSizeHints__SWIG_0(self,args); + } + _v = SWIG_CheckInt(argv[5]); + if (_v) { + if (argc <= 6) { + return _wrap_Window_SetSizeHints__SWIG_0(self,args); + } + _v = SWIG_CheckInt(argv[6]); + if (_v) { + return _wrap_Window_SetSizeHints__SWIG_0(self,args); + } + } + } + } + } + } + } + } + + PyErr_SetString(PyExc_TypeError,"No matching function for overloaded 'Window_SetSizeHints'"); + return NULL; +} + + +static PyObject *_wrap_Window_SetVirtualSizeHints__SWIG_0(PyObject *, PyObject *args) { PyObject *resultobj; wxWindow *arg1 = (wxWindow *) 0 ; int arg2 ; @@ -22783,11 +23299,8 @@ static PyObject *_wrap_Window_SetVirtualSizeHints(PyObject *, PyObject *args, Py PyObject * obj2 = 0 ; PyObject * obj3 = 0 ; PyObject * obj4 = 0 ; - char *kwnames[] = { - (char *) "self",(char *) "minW",(char *) "minH",(char *) "maxW",(char *) "maxH", NULL - }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OO:Window_SetVirtualSizeHints",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4)) goto fail; + if(!PyArg_ParseTuple(args,(char *)"OOO|OO:Window_SetVirtualSizeHints",&obj0,&obj1,&obj2,&obj3,&obj4)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; arg2 = (int) SWIG_AsInt(obj1); @@ -22816,6 +23329,121 @@ static PyObject *_wrap_Window_SetVirtualSizeHints(PyObject *, PyObject *args, Py } +static PyObject *_wrap_Window_SetVirtualSizeHints__SWIG_1(PyObject *, PyObject *args) { + PyObject *resultobj; + wxWindow *arg1 = (wxWindow *) 0 ; + wxSize *arg2 = 0 ; + wxSize const &arg3_defvalue = wxDefaultSize ; + wxSize *arg3 = (wxSize *) &arg3_defvalue ; + wxSize temp2 ; + wxSize temp3 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO|O:Window_SetVirtualSizeHints",&obj0,&obj1,&obj2)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxWindow, + SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; + { + arg2 = &temp2; + if ( ! wxSize_helper(obj1, &arg2)) SWIG_fail; + } + if (obj2) { + { + arg3 = &temp3; + if ( ! wxSize_helper(obj2, &arg3)) SWIG_fail; + } + } + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + (arg1)->SetVirtualSizeHints((wxSize const &)*arg2,(wxSize const &)*arg3); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_Window_SetVirtualSizeHints(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[6]; + int ii; + + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 5); ii++) { + argv[ii] = PyTuple_GetItem(args,ii); + } + if ((argc >= 2) && (argc <= 3)) { + int _v; + { + void *ptr; + if (SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_wxWindow, 0) == -1) { + _v = 0; + PyErr_Clear(); + } else { + _v = 1; + } + } + if (_v) { + { + _v = wxPySimple_typecheck(argv[1], wxT("wxSize"), 2); + } + if (_v) { + if (argc <= 2) { + return _wrap_Window_SetVirtualSizeHints__SWIG_1(self,args); + } + { + _v = wxPySimple_typecheck(argv[2], wxT("wxSize"), 2); + } + if (_v) { + return _wrap_Window_SetVirtualSizeHints__SWIG_1(self,args); + } + } + } + } + if ((argc >= 3) && (argc <= 5)) { + int _v; + { + void *ptr; + if (SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_wxWindow, 0) == -1) { + _v = 0; + PyErr_Clear(); + } else { + _v = 1; + } + } + if (_v) { + _v = SWIG_CheckInt(argv[1]); + if (_v) { + _v = SWIG_CheckInt(argv[2]); + if (_v) { + if (argc <= 3) { + return _wrap_Window_SetVirtualSizeHints__SWIG_0(self,args); + } + _v = SWIG_CheckInt(argv[3]); + if (_v) { + if (argc <= 4) { + return _wrap_Window_SetVirtualSizeHints__SWIG_0(self,args); + } + _v = SWIG_CheckInt(argv[4]); + if (_v) { + return _wrap_Window_SetVirtualSizeHints__SWIG_0(self,args); + } + } + } + } + } + } + + PyErr_SetString(PyExc_TypeError,"No matching function for overloaded 'Window_SetVirtualSizeHints'"); + return NULL; +} + + static PyObject *_wrap_Window_GetMinWidth(PyObject *, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxWindow *arg1 = (wxWindow *) 0 ; @@ -22950,6 +23578,36 @@ static PyObject *_wrap_Window_GetMaxSize(PyObject *, PyObject *args, PyObject *k } +static PyObject *_wrap_Window_GetMinSize(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj; + wxWindow *arg1 = (wxWindow *) 0 ; + wxSize result; + PyObject * obj0 = 0 ; + char *kwnames[] = { + (char *) "self", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:Window_GetMinSize",kwnames,&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxWindow, + SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = ((wxWindow const *)arg1)->GetMinSize(); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + wxSize * resultptr; + resultptr = new wxSize((wxSize &) result); + resultobj = SWIG_NewPointerObj((void *)(resultptr), SWIGTYPE_p_wxSize, 1); + } + return resultobj; + fail: + return NULL; +} + + static PyObject *_wrap_Window_SetVirtualSize(PyObject *, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxWindow *arg1 = (wxWindow *) 0 ; @@ -24261,6 +24919,115 @@ static PyObject *_wrap_Window_GetValidator(PyObject *, PyObject *args, PyObject } +static PyObject *_wrap_Window_Validate(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj; + wxWindow *arg1 = (wxWindow *) 0 ; + bool result; + PyObject * obj0 = 0 ; + char *kwnames[] = { + (char *) "self", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:Window_Validate",kwnames,&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxWindow, + SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (bool)(arg1)->Validate(); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_Window_TransferDataToWindow(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj; + wxWindow *arg1 = (wxWindow *) 0 ; + bool result; + PyObject * obj0 = 0 ; + char *kwnames[] = { + (char *) "self", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:Window_TransferDataToWindow",kwnames,&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxWindow, + SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (bool)(arg1)->TransferDataToWindow(); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_Window_TransferDataFromWindow(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj; + wxWindow *arg1 = (wxWindow *) 0 ; + bool result; + PyObject * obj0 = 0 ; + char *kwnames[] = { + (char *) "self", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:Window_TransferDataFromWindow",kwnames,&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxWindow, + SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (bool)(arg1)->TransferDataFromWindow(); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj); + } + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_Window_InitDialog(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_InitDialog",kwnames,&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxWindow, + SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + (arg1)->InitDialog(); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + static PyObject *_wrap_Window_SetAcceleratorTable(PyObject *, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxWindow *arg1 = (wxWindow *) 0 ; @@ -25130,6 +25897,68 @@ static PyObject *_wrap_Window_IsExposedRect(PyObject *, PyObject *args, PyObject } +static PyObject *_wrap_Window_GetDefaultAttributes(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj; + wxWindow *arg1 = (wxWindow *) 0 ; + wxVisualAttributes result; + PyObject * obj0 = 0 ; + char *kwnames[] = { + (char *) "self", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:Window_GetDefaultAttributes",kwnames,&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxWindow, + SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = ((wxWindow const *)arg1)->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 *_wrap_Window_GetClassDefaultAttributes(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj; + int arg1 = (int) wxWINDOW_VARIANT_NORMAL ; + wxVisualAttributes result; + PyObject * obj0 = 0 ; + char *kwnames[] = { + (char *) "variant", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|O:Window_GetClassDefaultAttributes",kwnames,&obj0)) goto fail; + if (obj0) { + arg1 = (wxWindowVariant) SWIG_AsInt(obj0); + if (PyErr_Occurred()) SWIG_fail; + } + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = wxWindow::GetClassDefaultAttributes((wxWindowVariant )arg1); + + 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 *_wrap_Window_SetBackgroundColour(PyObject *, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxWindow *arg1 = (wxWindow *) 0 ; @@ -25165,6 +25994,38 @@ static PyObject *_wrap_Window_SetBackgroundColour(PyObject *, PyObject *args, Py } +static PyObject *_wrap_Window_SetDefaultBackgroundColour(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj; + wxWindow *arg1 = (wxWindow *) 0 ; + wxColour *arg2 = 0 ; + wxColour temp2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char *kwnames[] = { + (char *) "self",(char *) "colour", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Window_SetDefaultBackgroundColour",kwnames,&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxWindow, + SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; + { + arg2 = &temp2; + if ( ! wxColour_helper(obj1, &arg2)) SWIG_fail; + } + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + (arg1)->SetDefaultBackgroundColour((wxColour 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_SetForegroundColour(PyObject *, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxWindow *arg1 = (wxWindow *) 0 ; @@ -25200,6 +26061,38 @@ static PyObject *_wrap_Window_SetForegroundColour(PyObject *, PyObject *args, Py } +static PyObject *_wrap_Window_SetDefaultForegroundColour(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj; + wxWindow *arg1 = (wxWindow *) 0 ; + wxColour *arg2 = 0 ; + wxColour temp2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char *kwnames[] = { + (char *) "self",(char *) "colour", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Window_SetDefaultForegroundColour",kwnames,&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxWindow, + SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; + { + arg2 = &temp2; + if ( ! wxColour_helper(obj1, &arg2)) SWIG_fail; + } + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + (arg1)->SetDefaultForegroundColour((wxColour 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_GetBackgroundColour(PyObject *, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxWindow *arg1 = (wxWindow *) 0 ; @@ -25366,6 +26259,40 @@ static PyObject *_wrap_Window_SetFont(PyObject *, PyObject *args, PyObject *kwar } +static PyObject *_wrap_Window_SetDefaultFont(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj; + wxWindow *arg1 = (wxWindow *) 0 ; + wxFont *arg2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char *kwnames[] = { + (char *) "self",(char *) "font", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Window_SetDefaultFont",kwnames,&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxWindow, + SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **)(&arg2),SWIGTYPE_p_wxFont, + SWIG_POINTER_EXCEPTION | 0)) == -1) + SWIG_fail; + if (arg2 == NULL) { + PyErr_SetString(PyExc_TypeError,"null reference"); + SWIG_fail; + } + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + (arg1)->SetDefaultFont((wxFont 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_GetFont(PyObject *, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxWindow *arg1 = (wxWindow *) 0 ; @@ -31997,6 +32924,38 @@ static PyObject *_wrap_Control_SetLabel(PyObject *, PyObject *args, PyObject *kw } +static PyObject *_wrap_Control_GetClassDefaultAttributes(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj; + int arg1 = (int) wxWINDOW_VARIANT_NORMAL ; + wxVisualAttributes result; + PyObject * obj0 = 0 ; + char *kwnames[] = { + (char *) "variant", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|O:Control_GetClassDefaultAttributes",kwnames,&obj0)) goto fail; + if (obj0) { + arg1 = (wxWindowVariant) SWIG_AsInt(obj0); + if (PyErr_Occurred()) SWIG_fail; + } + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = wxControl::GetClassDefaultAttributes((wxWindowVariant )arg1); + + 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 * Control_swigregister(PyObject *, PyObject *args) { PyObject *obj; if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL; @@ -32080,6 +33039,7 @@ static PyObject *_wrap_ItemContainer_AppendItems(PyObject *, PyObject *args, PyO #else PyObject* str = PyObject_Str(item); #endif + if (PyErr_Occurred()) SWIG_fail; arg2->Add(Py2wxString(str)); Py_DECREF(item); Py_DECREF(str); @@ -39252,6 +40212,8 @@ static PyMethodDef SwigMethods[] = { { (char *)"Size_SetHeight", (PyCFunction) _wrap_Size_SetHeight, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"Size_GetWidth", (PyCFunction) _wrap_Size_GetWidth, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"Size_GetHeight", (PyCFunction) _wrap_Size_GetHeight, METH_VARARGS | METH_KEYWORDS, NULL }, + { (char *)"Size_IsFullySpecified", (PyCFunction) _wrap_Size_IsFullySpecified, METH_VARARGS | METH_KEYWORDS, NULL }, + { (char *)"Size_SetDefaults", (PyCFunction) _wrap_Size_SetDefaults, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"Size_Get", (PyCFunction) _wrap_Size_Get, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"Size_swigregister", Size_swigregister, METH_VARARGS, NULL }, { (char *)"RealPoint_x_set", (PyCFunction) _wrap_RealPoint_x_set, METH_VARARGS | METH_KEYWORDS, NULL }, @@ -39453,7 +40415,7 @@ static PyMethodDef SwigMethods[] = { { (char *)"new_ImageFromMime", (PyCFunction) _wrap_new_ImageFromMime, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"new_ImageFromStream", (PyCFunction) _wrap_new_ImageFromStream, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"new_ImageFromStreamMime", (PyCFunction) _wrap_new_ImageFromStreamMime, METH_VARARGS | METH_KEYWORDS, NULL }, - { (char *)"new_EmptyImage", (PyCFunction) _wrap_new_EmptyImage, METH_VARARGS | METH_KEYWORDS, NULL }, + { (char *)"new_EmptyImage", _wrap_new_EmptyImage, METH_VARARGS, NULL }, { (char *)"new_ImageFromBitmap", (PyCFunction) _wrap_new_ImageFromBitmap, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"new_ImageFromData", (PyCFunction) _wrap_new_ImageFromData, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"Image_Create", (PyCFunction) _wrap_Image_Create, METH_VARARGS | METH_KEYWORDS, NULL }, @@ -39482,6 +40444,7 @@ static PyMethodDef SwigMethods[] = { { (char *)"Image_Ok", (PyCFunction) _wrap_Image_Ok, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"Image_GetWidth", (PyCFunction) _wrap_Image_GetWidth, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"Image_GetHeight", (PyCFunction) _wrap_Image_GetHeight, METH_VARARGS | METH_KEYWORDS, NULL }, + { (char *)"Image_GetSize", (PyCFunction) _wrap_Image_GetSize, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"Image_GetSubImage", (PyCFunction) _wrap_Image_GetSubImage, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"Image_Copy", (PyCFunction) _wrap_Image_Copy, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"Image_Paste", (PyCFunction) _wrap_Image_Paste, METH_VARARGS | METH_KEYWORDS, NULL }, @@ -39910,6 +40873,15 @@ static PyMethodDef SwigMethods[] = { { (char *)"AcceleratorTable_Ok", (PyCFunction) _wrap_AcceleratorTable_Ok, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"AcceleratorTable_swigregister", AcceleratorTable_swigregister, METH_VARARGS, NULL }, { (char *)"GetAccelFromString", (PyCFunction) _wrap_GetAccelFromString, METH_VARARGS | METH_KEYWORDS, NULL }, + { (char *)"new_VisualAttributes", (PyCFunction) _wrap_new_VisualAttributes, METH_VARARGS | METH_KEYWORDS, NULL }, + { (char *)"delete_VisualAttributes", (PyCFunction) _wrap_delete_VisualAttributes, METH_VARARGS | METH_KEYWORDS, NULL }, + { (char *)"VisualAttributes_font_set", (PyCFunction) _wrap_VisualAttributes_font_set, METH_VARARGS | METH_KEYWORDS, NULL }, + { (char *)"VisualAttributes_font_get", (PyCFunction) _wrap_VisualAttributes_font_get, METH_VARARGS | METH_KEYWORDS, NULL }, + { (char *)"VisualAttributes_colFg_set", (PyCFunction) _wrap_VisualAttributes_colFg_set, METH_VARARGS | METH_KEYWORDS, NULL }, + { (char *)"VisualAttributes_colFg_get", (PyCFunction) _wrap_VisualAttributes_colFg_get, METH_VARARGS | METH_KEYWORDS, NULL }, + { (char *)"VisualAttributes_colBg_set", (PyCFunction) _wrap_VisualAttributes_colBg_set, METH_VARARGS | METH_KEYWORDS, NULL }, + { (char *)"VisualAttributes_colBg_get", (PyCFunction) _wrap_VisualAttributes_colBg_get, METH_VARARGS | METH_KEYWORDS, NULL }, + { (char *)"VisualAttributes_swigregister", VisualAttributes_swigregister, METH_VARARGS, NULL }, { (char *)"new_Window", (PyCFunction) _wrap_new_Window, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"new_PreWindow", (PyCFunction) _wrap_new_PreWindow, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"Window_Create", (PyCFunction) _wrap_Window_Create, METH_VARARGS | METH_KEYWORDS, NULL }, @@ -39958,13 +40930,14 @@ static PyMethodDef SwigMethods[] = { { (char *)"Window_CenterOnParent", (PyCFunction) _wrap_Window_CenterOnParent, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"Window_Fit", (PyCFunction) _wrap_Window_Fit, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"Window_FitInside", (PyCFunction) _wrap_Window_FitInside, METH_VARARGS | METH_KEYWORDS, NULL }, - { (char *)"Window_SetSizeHints", (PyCFunction) _wrap_Window_SetSizeHints, METH_VARARGS | METH_KEYWORDS, NULL }, - { (char *)"Window_SetVirtualSizeHints", (PyCFunction) _wrap_Window_SetVirtualSizeHints, METH_VARARGS | METH_KEYWORDS, NULL }, + { (char *)"Window_SetSizeHints", _wrap_Window_SetSizeHints, METH_VARARGS, NULL }, + { (char *)"Window_SetVirtualSizeHints", _wrap_Window_SetVirtualSizeHints, METH_VARARGS, NULL }, { (char *)"Window_GetMinWidth", (PyCFunction) _wrap_Window_GetMinWidth, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"Window_GetMinHeight", (PyCFunction) _wrap_Window_GetMinHeight, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"Window_GetMaxWidth", (PyCFunction) _wrap_Window_GetMaxWidth, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"Window_GetMaxHeight", (PyCFunction) _wrap_Window_GetMaxHeight, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"Window_GetMaxSize", (PyCFunction) _wrap_Window_GetMaxSize, METH_VARARGS | METH_KEYWORDS, NULL }, + { (char *)"Window_GetMinSize", (PyCFunction) _wrap_Window_GetMinSize, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"Window_SetVirtualSize", (PyCFunction) _wrap_Window_SetVirtualSize, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"Window_SetVirtualSizeWH", (PyCFunction) _wrap_Window_SetVirtualSizeWH, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"Window_GetVirtualSize", (PyCFunction) _wrap_Window_GetVirtualSize, METH_VARARGS | METH_KEYWORDS, NULL }, @@ -40009,6 +40982,10 @@ static PyMethodDef SwigMethods[] = { { (char *)"Window_RemoveEventHandler", (PyCFunction) _wrap_Window_RemoveEventHandler, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"Window_SetValidator", (PyCFunction) _wrap_Window_SetValidator, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"Window_GetValidator", (PyCFunction) _wrap_Window_GetValidator, METH_VARARGS | METH_KEYWORDS, NULL }, + { (char *)"Window_Validate", (PyCFunction) _wrap_Window_Validate, METH_VARARGS | METH_KEYWORDS, NULL }, + { (char *)"Window_TransferDataToWindow", (PyCFunction) _wrap_Window_TransferDataToWindow, METH_VARARGS | METH_KEYWORDS, NULL }, + { (char *)"Window_TransferDataFromWindow", (PyCFunction) _wrap_Window_TransferDataFromWindow, METH_VARARGS | METH_KEYWORDS, NULL }, + { (char *)"Window_InitDialog", (PyCFunction) _wrap_Window_InitDialog, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"Window_SetAcceleratorTable", (PyCFunction) _wrap_Window_SetAcceleratorTable, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"Window_GetAcceleratorTable", (PyCFunction) _wrap_Window_GetAcceleratorTable, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"Window_RegisterHotKey", (PyCFunction) _wrap_Window_RegisterHotKey, METH_VARARGS | METH_KEYWORDS, NULL }, @@ -40036,13 +41013,18 @@ static PyMethodDef SwigMethods[] = { { (char *)"Window_IsExposed", (PyCFunction) _wrap_Window_IsExposed, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"Window_IsExposedPoint", (PyCFunction) _wrap_Window_IsExposedPoint, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"Window_IsExposedRect", (PyCFunction) _wrap_Window_IsExposedRect, METH_VARARGS | METH_KEYWORDS, NULL }, + { (char *)"Window_GetDefaultAttributes", (PyCFunction) _wrap_Window_GetDefaultAttributes, METH_VARARGS | METH_KEYWORDS, NULL }, + { (char *)"Window_GetClassDefaultAttributes", (PyCFunction) _wrap_Window_GetClassDefaultAttributes, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"Window_SetBackgroundColour", (PyCFunction) _wrap_Window_SetBackgroundColour, METH_VARARGS | METH_KEYWORDS, NULL }, + { (char *)"Window_SetDefaultBackgroundColour", (PyCFunction) _wrap_Window_SetDefaultBackgroundColour, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"Window_SetForegroundColour", (PyCFunction) _wrap_Window_SetForegroundColour, METH_VARARGS | METH_KEYWORDS, NULL }, + { (char *)"Window_SetDefaultForegroundColour", (PyCFunction) _wrap_Window_SetDefaultForegroundColour, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"Window_GetBackgroundColour", (PyCFunction) _wrap_Window_GetBackgroundColour, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"Window_GetForegroundColour", (PyCFunction) _wrap_Window_GetForegroundColour, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"Window_SetCursor", (PyCFunction) _wrap_Window_SetCursor, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"Window_GetCursor", (PyCFunction) _wrap_Window_GetCursor, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"Window_SetFont", (PyCFunction) _wrap_Window_SetFont, METH_VARARGS | METH_KEYWORDS, NULL }, + { (char *)"Window_SetDefaultFont", (PyCFunction) _wrap_Window_SetDefaultFont, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"Window_GetFont", (PyCFunction) _wrap_Window_GetFont, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"Window_SetCaret", (PyCFunction) _wrap_Window_SetCaret, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"Window_GetCaret", (PyCFunction) _wrap_Window_GetCaret, METH_VARARGS | METH_KEYWORDS, NULL }, @@ -40227,6 +41209,7 @@ static PyMethodDef SwigMethods[] = { { (char *)"Control_Command", (PyCFunction) _wrap_Control_Command, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"Control_GetLabel", (PyCFunction) _wrap_Control_GetLabel, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"Control_SetLabel", (PyCFunction) _wrap_Control_SetLabel, METH_VARARGS | METH_KEYWORDS, NULL }, + { (char *)"Control_GetClassDefaultAttributes", (PyCFunction) _wrap_Control_GetClassDefaultAttributes, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"Control_swigregister", Control_swigregister, METH_VARARGS, NULL }, { (char *)"ItemContainer_Append", (PyCFunction) _wrap_ItemContainer_Append, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"ItemContainer_AppendItems", (PyCFunction) _wrap_ItemContainer_AppendItems, METH_VARARGS | METH_KEYWORDS, NULL }, @@ -40967,6 +41950,7 @@ static swig_type_info _swigt__p_int[] = {{"_p_int", 0, "int *", 0, 0, 0, 0},{"_p static swig_type_info _swigt__p_wxSize[] = {{"_p_wxSize", 0, "wxSize *", 0, 0, 0, 0},{"_p_wxSize", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}}; static swig_type_info _swigt__p_wxDC[] = {{"_p_wxDC", 0, "wxDC *", 0, 0, 0, 0},{"_p_wxDC", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}}; static swig_type_info _swigt__p_wxPySizer[] = {{"_p_wxPySizer", 0, "wxPySizer *", 0, 0, 0, 0},{"_p_wxPySizer", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}}; +static swig_type_info _swigt__p_wxVisualAttributes[] = {{"_p_wxVisualAttributes", 0, "wxVisualAttributes *", 0, 0, 0, 0},{"_p_wxVisualAttributes", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}}; static swig_type_info _swigt__p_wxNotifyEvent[] = {{"_p_wxNotifyEvent", 0, "wxNotifyEvent *", 0, 0, 0, 0},{"_p_wxNotifyEvent", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}}; static swig_type_info _swigt__p_wxPyEvent[] = {{"_p_wxPyEvent", 0, "wxPyEvent *", 0, 0, 0, 0},{"_p_wxPyEvent", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}}; static swig_type_info _swigt__p_wxPropagationDisabler[] = {{"_p_wxPropagationDisabler", 0, "wxPropagationDisabler *", 0, 0, 0, 0},{"_p_wxPropagationDisabler", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}}; @@ -41083,6 +42067,7 @@ _swigt__p_int, _swigt__p_wxSize, _swigt__p_wxDC, _swigt__p_wxPySizer, +_swigt__p_wxVisualAttributes, _swigt__p_wxNotifyEvent, _swigt__p_wxPyEvent, _swigt__p_wxPropagationDisabler, @@ -41215,37 +42200,12 @@ SWIGEXPORT(void) SWIG_init(void) { PyDict_SetItemString(d,"STATIC_BORDER", SWIG_FromInt((int)wxSTATIC_BORDER)); PyDict_SetItemString(d,"TRANSPARENT_WINDOW", SWIG_FromInt((int)wxTRANSPARENT_WINDOW)); PyDict_SetItemString(d,"NO_BORDER", SWIG_FromInt((int)wxNO_BORDER)); - PyDict_SetItemString(d,"USER_COLOURS", SWIG_FromInt((int)wxUSER_COLOURS)); - PyDict_SetItemString(d,"NO_3D", SWIG_FromInt((int)wxNO_3D)); PyDict_SetItemString(d,"TAB_TRAVERSAL", SWIG_FromInt((int)wxTAB_TRAVERSAL)); PyDict_SetItemString(d,"WANTS_CHARS", SWIG_FromInt((int)wxWANTS_CHARS)); PyDict_SetItemString(d,"POPUP_WINDOW", SWIG_FromInt((int)wxPOPUP_WINDOW)); PyDict_SetItemString(d,"CENTER_FRAME", SWIG_FromInt((int)wxCENTER_FRAME)); PyDict_SetItemString(d,"CENTRE_ON_SCREEN", SWIG_FromInt((int)wxCENTRE_ON_SCREEN)); PyDict_SetItemString(d,"CENTER_ON_SCREEN", SWIG_FromInt((int)wxCENTER_ON_SCREEN)); - PyDict_SetItemString(d,"STAY_ON_TOP", SWIG_FromInt((int)wxSTAY_ON_TOP)); - PyDict_SetItemString(d,"ICONIZE", SWIG_FromInt((int)wxICONIZE)); - PyDict_SetItemString(d,"MINIMIZE", SWIG_FromInt((int)wxMINIMIZE)); - PyDict_SetItemString(d,"MAXIMIZE", SWIG_FromInt((int)wxMAXIMIZE)); - PyDict_SetItemString(d,"CLOSE_BOX", SWIG_FromInt((int)wxCLOSE_BOX)); - PyDict_SetItemString(d,"THICK_FRAME", SWIG_FromInt((int)wxTHICK_FRAME)); - PyDict_SetItemString(d,"SYSTEM_MENU", SWIG_FromInt((int)wxSYSTEM_MENU)); - PyDict_SetItemString(d,"MINIMIZE_BOX", SWIG_FromInt((int)wxMINIMIZE_BOX)); - PyDict_SetItemString(d,"MAXIMIZE_BOX", SWIG_FromInt((int)wxMAXIMIZE_BOX)); - PyDict_SetItemString(d,"TINY_CAPTION_HORIZ", SWIG_FromInt((int)wxTINY_CAPTION_HORIZ)); - PyDict_SetItemString(d,"TINY_CAPTION_VERT", SWIG_FromInt((int)wxTINY_CAPTION_VERT)); - PyDict_SetItemString(d,"RESIZE_BOX", SWIG_FromInt((int)wxRESIZE_BOX)); - PyDict_SetItemString(d,"RESIZE_BORDER", SWIG_FromInt((int)wxRESIZE_BORDER)); - PyDict_SetItemString(d,"DIALOG_MODAL", SWIG_FromInt((int)wxDIALOG_MODAL)); - PyDict_SetItemString(d,"DIALOG_MODELESS", SWIG_FromInt((int)wxDIALOG_MODELESS)); - PyDict_SetItemString(d,"DIALOG_NO_PARENT", SWIG_FromInt((int)wxDIALOG_NO_PARENT)); - PyDict_SetItemString(d,"DEFAULT_FRAME_STYLE", SWIG_FromInt((int)wxDEFAULT_FRAME_STYLE)); - PyDict_SetItemString(d,"DEFAULT_DIALOG_STYLE", SWIG_FromInt((int)wxDEFAULT_DIALOG_STYLE)); - PyDict_SetItemString(d,"FRAME_TOOL_WINDOW", SWIG_FromInt((int)wxFRAME_TOOL_WINDOW)); - PyDict_SetItemString(d,"FRAME_FLOAT_ON_PARENT", SWIG_FromInt((int)wxFRAME_FLOAT_ON_PARENT)); - PyDict_SetItemString(d,"FRAME_NO_WINDOW_MENU", SWIG_FromInt((int)wxFRAME_NO_WINDOW_MENU)); - PyDict_SetItemString(d,"FRAME_NO_TASKBAR", SWIG_FromInt((int)wxFRAME_NO_TASKBAR)); - PyDict_SetItemString(d,"FRAME_SHAPED", SWIG_FromInt((int)wxFRAME_SHAPED)); PyDict_SetItemString(d,"ED_CLIENT_MARGIN", SWIG_FromInt((int)wxED_CLIENT_MARGIN)); PyDict_SetItemString(d,"ED_BUTTONS_BOTTOM", SWIG_FromInt((int)wxED_BUTTONS_BOTTOM)); PyDict_SetItemString(d,"ED_BUTTONS_RIGHT", SWIG_FromInt((int)wxED_BUTTONS_RIGHT)); @@ -41476,8 +42436,9 @@ SWIGEXPORT(void) SWIG_init(void) { PyDict_SetItemString(d,"GROW", SWIG_FromInt((int)wxGROW)); PyDict_SetItemString(d,"EXPAND", SWIG_FromInt((int)wxEXPAND)); PyDict_SetItemString(d,"SHAPED", SWIG_FromInt((int)wxSHAPED)); - PyDict_SetItemString(d,"ADJUST_MINSIZE", SWIG_FromInt((int)wxADJUST_MINSIZE)); + PyDict_SetItemString(d,"FIXED_MINSIZE", SWIG_FromInt((int)wxFIXED_MINSIZE)); PyDict_SetItemString(d,"TILE", SWIG_FromInt((int)wxTILE)); + PyDict_SetItemString(d,"ADJUST_MINSIZE", SWIG_FromInt((int)wxADJUST_MINSIZE)); PyDict_SetItemString(d,"BORDER_DEFAULT", SWIG_FromInt((int)wxBORDER_DEFAULT)); PyDict_SetItemString(d,"BORDER_NONE", SWIG_FromInt((int)wxBORDER_NONE)); PyDict_SetItemString(d,"BORDER_STATIC", SWIG_FromInt((int)wxBORDER_STATIC)); @@ -41955,11 +42916,11 @@ SWIGEXPORT(void) SWIG_init(void) { PyDict_SetItemString(d,"PRINT_POSTSCRIPT", SWIG_FromInt((int)wxPRINT_POSTSCRIPT)); SWIG_addvarlink(SWIG_globals,(char*)"NullAcceleratorTable",_wrap_NullAcceleratorTable_get, _wrap_NullAcceleratorTable_set); SWIG_addvarlink(SWIG_globals,(char*)"PanelNameStr",_wrap_PanelNameStr_get, _wrap_PanelNameStr_set); - PyDict_SetItemString(d,"WINDOW_VARIANT_DEFAULT", SWIG_FromInt((int)wxWINDOW_VARIANT_DEFAULT)); PyDict_SetItemString(d,"WINDOW_VARIANT_NORMAL", SWIG_FromInt((int)wxWINDOW_VARIANT_NORMAL)); PyDict_SetItemString(d,"WINDOW_VARIANT_SMALL", SWIG_FromInt((int)wxWINDOW_VARIANT_SMALL)); PyDict_SetItemString(d,"WINDOW_VARIANT_MINI", SWIG_FromInt((int)wxWINDOW_VARIANT_MINI)); PyDict_SetItemString(d,"WINDOW_VARIANT_LARGE", SWIG_FromInt((int)wxWINDOW_VARIANT_LARGE)); + PyDict_SetItemString(d,"WINDOW_VARIANT_MAX", SWIG_FromInt((int)wxWINDOW_VARIANT_MAX)); SWIG_addvarlink(SWIG_globals,(char*)"DefaultValidator",_wrap_DefaultValidator_get, _wrap_DefaultValidator_set); SWIG_addvarlink(SWIG_globals,(char*)"ControlNameStr",_wrap_ControlNameStr_get, _wrap_ControlNameStr_set); PyDict_SetItemString(d,"FLEX_GROWMODE_NONE", SWIG_FromInt((int)wxFLEX_GROWMODE_NONE)); diff --git a/wxPython/src/mac/gdi.py b/wxPython/src/mac/gdi.py index 22d3cca161..d9651836c8 100644 --- a/wxPython/src/mac/gdi.py +++ b/wxPython/src/mac/gdi.py @@ -51,13 +51,13 @@ class Colour(core.Object): etc. Valid RGB values are in the range 0 to 255. In wxPython there are typemaps that will automatically convert from a colour - name, or from a "#RRGGBB" colour hex value string to a wx.Colour object when + name, or from a '#RRGGBB' colour hex value string to a wx.Colour object when calling C++ methods that expect a wxColour. This means that the following are all equivallent: win.SetBackgroundColour(wxColour(0,0,255)) - win.SetBackgroundColour("BLUE") - win.SetBackgroundColour("#0000FF") + win.SetBackgroundColour('BLUE') + win.SetBackgroundColour('#0000FF') You can retrieve the various current system colour settings with wx.SystemSettings.GetColour. @@ -421,13 +421,13 @@ class Brush(GDIObject): """Ok() -> bool""" return _gdi.Brush_Ok(*args, **kwargs) - def GetMacTheme(*args, **kwargs): - """GetMacTheme() -> short""" - return _gdi.Brush_GetMacTheme(*args, **kwargs) + def MacGetTheme(*args, **kwargs): + """MacGetTheme() -> short""" + return _gdi.Brush_MacGetTheme(*args, **kwargs) - def SetMacTheme(*args, **kwargs): - """SetMacTheme(short macThemeBrush)""" - return _gdi.Brush_SetMacTheme(*args, **kwargs) + def MacSetTheme(*args, **kwargs): + """MacSetTheme(short macThemeBrush)""" + return _gdi.Brush_MacSetTheme(*args, **kwargs) def __nonzero__(self): return self.Ok() @@ -486,6 +486,14 @@ class Bitmap(GDIObject): """ return _gdi.Bitmap_GetDepth(*args, **kwargs) + def GetSize(*args, **kwargs): + """ + GetSize() -> Size + + Get the size of the bitmap. + """ + return _gdi.Bitmap_GetSize(*args, **kwargs) + def ConvertToImage(*args, **kwargs): """ ConvertToImage() -> Image @@ -574,6 +582,14 @@ class Bitmap(GDIObject): """ return _gdi.Bitmap_SetDepth(*args, **kwargs) + def SetSize(*args, **kwargs): + """ + SetSize(Size size) + + Set the bitmap size + """ + return _gdi.Bitmap_SetSize(*args, **kwargs) + def __nonzero__(self): return self.Ok() def __eq__(*args, **kwargs): """__eq__(Bitmap other) -> bool""" @@ -591,18 +607,6 @@ class BitmapPtr(Bitmap): self.__class__ = Bitmap _gdi.Bitmap_swigregister(BitmapPtr) -def EmptyBitmap(*args, **kwargs): - """ - EmptyBitmap(int width, int height, int depth=-1) -> Bitmap - - Creates a new bitmap of the given size. A depth of -1 indicates the depth of - the current screen or visual. Some platforms only support 1 for monochrome and - -1 for the current colour setting. - """ - val = _gdi.new_EmptyBitmap(*args, **kwargs) - val.thisown = 1 - return val - def BitmapFromIcon(*args, **kwargs): """ BitmapFromIcon(Icon icon) -> Bitmap @@ -649,6 +653,19 @@ def BitmapFromBits(*args, **kwargs): val.thisown = 1 return val +def EmptyBitmap(*args): + """ + EmptyBitmap(int width, int height, int depth=-1) -> Bitmap + EmptyBitmap(Size size, int depth=-1) -> Bitmap + + Creates a new bitmap of the given size. A depth of -1 indicates + the depth of the current screen or visual. Some platforms only + support 1 for monochrome and -1 for the current colour setting. + """ + val = _gdi.new_EmptyBitmap(*args) + val.thisown = 1 + return val + class Mask(core.Object): """ This class encapsulates a monochrome mask bitmap, where the masked area is @@ -1167,6 +1184,7 @@ FONTENCODING_ISO8859_14 = _gdi.FONTENCODING_ISO8859_14 FONTENCODING_ISO8859_15 = _gdi.FONTENCODING_ISO8859_15 FONTENCODING_ISO8859_MAX = _gdi.FONTENCODING_ISO8859_MAX FONTENCODING_KOI8 = _gdi.FONTENCODING_KOI8 +FONTENCODING_KOI8_U = _gdi.FONTENCODING_KOI8_U FONTENCODING_ALTERNATIVE = _gdi.FONTENCODING_ALTERNATIVE FONTENCODING_BULGARIAN = _gdi.FONTENCODING_BULGARIAN FONTENCODING_CP437 = _gdi.FONTENCODING_CP437 @@ -1445,6 +1463,11 @@ class FontMapper(object): return _gdi.FontMapper_GetEncodingDescription(*args, **kwargs) GetEncodingDescription = staticmethod(GetEncodingDescription) + def GetEncodingFromName(*args, **kwargs): + """GetEncodingFromName(String name) -> int""" + return _gdi.FontMapper_GetEncodingFromName(*args, **kwargs) + + GetEncodingFromName = staticmethod(GetEncodingFromName) def SetConfig(*args, **kwargs): """SetConfig(ConfigBase config)""" return _gdi.FontMapper_SetConfig(*args, **kwargs) @@ -1506,6 +1529,10 @@ def FontMapper_GetEncodingDescription(*args, **kwargs): """FontMapper_GetEncodingDescription(int encoding) -> String""" return _gdi.FontMapper_GetEncodingDescription(*args, **kwargs) +def FontMapper_GetEncodingFromName(*args, **kwargs): + """FontMapper_GetEncodingFromName(String name) -> int""" + return _gdi.FontMapper_GetEncodingFromName(*args, **kwargs) + def FontMapper_GetDefaultConfigPath(*args, **kwargs): """FontMapper_GetDefaultConfigPath() -> String""" return _gdi.FontMapper_GetDefaultConfigPath(*args, **kwargs) diff --git a/wxPython/src/mac/gdi_wrap.cpp b/wxPython/src/mac/gdi_wrap.cpp index 332680d868..2f460bffab 100644 --- a/wxPython/src/mac/gdi_wrap.cpp +++ b/wxPython/src/mac/gdi_wrap.cpp @@ -218,9 +218,9 @@ SWIGIMPORT(void) SWIG_Python_InstallConstants(PyObject *d, swig_con #define SWIGTYPE_p_wxImage swig_types[9] #define SWIGTYPE_p_wxMetaFileDC swig_types[10] #define SWIGTYPE_p_wxMask swig_types[11] -#define SWIGTYPE_p_wxFont swig_types[12] -#define SWIGTYPE_p_wxWindow swig_types[13] -#define SWIGTYPE_p_wxSize swig_types[14] +#define SWIGTYPE_p_wxSize swig_types[12] +#define SWIGTYPE_p_wxFont swig_types[13] +#define SWIGTYPE_p_wxWindow swig_types[14] #define SWIGTYPE_p_double swig_types[15] #define SWIGTYPE_p_wxMemoryDC swig_types[16] #define SWIGTYPE_p_wxFontMapper swig_types[17] @@ -246,8 +246,8 @@ SWIGIMPORT(void) SWIG_Python_InstallConstants(PyObject *d, swig_con #define SWIGTYPE_p_wxIcon swig_types[37] #define SWIGTYPE_p_wxLocale swig_types[38] #define SWIGTYPE_p_wxRegion swig_types[39] -#define SWIGTYPE_p_wxLanguageInfo swig_types[40] -#define SWIGTYPE_p_wxConfigBase swig_types[41] +#define SWIGTYPE_p_wxConfigBase swig_types[40] +#define SWIGTYPE_p_wxLanguageInfo swig_types[41] #define SWIGTYPE_p_wxWindowDC swig_types[42] #define SWIGTYPE_p_wxPrintData swig_types[43] #define SWIGTYPE_p_wxBrushList swig_types[44] @@ -622,10 +622,24 @@ wxBitmap *new_wxBitmap(PyObject *bits,int width,int height,int depth){ PyString_AsStringAndSize(bits, &buf, &length); return new wxBitmap(buf, width, height, depth); } +wxBitmap *new_wxBitmap__SWIG_0(int width,int height,int depth){ + return new wxBitmap(width, height, depth); + } +wxBitmap *new_wxBitmap__SWIG_1(wxSize const &size,int depth){ + return new wxBitmap(size.x, size.y, depth); + } +wxSize wxBitmap_GetSize(wxBitmap *self){ + wxSize size(self->GetWidth(), self->GetHeight()); + return size; + } void wxBitmap_SetMaskColour(wxBitmap *self,wxColour const &colour){ wxMask *mask = new wxMask(*self, colour); self->SetMask(mask); } +void wxBitmap_SetSize(wxBitmap *self,wxSize const &size){ + self->SetWidth(size.x); + self->SetHeight(size.y); + } bool wxBitmap___eq__(wxBitmap *self,wxBitmap const *other){ return other ? (*self == *other) : False; } bool wxBitmap___ne__(wxBitmap *self,wxBitmap const *other){ return other ? (*self != *other) : True; } wxMask *new_wxMask(wxBitmap const &bitmap,wxColour const &colour){ @@ -2671,7 +2685,7 @@ static PyObject *_wrap_Brush_Ok(PyObject *, PyObject *args, PyObject *kwargs) { } -static PyObject *_wrap_Brush_GetMacTheme(PyObject *, PyObject *args, PyObject *kwargs) { +static PyObject *_wrap_Brush_MacGetTheme(PyObject *, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxBrush *arg1 = (wxBrush *) 0 ; short result; @@ -2680,12 +2694,12 @@ static PyObject *_wrap_Brush_GetMacTheme(PyObject *, PyObject *args, PyObject *k (char *) "self", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:Brush_GetMacTheme",kwnames,&obj0)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:Brush_MacGetTheme",kwnames,&obj0)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxBrush, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (short)(arg1)->GetMacTheme(); + result = (short)(arg1)->MacGetTheme(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; @@ -2697,7 +2711,7 @@ static PyObject *_wrap_Brush_GetMacTheme(PyObject *, PyObject *args, PyObject *k } -static PyObject *_wrap_Brush_SetMacTheme(PyObject *, PyObject *args, PyObject *kwargs) { +static PyObject *_wrap_Brush_MacSetTheme(PyObject *, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxBrush *arg1 = (wxBrush *) 0 ; short arg2 ; @@ -2707,14 +2721,14 @@ static PyObject *_wrap_Brush_SetMacTheme(PyObject *, PyObject *args, PyObject *k (char *) "self",(char *) "macThemeBrush", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Brush_SetMacTheme",kwnames,&obj0,&obj1)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Brush_MacSetTheme",kwnames,&obj0,&obj1)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxBrush, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; arg2 = (short) SWIG_AsShort(obj1); if (PyErr_Occurred()) SWIG_fail; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - (arg1)->SetMacTheme(arg2); + (arg1)->MacSetTheme(arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; @@ -2802,42 +2816,6 @@ static PyObject *_wrap_delete_Bitmap(PyObject *, PyObject *args, PyObject *kwarg } -static PyObject *_wrap_new_EmptyBitmap(PyObject *, PyObject *args, PyObject *kwargs) { - PyObject *resultobj; - int arg1 ; - int arg2 ; - int arg3 = (int) -1 ; - wxBitmap *result; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - char *kwnames[] = { - (char *) "width",(char *) "height",(char *) "depth", NULL - }; - - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:new_EmptyBitmap",kwnames,&obj0,&obj1,&obj2)) goto fail; - arg1 = (int) SWIG_AsInt(obj0); - if (PyErr_Occurred()) 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(); - result = (wxBitmap *)new wxBitmap(arg1,arg2,arg3); - - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; - } - resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_wxBitmap, 1); - return resultobj; - fail: - return NULL; -} - - static PyObject *_wrap_new_BitmapFromIcon(PyObject *, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxIcon *arg1 = 0 ; @@ -2970,6 +2948,117 @@ static PyObject *_wrap_new_BitmapFromBits(PyObject *, PyObject *args, PyObject * } +static PyObject *_wrap_new_EmptyBitmap__SWIG_0(PyObject *, PyObject *args) { + PyObject *resultobj; + int arg1 ; + int arg2 ; + int arg3 = (int) -1 ; + wxBitmap *result; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO|O:new_EmptyBitmap",&obj0,&obj1,&obj2)) goto fail; + arg1 = (int) SWIG_AsInt(obj0); + if (PyErr_Occurred()) 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(); + result = (wxBitmap *)new_wxBitmap__SWIG_0(arg1,arg2,arg3); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_wxBitmap, 1); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_new_EmptyBitmap__SWIG_1(PyObject *, PyObject *args) { + PyObject *resultobj; + wxSize *arg1 = 0 ; + int arg2 = (int) -1 ; + wxBitmap *result; + wxSize temp1 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O|O:new_EmptyBitmap",&obj0,&obj1)) goto fail; + { + arg1 = &temp1; + if ( ! wxSize_helper(obj0, &arg1)) SWIG_fail; + } + if (obj1) { + arg2 = (int) SWIG_AsInt(obj1); + if (PyErr_Occurred()) SWIG_fail; + } + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (wxBitmap *)new_wxBitmap__SWIG_1((wxSize const &)*arg1,arg2); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_wxBitmap, 1); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_new_EmptyBitmap(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[4]; + int ii; + + argc = PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 3); ii++) { + argv[ii] = PyTuple_GetItem(args,ii); + } + if ((argc >= 1) && (argc <= 2)) { + int _v; + { + _v = wxPySimple_typecheck(argv[0], wxT("wxSize"), 2); + } + if (_v) { + if (argc <= 1) { + return _wrap_new_EmptyBitmap__SWIG_1(self,args); + } + _v = SWIG_CheckInt(argv[1]); + if (_v) { + return _wrap_new_EmptyBitmap__SWIG_1(self,args); + } + } + } + if ((argc >= 2) && (argc <= 3)) { + int _v; + _v = SWIG_CheckInt(argv[0]); + if (_v) { + _v = SWIG_CheckInt(argv[1]); + if (_v) { + if (argc <= 2) { + return _wrap_new_EmptyBitmap__SWIG_0(self,args); + } + _v = SWIG_CheckInt(argv[2]); + if (_v) { + return _wrap_new_EmptyBitmap__SWIG_0(self,args); + } + } + } + } + + PyErr_SetString(PyExc_TypeError,"No matching function for overloaded 'new_EmptyBitmap'"); + return NULL; +} + + static PyObject *_wrap_Bitmap_Ok(PyObject *, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxBitmap *arg1 = (wxBitmap *) 0 ; @@ -3076,6 +3165,36 @@ static PyObject *_wrap_Bitmap_GetDepth(PyObject *, PyObject *args, PyObject *kwa } +static PyObject *_wrap_Bitmap_GetSize(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj; + wxBitmap *arg1 = (wxBitmap *) 0 ; + wxSize result; + PyObject * obj0 = 0 ; + char *kwnames[] = { + (char *) "self", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:Bitmap_GetSize",kwnames,&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxBitmap, + SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = wxBitmap_GetSize(arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + wxSize * resultptr; + resultptr = new wxSize((wxSize &) result); + resultobj = SWIG_NewPointerObj((void *)(resultptr), SWIGTYPE_p_wxSize, 1); + } + return resultobj; + fail: + return NULL; +} + + static PyObject *_wrap_Bitmap_ConvertToImage(PyObject *, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxBitmap *arg1 = (wxBitmap *) 0 ; @@ -3456,6 +3575,38 @@ static PyObject *_wrap_Bitmap_SetDepth(PyObject *, PyObject *args, PyObject *kwa } +static PyObject *_wrap_Bitmap_SetSize(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj; + wxBitmap *arg1 = (wxBitmap *) 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:Bitmap_SetSize",kwnames,&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxBitmap, + SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; + { + arg2 = &temp2; + if ( ! wxSize_helper(obj1, &arg2)) SWIG_fail; + } + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxBitmap_SetSize(arg1,(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_Bitmap___eq__(PyObject *, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxBitmap *arg1 = (wxBitmap *) 0 ; @@ -7189,6 +7340,44 @@ static PyObject *_wrap_FontMapper_GetEncodingDescription(PyObject *, PyObject *a } +static PyObject *_wrap_FontMapper_GetEncodingFromName(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj; + wxString *arg1 = 0 ; + int result; + bool temp1 = False ; + PyObject * obj0 = 0 ; + char *kwnames[] = { + (char *) "name", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:FontMapper_GetEncodingFromName",kwnames,&obj0)) goto fail; + { + arg1 = wxString_in_helper(obj0); + if (arg1 == NULL) SWIG_fail; + temp1 = True; + } + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (int)wxFontMapper::GetEncodingFromName((wxString const &)*arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + resultobj = SWIG_FromInt((int)result); + { + if (temp1) + delete arg1; + } + return resultobj; + fail: + { + if (temp1) + delete arg1; + } + return NULL; +} + + static PyObject *_wrap_FontMapper_SetConfig(PyObject *, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxFontMapper *arg1 = (wxFontMapper *) 0 ; @@ -18278,20 +18467,21 @@ static PyMethodDef SwigMethods[] = { { (char *)"Brush_GetStyle", (PyCFunction) _wrap_Brush_GetStyle, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"Brush_GetStipple", (PyCFunction) _wrap_Brush_GetStipple, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"Brush_Ok", (PyCFunction) _wrap_Brush_Ok, METH_VARARGS | METH_KEYWORDS, NULL }, - { (char *)"Brush_GetMacTheme", (PyCFunction) _wrap_Brush_GetMacTheme, METH_VARARGS | METH_KEYWORDS, NULL }, - { (char *)"Brush_SetMacTheme", (PyCFunction) _wrap_Brush_SetMacTheme, METH_VARARGS | METH_KEYWORDS, NULL }, + { (char *)"Brush_MacGetTheme", (PyCFunction) _wrap_Brush_MacGetTheme, METH_VARARGS | METH_KEYWORDS, NULL }, + { (char *)"Brush_MacSetTheme", (PyCFunction) _wrap_Brush_MacSetTheme, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"Brush_swigregister", Brush_swigregister, METH_VARARGS, NULL }, { (char *)"new_Bitmap", (PyCFunction) _wrap_new_Bitmap, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"delete_Bitmap", (PyCFunction) _wrap_delete_Bitmap, METH_VARARGS | METH_KEYWORDS, NULL }, - { (char *)"new_EmptyBitmap", (PyCFunction) _wrap_new_EmptyBitmap, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"new_BitmapFromIcon", (PyCFunction) _wrap_new_BitmapFromIcon, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"new_BitmapFromImage", (PyCFunction) _wrap_new_BitmapFromImage, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"new_BitmapFromXPMData", (PyCFunction) _wrap_new_BitmapFromXPMData, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"new_BitmapFromBits", (PyCFunction) _wrap_new_BitmapFromBits, METH_VARARGS | METH_KEYWORDS, NULL }, + { (char *)"new_EmptyBitmap", _wrap_new_EmptyBitmap, METH_VARARGS, NULL }, { (char *)"Bitmap_Ok", (PyCFunction) _wrap_Bitmap_Ok, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"Bitmap_GetWidth", (PyCFunction) _wrap_Bitmap_GetWidth, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"Bitmap_GetHeight", (PyCFunction) _wrap_Bitmap_GetHeight, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"Bitmap_GetDepth", (PyCFunction) _wrap_Bitmap_GetDepth, METH_VARARGS | METH_KEYWORDS, NULL }, + { (char *)"Bitmap_GetSize", (PyCFunction) _wrap_Bitmap_GetSize, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"Bitmap_ConvertToImage", (PyCFunction) _wrap_Bitmap_ConvertToImage, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"Bitmap_GetMask", (PyCFunction) _wrap_Bitmap_GetMask, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"Bitmap_SetMask", (PyCFunction) _wrap_Bitmap_SetMask, METH_VARARGS | METH_KEYWORDS, NULL }, @@ -18303,6 +18493,7 @@ static PyMethodDef SwigMethods[] = { { (char *)"Bitmap_SetHeight", (PyCFunction) _wrap_Bitmap_SetHeight, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"Bitmap_SetWidth", (PyCFunction) _wrap_Bitmap_SetWidth, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"Bitmap_SetDepth", (PyCFunction) _wrap_Bitmap_SetDepth, METH_VARARGS | METH_KEYWORDS, NULL }, + { (char *)"Bitmap_SetSize", (PyCFunction) _wrap_Bitmap_SetSize, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"Bitmap___eq__", (PyCFunction) _wrap_Bitmap___eq__, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"Bitmap___ne__", (PyCFunction) _wrap_Bitmap___ne__, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"Bitmap_swigregister", Bitmap_swigregister, METH_VARARGS, NULL }, @@ -18429,6 +18620,7 @@ static PyMethodDef SwigMethods[] = { { (char *)"FontMapper_GetEncoding", (PyCFunction) _wrap_FontMapper_GetEncoding, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"FontMapper_GetEncodingName", (PyCFunction) _wrap_FontMapper_GetEncodingName, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"FontMapper_GetEncodingDescription", (PyCFunction) _wrap_FontMapper_GetEncodingDescription, METH_VARARGS | METH_KEYWORDS, NULL }, + { (char *)"FontMapper_GetEncodingFromName", (PyCFunction) _wrap_FontMapper_GetEncodingFromName, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"FontMapper_SetConfig", (PyCFunction) _wrap_FontMapper_SetConfig, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"FontMapper_SetConfigPath", (PyCFunction) _wrap_FontMapper_SetConfigPath, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"FontMapper_GetDefaultConfigPath", (PyCFunction) _wrap_FontMapper_GetDefaultConfigPath, METH_VARARGS | METH_KEYWORDS, NULL }, @@ -19156,9 +19348,9 @@ static swig_type_info _swigt__p_wxIconLocation[] = {{"_p_wxIconLocation", 0, "wx static swig_type_info _swigt__p_wxImage[] = {{"_p_wxImage", 0, "wxImage *", 0, 0, 0, 0},{"_p_wxImage", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}}; static swig_type_info _swigt__p_wxMetaFileDC[] = {{"_p_wxMetaFileDC", 0, "wxMetaFileDC *", 0, 0, 0, 0},{"_p_wxMetaFileDC", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}}; static swig_type_info _swigt__p_wxMask[] = {{"_p_wxMask", 0, "wxMask *", 0, 0, 0, 0},{"_p_wxMask", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}}; +static swig_type_info _swigt__p_wxSize[] = {{"_p_wxSize", 0, "wxSize *", 0, 0, 0, 0},{"_p_wxSize", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}}; static swig_type_info _swigt__p_wxFont[] = {{"_p_wxFont", 0, "wxFont *", 0, 0, 0, 0},{"_p_wxFont", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}}; static swig_type_info _swigt__p_wxWindow[] = {{"_p_wxWindow", 0, "wxWindow *", 0, 0, 0, 0},{"_p_wxControl", _p_wxControlTo_p_wxWindow, 0, 0, 0, 0, 0},{"_p_wxWindow", 0, 0, 0, 0, 0, 0},{"_p_wxControlWithItems", _p_wxControlWithItemsTo_p_wxWindow, 0, 0, 0, 0, 0},{"_p_wxMenuBar", _p_wxMenuBarTo_p_wxWindow, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}}; -static swig_type_info _swigt__p_wxSize[] = {{"_p_wxSize", 0, "wxSize *", 0, 0, 0, 0},{"_p_wxSize", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}}; static swig_type_info _swigt__p_double[] = {{"_p_double", 0, "double *", 0, 0, 0, 0},{"_p_double", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}}; static swig_type_info _swigt__p_wxMemoryDC[] = {{"_p_wxMemoryDC", 0, "wxMemoryDC *", 0, 0, 0, 0},{"_p_wxBufferedDC", _p_wxBufferedDCTo_p_wxMemoryDC, 0, 0, 0, 0, 0},{"_p_wxMemoryDC", 0, 0, 0, 0, 0, 0},{"_p_wxBufferedPaintDC", _p_wxBufferedPaintDCTo_p_wxMemoryDC, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}}; static swig_type_info _swigt__p_wxFontMapper[] = {{"_p_wxFontMapper", 0, "wxFontMapper *", 0, 0, 0, 0},{"_p_wxFontMapper", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}}; @@ -19184,8 +19376,8 @@ static swig_type_info _swigt__p_wxGDIObject[] = {{"_p_wxGDIObject", 0, "wxGDIObj static swig_type_info _swigt__p_wxIcon[] = {{"_p_wxIcon", 0, "wxIcon *", 0, 0, 0, 0},{"_p_wxIcon", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}}; static swig_type_info _swigt__p_wxLocale[] = {{"_p_wxLocale", 0, "wxLocale *", 0, 0, 0, 0},{"_p_wxLocale", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}}; static swig_type_info _swigt__p_wxRegion[] = {{"_p_wxRegion", 0, "wxRegion *", 0, 0, 0, 0},{"_p_wxRegion", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}}; -static swig_type_info _swigt__p_wxLanguageInfo[] = {{"_p_wxLanguageInfo", 0, "wxLanguageInfo *", 0, 0, 0, 0},{"_p_wxLanguageInfo", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}}; static swig_type_info _swigt__p_wxConfigBase[] = {{"_p_wxConfigBase", 0, "wxConfigBase *", 0, 0, 0, 0},{"_p_wxConfigBase", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}}; +static swig_type_info _swigt__p_wxLanguageInfo[] = {{"_p_wxLanguageInfo", 0, "wxLanguageInfo *", 0, 0, 0, 0},{"_p_wxLanguageInfo", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}}; static swig_type_info _swigt__p_wxWindowDC[] = {{"_p_wxWindowDC", 0, "wxWindowDC *", 0, 0, 0, 0},{"_p_wxWindowDC", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}}; static swig_type_info _swigt__p_wxPrintData[] = {{"_p_wxPrintData", 0, "wxPrintData *", 0, 0, 0, 0},{"_p_wxPrintData", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}}; static swig_type_info _swigt__p_wxBrushList[] = {{"_p_wxBrushList", 0, "wxBrushList *", 0, 0, 0, 0},{"_p_wxBrushList", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}}; @@ -19214,9 +19406,9 @@ _swigt__p_wxIconLocation, _swigt__p_wxImage, _swigt__p_wxMetaFileDC, _swigt__p_wxMask, +_swigt__p_wxSize, _swigt__p_wxFont, _swigt__p_wxWindow, -_swigt__p_wxSize, _swigt__p_double, _swigt__p_wxMemoryDC, _swigt__p_wxFontMapper, @@ -19242,8 +19434,8 @@ _swigt__p_wxGDIObject, _swigt__p_wxIcon, _swigt__p_wxLocale, _swigt__p_wxRegion, -_swigt__p_wxLanguageInfo, _swigt__p_wxConfigBase, +_swigt__p_wxLanguageInfo, _swigt__p_wxWindowDC, _swigt__p_wxPrintData, _swigt__p_wxBrushList, @@ -19340,6 +19532,7 @@ SWIGEXPORT(void) SWIG_init(void) { PyDict_SetItemString(d,"FONTENCODING_ISO8859_15", SWIG_FromInt((int)wxFONTENCODING_ISO8859_15)); PyDict_SetItemString(d,"FONTENCODING_ISO8859_MAX", SWIG_FromInt((int)wxFONTENCODING_ISO8859_MAX)); PyDict_SetItemString(d,"FONTENCODING_KOI8", SWIG_FromInt((int)wxFONTENCODING_KOI8)); + PyDict_SetItemString(d,"FONTENCODING_KOI8_U", SWIG_FromInt((int)wxFONTENCODING_KOI8_U)); PyDict_SetItemString(d,"FONTENCODING_ALTERNATIVE", SWIG_FromInt((int)wxFONTENCODING_ALTERNATIVE)); PyDict_SetItemString(d,"FONTENCODING_BULGARIAN", SWIG_FromInt((int)wxFONTENCODING_BULGARIAN)); PyDict_SetItemString(d,"FONTENCODING_CP437", SWIG_FromInt((int)wxFONTENCODING_CP437)); diff --git a/wxPython/src/mac/grid.py b/wxPython/src/mac/grid.py index 259d15e93c..54276f6831 100644 --- a/wxPython/src/mac/grid.py +++ b/wxPython/src/mac/grid.py @@ -447,7 +447,7 @@ class GridCellFloatEditor(GridCellTextEditor): def __repr__(self): return "<%s.%s; proxy of C++ wxGridCellFloatEditor instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): - """__init__() -> GridCellFloatEditor""" + """__init__(int width=-1, int precision=-1) -> GridCellFloatEditor""" newobj = _grid.new_GridCellFloatEditor(*args, **kwargs) self.this = newobj.this self.thisown = 1 diff --git a/wxPython/src/mac/grid_wrap.cpp b/wxPython/src/mac/grid_wrap.cpp index 170d4ade2f..5aa818c864 100644 --- a/wxPython/src/mac/grid_wrap.cpp +++ b/wxPython/src/mac/grid_wrap.cpp @@ -3416,15 +3416,27 @@ static PyObject * GridCellNumberEditor_swigregister(PyObject *, PyObject *args) } static PyObject *_wrap_new_GridCellFloatEditor(PyObject *, PyObject *args, PyObject *kwargs) { PyObject *resultobj; + int arg1 = (int) -1 ; + int arg2 = (int) -1 ; wxGridCellFloatEditor *result; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; char *kwnames[] = { - NULL + (char *) "width",(char *) "precision", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)":new_GridCellFloatEditor",kwnames)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|OO:new_GridCellFloatEditor",kwnames,&obj0,&obj1)) goto fail; + if (obj0) { + arg1 = (int) SWIG_AsInt(obj0); + if (PyErr_Occurred()) SWIG_fail; + } + if (obj1) { + arg2 = (int) SWIG_AsInt(obj1); + if (PyErr_Occurred()) SWIG_fail; + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (wxGridCellFloatEditor *)new wxGridCellFloatEditor(); + result = (wxGridCellFloatEditor *)new wxGridCellFloatEditor(arg1,arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; @@ -8782,6 +8794,7 @@ static PyObject *_wrap_Grid_GetTextBoxSize(PyObject *, PyObject *args, PyObject #else PyObject* str = PyObject_Str(item); #endif + if (PyErr_Occurred()) SWIG_fail; arg3->Add(Py2wxString(str)); Py_DECREF(item); Py_DECREF(str); diff --git a/wxPython/src/mac/misc_wrap.cpp b/wxPython/src/mac/misc_wrap.cpp index bb07d7543b..edbba4711a 100644 --- a/wxPython/src/mac/misc_wrap.cpp +++ b/wxPython/src/mac/misc_wrap.cpp @@ -11926,6 +11926,7 @@ static PyObject *_wrap_new_FileTypeInfoSequence(PyObject *, PyObject *args, PyOb #else PyObject* str = PyObject_Str(item); #endif + if (PyErr_Occurred()) SWIG_fail; arg1->Add(Py2wxString(str)); Py_DECREF(item); Py_DECREF(str); diff --git a/wxPython/src/mac/windows.py b/wxPython/src/mac/windows.py index 426fac7223..984779eed8 100644 --- a/wxPython/src/mac/windows.py +++ b/wxPython/src/mac/windows.py @@ -24,8 +24,8 @@ class Panel(core.Window): def Create(*args, **kwargs): """ - Create(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, - long style=wxTAB_TRAVERSAL|wxNO_BORDER, + Create(Window parent, int id=-1, Point pos=DefaultPosition, + Size size=DefaultSize, long style=wxTAB_TRAVERSAL|wxNO_BORDER, String name=PanelNameStr) -> bool Create the GUI part of the Window for 2-phase creation mode. @@ -33,7 +33,12 @@ class Panel(core.Window): return _windows.Panel_Create(*args, **kwargs) def InitDialog(*args, **kwargs): - """InitDialog()""" + """ + InitDialog() + + Sends an EVT_INIT_DIALOG event, whose handler usually transfers + data to the dialog via validators. + """ return _windows.Panel_InitDialog(*args, **kwargs) @@ -190,6 +195,27 @@ def PreScrolledWindow(*args, **kwargs): #--------------------------------------------------------------------------- +STAY_ON_TOP = _windows.STAY_ON_TOP +ICONIZE = _windows.ICONIZE +MINIMIZE = _windows.MINIMIZE +MAXIMIZE = _windows.MAXIMIZE +CLOSE_BOX = _windows.CLOSE_BOX +THICK_FRAME = _windows.THICK_FRAME +SYSTEM_MENU = _windows.SYSTEM_MENU +MINIMIZE_BOX = _windows.MINIMIZE_BOX +MAXIMIZE_BOX = _windows.MAXIMIZE_BOX +TINY_CAPTION_HORIZ = _windows.TINY_CAPTION_HORIZ +TINY_CAPTION_VERT = _windows.TINY_CAPTION_VERT +RESIZE_BOX = _windows.RESIZE_BOX +RESIZE_BORDER = _windows.RESIZE_BORDER +DIALOG_NO_PARENT = _windows.DIALOG_NO_PARENT +DEFAULT_FRAME_STYLE = _windows.DEFAULT_FRAME_STYLE +DEFAULT_DIALOG_STYLE = _windows.DEFAULT_DIALOG_STYLE +FRAME_TOOL_WINDOW = _windows.FRAME_TOOL_WINDOW +FRAME_FLOAT_ON_PARENT = _windows.FRAME_FLOAT_ON_PARENT +FRAME_NO_WINDOW_MENU = _windows.FRAME_NO_WINDOW_MENU +FRAME_NO_TASKBAR = _windows.FRAME_NO_TASKBAR +FRAME_SHAPED = _windows.FRAME_SHAPED FULLSCREEN_NOMENUBAR = _windows.FULLSCREEN_NOMENUBAR FULLSCREEN_NOTOOLBAR = _windows.FULLSCREEN_NOTOOLBAR FULLSCREEN_NOSTATUSBAR = _windows.FULLSCREEN_NOSTATUSBAR @@ -261,6 +287,14 @@ class TopLevelWindow(core.Window): """SetShape(Region region) -> bool""" return _windows.TopLevelWindow_SetShape(*args, **kwargs) + def MacSetMetalAppearance(*args, **kwargs): + """MacSetMetalAppearance(bool on)""" + return _windows.TopLevelWindow_MacSetMetalAppearance(*args, **kwargs) + + def MacGetMetalAppearance(*args, **kwargs): + """MacGetMetalAppearance() -> bool""" + return _windows.TopLevelWindow_MacGetMetalAppearance(*args, **kwargs) + class TopLevelWindowPtr(TopLevelWindow): def __init__(self, this): @@ -683,8 +717,8 @@ class SplitterWindow(core.Window): return "<%s.%s; proxy of C++ wxSplitterWindow instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): """ - __init__(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, - long style=SP_3D, String name=SplitterNameStr) -> SplitterWindow + __init__(Window parent, int id=-1, Point pos=DefaultPosition, + Size size=DefaultSize, long style=SP_3D, String name=SplitterNameStr) -> SplitterWindow Constructor. Creates and shows a SplitterWindow. """ @@ -697,8 +731,8 @@ class SplitterWindow(core.Window): def Create(*args, **kwargs): """ - Create(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, - long style=SP_3D, String name=SplitterNameStr) -> bool + Create(Window parent, int id=-1, Point pos=DefaultPosition, + Size size=DefaultSize, long style=SP_3D, String name=SplitterNameStr) -> bool Create the GUI part of the SplitterWindow for the 2-phase create. """ @@ -1815,6 +1849,14 @@ class TaskBarIcon(core.EvtHandler): if self.thisown: destroy(self) except: pass + def Destroy(*args, **kwargs): + """ + Destroy() + + Deletes the C++ object this Python object is a proxy for. + """ + return _windows.TaskBarIcon_Destroy(*args, **kwargs) + class TaskBarIconPtr(TaskBarIcon): def __init__(self, this): diff --git a/wxPython/src/mac/windows_wrap.cpp b/wxPython/src/mac/windows_wrap.cpp index ec73671c09..e148ff3f0f 100644 --- a/wxPython/src/mac/windows_wrap.cpp +++ b/wxPython/src/mac/windows_wrap.cpp @@ -820,6 +820,11 @@ enum { }; #endif +void wxTaskBarIcon_Destroy(wxTaskBarIcon *self){ + + + + } static const wxString wxPyFileSelectorPromptStr(wxFileSelectorPromptStr); static const wxString wxPyDirSelectorPromptStr(wxDirSelectorPromptStr); static const wxString wxPyDirDialogNameStr(wxDirDialogNameStr); @@ -1368,7 +1373,7 @@ static PyObject *_wrap_Panel_Create(PyObject *, PyObject *args, PyObject *kwargs PyObject *resultobj; wxPanel *arg1 = (wxPanel *) 0 ; wxWindow *arg2 = (wxWindow *) 0 ; - int arg3 ; + int arg3 = (int) (int)-1 ; wxPoint const &arg4_defvalue = wxDefaultPosition ; wxPoint *arg4 = (wxPoint *) &arg4_defvalue ; wxSize const &arg5_defvalue = wxDefaultSize ; @@ -1391,13 +1396,15 @@ static PyObject *_wrap_Panel_Create(PyObject *, PyObject *args, PyObject *kwargs (char *) "self",(char *) "parent",(char *) "id",(char *) "pos",(char *) "size",(char *) "style",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OOOO:Panel_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOOOO:Panel_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxPanel, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj1,(void **)(&arg2),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg3 = (int const) SWIG_AsInt(obj2); - if (PyErr_Occurred()) SWIG_fail; + if (obj2) { + arg3 = (int const) SWIG_AsInt(obj2); + if (PyErr_Occurred()) SWIG_fail; + } if (obj3) { { arg4 = &temp4; @@ -2994,6 +3001,63 @@ static PyObject *_wrap_TopLevelWindow_SetShape(PyObject *, PyObject *args, PyObj } +static PyObject *_wrap_TopLevelWindow_MacSetMetalAppearance(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj; + wxTopLevelWindow *arg1 = (wxTopLevelWindow *) 0 ; + bool arg2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + char *kwnames[] = { + (char *) "self",(char *) "on", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:TopLevelWindow_MacSetMetalAppearance",kwnames,&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxTopLevelWindow, + SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; + arg2 = (bool) SWIG_AsBool(obj1); + if (PyErr_Occurred()) SWIG_fail; + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + (arg1)->MacSetMetalAppearance(arg2); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_TopLevelWindow_MacGetMetalAppearance(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj; + wxTopLevelWindow *arg1 = (wxTopLevelWindow *) 0 ; + bool result; + PyObject * obj0 = 0 ; + char *kwnames[] = { + (char *) "self", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:TopLevelWindow_MacGetMetalAppearance",kwnames,&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxTopLevelWindow, + SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (bool)((wxTopLevelWindow const *)arg1)->MacGetMetalAppearance(); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj); + } + return resultobj; + fail: + return NULL; +} + + static PyObject * TopLevelWindow_swigregister(PyObject *, PyObject *args) { PyObject *obj; if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL; @@ -5419,7 +5483,7 @@ static PyObject *_wrap_SplitterNameStr_get() { static PyObject *_wrap_new_SplitterWindow(PyObject *, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxWindow *arg1 = (wxWindow *) 0 ; - int arg2 ; + int arg2 = (int) -1 ; wxPoint const &arg3_defvalue = wxDefaultPosition ; wxPoint *arg3 = (wxPoint *) &arg3_defvalue ; wxSize const &arg4_defvalue = wxDefaultSize ; @@ -5441,11 +5505,13 @@ static PyObject *_wrap_new_SplitterWindow(PyObject *, PyObject *args, PyObject * (char *) "parent",(char *) "id",(char *) "pos",(char *) "size",(char *) "style",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOOO:new_SplitterWindow",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OOOOO:new_SplitterWindow",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg2 = (int) SWIG_AsInt(obj1); - if (PyErr_Occurred()) SWIG_fail; + if (obj1) { + arg2 = (int) SWIG_AsInt(obj1); + if (PyErr_Occurred()) SWIG_fail; + } if (obj2) { { arg3 = &temp3; @@ -5517,7 +5583,7 @@ static PyObject *_wrap_SplitterWindow_Create(PyObject *, PyObject *args, PyObjec PyObject *resultobj; wxSplitterWindow *arg1 = (wxSplitterWindow *) 0 ; wxWindow *arg2 = (wxWindow *) 0 ; - int arg3 ; + int arg3 = (int) -1 ; wxPoint const &arg4_defvalue = wxDefaultPosition ; wxPoint *arg4 = (wxPoint *) &arg4_defvalue ; wxSize const &arg5_defvalue = wxDefaultSize ; @@ -5540,13 +5606,15 @@ static PyObject *_wrap_SplitterWindow_Create(PyObject *, PyObject *args, PyObjec (char *) "self",(char *) "parent",(char *) "id",(char *) "pos",(char *) "size",(char *) "style",(char *) "name", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OOOO:SplitterWindow_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOOOO:SplitterWindow_Create",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) goto fail; if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxSplitterWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; if ((SWIG_ConvertPtr(obj1,(void **)(&arg2),SWIGTYPE_p_wxWindow, SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg3 = (int) SWIG_AsInt(obj2); - if (PyErr_Occurred()) SWIG_fail; + if (obj2) { + arg3 = (int) SWIG_AsInt(obj2); + if (PyErr_Occurred()) SWIG_fail; + } if (obj3) { { arg4 = &temp4; @@ -10479,6 +10547,31 @@ static PyObject *_wrap_delete_TaskBarIcon(PyObject *, PyObject *args, PyObject * } +static PyObject *_wrap_TaskBarIcon_Destroy(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj; + wxTaskBarIcon *arg1 = (wxTaskBarIcon *) 0 ; + PyObject * obj0 = 0 ; + char *kwnames[] = { + (char *) "self", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:TaskBarIcon_Destroy",kwnames,&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxTaskBarIcon, + SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + wxTaskBarIcon_Destroy(arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + static PyObject * TaskBarIcon_swigregister(PyObject *, PyObject *args) { PyObject *obj; if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL; @@ -24001,6 +24094,8 @@ static PyMethodDef SwigMethods[] = { { (char *)"TopLevelWindow_SetTitle", (PyCFunction) _wrap_TopLevelWindow_SetTitle, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"TopLevelWindow_GetTitle", (PyCFunction) _wrap_TopLevelWindow_GetTitle, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"TopLevelWindow_SetShape", (PyCFunction) _wrap_TopLevelWindow_SetShape, METH_VARARGS | METH_KEYWORDS, NULL }, + { (char *)"TopLevelWindow_MacSetMetalAppearance", (PyCFunction) _wrap_TopLevelWindow_MacSetMetalAppearance, METH_VARARGS | METH_KEYWORDS, NULL }, + { (char *)"TopLevelWindow_MacGetMetalAppearance", (PyCFunction) _wrap_TopLevelWindow_MacGetMetalAppearance, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"TopLevelWindow_swigregister", TopLevelWindow_swigregister, METH_VARARGS, NULL }, { (char *)"new_Frame", (PyCFunction) _wrap_new_Frame, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"new_PreFrame", (PyCFunction) _wrap_new_PreFrame, METH_VARARGS | METH_KEYWORDS, NULL }, @@ -24226,6 +24321,7 @@ static PyMethodDef SwigMethods[] = { { (char *)"HtmlListBox_swigregister", HtmlListBox_swigregister, METH_VARARGS, NULL }, { (char *)"new_TaskBarIcon", (PyCFunction) _wrap_new_TaskBarIcon, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"delete_TaskBarIcon", (PyCFunction) _wrap_delete_TaskBarIcon, METH_VARARGS | METH_KEYWORDS, NULL }, + { (char *)"TaskBarIcon_Destroy", (PyCFunction) _wrap_TaskBarIcon_Destroy, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"TaskBarIcon_swigregister", TaskBarIcon_swigregister, METH_VARARGS, NULL }, { (char *)"new_TaskBarIconEvent", (PyCFunction) _wrap_new_TaskBarIconEvent, METH_VARARGS | METH_KEYWORDS, NULL }, { (char *)"TaskBarIconEvent_swigregister", TaskBarIconEvent_swigregister, METH_VARARGS, NULL }, @@ -25874,6 +25970,27 @@ SWIGEXPORT(void) SWIG_init(void) { SWIG_addvarlink(SWIG_globals,(char*)"DialogNameStr",_wrap_DialogNameStr_get, _wrap_DialogNameStr_set); SWIG_addvarlink(SWIG_globals,(char*)"StatusLineNameStr",_wrap_StatusLineNameStr_get, _wrap_StatusLineNameStr_set); SWIG_addvarlink(SWIG_globals,(char*)"ToolBarNameStr",_wrap_ToolBarNameStr_get, _wrap_ToolBarNameStr_set); + PyDict_SetItemString(d,"STAY_ON_TOP", SWIG_FromInt((int)wxSTAY_ON_TOP)); + PyDict_SetItemString(d,"ICONIZE", SWIG_FromInt((int)wxICONIZE)); + PyDict_SetItemString(d,"MINIMIZE", SWIG_FromInt((int)wxMINIMIZE)); + PyDict_SetItemString(d,"MAXIMIZE", SWIG_FromInt((int)wxMAXIMIZE)); + PyDict_SetItemString(d,"CLOSE_BOX", SWIG_FromInt((int)wxCLOSE_BOX)); + PyDict_SetItemString(d,"THICK_FRAME", SWIG_FromInt((int)wxTHICK_FRAME)); + PyDict_SetItemString(d,"SYSTEM_MENU", SWIG_FromInt((int)wxSYSTEM_MENU)); + PyDict_SetItemString(d,"MINIMIZE_BOX", SWIG_FromInt((int)wxMINIMIZE_BOX)); + PyDict_SetItemString(d,"MAXIMIZE_BOX", SWIG_FromInt((int)wxMAXIMIZE_BOX)); + PyDict_SetItemString(d,"TINY_CAPTION_HORIZ", SWIG_FromInt((int)wxTINY_CAPTION_HORIZ)); + PyDict_SetItemString(d,"TINY_CAPTION_VERT", SWIG_FromInt((int)wxTINY_CAPTION_VERT)); + PyDict_SetItemString(d,"RESIZE_BOX", SWIG_FromInt((int)wxRESIZE_BOX)); + PyDict_SetItemString(d,"RESIZE_BORDER", SWIG_FromInt((int)wxRESIZE_BORDER)); + PyDict_SetItemString(d,"DIALOG_NO_PARENT", SWIG_FromInt((int)wxDIALOG_NO_PARENT)); + PyDict_SetItemString(d,"DEFAULT_FRAME_STYLE", SWIG_FromInt((int)wxDEFAULT_FRAME_STYLE)); + PyDict_SetItemString(d,"DEFAULT_DIALOG_STYLE", SWIG_FromInt((int)wxDEFAULT_DIALOG_STYLE)); + PyDict_SetItemString(d,"FRAME_TOOL_WINDOW", SWIG_FromInt((int)wxFRAME_TOOL_WINDOW)); + PyDict_SetItemString(d,"FRAME_FLOAT_ON_PARENT", SWIG_FromInt((int)wxFRAME_FLOAT_ON_PARENT)); + PyDict_SetItemString(d,"FRAME_NO_WINDOW_MENU", SWIG_FromInt((int)wxFRAME_NO_WINDOW_MENU)); + PyDict_SetItemString(d,"FRAME_NO_TASKBAR", SWIG_FromInt((int)wxFRAME_NO_TASKBAR)); + PyDict_SetItemString(d,"FRAME_SHAPED", SWIG_FromInt((int)wxFRAME_SHAPED)); PyDict_SetItemString(d,"FULLSCREEN_NOMENUBAR", SWIG_FromInt((int)wxFULLSCREEN_NOMENUBAR)); PyDict_SetItemString(d,"FULLSCREEN_NOTOOLBAR", SWIG_FromInt((int)wxFULLSCREEN_NOTOOLBAR)); PyDict_SetItemString(d,"FULLSCREEN_NOSTATUSBAR", SWIG_FromInt((int)wxFULLSCREEN_NOSTATUSBAR)); -- 2.45.2