reSWIGged

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28016 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2004-06-24 21:02:49 +00:00
parent 4b1ae1539c
commit a001823c80
15 changed files with 645 additions and 985 deletions

View File

@@ -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):

View File

@@ -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:

View File

@@ -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 },

View File

@@ -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)

View File

@@ -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
#---------------------------------------------------------------------------

View File

@@ -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);
}

View File

@@ -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):