From a001823c80ceb1e9ac518350e1e9467299b66950 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Thu, 24 Jun 2004 21:02:49 +0000 Subject: [PATCH] reSWIGged git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28016 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/src/mac/_controls.py | 50 +- wxPython/src/mac/_core.py | 80 ++- wxPython/src/mac/_core_wrap.cpp | 174 ++++--- wxPython/src/mac/_gdi.py | 11 +- wxPython/src/mac/_misc.py | 53 +- wxPython/src/mac/_misc_wrap.cpp | 38 +- wxPython/src/mac/_windows.py | 40 +- wxPython/src/msw/_controls.py | 740 ++++------------------------ wxPython/src/msw/_controls_wrap.cpp | 69 +-- wxPython/src/msw/_core.py | 74 ++- wxPython/src/msw/_core_wrap.cpp | 174 ++++--- wxPython/src/msw/_gdi.py | 11 +- wxPython/src/msw/_misc.py | 53 +- wxPython/src/msw/_misc_wrap.cpp | 38 +- wxPython/src/msw/_windows.py | 19 +- 15 files changed, 642 insertions(+), 982 deletions(-) diff --git a/wxPython/src/mac/_controls.py b/wxPython/src/mac/_controls.py index 68159f1943..1f087881b5 100644 --- a/wxPython/src/mac/_controls.py +++ b/wxPython/src/mac/_controls.py @@ -451,6 +451,8 @@ class Choice(_core.ControlWithItems): Create(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, List choices=[], long style=0, Validator validator=DefaultValidator, String name=ChoiceNameStr) -> bool + + Actually create the GUI Choice control for 2-phase creation """ return _controls_.Choice_Create(*args, **kwargs) @@ -567,6 +569,8 @@ class ComboBox(_core.Control,_core.ItemContainer): Point pos=DefaultPosition, Size size=DefaultSize, List choices=[], long style=0, Validator validator=DefaultValidator, String name=ChoiceNameStr) -> bool + + Actually create the GUI wxComboBox control for 2-phase creation """ return _controls_.ComboBox_Create(*args, **kwargs) @@ -1662,7 +1666,11 @@ class TextCtrl(_core.Control): return _controls_.TextCtrl_IsMultiLine(*args, **kwargs) def GetSelection(*args, **kwargs): - """GetSelection() -> (from, to)""" + """ + GetSelection() -> (from, to) + + If the return values from and to are the same, there is no selection. + """ return _controls_.TextCtrl_GetSelection(*args, **kwargs) def GetStringSelection(*args, **kwargs): @@ -1742,7 +1750,12 @@ class TextCtrl(_core.Control): return _controls_.TextCtrl_ShowPosition(*args, **kwargs) def HitTest(*args, **kwargs): - """HitTest(Point pt) -> (result, row, col)""" + """ + HitTest(Point pt) -> (result, row, col) + + Find the character at position given in pixels. NB: pt is in device + coords but is not adjusted for the client area origin nor scrolling + """ return _controls_.TextCtrl_HitTest(*args, **kwargs) def Copy(*args, **kwargs): @@ -2956,7 +2969,12 @@ class Notebook(BookCtrl): return _controls_.Notebook_SetTabSize(*args, **kwargs) def HitTest(*args, **kwargs): - """HitTest(Point pt) -> (tab, where)""" + """ + HitTest(Point pt) -> (tab, where) + + Returns the tab which is hit, and flags indicating where using + wx.NB_HITTEST flags. + """ return _controls_.Notebook_HitTest(*args, **kwargs) def CalcSizeFromPage(*args, **kwargs): @@ -4430,7 +4448,12 @@ class ListCtrl(_core.Control): return _controls_.ListCtrl_FindItemAtPos(*args, **kwargs) def HitTest(*args, **kwargs): - """HitTest(Point point) -> (item, where)""" + """ + HitTest(Point point) -> (item, where) + + Determines which item (if any) is at the specified point, giving + in the second return value (see wxLIST_HITTEST_... flags.) + """ return _controls_.ListCtrl_HitTest(*args, **kwargs) def InsertItem(*args, **kwargs): @@ -5220,7 +5243,14 @@ class TreeCtrl(_core.Control): return _controls_.TreeCtrl_SortChildren(*args, **kwargs) def HitTest(*args, **kwargs): - """HitTest(Point point) -> (item, where)""" + """ + HitTest(Point point) -> (item, where) + + Determine which item (if any) belongs the given point. The coordinates + specified are relative to the client area of tree ctrl and the where return + value is set to a bitmask of wxTREE_HITTEST_xxx constants. + + """ return _controls_.TreeCtrl_HitTest(*args, **kwargs) def GetBoundingRect(*args, **kwargs): @@ -5371,7 +5401,15 @@ class GenericDirCtrl(_core.Control): return _controls_.GenericDirCtrl_GetFilterListCtrl(*args, **kwargs) def FindChild(*args, **kwargs): - """FindChild(wxTreeItemId parentId, wxString path) -> (item, done)""" + """ + FindChild(wxTreeItemId parentId, wxString path) -> (item, done) + + Find the child that matches the first part of 'path'. E.g. if a child + path is "/usr" and 'path' is "/usr/include" then the child for + /usr is returned. If the path string has been used (we're at the + leaf), done is set to True. + + """ return _controls_.GenericDirCtrl_FindChild(*args, **kwargs) def DoResize(*args, **kwargs): diff --git a/wxPython/src/mac/_core.py b/wxPython/src/mac/_core.py index 3e816ee7bb..56a325a701 100644 --- a/wxPython/src/mac/_core.py +++ b/wxPython/src/mac/_core.py @@ -5838,6 +5838,26 @@ class Window(EvtHandler): """ return _core_.Window_GetBestSizeTuple(*args, **kwargs) + def InvalidateBestSize(*args, **kwargs): + """ + InvalidateBestSize(self) + + Reset the cached best size value so it will be recalculated the next + time it is needed. + """ + return _core_.Window_InvalidateBestSize(*args, **kwargs) + + def GetBestFittingSize(*args, **kwargs): + """ + GetBestFittingSize(self) -> Size + + This function will merge the window's best size into the window's + minimum size, giving priority to the min size components, and returns + the results. + + """ + return _core_.Window_GetBestFittingSize(*args, **kwargs) + def GetAdjustedBestSize(*args, **kwargs): """ GetAdjustedBestSize(self) -> Size @@ -8181,40 +8201,8 @@ class Control(Window): """ return _core_.Control_SetLabel(*args, **kwargs) - def GetAdjustMinSizeFlag(*args, **kwargs): - """ - GetAdjustMinSizeFlag(self) -> bool - - Returns whether the minsize should be adjusted for this control when - `SetLabel` or `SetFont` are called. - """ - return _core_.Control_GetAdjustMinSizeFlag(*args, **kwargs) - - def SetAdjustMinSizeFlag(*args, **kwargs): - """ - SetAdjustMinSizeFlag(self, bool adjust) - - By default controls will readjust their size and minsize when - `SetLabel` or `SetFont` are called. This flag will allow you to - control this behavior. - """ - return _core_.Control_SetAdjustMinSizeFlag(*args, **kwargs) - def GetClassDefaultAttributes(*args, **kwargs): - """ - GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes - - 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 - user's 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 `wx.Window.SetWindowVariant` for more about - this. - """ + """GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes""" return _core_.Control_GetClassDefaultAttributes(*args, **kwargs) GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes) @@ -8238,20 +8226,7 @@ def PreControl(*args, **kwargs): 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 - user's 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 `wx.Window.SetWindowVariant` for more about - this. - """ + """Control_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes""" return _core_.Control_GetClassDefaultAttributes(*args, **kwargs) #--------------------------------------------------------------------------- @@ -8524,6 +8499,15 @@ class SizerItem(Object): """ return _core_.SizerItem_GetMinSize(*args, **kwargs) + def GetMinSizeWithBorder(*args, **kwargs): + """ + GetMinSizeWithBorder(self) -> Size + + Get the minimum size needed for the item with space for the borders + added, if needed. + """ + return _core_.SizerItem_GetMinSizeWithBorder(*args, **kwargs) + def SetInitSize(*args, **kwargs): """SetInitSize(self, int x, int y)""" return _core_.SizerItem_SetInitSize(*args, **kwargs) @@ -10434,7 +10418,7 @@ def CallAfter(callable, *args, **kw): :see: `wx.FutureCall` """ app = wx.GetApp() - assert app, 'No wxApp created yet' + assert app is not None, 'No wx.App created yet' global _wxPyCallAfterId if _wxPyCallAfterId is None: diff --git a/wxPython/src/mac/_core_wrap.cpp b/wxPython/src/mac/_core_wrap.cpp index bfb0c459f8..7a731c6887 100644 --- a/wxPython/src/mac/_core_wrap.cpp +++ b/wxPython/src/mac/_core_wrap.cpp @@ -22885,6 +22885,61 @@ static PyObject *_wrap_Window_GetBestSizeTuple(PyObject *self, PyObject *args, P } +static PyObject *_wrap_Window_InvalidateBestSize(PyObject *self, 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_InvalidateBestSize",kwnames,&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxWindow, + SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + (arg1)->InvalidateBestSize(); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_Window_GetBestFittingSize(PyObject *self, 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_GetBestFittingSize",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)->GetBestFittingSize(); + + 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_GetAdjustedBestSize(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxWindow *arg1 = (wxWindow *) 0 ; @@ -26264,7 +26319,7 @@ static PyObject *_wrap_Window_SetCursor(PyObject *self, PyObject *args, PyObject static PyObject *_wrap_Window_GetCursor(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxWindow *arg1 = (wxWindow *) 0 ; - wxCursor *result; + wxCursor result; PyObject * obj0 = 0 ; char *kwnames[] = { (char *) "self", NULL @@ -26275,17 +26330,15 @@ static PyObject *_wrap_Window_GetCursor(PyObject *self, PyObject *args, PyObject SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - { - wxCursor &_result_ref = (arg1)->GetCursor(); - result = (wxCursor *) &_result_ref; - } + result = (arg1)->GetCursor(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } { - wxCursor* resultptr = new wxCursor(*result); - resultobj = SWIG_NewPointerObj((void*)(resultptr), SWIGTYPE_p_wxCursor, 1); + wxCursor * resultptr; + resultptr = new wxCursor((wxCursor &) result); + resultobj = SWIG_NewPointerObj((void *)(resultptr), SWIGTYPE_p_wxCursor, 1); } return resultobj; fail: @@ -26367,7 +26420,7 @@ static PyObject *_wrap_Window_SetDefaultFont(PyObject *self, PyObject *args, PyO static PyObject *_wrap_Window_GetFont(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxWindow *arg1 = (wxWindow *) 0 ; - wxFont *result; + wxFont result; PyObject * obj0 = 0 ; char *kwnames[] = { (char *) "self", NULL @@ -26378,17 +26431,15 @@ static PyObject *_wrap_Window_GetFont(PyObject *self, PyObject *args, PyObject * SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - { - wxFont &_result_ref = (arg1)->GetFont(); - result = (wxFont *) &_result_ref; - } + result = (arg1)->GetFont(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } { - wxFont* resultptr = new wxFont(*result); - resultobj = SWIG_NewPointerObj((void*)(resultptr), SWIGTYPE_p_wxFont, 1); + wxFont * resultptr; + resultptr = new wxFont((wxFont &) result); + resultobj = SWIG_NewPointerObj((void *)(resultptr), SWIGTYPE_p_wxFont, 1); } return resultobj; fail: @@ -33095,63 +33146,6 @@ static PyObject *_wrap_Control_SetLabel(PyObject *self, PyObject *args, PyObject } -static PyObject *_wrap_Control_GetAdjustMinSizeFlag(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject *resultobj; - wxControl *arg1 = (wxControl *) 0 ; - bool result; - PyObject * obj0 = 0 ; - char *kwnames[] = { - (char *) "self", NULL - }; - - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:Control_GetAdjustMinSizeFlag",kwnames,&obj0)) goto fail; - if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxControl, - SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - { - PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (bool)(arg1)->GetAdjustMinSizeFlag(); - - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; - } - { - resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj); - } - return resultobj; - fail: - return NULL; -} - - -static PyObject *_wrap_Control_SetAdjustMinSizeFlag(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject *resultobj; - wxControl *arg1 = (wxControl *) 0 ; - bool arg2 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char *kwnames[] = { - (char *) "self",(char *) "adjust", NULL - }; - - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Control_SetAdjustMinSizeFlag",kwnames,&obj0,&obj1)) goto fail; - if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxControl, - SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg2 = (bool) SWIG_AsBool(obj1); - if (PyErr_Occurred()) SWIG_fail; - { - PyThreadState* __tstate = wxPyBeginAllowThreads(); - (arg1)->SetAdjustMinSizeFlag(arg2); - - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; - } - Py_INCREF(Py_None); resultobj = Py_None; - return resultobj; - fail: - return NULL; -} - - static PyObject *_wrap_Control_GetClassDefaultAttributes(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; int arg1 = (int) wxWINDOW_VARIANT_NORMAL ; @@ -33167,12 +33161,11 @@ static PyObject *_wrap_Control_GetClassDefaultAttributes(PyObject *self, PyObjec if (PyErr_Occurred()) SWIG_fail; } { - if (!wxPyCheckForApp()) SWIG_fail; PyThreadState* __tstate = wxPyBeginAllowThreads(); result = wxControl::GetClassDefaultAttributes((wxWindowVariant )arg1); wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; + if (PyErr_Occurred()) SWIG_fail; } { wxVisualAttributes * resultptr; @@ -34099,6 +34092,36 @@ static PyObject *_wrap_SizerItem_GetMinSize(PyObject *self, PyObject *args, PyOb } +static PyObject *_wrap_SizerItem_GetMinSizeWithBorder(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj; + wxSizerItem *arg1 = (wxSizerItem *) 0 ; + wxSize result; + PyObject * obj0 = 0 ; + char *kwnames[] = { + (char *) "self", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:SizerItem_GetMinSizeWithBorder",kwnames,&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxSizerItem, + SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = ((wxSizerItem const *)arg1)->GetMinSizeWithBorder(); + + 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_SizerItem_SetInitSize(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxSizerItem *arg1 = (wxSizerItem *) 0 ; @@ -40695,6 +40718,8 @@ static PyMethodDef SwigMethods[] = { { (char *)"Window_GetClientRect", (PyCFunction) _wrap_Window_GetClientRect, METH_VARARGS | METH_KEYWORDS }, { (char *)"Window_GetBestSize", (PyCFunction) _wrap_Window_GetBestSize, METH_VARARGS | METH_KEYWORDS }, { (char *)"Window_GetBestSizeTuple", (PyCFunction) _wrap_Window_GetBestSizeTuple, METH_VARARGS | METH_KEYWORDS }, + { (char *)"Window_InvalidateBestSize", (PyCFunction) _wrap_Window_InvalidateBestSize, METH_VARARGS | METH_KEYWORDS }, + { (char *)"Window_GetBestFittingSize", (PyCFunction) _wrap_Window_GetBestFittingSize, METH_VARARGS | METH_KEYWORDS }, { (char *)"Window_GetAdjustedBestSize", (PyCFunction) _wrap_Window_GetAdjustedBestSize, METH_VARARGS | METH_KEYWORDS }, { (char *)"Window_Center", (PyCFunction) _wrap_Window_Center, METH_VARARGS | METH_KEYWORDS }, { (char *)"Window_CenterOnScreen", (PyCFunction) _wrap_Window_CenterOnScreen, METH_VARARGS | METH_KEYWORDS }, @@ -40986,8 +41011,6 @@ static PyMethodDef SwigMethods[] = { { (char *)"Control_Command", (PyCFunction) _wrap_Control_Command, METH_VARARGS | METH_KEYWORDS }, { (char *)"Control_GetLabel", (PyCFunction) _wrap_Control_GetLabel, METH_VARARGS | METH_KEYWORDS }, { (char *)"Control_SetLabel", (PyCFunction) _wrap_Control_SetLabel, METH_VARARGS | METH_KEYWORDS }, - { (char *)"Control_GetAdjustMinSizeFlag", (PyCFunction) _wrap_Control_GetAdjustMinSizeFlag, METH_VARARGS | METH_KEYWORDS }, - { (char *)"Control_SetAdjustMinSizeFlag", (PyCFunction) _wrap_Control_SetAdjustMinSizeFlag, METH_VARARGS | METH_KEYWORDS }, { (char *)"Control_GetClassDefaultAttributes", (PyCFunction) _wrap_Control_GetClassDefaultAttributes, METH_VARARGS | METH_KEYWORDS }, { (char *)"Control_swigregister", Control_swigregister, METH_VARARGS }, { (char *)"ItemContainer_Append", (PyCFunction) _wrap_ItemContainer_Append, METH_VARARGS | METH_KEYWORDS }, @@ -41018,6 +41041,7 @@ static PyMethodDef SwigMethods[] = { { (char *)"SizerItem_CalcMin", (PyCFunction) _wrap_SizerItem_CalcMin, METH_VARARGS | METH_KEYWORDS }, { (char *)"SizerItem_SetDimension", (PyCFunction) _wrap_SizerItem_SetDimension, METH_VARARGS | METH_KEYWORDS }, { (char *)"SizerItem_GetMinSize", (PyCFunction) _wrap_SizerItem_GetMinSize, METH_VARARGS | METH_KEYWORDS }, + { (char *)"SizerItem_GetMinSizeWithBorder", (PyCFunction) _wrap_SizerItem_GetMinSizeWithBorder, METH_VARARGS | METH_KEYWORDS }, { (char *)"SizerItem_SetInitSize", (PyCFunction) _wrap_SizerItem_SetInitSize, METH_VARARGS | METH_KEYWORDS }, { (char *)"SizerItem_SetRatioWH", (PyCFunction) _wrap_SizerItem_SetRatioWH, METH_VARARGS | METH_KEYWORDS }, { (char *)"SizerItem_SetRatioSize", (PyCFunction) _wrap_SizerItem_SetRatioSize, METH_VARARGS | METH_KEYWORDS }, diff --git a/wxPython/src/mac/_gdi.py b/wxPython/src/mac/_gdi.py index 5319e3392c..7806c01718 100644 --- a/wxPython/src/mac/_gdi.py +++ b/wxPython/src/mac/_gdi.py @@ -2607,7 +2607,12 @@ class DC(_core.Object): return _gdi_.DC_GetCharWidth(*args, **kwargs) def GetTextExtent(*args, **kwargs): - """GetTextExtent(wxString string) -> (width, height)""" + """ + GetTextExtent(wxString string) -> (width, height) + + Get the width and height of the text using the current font. Only + works for single line strings. + """ return _gdi_.DC_GetTextExtent(*args, **kwargs) def GetFullTextExtent(*args, **kwargs): @@ -2624,6 +2629,10 @@ class DC(_core.Object): """ GetMultiLineTextExtent(wxString string, Font font=None) -> (width, height, descent, externalLeading) + + Get the width, height, decent and leading of the text using the + current or specified font. Works for single as well as multi-line + strings. """ return _gdi_.DC_GetMultiLineTextExtent(*args, **kwargs) diff --git a/wxPython/src/mac/_misc.py b/wxPython/src/mac/_misc.py index a8e6ecea5e..40b0cd7a8c 100644 --- a/wxPython/src/mac/_misc.py +++ b/wxPython/src/mac/_misc.py @@ -3273,7 +3273,11 @@ class DateTime(object): GetWeekDayName = staticmethod(GetWeekDayName) def GetAmPmStrings(*args, **kwargs): - """GetAmPmStrings() -> (am, pm)""" + """ + GetAmPmStrings() -> (am, pm) + + Get the AM and PM strings in the current locale (may be empty) + """ return _misc_.DateTime_GetAmPmStrings(*args, **kwargs) GetAmPmStrings = staticmethod(GetAmPmStrings) @@ -3747,7 +3751,11 @@ def DateTime_GetWeekDayName(*args, **kwargs): return _misc_.DateTime_GetWeekDayName(*args, **kwargs) def DateTime_GetAmPmStrings(*args, **kwargs): - """GetAmPmStrings() -> (am, pm)""" + """ + GetAmPmStrings() -> (am, pm) + + Get the AM and PM strings in the current locale (may be empty) + """ return _misc_.DateTime_GetAmPmStrings(*args, **kwargs) def DateTime_IsDSTApplicable(*args, **kwargs): @@ -4854,7 +4862,11 @@ class FileDataObject(DataObjectSimple): self.thisown = 1 del newobj.thisown def GetFilenames(*args, **kwargs): - """GetFilenames(self) -> [names]""" + """ + GetFilenames(self) -> [names] + + Returns a list of file names. + """ return _misc_.FileDataObject_GetFilenames(*args, **kwargs) def AddFile(*args, **kwargs): @@ -5340,6 +5352,15 @@ class Clipboard(_core.Object): """ return _misc_.Clipboard_UsePrimarySelection(*args, **kwargs) + def Get(*args, **kwargs): + """ + Get() -> Clipboard + + Returns global instance (wxTheClipboard) of the object. + """ + return _misc_.Clipboard_Get(*args, **kwargs) + + Get = staticmethod(Get) class ClipboardPtr(Clipboard): def __init__(self, this): @@ -5348,6 +5369,31 @@ class ClipboardPtr(Clipboard): self.__class__ = Clipboard _misc_.Clipboard_swigregister(ClipboardPtr) +def Clipboard_Get(*args, **kwargs): + """ + Clipboard_Get() -> Clipboard + + Returns global instance (wxTheClipboard) of the object. + """ + return _misc_.Clipboard_Get(*args, **kwargs) + +class _wxPyDelayedInitWrapper(object): + def __init__(self, initfunc, *args, **kwargs): + self._initfunc = initfunc + self._args = args + self._kwargs = kwargs + self._instance = None + def _checkInstance(self): + if self._instance is None: + self._instance = self._initfunc(*self._args, **self._kwargs) + def __getattr__(self, name): + self._checkInstance() + return getattr(self._instance, name) + def __repr__(self): + self._checkInstance() + return repr(self._instance) +TheClipboard = _wxPyDelayedInitWrapper(Clipboard.Get) + class ClipboardLocker(object): """ A helpful class for opening the clipboard and automatically @@ -5388,7 +5434,6 @@ class ClipboardLockerPtr(ClipboardLocker): if not hasattr(self,"thisown"): self.thisown = 0 self.__class__ = ClipboardLocker _misc_.ClipboardLocker_swigregister(ClipboardLockerPtr) -TheClipboard = cvar.TheClipboard #--------------------------------------------------------------------------- diff --git a/wxPython/src/mac/_misc_wrap.cpp b/wxPython/src/mac/_misc_wrap.cpp index 4c32099023..5daa8495b6 100644 --- a/wxPython/src/mac/_misc_wrap.cpp +++ b/wxPython/src/mac/_misc_wrap.cpp @@ -27258,6 +27258,28 @@ static PyObject *_wrap_Clipboard_UsePrimarySelection(PyObject *self, PyObject *a } +static PyObject *_wrap_Clipboard_Get(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj; + wxClipboard *result; + char *kwnames[] = { + NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)":Clipboard_Get",kwnames)) goto fail; + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (wxClipboard *)wxClipboard::Get(); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_wxClipboard, 0); + return resultobj; + fail: + return NULL; +} + + static PyObject * Clipboard_swigregister(PyObject *self, PyObject *args) { PyObject *obj; if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL; @@ -27265,20 +27287,6 @@ static PyObject * Clipboard_swigregister(PyObject *self, PyObject *args) { Py_INCREF(obj); return Py_BuildValue((char *)""); } -static int _wrap_TheClipboard_set(PyObject *_val) { - PyErr_SetString(PyExc_TypeError,"Variable TheClipboard is read-only."); - return 1; -} - - -static PyObject *_wrap_TheClipboard_get() { - PyObject *pyobj; - - pyobj = SWIG_NewPointerObj((void *)(wxTheClipboard), SWIGTYPE_p_wxClipboard, 0); - return pyobj; -} - - static PyObject *_wrap_new_ClipboardLocker(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxClipboard *arg1 = (wxClipboard *) NULL ; @@ -28992,6 +29000,7 @@ static PyMethodDef SwigMethods[] = { { (char *)"Clipboard_Clear", (PyCFunction) _wrap_Clipboard_Clear, METH_VARARGS | METH_KEYWORDS }, { (char *)"Clipboard_Flush", (PyCFunction) _wrap_Clipboard_Flush, METH_VARARGS | METH_KEYWORDS }, { (char *)"Clipboard_UsePrimarySelection", (PyCFunction) _wrap_Clipboard_UsePrimarySelection, METH_VARARGS | METH_KEYWORDS }, + { (char *)"Clipboard_Get", (PyCFunction) _wrap_Clipboard_Get, METH_VARARGS | METH_KEYWORDS }, { (char *)"Clipboard_swigregister", Clipboard_swigregister, METH_VARARGS }, { (char *)"new_ClipboardLocker", (PyCFunction) _wrap_new_ClipboardLocker, METH_VARARGS | METH_KEYWORDS }, { (char *)"delete_ClipboardLocker", (PyCFunction) _wrap_delete_ClipboardLocker, METH_VARARGS | METH_KEYWORDS }, @@ -30171,7 +30180,6 @@ SWIGEXPORT(void) SWIG_init(void) { wxPyPtrTypeMap_Add("wxTextDropTarget", "wxPyTextDropTarget"); wxPyPtrTypeMap_Add("wxFileDropTarget", "wxPyFileDropTarget"); - SWIG_addvarlink(SWIG_globals,(char*)"TheClipboard",_wrap_TheClipboard_get, _wrap_TheClipboard_set); SWIG_addvarlink(SWIG_globals,(char*)"DefaultVideoMode",_wrap_DefaultVideoMode_get, _wrap_DefaultVideoMode_set); } diff --git a/wxPython/src/mac/_windows.py b/wxPython/src/mac/_windows.py index 20c4e4f9e4..7ecf54af71 100644 --- a/wxPython/src/mac/_windows.py +++ b/wxPython/src/mac/_windows.py @@ -137,7 +137,11 @@ class ScrolledWindow(Panel): return _windows_.ScrolledWindow_SetScrollRate(*args, **kwargs) def GetScrollPixelsPerUnit(*args, **kwargs): - """GetScrollPixelsPerUnit() -> (xUnit, yUnit)""" + """ + GetScrollPixelsPerUnit() -> (xUnit, yUnit) + + Get the size of one logical unit in physical units. + """ return _windows_.ScrolledWindow_GetScrollPixelsPerUnit(*args, **kwargs) def EnableScrolling(*args, **kwargs): @@ -145,7 +149,11 @@ class ScrolledWindow(Panel): return _windows_.ScrolledWindow_EnableScrolling(*args, **kwargs) def GetViewStart(*args, **kwargs): - """GetViewStart() -> (x,y)""" + """ + GetViewStart() -> (x,y) + + Get the view start + """ return _windows_.ScrolledWindow_GetViewStart(*args, **kwargs) def SetScale(*args, **kwargs): @@ -1736,14 +1744,7 @@ class VScrolledWindow(Panel): return _windows_.VScrolledWindow_ScrollToLine(*args, **kwargs) def ScrollLines(*args, **kwargs): - """ - ScrollLines(self, int lines) -> bool - - If the platform and window class supports it, scrolls the window by - the given number of lines down, if lines is positive, or up if lines - is negative. Returns True if the window was scrolled, False if it was - already on top/bottom and nothing was done. - """ + """ScrollLines(self, int lines) -> bool""" return _windows_.VScrolledWindow_ScrollLines(*args, **kwargs) def ScrollPages(*args, **kwargs): @@ -1766,19 +1767,11 @@ class VScrolledWindow(Panel): return _windows_.VScrolledWindow_RefreshLines(*args, **kwargs) def HitTestXT(*args, **kwargs): - """ - HitTestXT(self, int x, int y) -> int - - Test where the given (in client coords) point lies - """ + """HitTestXT(self, int x, int y) -> int""" return _windows_.VScrolledWindow_HitTestXT(*args, **kwargs) def HitTest(*args, **kwargs): - """ - HitTest(self, Point pt) -> int - - Test where the given (in client coords) point lies - """ + """HitTest(self, Point pt) -> int""" return _windows_.VScrolledWindow_HitTest(*args, **kwargs) def RefreshAll(*args, **kwargs): @@ -2445,7 +2438,12 @@ class MultiChoiceDialog(Dialog): self._setOORInfo(self) def SetSelections(*args, **kwargs): - """SetSelections(List selections)""" + """ + SetSelections(List selections) + + Specify the items in the list that should be selected, using a list of + integers. + """ return _windows_.MultiChoiceDialog_SetSelections(*args, **kwargs) def GetSelections(*args, **kwargs): diff --git a/wxPython/src/msw/_controls.py b/wxPython/src/msw/_controls.py index e79a33ba65..28a09bfedb 100644 --- a/wxPython/src/msw/_controls.py +++ b/wxPython/src/msw/_controls.py @@ -65,20 +65,7 @@ class Button(_core.Control): GetDefaultSize = staticmethod(GetDefaultSize) 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 - user's 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 `wx.Window.SetWindowVariant` for more about - this. - """ + """GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes""" return _controls_.Button_GetClassDefaultAttributes(*args, **kwargs) GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes) @@ -111,20 +98,7 @@ def Button_GetDefaultSize(*args, **kwargs): return _controls_.Button_GetDefaultSize(*args, **kwargs) def Button_GetClassDefaultAttributes(*args, **kwargs): - """ - Button_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 - user's 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 `wx.Window.SetWindowVariant` for more about - this. - """ + """Button_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes""" return _controls_.Button_GetClassDefaultAttributes(*args, **kwargs) class BitmapButton(Button): @@ -369,20 +343,7 @@ class CheckBox(_core.Control): return _controls_.CheckBox_Is3rdStateAllowedForUser(*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 - user's 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 `wx.Window.SetWindowVariant` for more about - this. - """ + """GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes""" return _controls_.CheckBox_GetClassDefaultAttributes(*args, **kwargs) GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes) @@ -406,20 +367,7 @@ def PreCheckBox(*args, **kwargs): return val def CheckBox_GetClassDefaultAttributes(*args, **kwargs): - """ - CheckBox_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 - user's 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 `wx.Window.SetWindowVariant` for more about - this. - """ + """CheckBox_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes""" return _controls_.CheckBox_GetClassDefaultAttributes(*args, **kwargs) #--------------------------------------------------------------------------- @@ -451,6 +399,8 @@ class Choice(_core.ControlWithItems): Create(Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize, List choices=[], long style=0, Validator validator=DefaultValidator, String name=ChoiceNameStr) -> bool + + Actually create the GUI Choice control for 2-phase creation """ return _controls_.Choice_Create(*args, **kwargs) @@ -480,20 +430,7 @@ class Choice(_core.ControlWithItems): Select = SetSelection 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 - user's 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 `wx.Window.SetWindowVariant` for more about - this. - """ + """GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes""" return _controls_.Choice_GetClassDefaultAttributes(*args, **kwargs) GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes) @@ -517,20 +454,7 @@ def PreChoice(*args, **kwargs): return val def Choice_GetClassDefaultAttributes(*args, **kwargs): - """ - Choice_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 - user's 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 `wx.Window.SetWindowVariant` for more about - this. - """ + """Choice_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes""" return _controls_.Choice_GetClassDefaultAttributes(*args, **kwargs) #--------------------------------------------------------------------------- @@ -567,6 +491,8 @@ class ComboBox(Choice): Point pos=DefaultPosition, Size size=DefaultSize, List choices=[], long style=0, Validator validator=DefaultValidator, String name=ChoiceNameStr) -> bool + + Actually create the GUI wxComboBox control for 2-phase creation """ return _controls_.ComboBox_Create(*args, **kwargs) @@ -692,20 +618,7 @@ class ComboBox(Choice): return _controls_.ComboBox_Remove(*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 - user's 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 `wx.Window.SetWindowVariant` for more about - this. - """ + """GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes""" return _controls_.ComboBox_GetClassDefaultAttributes(*args, **kwargs) GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes) @@ -729,20 +642,7 @@ def PreComboBox(*args, **kwargs): return val def ComboBox_GetClassDefaultAttributes(*args, **kwargs): - """ - ComboBox_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 - user's 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 `wx.Window.SetWindowVariant` for more about - this. - """ + """ComboBox_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes""" return _controls_.ComboBox_GetClassDefaultAttributes(*args, **kwargs) #--------------------------------------------------------------------------- @@ -813,20 +713,7 @@ class Gauge(_core.Control): return _controls_.Gauge_GetBezelFace(*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 - user's 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 `wx.Window.SetWindowVariant` for more about - this. - """ + """GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes""" return _controls_.Gauge_GetClassDefaultAttributes(*args, **kwargs) GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes) @@ -846,20 +733,7 @@ def PreGauge(*args, **kwargs): return val def Gauge_GetClassDefaultAttributes(*args, **kwargs): - """ - Gauge_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 - user's 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 `wx.Window.SetWindowVariant` for more about - this. - """ + """Gauge_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes""" return _controls_.Gauge_GetClassDefaultAttributes(*args, **kwargs) #--------------------------------------------------------------------------- @@ -888,20 +762,7 @@ class StaticBox(_core.Control): return _controls_.StaticBox_Create(*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 - user's 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 `wx.Window.SetWindowVariant` for more about - this. - """ + """GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes""" return _controls_.StaticBox_GetClassDefaultAttributes(*args, **kwargs) GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes) @@ -923,20 +784,7 @@ def PreStaticBox(*args, **kwargs): return val def StaticBox_GetClassDefaultAttributes(*args, **kwargs): - """ - StaticBox_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 - user's 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 `wx.Window.SetWindowVariant` for more about - this. - """ + """StaticBox_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes""" return _controls_.StaticBox_GetClassDefaultAttributes(*args, **kwargs) #--------------------------------------------------------------------------- @@ -974,20 +822,7 @@ class StaticLine(_core.Control): GetDefaultSize = staticmethod(GetDefaultSize) 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 - user's 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 `wx.Window.SetWindowVariant` for more about - this. - """ + """GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes""" return _controls_.StaticLine_GetClassDefaultAttributes(*args, **kwargs) GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes) @@ -1010,20 +845,7 @@ def StaticLine_GetDefaultSize(*args, **kwargs): return _controls_.StaticLine_GetDefaultSize(*args, **kwargs) def StaticLine_GetClassDefaultAttributes(*args, **kwargs): - """ - StaticLine_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 - user's 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 `wx.Window.SetWindowVariant` for more about - this. - """ + """StaticLine_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes""" return _controls_.StaticLine_GetClassDefaultAttributes(*args, **kwargs) #--------------------------------------------------------------------------- @@ -1052,20 +874,7 @@ class StaticText(_core.Control): return _controls_.StaticText_Create(*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 - user's 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 `wx.Window.SetWindowVariant` for more about - this. - """ + """GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes""" return _controls_.StaticText_GetClassDefaultAttributes(*args, **kwargs) GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes) @@ -1084,20 +893,7 @@ def PreStaticText(*args, **kwargs): return val def StaticText_GetClassDefaultAttributes(*args, **kwargs): - """ - StaticText_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 - user's 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 `wx.Window.SetWindowVariant` for more about - this. - """ + """StaticText_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes""" return _controls_.StaticText_GetClassDefaultAttributes(*args, **kwargs) #--------------------------------------------------------------------------- @@ -1138,20 +934,7 @@ class StaticBitmap(_core.Control): return _controls_.StaticBitmap_SetIcon(*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 - user's 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 `wx.Window.SetWindowVariant` for more about - this. - """ + """GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes""" return _controls_.StaticBitmap_GetClassDefaultAttributes(*args, **kwargs) GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes) @@ -1170,20 +953,7 @@ def PreStaticBitmap(*args, **kwargs): return val def StaticBitmap_GetClassDefaultAttributes(*args, **kwargs): - """ - StaticBitmap_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 - user's 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 `wx.Window.SetWindowVariant` for more about - this. - """ + """StaticBitmap_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes""" return _controls_.StaticBitmap_GetClassDefaultAttributes(*args, **kwargs) #--------------------------------------------------------------------------- @@ -1295,20 +1065,7 @@ class ListBox(_core.ControlWithItems): 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 - user's 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 `wx.Window.SetWindowVariant` for more about - this. - """ + """GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes""" return _controls_.ListBox_GetClassDefaultAttributes(*args, **kwargs) GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes) @@ -1328,20 +1085,7 @@ def PreListBox(*args, **kwargs): 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 - user's 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 `wx.Window.SetWindowVariant` for more about - this. - """ + """ListBox_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes""" return _controls_.ListBox_GetClassDefaultAttributes(*args, **kwargs) #--------------------------------------------------------------------------- @@ -1666,7 +1410,11 @@ class TextCtrl(_core.Control): return _controls_.TextCtrl_IsMultiLine(*args, **kwargs) def GetSelection(*args, **kwargs): - """GetSelection() -> (from, to)""" + """ + GetSelection() -> (from, to) + + If the return values from and to are the same, there is no selection. + """ return _controls_.TextCtrl_GetSelection(*args, **kwargs) def GetStringSelection(*args, **kwargs): @@ -1746,7 +1494,12 @@ class TextCtrl(_core.Control): return _controls_.TextCtrl_ShowPosition(*args, **kwargs) def HitTest(*args, **kwargs): - """HitTest(Point pt) -> (result, row, col)""" + """ + HitTest(Point pt) -> (result, row, col) + + Find the character at position given in pixels. NB: pt is in device + coords but is not adjusted for the client area origin nor scrolling + """ return _controls_.TextCtrl_HitTest(*args, **kwargs) def Copy(*args, **kwargs): @@ -1834,20 +1587,7 @@ class TextCtrl(_core.Control): return _controls_.TextCtrl_GetString(*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 - user's 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 `wx.Window.SetWindowVariant` for more about - this. - """ + """GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes""" return _controls_.TextCtrl_GetClassDefaultAttributes(*args, **kwargs) GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes) @@ -1866,20 +1606,7 @@ def PreTextCtrl(*args, **kwargs): return val def TextCtrl_GetClassDefaultAttributes(*args, **kwargs): - """ - TextCtrl_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 - user's 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 `wx.Window.SetWindowVariant` for more about - this. - """ + """TextCtrl_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes""" return _controls_.TextCtrl_GetClassDefaultAttributes(*args, **kwargs) wxEVT_COMMAND_TEXT_UPDATED = _controls_.wxEVT_COMMAND_TEXT_UPDATED @@ -1982,20 +1709,7 @@ class ScrollBar(_core.Control): return _controls_.ScrollBar_SetScrollbar(*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 - user's 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 `wx.Window.SetWindowVariant` for more about - this. - """ + """GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes""" return _controls_.ScrollBar_GetClassDefaultAttributes(*args, **kwargs) GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes) @@ -2015,20 +1729,7 @@ def PreScrollBar(*args, **kwargs): return val def ScrollBar_GetClassDefaultAttributes(*args, **kwargs): - """ - ScrollBar_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 - user's 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 `wx.Window.SetWindowVariant` for more about - this. - """ + """ScrollBar_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes""" return _controls_.ScrollBar_GetClassDefaultAttributes(*args, **kwargs) #--------------------------------------------------------------------------- @@ -2093,20 +1794,7 @@ class SpinButton(_core.Control): return _controls_.SpinButton_IsVertical(*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 - user's 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 `wx.Window.SetWindowVariant` for more about - this. - """ + """GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes""" return _controls_.SpinButton_GetClassDefaultAttributes(*args, **kwargs) GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes) @@ -2127,20 +1815,7 @@ def PreSpinButton(*args, **kwargs): return val def SpinButton_GetClassDefaultAttributes(*args, **kwargs): - """ - SpinButton_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 - user's 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 `wx.Window.SetWindowVariant` for more about - this. - """ + """SpinButton_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes""" return _controls_.SpinButton_GetClassDefaultAttributes(*args, **kwargs) class SpinCtrl(_core.Control): @@ -2197,20 +1872,7 @@ class SpinCtrl(_core.Control): return _controls_.SpinCtrl_SetSelection(*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 - user's 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 `wx.Window.SetWindowVariant` for more about - this. - """ + """GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes""" return _controls_.SpinCtrl_GetClassDefaultAttributes(*args, **kwargs) GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes) @@ -2229,20 +1891,7 @@ def PreSpinCtrl(*args, **kwargs): return val def SpinCtrl_GetClassDefaultAttributes(*args, **kwargs): - """ - SpinCtrl_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 - user's 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 `wx.Window.SetWindowVariant` for more about - this. - """ + """SpinCtrl_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes""" return _controls_.SpinCtrl_GetClassDefaultAttributes(*args, **kwargs) class SpinEvent(_core.NotifyEvent): @@ -2363,20 +2012,7 @@ class RadioBox(_core.Control): return _controls_.RadioBox_GetNextItem(*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 - user's 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 `wx.Window.SetWindowVariant` for more about - this. - """ + """GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes""" return _controls_.RadioBox_GetClassDefaultAttributes(*args, **kwargs) GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes) @@ -2397,20 +2033,7 @@ def PreRadioBox(*args, **kwargs): return val def RadioBox_GetClassDefaultAttributes(*args, **kwargs): - """ - RadioBox_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 - user's 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 `wx.Window.SetWindowVariant` for more about - this. - """ + """RadioBox_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes""" return _controls_.RadioBox_GetClassDefaultAttributes(*args, **kwargs) #--------------------------------------------------------------------------- @@ -2449,20 +2072,7 @@ class RadioButton(_core.Control): return _controls_.RadioButton_SetValue(*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 - user's 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 `wx.Window.SetWindowVariant` for more about - this. - """ + """GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes""" return _controls_.RadioButton_GetClassDefaultAttributes(*args, **kwargs) GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes) @@ -2481,20 +2091,7 @@ def PreRadioButton(*args, **kwargs): return val def RadioButton_GetClassDefaultAttributes(*args, **kwargs): - """ - RadioButton_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 - user's 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 `wx.Window.SetWindowVariant` for more about - this. - """ + """RadioButton_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes""" return _controls_.RadioButton_GetClassDefaultAttributes(*args, **kwargs) #--------------------------------------------------------------------------- @@ -2612,20 +2209,7 @@ class Slider(_core.Control): return _controls_.Slider_SetSelection(*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 - user's 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 `wx.Window.SetWindowVariant` for more about - this. - """ + """GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes""" return _controls_.Slider_GetClassDefaultAttributes(*args, **kwargs) GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes) @@ -2645,20 +2229,7 @@ def PreSlider(*args, **kwargs): return val def Slider_GetClassDefaultAttributes(*args, **kwargs): - """ - Slider_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 - user's 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 `wx.Window.SetWindowVariant` for more about - this. - """ + """Slider_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes""" return _controls_.Slider_GetClassDefaultAttributes(*args, **kwargs) #--------------------------------------------------------------------------- @@ -2708,20 +2279,7 @@ class ToggleButton(_core.Control): return _controls_.ToggleButton_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 - user's 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 `wx.Window.SetWindowVariant` for more about - this. - """ + """GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes""" return _controls_.ToggleButton_GetClassDefaultAttributes(*args, **kwargs) GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes) @@ -2741,20 +2299,7 @@ def PreToggleButton(*args, **kwargs): return val def ToggleButton_GetClassDefaultAttributes(*args, **kwargs): - """ - ToggleButton_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 - user's 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 `wx.Window.SetWindowVariant` for more about - this. - """ + """ToggleButton_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes""" return _controls_.ToggleButton_GetClassDefaultAttributes(*args, **kwargs) #--------------------------------------------------------------------------- @@ -2843,20 +2388,7 @@ class BookCtrl(_core.Control): return _controls_.BookCtrl_AdvanceSelection(*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 - user's 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 `wx.Window.SetWindowVariant` for more about - this. - """ + """GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes""" return _controls_.BookCtrl_GetClassDefaultAttributes(*args, **kwargs) GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes) @@ -2870,20 +2402,7 @@ _controls_.BookCtrl_swigregister(BookCtrlPtr) NOTEBOOK_NAME = cvar.NOTEBOOK_NAME def BookCtrl_GetClassDefaultAttributes(*args, **kwargs): - """ - BookCtrl_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 - user's 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 `wx.Window.SetWindowVariant` for more about - this. - """ + """BookCtrl_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes""" return _controls_.BookCtrl_GetClassDefaultAttributes(*args, **kwargs) class BookCtrlEvent(_core.NotifyEvent): @@ -2968,7 +2487,12 @@ class Notebook(BookCtrl): return _controls_.Notebook_SetTabSize(*args, **kwargs) def HitTest(*args, **kwargs): - """HitTest(Point pt) -> (tab, where)""" + """ + HitTest(Point pt) -> (tab, where) + + Returns the tab which is hit, and flags indicating where using + wx.NB_HITTEST flags. + """ return _controls_.Notebook_HitTest(*args, **kwargs) def CalcSizeFromPage(*args, **kwargs): @@ -2980,20 +2504,7 @@ class Notebook(BookCtrl): return _controls_.Notebook_ApplyThemeBackground(*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 - user's 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 `wx.Window.SetWindowVariant` for more about - this. - """ + """GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes""" return _controls_.Notebook_GetClassDefaultAttributes(*args, **kwargs) GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes) @@ -3012,20 +2523,7 @@ def PreNotebook(*args, **kwargs): return val def Notebook_GetClassDefaultAttributes(*args, **kwargs): - """ - Notebook_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 - user's 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 `wx.Window.SetWindowVariant` for more about - this. - """ + """Notebook_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes""" return _controls_.Notebook_GetClassDefaultAttributes(*args, **kwargs) class NotebookEvent(BookCtrlEvent): @@ -3743,20 +3241,7 @@ class ToolBar(ToolBarBase): return _controls_.ToolBar_FindToolForPosition(*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 - user's 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 `wx.Window.SetWindowVariant` for more about - this. - """ + """GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes""" return _controls_.ToolBar_GetClassDefaultAttributes(*args, **kwargs) GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes) @@ -3775,20 +3260,7 @@ def PreToolBar(*args, **kwargs): return val def ToolBar_GetClassDefaultAttributes(*args, **kwargs): - """ - ToolBar_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 - user's 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 `wx.Window.SetWindowVariant` for more about - this. - """ + """ToolBar_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes""" return _controls_.ToolBar_GetClassDefaultAttributes(*args, **kwargs) #--------------------------------------------------------------------------- @@ -4450,7 +3922,12 @@ class ListCtrl(_core.Control): return _controls_.ListCtrl_FindItemAtPos(*args, **kwargs) def HitTest(*args, **kwargs): - """HitTest(Point point) -> (item, where)""" + """ + HitTest(Point point) -> (item, where) + + Determines which item (if any) is at the specified point, giving + in the second return value (see wxLIST_HITTEST_... flags.) + """ return _controls_.ListCtrl_HitTest(*args, **kwargs) def InsertItem(*args, **kwargs): @@ -4572,20 +4049,7 @@ class ListCtrl(_core.Control): 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 - user's 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 `wx.Window.SetWindowVariant` for more about - this. - """ + """GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes""" return _controls_.ListCtrl_GetClassDefaultAttributes(*args, **kwargs) GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes) @@ -4604,20 +4068,7 @@ def PreListCtrl(*args, **kwargs): 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 - user's 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 `wx.Window.SetWindowVariant` for more about - this. - """ + """ListCtrl_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes""" return _controls_.ListCtrl_GetClassDefaultAttributes(*args, **kwargs) #--------------------------------------------------------------------------- @@ -5248,7 +4699,14 @@ class TreeCtrl(_core.Control): return _controls_.TreeCtrl_SortChildren(*args, **kwargs) def HitTest(*args, **kwargs): - """HitTest(Point point) -> (item, where)""" + """ + HitTest(Point point) -> (item, where) + + Determine which item (if any) belongs the given point. The coordinates + specified are relative to the client area of tree ctrl and the where return + value is set to a bitmask of wxTREE_HITTEST_xxx constants. + + """ return _controls_.TreeCtrl_HitTest(*args, **kwargs) def GetBoundingRect(*args, **kwargs): @@ -5256,20 +4714,7 @@ class TreeCtrl(_core.Control): 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 - user's 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 `wx.Window.SetWindowVariant` for more about - this. - """ + """GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes""" return _controls_.TreeCtrl_GetClassDefaultAttributes(*args, **kwargs) GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes) @@ -5288,20 +4733,7 @@ def PreTreeCtrl(*args, **kwargs): 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 - user's 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 `wx.Window.SetWindowVariant` for more about - this. - """ + """TreeCtrl_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes""" return _controls_.TreeCtrl_GetClassDefaultAttributes(*args, **kwargs) #--------------------------------------------------------------------------- @@ -5399,7 +4831,15 @@ class GenericDirCtrl(_core.Control): return _controls_.GenericDirCtrl_GetFilterListCtrl(*args, **kwargs) def FindChild(*args, **kwargs): - """FindChild(wxTreeItemId parentId, wxString path) -> (item, done)""" + """ + FindChild(wxTreeItemId parentId, wxString path) -> (item, done) + + Find the child that matches the first part of 'path'. E.g. if a child + path is "/usr" and 'path' is "/usr/include" then the child for + /usr is returned. If the path string has been used (we're at the + leaf), done is set to True. + + """ return _controls_.GenericDirCtrl_FindChild(*args, **kwargs) def DoResize(*args, **kwargs): diff --git a/wxPython/src/msw/_controls_wrap.cpp b/wxPython/src/msw/_controls_wrap.cpp index ec02f4ade8..4bc958e84e 100644 --- a/wxPython/src/msw/_controls_wrap.cpp +++ b/wxPython/src/msw/_controls_wrap.cpp @@ -1353,12 +1353,11 @@ static PyObject *_wrap_Button_GetClassDefaultAttributes(PyObject *self, PyObject if (PyErr_Occurred()) SWIG_fail; } { - if (!wxPyCheckForApp()) SWIG_fail; PyThreadState* __tstate = wxPyBeginAllowThreads(); result = wxButton::GetClassDefaultAttributes((wxWindowVariant )arg1); wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; + if (PyErr_Occurred()) SWIG_fail; } { wxVisualAttributes * resultptr; @@ -2439,12 +2438,11 @@ static PyObject *_wrap_CheckBox_GetClassDefaultAttributes(PyObject *self, PyObje if (PyErr_Occurred()) SWIG_fail; } { - if (!wxPyCheckForApp()) SWIG_fail; PyThreadState* __tstate = wxPyBeginAllowThreads(); result = wxCheckBox::GetClassDefaultAttributes((wxWindowVariant )arg1); wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; + if (PyErr_Occurred()) SWIG_fail; } { wxVisualAttributes * resultptr; @@ -2891,12 +2889,11 @@ static PyObject *_wrap_Choice_GetClassDefaultAttributes(PyObject *self, PyObject if (PyErr_Occurred()) SWIG_fail; } { - if (!wxPyCheckForApp()) SWIG_fail; PyThreadState* __tstate = wxPyBeginAllowThreads(); result = wxChoice::GetClassDefaultAttributes((wxWindowVariant )arg1); wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; + if (PyErr_Occurred()) SWIG_fail; } { wxVisualAttributes * resultptr; @@ -3779,12 +3776,11 @@ static PyObject *_wrap_ComboBox_GetClassDefaultAttributes(PyObject *self, PyObje if (PyErr_Occurred()) SWIG_fail; } { - if (!wxPyCheckForApp()) SWIG_fail; PyThreadState* __tstate = wxPyBeginAllowThreads(); result = wxComboBox::GetClassDefaultAttributes((wxWindowVariant )arg1); wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; + if (PyErr_Occurred()) SWIG_fail; } { wxVisualAttributes * resultptr; @@ -4307,12 +4303,11 @@ static PyObject *_wrap_Gauge_GetClassDefaultAttributes(PyObject *self, PyObject if (PyErr_Occurred()) SWIG_fail; } { - if (!wxPyCheckForApp()) SWIG_fail; PyThreadState* __tstate = wxPyBeginAllowThreads(); result = wxGauge::GetClassDefaultAttributes((wxWindowVariant )arg1); wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; + if (PyErr_Occurred()) SWIG_fail; } { wxVisualAttributes * resultptr; @@ -4633,12 +4628,11 @@ static PyObject *_wrap_StaticBox_GetClassDefaultAttributes(PyObject *self, PyObj if (PyErr_Occurred()) SWIG_fail; } { - if (!wxPyCheckForApp()) SWIG_fail; PyThreadState* __tstate = wxPyBeginAllowThreads(); result = wxStaticBox::GetClassDefaultAttributes((wxWindowVariant )arg1); wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; + if (PyErr_Occurred()) SWIG_fail; } { wxVisualAttributes * resultptr; @@ -4907,12 +4901,11 @@ static PyObject *_wrap_StaticLine_GetClassDefaultAttributes(PyObject *self, PyOb if (PyErr_Occurred()) SWIG_fail; } { - if (!wxPyCheckForApp()) SWIG_fail; PyThreadState* __tstate = wxPyBeginAllowThreads(); result = wxStaticLine::GetClassDefaultAttributes((wxWindowVariant )arg1); wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; + if (PyErr_Occurred()) SWIG_fail; } { wxVisualAttributes * resultptr; @@ -5169,12 +5162,11 @@ static PyObject *_wrap_StaticText_GetClassDefaultAttributes(PyObject *self, PyOb if (PyErr_Occurred()) SWIG_fail; } { - if (!wxPyCheckForApp()) SWIG_fail; PyThreadState* __tstate = wxPyBeginAllowThreads(); result = wxStaticText::GetClassDefaultAttributes((wxWindowVariant )arg1); wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; + if (PyErr_Occurred()) SWIG_fail; } { wxVisualAttributes * resultptr; @@ -5515,12 +5507,11 @@ static PyObject *_wrap_StaticBitmap_GetClassDefaultAttributes(PyObject *self, Py if (PyErr_Occurred()) SWIG_fail; } { - if (!wxPyCheckForApp()) SWIG_fail; PyThreadState* __tstate = wxPyBeginAllowThreads(); result = wxStaticBitmap::GetClassDefaultAttributes((wxWindowVariant )arg1); wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; + if (PyErr_Occurred()) SWIG_fail; } { wxVisualAttributes * resultptr; @@ -6523,12 +6514,11 @@ static PyObject *_wrap_ListBox_GetClassDefaultAttributes(PyObject *self, PyObjec if (PyErr_Occurred()) SWIG_fail; } { - if (!wxPyCheckForApp()) SWIG_fail; PyThreadState* __tstate = wxPyBeginAllowThreads(); result = wxListBox::GetClassDefaultAttributes((wxWindowVariant )arg1); wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; + if (PyErr_Occurred()) SWIG_fail; } { wxVisualAttributes * resultptr; @@ -9918,12 +9908,11 @@ static PyObject *_wrap_TextCtrl_GetClassDefaultAttributes(PyObject *self, PyObje if (PyErr_Occurred()) SWIG_fail; } { - if (!wxPyCheckForApp()) SWIG_fail; PyThreadState* __tstate = wxPyBeginAllowThreads(); result = wxTextCtrl::GetClassDefaultAttributes((wxWindowVariant )arg1); wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; + if (PyErr_Occurred()) SWIG_fail; } { wxVisualAttributes * resultptr; @@ -10525,12 +10514,11 @@ static PyObject *_wrap_ScrollBar_GetClassDefaultAttributes(PyObject *self, PyObj if (PyErr_Occurred()) SWIG_fail; } { - if (!wxPyCheckForApp()) SWIG_fail; PyThreadState* __tstate = wxPyBeginAllowThreads(); result = wxScrollBar::GetClassDefaultAttributes((wxWindowVariant )arg1); wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; + if (PyErr_Occurred()) SWIG_fail; } { wxVisualAttributes * resultptr; @@ -11015,12 +11003,11 @@ static PyObject *_wrap_SpinButton_GetClassDefaultAttributes(PyObject *self, PyOb if (PyErr_Occurred()) SWIG_fail; } { - if (!wxPyCheckForApp()) SWIG_fail; PyThreadState* __tstate = wxPyBeginAllowThreads(); result = wxSpinButton::GetClassDefaultAttributes((wxWindowVariant )arg1); wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; + if (PyErr_Occurred()) SWIG_fail; } { wxVisualAttributes * resultptr; @@ -11527,12 +11514,11 @@ static PyObject *_wrap_SpinCtrl_GetClassDefaultAttributes(PyObject *self, PyObje if (PyErr_Occurred()) SWIG_fail; } { - if (!wxPyCheckForApp()) SWIG_fail; PyThreadState* __tstate = wxPyBeginAllowThreads(); result = wxSpinCtrl::GetClassDefaultAttributes((wxWindowVariant )arg1); wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; + if (PyErr_Occurred()) SWIG_fail; } { wxVisualAttributes * resultptr; @@ -12467,12 +12453,11 @@ static PyObject *_wrap_RadioBox_GetClassDefaultAttributes(PyObject *self, PyObje if (PyErr_Occurred()) SWIG_fail; } { - if (!wxPyCheckForApp()) SWIG_fail; PyThreadState* __tstate = wxPyBeginAllowThreads(); result = wxRadioBox::GetClassDefaultAttributes((wxWindowVariant )arg1); wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; + if (PyErr_Occurred()) SWIG_fail; } { wxVisualAttributes * resultptr; @@ -12810,12 +12795,11 @@ static PyObject *_wrap_RadioButton_GetClassDefaultAttributes(PyObject *self, PyO if (PyErr_Occurred()) SWIG_fail; } { - if (!wxPyCheckForApp()) SWIG_fail; PyThreadState* __tstate = wxPyBeginAllowThreads(); result = wxRadioButton::GetClassDefaultAttributes((wxWindowVariant )arg1); wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; + if (PyErr_Occurred()) SWIG_fail; } { wxVisualAttributes * resultptr; @@ -13702,12 +13686,11 @@ static PyObject *_wrap_Slider_GetClassDefaultAttributes(PyObject *self, PyObject if (PyErr_Occurred()) SWIG_fail; } { - if (!wxPyCheckForApp()) SWIG_fail; PyThreadState* __tstate = wxPyBeginAllowThreads(); result = wxSlider::GetClassDefaultAttributes((wxWindowVariant )arg1); wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; + if (PyErr_Occurred()) SWIG_fail; } { wxVisualAttributes * resultptr; @@ -14106,12 +14089,11 @@ static PyObject *_wrap_ToggleButton_GetClassDefaultAttributes(PyObject *self, Py if (PyErr_Occurred()) SWIG_fail; } { - if (!wxPyCheckForApp()) SWIG_fail; PyThreadState* __tstate = wxPyBeginAllowThreads(); result = wxToggleButton::GetClassDefaultAttributes((wxWindowVariant )arg1); wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; + if (PyErr_Occurred()) SWIG_fail; } { wxVisualAttributes * resultptr; @@ -14832,12 +14814,11 @@ static PyObject *_wrap_BookCtrl_GetClassDefaultAttributes(PyObject *self, PyObje if (PyErr_Occurred()) SWIG_fail; } { - if (!wxPyCheckForApp()) SWIG_fail; PyThreadState* __tstate = wxPyBeginAllowThreads(); result = wxBookCtrl::GetClassDefaultAttributes((wxWindowVariant )arg1); wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; + if (PyErr_Occurred()) SWIG_fail; } { wxVisualAttributes * resultptr; @@ -15426,12 +15407,11 @@ static PyObject *_wrap_Notebook_GetClassDefaultAttributes(PyObject *self, PyObje if (PyErr_Occurred()) SWIG_fail; } { - if (!wxPyCheckForApp()) SWIG_fail; PyThreadState* __tstate = wxPyBeginAllowThreads(); result = wxNotebook::GetClassDefaultAttributes((wxWindowVariant )arg1); wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; + if (PyErr_Occurred()) SWIG_fail; } { wxVisualAttributes * resultptr; @@ -18710,12 +18690,11 @@ static PyObject *_wrap_ToolBar_GetClassDefaultAttributes(PyObject *self, PyObjec if (PyErr_Occurred()) SWIG_fail; } { - if (!wxPyCheckForApp()) SWIG_fail; PyThreadState* __tstate = wxPyBeginAllowThreads(); result = wxToolBar::GetClassDefaultAttributes((wxWindowVariant )arg1); wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; + if (PyErr_Occurred()) SWIG_fail; } { wxVisualAttributes * resultptr; @@ -23695,12 +23674,11 @@ static PyObject *_wrap_ListCtrl_GetClassDefaultAttributes(PyObject *self, PyObje if (PyErr_Occurred()) SWIG_fail; } { - if (!wxPyCheckForApp()) SWIG_fail; PyThreadState* __tstate = wxPyBeginAllowThreads(); result = wxPyListCtrl::GetClassDefaultAttributes((wxWindowVariant )arg1); wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; + if (PyErr_Occurred()) SWIG_fail; } { wxVisualAttributes * resultptr; @@ -27998,12 +27976,11 @@ static PyObject *_wrap_TreeCtrl_GetClassDefaultAttributes(PyObject *self, PyObje if (PyErr_Occurred()) SWIG_fail; } { - if (!wxPyCheckForApp()) SWIG_fail; PyThreadState* __tstate = wxPyBeginAllowThreads(); result = wxPyTreeCtrl::GetClassDefaultAttributes((wxWindowVariant )arg1); wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; + if (PyErr_Occurred()) SWIG_fail; } { wxVisualAttributes * resultptr; diff --git a/wxPython/src/msw/_core.py b/wxPython/src/msw/_core.py index 0ba42d94c4..dd021fce57 100644 --- a/wxPython/src/msw/_core.py +++ b/wxPython/src/msw/_core.py @@ -5838,6 +5838,26 @@ class Window(EvtHandler): """ return _core_.Window_GetBestSizeTuple(*args, **kwargs) + def InvalidateBestSize(*args, **kwargs): + """ + InvalidateBestSize(self) + + Reset the cached best size value so it will be recalculated the next + time it is needed. + """ + return _core_.Window_InvalidateBestSize(*args, **kwargs) + + def GetBestFittingSize(*args, **kwargs): + """ + GetBestFittingSize(self) -> Size + + This function will merge the window's best size into the window's + minimum size, giving priority to the min size components, and returns + the results. + + """ + return _core_.Window_GetBestFittingSize(*args, **kwargs) + def GetAdjustedBestSize(*args, **kwargs): """ GetAdjustedBestSize(self) -> Size @@ -8250,27 +8270,21 @@ class Control(Window): """ return _core_.Control_SetLabel(*args, **kwargs) - def GetAdjustMinSizeFlag(*args, **kwargs): - """ - GetAdjustMinSizeFlag(self) -> bool - - Returns whether the minsize should be adjusted for this control when - `SetLabel` or `SetFont` are called. + def GetClassDefaultAttributes(*args, **kwargs): """ - return _core_.Control_GetAdjustMinSizeFlag(*args, **kwargs) + GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes - def SetAdjustMinSizeFlag(*args, **kwargs): - """ - SetAdjustMinSizeFlag(self, bool adjust) + 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 + user's system, especially if it uses themes. - By default controls will readjust their size and minsize when - `SetLabel` or `SetFont` are called. This flag will allow you to - control this behavior. + 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 `wx.Window.SetWindowVariant` for more about + this. """ - return _core_.Control_SetAdjustMinSizeFlag(*args, **kwargs) - - def GetClassDefaultAttributes(*args, **kwargs): - """GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes""" return _core_.Control_GetClassDefaultAttributes(*args, **kwargs) GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes) @@ -8294,7 +8308,20 @@ def PreControl(*args, **kwargs): return val def Control_GetClassDefaultAttributes(*args, **kwargs): - """Control_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes""" + """ + 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 + user's 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 `wx.Window.SetWindowVariant` for more about + this. + """ return _core_.Control_GetClassDefaultAttributes(*args, **kwargs) #--------------------------------------------------------------------------- @@ -8567,6 +8594,15 @@ class SizerItem(Object): """ return _core_.SizerItem_GetMinSize(*args, **kwargs) + def GetMinSizeWithBorder(*args, **kwargs): + """ + GetMinSizeWithBorder(self) -> Size + + Get the minimum size needed for the item with space for the borders + added, if needed. + """ + return _core_.SizerItem_GetMinSizeWithBorder(*args, **kwargs) + def SetInitSize(*args, **kwargs): """SetInitSize(self, int x, int y)""" return _core_.SizerItem_SetInitSize(*args, **kwargs) @@ -10477,7 +10513,7 @@ def CallAfter(callable, *args, **kw): :see: `wx.FutureCall` """ app = wx.GetApp() - assert app, 'No wxApp created yet' + assert app is not None, 'No wx.App created yet' global _wxPyCallAfterId if _wxPyCallAfterId is None: diff --git a/wxPython/src/msw/_core_wrap.cpp b/wxPython/src/msw/_core_wrap.cpp index c59c1f4d5c..a17b4c4b0b 100644 --- a/wxPython/src/msw/_core_wrap.cpp +++ b/wxPython/src/msw/_core_wrap.cpp @@ -22883,6 +22883,61 @@ static PyObject *_wrap_Window_GetBestSizeTuple(PyObject *self, PyObject *args, P } +static PyObject *_wrap_Window_InvalidateBestSize(PyObject *self, 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_InvalidateBestSize",kwnames,&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxWindow, + SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + (arg1)->InvalidateBestSize(); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_Window_GetBestFittingSize(PyObject *self, 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_GetBestFittingSize",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)->GetBestFittingSize(); + + 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_GetAdjustedBestSize(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxWindow *arg1 = (wxWindow *) 0 ; @@ -26262,7 +26317,7 @@ static PyObject *_wrap_Window_SetCursor(PyObject *self, PyObject *args, PyObject static PyObject *_wrap_Window_GetCursor(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxWindow *arg1 = (wxWindow *) 0 ; - wxCursor *result; + wxCursor result; PyObject * obj0 = 0 ; char *kwnames[] = { (char *) "self", NULL @@ -26273,17 +26328,15 @@ static PyObject *_wrap_Window_GetCursor(PyObject *self, PyObject *args, PyObject SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - { - wxCursor &_result_ref = (arg1)->GetCursor(); - result = (wxCursor *) &_result_ref; - } + result = (arg1)->GetCursor(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } { - wxCursor* resultptr = new wxCursor(*result); - resultobj = SWIG_NewPointerObj((void*)(resultptr), SWIGTYPE_p_wxCursor, 1); + wxCursor * resultptr; + resultptr = new wxCursor((wxCursor &) result); + resultobj = SWIG_NewPointerObj((void *)(resultptr), SWIGTYPE_p_wxCursor, 1); } return resultobj; fail: @@ -26365,7 +26418,7 @@ static PyObject *_wrap_Window_SetDefaultFont(PyObject *self, PyObject *args, PyO static PyObject *_wrap_Window_GetFont(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxWindow *arg1 = (wxWindow *) 0 ; - wxFont *result; + wxFont result; PyObject * obj0 = 0 ; char *kwnames[] = { (char *) "self", NULL @@ -26376,17 +26429,15 @@ static PyObject *_wrap_Window_GetFont(PyObject *self, PyObject *args, PyObject * SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; { PyThreadState* __tstate = wxPyBeginAllowThreads(); - { - wxFont &_result_ref = (arg1)->GetFont(); - result = (wxFont *) &_result_ref; - } + result = (arg1)->GetFont(); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; } { - wxFont* resultptr = new wxFont(*result); - resultobj = SWIG_NewPointerObj((void*)(resultptr), SWIGTYPE_p_wxFont, 1); + wxFont * resultptr; + resultptr = new wxFont((wxFont &) result); + resultobj = SWIG_NewPointerObj((void *)(resultptr), SWIGTYPE_p_wxFont, 1); } return resultobj; fail: @@ -33595,63 +33646,6 @@ static PyObject *_wrap_Control_SetLabel(PyObject *self, PyObject *args, PyObject } -static PyObject *_wrap_Control_GetAdjustMinSizeFlag(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject *resultobj; - wxControl *arg1 = (wxControl *) 0 ; - bool result; - PyObject * obj0 = 0 ; - char *kwnames[] = { - (char *) "self", NULL - }; - - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:Control_GetAdjustMinSizeFlag",kwnames,&obj0)) goto fail; - if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxControl, - SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - { - PyThreadState* __tstate = wxPyBeginAllowThreads(); - result = (bool)(arg1)->GetAdjustMinSizeFlag(); - - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; - } - { - resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj); - } - return resultobj; - fail: - return NULL; -} - - -static PyObject *_wrap_Control_SetAdjustMinSizeFlag(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject *resultobj; - wxControl *arg1 = (wxControl *) 0 ; - bool arg2 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - char *kwnames[] = { - (char *) "self",(char *) "adjust", NULL - }; - - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO:Control_SetAdjustMinSizeFlag",kwnames,&obj0,&obj1)) goto fail; - if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxControl, - SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; - arg2 = (bool) SWIG_AsBool(obj1); - if (PyErr_Occurred()) SWIG_fail; - { - PyThreadState* __tstate = wxPyBeginAllowThreads(); - (arg1)->SetAdjustMinSizeFlag(arg2); - - wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; - } - Py_INCREF(Py_None); resultobj = Py_None; - return resultobj; - fail: - return NULL; -} - - static PyObject *_wrap_Control_GetClassDefaultAttributes(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; int arg1 = (int) wxWINDOW_VARIANT_NORMAL ; @@ -33667,11 +33661,12 @@ static PyObject *_wrap_Control_GetClassDefaultAttributes(PyObject *self, PyObjec if (PyErr_Occurred()) SWIG_fail; } { + if (!wxPyCheckForApp()) SWIG_fail; PyThreadState* __tstate = wxPyBeginAllowThreads(); result = wxControl::GetClassDefaultAttributes((wxWindowVariant )arg1); wxPyEndAllowThreads(__tstate); - if (PyErr_Occurred()) SWIG_fail; + if (PyErr_Occurred()) SWIG_fail; } { wxVisualAttributes * resultptr; @@ -34598,6 +34593,36 @@ static PyObject *_wrap_SizerItem_GetMinSize(PyObject *self, PyObject *args, PyOb } +static PyObject *_wrap_SizerItem_GetMinSizeWithBorder(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj; + wxSizerItem *arg1 = (wxSizerItem *) 0 ; + wxSize result; + PyObject * obj0 = 0 ; + char *kwnames[] = { + (char *) "self", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:SizerItem_GetMinSizeWithBorder",kwnames,&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxSizerItem, + SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail; + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = ((wxSizerItem const *)arg1)->GetMinSizeWithBorder(); + + 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_SizerItem_SetInitSize(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxSizerItem *arg1 = (wxSizerItem *) 0 ; @@ -41194,6 +41219,8 @@ static PyMethodDef SwigMethods[] = { { (char *)"Window_GetClientRect", (PyCFunction) _wrap_Window_GetClientRect, METH_VARARGS | METH_KEYWORDS }, { (char *)"Window_GetBestSize", (PyCFunction) _wrap_Window_GetBestSize, METH_VARARGS | METH_KEYWORDS }, { (char *)"Window_GetBestSizeTuple", (PyCFunction) _wrap_Window_GetBestSizeTuple, METH_VARARGS | METH_KEYWORDS }, + { (char *)"Window_InvalidateBestSize", (PyCFunction) _wrap_Window_InvalidateBestSize, METH_VARARGS | METH_KEYWORDS }, + { (char *)"Window_GetBestFittingSize", (PyCFunction) _wrap_Window_GetBestFittingSize, METH_VARARGS | METH_KEYWORDS }, { (char *)"Window_GetAdjustedBestSize", (PyCFunction) _wrap_Window_GetAdjustedBestSize, METH_VARARGS | METH_KEYWORDS }, { (char *)"Window_Center", (PyCFunction) _wrap_Window_Center, METH_VARARGS | METH_KEYWORDS }, { (char *)"Window_CenterOnScreen", (PyCFunction) _wrap_Window_CenterOnScreen, METH_VARARGS | METH_KEYWORDS }, @@ -41501,8 +41528,6 @@ static PyMethodDef SwigMethods[] = { { (char *)"Control_Command", (PyCFunction) _wrap_Control_Command, METH_VARARGS | METH_KEYWORDS }, { (char *)"Control_GetLabel", (PyCFunction) _wrap_Control_GetLabel, METH_VARARGS | METH_KEYWORDS }, { (char *)"Control_SetLabel", (PyCFunction) _wrap_Control_SetLabel, METH_VARARGS | METH_KEYWORDS }, - { (char *)"Control_GetAdjustMinSizeFlag", (PyCFunction) _wrap_Control_GetAdjustMinSizeFlag, METH_VARARGS | METH_KEYWORDS }, - { (char *)"Control_SetAdjustMinSizeFlag", (PyCFunction) _wrap_Control_SetAdjustMinSizeFlag, METH_VARARGS | METH_KEYWORDS }, { (char *)"Control_GetClassDefaultAttributes", (PyCFunction) _wrap_Control_GetClassDefaultAttributes, METH_VARARGS | METH_KEYWORDS }, { (char *)"Control_swigregister", Control_swigregister, METH_VARARGS }, { (char *)"ItemContainer_Append", (PyCFunction) _wrap_ItemContainer_Append, METH_VARARGS | METH_KEYWORDS }, @@ -41533,6 +41558,7 @@ static PyMethodDef SwigMethods[] = { { (char *)"SizerItem_CalcMin", (PyCFunction) _wrap_SizerItem_CalcMin, METH_VARARGS | METH_KEYWORDS }, { (char *)"SizerItem_SetDimension", (PyCFunction) _wrap_SizerItem_SetDimension, METH_VARARGS | METH_KEYWORDS }, { (char *)"SizerItem_GetMinSize", (PyCFunction) _wrap_SizerItem_GetMinSize, METH_VARARGS | METH_KEYWORDS }, + { (char *)"SizerItem_GetMinSizeWithBorder", (PyCFunction) _wrap_SizerItem_GetMinSizeWithBorder, METH_VARARGS | METH_KEYWORDS }, { (char *)"SizerItem_SetInitSize", (PyCFunction) _wrap_SizerItem_SetInitSize, METH_VARARGS | METH_KEYWORDS }, { (char *)"SizerItem_SetRatioWH", (PyCFunction) _wrap_SizerItem_SetRatioWH, METH_VARARGS | METH_KEYWORDS }, { (char *)"SizerItem_SetRatioSize", (PyCFunction) _wrap_SizerItem_SetRatioSize, METH_VARARGS | METH_KEYWORDS }, diff --git a/wxPython/src/msw/_gdi.py b/wxPython/src/msw/_gdi.py index 84deac2955..bacf6ef65c 100644 --- a/wxPython/src/msw/_gdi.py +++ b/wxPython/src/msw/_gdi.py @@ -2699,7 +2699,12 @@ class DC(_core.Object): return _gdi_.DC_GetCharWidth(*args, **kwargs) def GetTextExtent(*args, **kwargs): - """GetTextExtent(wxString string) -> (width, height)""" + """ + GetTextExtent(wxString string) -> (width, height) + + Get the width and height of the text using the current font. Only + works for single line strings. + """ return _gdi_.DC_GetTextExtent(*args, **kwargs) def GetFullTextExtent(*args, **kwargs): @@ -2716,6 +2721,10 @@ class DC(_core.Object): """ GetMultiLineTextExtent(wxString string, Font font=None) -> (width, height, descent, externalLeading) + + Get the width, height, decent and leading of the text using the + current or specified font. Works for single as well as multi-line + strings. """ return _gdi_.DC_GetMultiLineTextExtent(*args, **kwargs) diff --git a/wxPython/src/msw/_misc.py b/wxPython/src/msw/_misc.py index a8e6ecea5e..40b0cd7a8c 100644 --- a/wxPython/src/msw/_misc.py +++ b/wxPython/src/msw/_misc.py @@ -3273,7 +3273,11 @@ class DateTime(object): GetWeekDayName = staticmethod(GetWeekDayName) def GetAmPmStrings(*args, **kwargs): - """GetAmPmStrings() -> (am, pm)""" + """ + GetAmPmStrings() -> (am, pm) + + Get the AM and PM strings in the current locale (may be empty) + """ return _misc_.DateTime_GetAmPmStrings(*args, **kwargs) GetAmPmStrings = staticmethod(GetAmPmStrings) @@ -3747,7 +3751,11 @@ def DateTime_GetWeekDayName(*args, **kwargs): return _misc_.DateTime_GetWeekDayName(*args, **kwargs) def DateTime_GetAmPmStrings(*args, **kwargs): - """GetAmPmStrings() -> (am, pm)""" + """ + GetAmPmStrings() -> (am, pm) + + Get the AM and PM strings in the current locale (may be empty) + """ return _misc_.DateTime_GetAmPmStrings(*args, **kwargs) def DateTime_IsDSTApplicable(*args, **kwargs): @@ -4854,7 +4862,11 @@ class FileDataObject(DataObjectSimple): self.thisown = 1 del newobj.thisown def GetFilenames(*args, **kwargs): - """GetFilenames(self) -> [names]""" + """ + GetFilenames(self) -> [names] + + Returns a list of file names. + """ return _misc_.FileDataObject_GetFilenames(*args, **kwargs) def AddFile(*args, **kwargs): @@ -5340,6 +5352,15 @@ class Clipboard(_core.Object): """ return _misc_.Clipboard_UsePrimarySelection(*args, **kwargs) + def Get(*args, **kwargs): + """ + Get() -> Clipboard + + Returns global instance (wxTheClipboard) of the object. + """ + return _misc_.Clipboard_Get(*args, **kwargs) + + Get = staticmethod(Get) class ClipboardPtr(Clipboard): def __init__(self, this): @@ -5348,6 +5369,31 @@ class ClipboardPtr(Clipboard): self.__class__ = Clipboard _misc_.Clipboard_swigregister(ClipboardPtr) +def Clipboard_Get(*args, **kwargs): + """ + Clipboard_Get() -> Clipboard + + Returns global instance (wxTheClipboard) of the object. + """ + return _misc_.Clipboard_Get(*args, **kwargs) + +class _wxPyDelayedInitWrapper(object): + def __init__(self, initfunc, *args, **kwargs): + self._initfunc = initfunc + self._args = args + self._kwargs = kwargs + self._instance = None + def _checkInstance(self): + if self._instance is None: + self._instance = self._initfunc(*self._args, **self._kwargs) + def __getattr__(self, name): + self._checkInstance() + return getattr(self._instance, name) + def __repr__(self): + self._checkInstance() + return repr(self._instance) +TheClipboard = _wxPyDelayedInitWrapper(Clipboard.Get) + class ClipboardLocker(object): """ A helpful class for opening the clipboard and automatically @@ -5388,7 +5434,6 @@ class ClipboardLockerPtr(ClipboardLocker): if not hasattr(self,"thisown"): self.thisown = 0 self.__class__ = ClipboardLocker _misc_.ClipboardLocker_swigregister(ClipboardLockerPtr) -TheClipboard = cvar.TheClipboard #--------------------------------------------------------------------------- diff --git a/wxPython/src/msw/_misc_wrap.cpp b/wxPython/src/msw/_misc_wrap.cpp index ab346c766f..ee8a2e1f41 100644 --- a/wxPython/src/msw/_misc_wrap.cpp +++ b/wxPython/src/msw/_misc_wrap.cpp @@ -27256,6 +27256,28 @@ static PyObject *_wrap_Clipboard_UsePrimarySelection(PyObject *self, PyObject *a } +static PyObject *_wrap_Clipboard_Get(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject *resultobj; + wxClipboard *result; + char *kwnames[] = { + NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)":Clipboard_Get",kwnames)) goto fail; + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (wxClipboard *)wxClipboard::Get(); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_wxClipboard, 0); + return resultobj; + fail: + return NULL; +} + + static PyObject * Clipboard_swigregister(PyObject *self, PyObject *args) { PyObject *obj; if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL; @@ -27263,20 +27285,6 @@ static PyObject * Clipboard_swigregister(PyObject *self, PyObject *args) { Py_INCREF(obj); return Py_BuildValue((char *)""); } -static int _wrap_TheClipboard_set(PyObject *_val) { - PyErr_SetString(PyExc_TypeError,"Variable TheClipboard is read-only."); - return 1; -} - - -static PyObject *_wrap_TheClipboard_get() { - PyObject *pyobj; - - pyobj = SWIG_NewPointerObj((void *)(wxTheClipboard), SWIGTYPE_p_wxClipboard, 0); - return pyobj; -} - - static PyObject *_wrap_new_ClipboardLocker(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxClipboard *arg1 = (wxClipboard *) NULL ; @@ -28990,6 +28998,7 @@ static PyMethodDef SwigMethods[] = { { (char *)"Clipboard_Clear", (PyCFunction) _wrap_Clipboard_Clear, METH_VARARGS | METH_KEYWORDS }, { (char *)"Clipboard_Flush", (PyCFunction) _wrap_Clipboard_Flush, METH_VARARGS | METH_KEYWORDS }, { (char *)"Clipboard_UsePrimarySelection", (PyCFunction) _wrap_Clipboard_UsePrimarySelection, METH_VARARGS | METH_KEYWORDS }, + { (char *)"Clipboard_Get", (PyCFunction) _wrap_Clipboard_Get, METH_VARARGS | METH_KEYWORDS }, { (char *)"Clipboard_swigregister", Clipboard_swigregister, METH_VARARGS }, { (char *)"new_ClipboardLocker", (PyCFunction) _wrap_new_ClipboardLocker, METH_VARARGS | METH_KEYWORDS }, { (char *)"delete_ClipboardLocker", (PyCFunction) _wrap_delete_ClipboardLocker, METH_VARARGS | METH_KEYWORDS }, @@ -30169,7 +30178,6 @@ SWIGEXPORT(void) SWIG_init(void) { wxPyPtrTypeMap_Add("wxTextDropTarget", "wxPyTextDropTarget"); wxPyPtrTypeMap_Add("wxFileDropTarget", "wxPyFileDropTarget"); - SWIG_addvarlink(SWIG_globals,(char*)"TheClipboard",_wrap_TheClipboard_get, _wrap_TheClipboard_set); SWIG_addvarlink(SWIG_globals,(char*)"DefaultVideoMode",_wrap_DefaultVideoMode_get, _wrap_DefaultVideoMode_set); } diff --git a/wxPython/src/msw/_windows.py b/wxPython/src/msw/_windows.py index 5dcdef14dd..30df5f0d2f 100644 --- a/wxPython/src/msw/_windows.py +++ b/wxPython/src/msw/_windows.py @@ -137,7 +137,11 @@ class ScrolledWindow(Panel): return _windows_.ScrolledWindow_SetScrollRate(*args, **kwargs) def GetScrollPixelsPerUnit(*args, **kwargs): - """GetScrollPixelsPerUnit() -> (xUnit, yUnit)""" + """ + GetScrollPixelsPerUnit() -> (xUnit, yUnit) + + Get the size of one logical unit in physical units. + """ return _windows_.ScrolledWindow_GetScrollPixelsPerUnit(*args, **kwargs) def EnableScrolling(*args, **kwargs): @@ -145,7 +149,11 @@ class ScrolledWindow(Panel): return _windows_.ScrolledWindow_EnableScrolling(*args, **kwargs) def GetViewStart(*args, **kwargs): - """GetViewStart() -> (x,y)""" + """ + GetViewStart() -> (x,y) + + Get the view start + """ return _windows_.ScrolledWindow_GetViewStart(*args, **kwargs) def SetScale(*args, **kwargs): @@ -2471,7 +2479,12 @@ class MultiChoiceDialog(Dialog): self._setOORInfo(self) def SetSelections(*args, **kwargs): - """SetSelections(List selections)""" + """ + SetSelections(List selections) + + Specify the items in the list that should be selected, using a list of + integers. + """ return _windows_.MultiChoiceDialog_SetSelections(*args, **kwargs) def GetSelections(*args, **kwargs): -- 2.45.2