X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a5f9094e25010e9a426e55f576af1988c99d3c91..3eddc6bc00bcbdea23d52a8724f46ad56768f8b6:/wxPython/src/msw/grid.py diff --git a/wxPython/src/msw/grid.py b/wxPython/src/msw/grid.py index 812342d11f..1e70f0dedd 100644 --- a/wxPython/src/msw/grid.py +++ b/wxPython/src/msw/grid.py @@ -68,6 +68,9 @@ GRID_VALUE_TEXT = _grid.GRID_VALUE_TEXT GRID_VALUE_LONG = _grid.GRID_VALUE_LONG GRID_VALUE_CHOICEINT = _grid.GRID_VALUE_CHOICEINT GRID_VALUE_DATETIME = _grid.GRID_VALUE_DATETIME +GRID_AUTOSIZE = _grid.GRID_AUTOSIZE +GRID_COLUMN = _grid.GRID_COLUMN +GRID_ROW = _grid.GRID_ROW GRID_DEFAULT_NUMBER_ROWS = _grid.GRID_DEFAULT_NUMBER_ROWS GRID_DEFAULT_NUMBER_COLS = _grid.GRID_DEFAULT_NUMBER_COLS GRID_DEFAULT_ROW_HEIGHT = _grid.GRID_DEFAULT_ROW_HEIGHT @@ -135,7 +138,7 @@ class PyGridCellRenderer(GridCellRenderer): def __init__(self, *args, **kwargs): """__init__(self) -> PyGridCellRenderer""" _grid.PyGridCellRenderer_swiginit(self,_grid.new_PyGridCellRenderer(*args, **kwargs)) - self._setCallbackInfo(self, PyGridCellRenderer);self._setOORInfo(self) + self._setOORInfo(self);PyGridCellRenderer._setCallbackInfo(self, self, PyGridCellRenderer) def _setCallbackInfo(*args, **kwargs): """_setCallbackInfo(self, PyObject self, PyObject _class)""" @@ -322,9 +325,8 @@ class GridCellEditor(GridCellWorker): def Destroy(*args, **kwargs): """Destroy(self)""" - val = _grid.GridCellEditor_Destroy(*args, **kwargs) - args[0].thisown = 0 - return val + args[0].this.own(False) + return _grid.GridCellEditor_Destroy(*args, **kwargs) CellAttr = property(GetCellAttr,SetCellAttr,doc="See `GetCellAttr` and `SetCellAttr`") Control = property(GetControl,SetControl,doc="See `GetControl` and `SetControl`") @@ -337,7 +339,7 @@ class PyGridCellEditor(GridCellEditor): def __init__(self, *args, **kwargs): """__init__(self) -> PyGridCellEditor""" _grid.PyGridCellEditor_swiginit(self,_grid.new_PyGridCellEditor(*args, **kwargs)) - self._setCallbackInfo(self, PyGridCellEditor);self._setOORInfo(self) + self._setOORInfo(self);PyGridCellEditor._setCallbackInfo(self, self, PyGridCellEditor) def _setCallbackInfo(*args, **kwargs): """_setCallbackInfo(self, PyObject self, PyObject _class)""" @@ -441,7 +443,26 @@ class GridCellBoolEditor(GridCellEditor): _grid.GridCellBoolEditor_swiginit(self,_grid.new_GridCellBoolEditor(*args, **kwargs)) self._setOORInfo(self) + def UseStringValues(*args, **kwargs): + """UseStringValues(String valueTrue=OneString, String valueFalse=EmptyString)""" + return _grid.GridCellBoolEditor_UseStringValues(*args, **kwargs) + + UseStringValues = staticmethod(UseStringValues) + def IsTrueValue(*args, **kwargs): + """IsTrueValue(String value) -> bool""" + return _grid.GridCellBoolEditor_IsTrueValue(*args, **kwargs) + + IsTrueValue = staticmethod(IsTrueValue) _grid.GridCellBoolEditor_swigregister(GridCellBoolEditor) +OneString = cvar.OneString + +def GridCellBoolEditor_UseStringValues(*args, **kwargs): + """GridCellBoolEditor_UseStringValues(String valueTrue=OneString, String valueFalse=EmptyString)""" + return _grid.GridCellBoolEditor_UseStringValues(*args, **kwargs) + +def GridCellBoolEditor_IsTrueValue(*args, **kwargs): + """GridCellBoolEditor_IsTrueValue(String value) -> bool""" + return _grid.GridCellBoolEditor_IsTrueValue(*args, **kwargs) class GridCellChoiceEditor(GridCellEditor): """Proxy of C++ GridCellChoiceEditor class""" @@ -684,7 +705,7 @@ class PyGridCellAttrProvider(GridCellAttrProvider): def __init__(self, *args, **kwargs): """__init__(self) -> PyGridCellAttrProvider""" _grid.PyGridCellAttrProvider_swiginit(self,_grid.new_PyGridCellAttrProvider(*args, **kwargs)) - self._setCallbackInfo(self, PyGridCellAttrProvider) + PyGridCellAttrProvider._setCallbackInfo(self, self, PyGridCellAttrProvider) def _setCallbackInfo(*args, **kwargs): """_setCallbackInfo(self, PyObject self, PyObject _class)""" @@ -888,7 +909,7 @@ class PyGridTableBase(GridTableBase): def __init__(self, *args, **kwargs): """__init__(self) -> PyGridTableBase""" _grid.PyGridTableBase_swiginit(self,_grid.new_PyGridTableBase(*args, **kwargs)) - self._setCallbackInfo(self, PyGridTableBase);self._setOORInfo(self) + self._setOORInfo(self);PyGridTableBase._setCallbackInfo(self, self, PyGridTableBase) def _setCallbackInfo(*args, **kwargs): """_setCallbackInfo(self, PyObject self, PyObject _class)""" @@ -900,9 +921,8 @@ class PyGridTableBase(GridTableBase): Deletes the C++ object this Python object is a proxy for. """ - val = _grid.PyGridTableBase_Destroy(*args, **kwargs) - args[0].thisown = 0 - return val + args[0].this.own(False) + return _grid.PyGridTableBase_Destroy(*args, **kwargs) def base_GetTypeName(*args, **kw): return PyGridTableBase.GetTypeName(*args, **kw) @@ -1120,7 +1140,7 @@ class GridCellCoords(object): def __str__(self): return str(self.Get()) def __repr__(self): return 'wxGridCellCoords'+str(self.Get()) def __len__(self): return len(self.Get()) - def __getitem__(self, index): return self.asTuple()[index] + def __getitem__(self, index): return self.Get()[index] def __setitem__(self, index, val): if index == 0: self.SetRow(val) elif index == 1: self.SetCol(val) @@ -2077,6 +2097,21 @@ def Grid_GetClassDefaultAttributes(*args, **kwargs): """ return _grid.Grid_GetClassDefaultAttributes(*args, **kwargs) +class GridUpdateLocker(object): + """Proxy of C++ GridUpdateLocker class""" + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + def __init__(self, *args, **kwargs): + """__init__(self, Grid grid=None) -> GridUpdateLocker""" + _grid.GridUpdateLocker_swiginit(self,_grid.new_GridUpdateLocker(*args, **kwargs)) + __swig_destroy__ = _grid.delete_GridUpdateLocker + __del__ = lambda self : None; + def Create(*args, **kwargs): + """Create(self, Grid grid)""" + return _grid.GridUpdateLocker_Create(*args, **kwargs) + +_grid.GridUpdateLocker_swigregister(GridUpdateLocker) + class GridEvent(_core.NotifyEvent): """Proxy of C++ GridEvent class""" thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')