reSWIGged

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27849 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2004-06-17 06:05:17 +00:00
parent fdc775af55
commit fd2dc34356
10 changed files with 236 additions and 75 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)
@@ -1666,7 +1670,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 +1754,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):
@@ -2960,7 +2973,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):
@@ -4434,7 +4452,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):
@@ -5224,7 +5247,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):
@@ -5375,7 +5405,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

@@ -1322,11 +1322,19 @@ class Point2D(object):
self.thisown = 1
del newobj.thisown
def GetFloor(*args, **kwargs):
"""GetFloor() -> (x,y)"""
"""
GetFloor() -> (x,y)
Convert to integer
"""
return _core_.Point2D_GetFloor(*args, **kwargs)
def GetRounded(*args, **kwargs):
"""GetRounded() -> (x,y)"""
"""
GetRounded() -> (x,y)
Convert to integer
"""
return _core_.Point2D_GetRounded(*args, **kwargs)
def GetVectorLength(*args, **kwargs):
@@ -1950,7 +1958,13 @@ class ImageHistogram(object):
MakeKey = staticmethod(MakeKey)
def FindFirstUnusedColour(*args, **kwargs):
"""FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b)"""
"""
FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b)
Find first colour that is not used in the image and has higher RGB
values than startR, startG, startB. Returns a tuple consisting of a
success flag and rgb values.
"""
return _core_.ImageHistogram_FindFirstUnusedColour(*args, **kwargs)
@@ -2037,7 +2051,13 @@ class Image(Object):
return _core_.Image_HasAlpha(*args, **kwargs)
def FindFirstUnusedColour(*args, **kwargs):
"""FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b)"""
"""
FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b)
Find first colour that is not used in the image and has higher RGB
values than startR, startG, startB. Returns a tuple consisting of a
success flag and rgb values.
"""
return _core_.Image_FindFirstUnusedColour(*args, **kwargs)
def SetMaskFromImage(*args, **kwargs):
@@ -6220,21 +6240,8 @@ class Window(EvtHandler):
"""
Navigate(self, int flags=NavigationKeyEvent.IsForward) -> bool
:param flags: A combination of the ``IsForward`` and ``WinChange``
values in the `wx.NavigationKeyEvent` class, which
determine if the navigation should be in forward or
reverse order, and if it should be able to cross
parent window boundaries, such as between notebook
pages or MDI child frames. Typically the status of
the Shift key (for forward or reverse) or the
Control key (for WinChange) would be used to
determine how to set the flags.
situation in which you may wish to call this method is from a text
rol custom keypress handler to do the default navigation behaviour
the tab key, since the standard default behaviour for a multiline
control with the wx.TE_PROCESS_TAB style is to insert a tab and
navigate to the next control.
Does keyboard navigation from this window to another, by sending a
`wx.NavigationKeyEvent`.
"""
return _core_.Window_Navigate(*args, **kwargs)
@@ -6888,7 +6895,11 @@ class Window(EvtHandler):
return _core_.Window_GetCharWidth(*args, **kwargs)
def GetTextExtent(*args, **kwargs):
"""GetTextExtent(String string) -> (width, height)"""
"""
GetTextExtent(String string) -> (width, height)
Get the width and height of the text using the current font.
"""
return _core_.Window_GetTextExtent(*args, **kwargs)
def GetFullTextExtent(*args, **kwargs):
@@ -9509,11 +9520,21 @@ class FlexGridSizer(GridSizer):
return _core_.FlexGridSizer_GetNonFlexibleGrowMode(*args, **kwargs)
def GetRowHeights(*args, **kwargs):
"""GetRowHeights(self) -> list"""
"""
GetRowHeights(self) -> list
Returns a list of integers representing the heights of each of the
rows in the sizer.
"""
return _core_.FlexGridSizer_GetRowHeights(*args, **kwargs)
def GetColWidths(*args, **kwargs):
"""GetColWidths(self) -> list"""
"""
GetColWidths(self) -> list
Returns a list of integers representing the widths of each of the
columns in the sizer.
"""
return _core_.FlexGridSizer_GetColWidths(*args, **kwargs)

View File

@@ -2611,7 +2611,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):
@@ -2628,6 +2633,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):

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):
@@ -1751,14 +1759,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):
@@ -1781,19 +1782,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):
@@ -2481,7 +2474,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):

View File

@@ -708,6 +708,10 @@ class GridCellAttr(object):
"""IsReadOnly(self) -> bool"""
return _grid.GridCellAttr_IsReadOnly(*args, **kwargs)
def GetKind(*args, **kwargs):
"""GetKind(self) -> int"""
return _grid.GridCellAttr_GetKind(*args, **kwargs)
def SetDefAttr(*args, **kwargs):
"""SetDefAttr(self, GridCellAttr defAttr)"""
return _grid.GridCellAttr_SetDefAttr(*args, **kwargs)

View File

@@ -4779,6 +4779,32 @@ static PyObject *_wrap_GridCellAttr_IsReadOnly(PyObject *self, PyObject *args, P
}
static PyObject *_wrap_GridCellAttr_GetKind(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject *resultobj;
wxGridCellAttr *arg1 = (wxGridCellAttr *) 0 ;
int result;
PyObject * obj0 = 0 ;
char *kwnames[] = {
(char *) "self", NULL
};
if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:GridCellAttr_GetKind",kwnames,&obj0)) goto fail;
if ((SWIG_ConvertPtr(obj0,(void **)(&arg1),SWIGTYPE_p_wxGridCellAttr,
SWIG_POINTER_EXCEPTION | 0)) == -1) SWIG_fail;
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
result = (int)(arg1)->GetKind();
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) SWIG_fail;
}
resultobj = SWIG_FromInt((int)result);
return resultobj;
fail:
return NULL;
}
static PyObject *_wrap_GridCellAttr_SetDefAttr(PyObject *self, PyObject *args, PyObject *kwargs) {
PyObject *resultobj;
wxGridCellAttr *arg1 = (wxGridCellAttr *) 0 ;
@@ -15710,6 +15736,7 @@ static PyMethodDef SwigMethods[] = {
{ (char *)"GridCellAttr_GetRenderer", (PyCFunction) _wrap_GridCellAttr_GetRenderer, METH_VARARGS | METH_KEYWORDS },
{ (char *)"GridCellAttr_GetEditor", (PyCFunction) _wrap_GridCellAttr_GetEditor, METH_VARARGS | METH_KEYWORDS },
{ (char *)"GridCellAttr_IsReadOnly", (PyCFunction) _wrap_GridCellAttr_IsReadOnly, METH_VARARGS | METH_KEYWORDS },
{ (char *)"GridCellAttr_GetKind", (PyCFunction) _wrap_GridCellAttr_GetKind, METH_VARARGS | METH_KEYWORDS },
{ (char *)"GridCellAttr_SetDefAttr", (PyCFunction) _wrap_GridCellAttr_SetDefAttr, METH_VARARGS | METH_KEYWORDS },
{ (char *)"GridCellAttr_swigregister", GridCellAttr_swigregister, METH_VARARGS },
{ (char *)"new_GridCellAttrProvider", (PyCFunction) _wrap_new_GridCellAttrProvider, METH_VARARGS | METH_KEYWORDS },