X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1e6796a093c94cfb6de545594fcb625cafb7a8a4..53663be8a5ea8e1c6f178839209b67e8228e4642:/wxPython/src/msw/grid.py diff --git a/wxPython/src/msw/grid.py b/wxPython/src/msw/grid.py index 7cbd1c0df1..258b2736ec 100644 --- a/wxPython/src/msw/grid.py +++ b/wxPython/src/msw/grid.py @@ -255,6 +255,12 @@ class wxGridCellEditorPtr : def SetControl(self, *_args, **_kwargs): val = apply(gridc.wxGridCellEditor_SetControl,(self,) + _args, _kwargs) return val + def GetCellAttr(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellEditor_GetCellAttr,(self,) + _args, _kwargs) + return val + def SetCellAttr(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellEditor_SetCellAttr,(self,) + _args, _kwargs) + return val def SetParameters(self, *_args, **_kwargs): val = apply(gridc.wxGridCellEditor_SetParameters,(self,) + _args, _kwargs) return val @@ -362,6 +368,9 @@ class wxGridCellTextEditorPtr(wxGridCellEditorPtr): def __init__(self,this): self.this = this self.thisown = 0 + def GetValue(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellTextEditor_GetValue,(self,) + _args, _kwargs) + return val def __repr__(self): return "" % (self.this,) class wxGridCellTextEditor(wxGridCellTextEditorPtr): @@ -377,6 +386,9 @@ class wxGridCellNumberEditorPtr(wxGridCellTextEditorPtr): def __init__(self,this): self.this = this self.thisown = 0 + def GetValue(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellNumberEditor_GetValue,(self,) + _args, _kwargs) + return val def __repr__(self): return "" % (self.this,) class wxGridCellNumberEditor(wxGridCellNumberEditorPtr): @@ -392,6 +404,9 @@ class wxGridCellFloatEditorPtr(wxGridCellTextEditorPtr): def __init__(self,this): self.this = this self.thisown = 0 + def GetValue(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellFloatEditor_GetValue,(self,) + _args, _kwargs) + return val def __repr__(self): return "" % (self.this,) class wxGridCellFloatEditor(wxGridCellFloatEditorPtr): @@ -407,6 +422,9 @@ class wxGridCellBoolEditorPtr(wxGridCellEditorPtr): def __init__(self,this): self.this = this self.thisown = 0 + def GetValue(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellBoolEditor_GetValue,(self,) + _args, _kwargs) + return val def __repr__(self): return "" % (self.this,) class wxGridCellBoolEditor(wxGridCellBoolEditorPtr): @@ -422,6 +440,9 @@ class wxGridCellChoiceEditorPtr(wxGridCellEditorPtr): def __init__(self,this): self.this = this self.thisown = 0 + def GetValue(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellChoiceEditor_GetValue,(self,) + _args, _kwargs) + return val def __repr__(self): return "" % (self.this,) class wxGridCellChoiceEditor(wxGridCellChoiceEditorPtr): @@ -437,6 +458,9 @@ class wxGridCellEnumEditorPtr(wxGridCellChoiceEditorPtr): def __init__(self,this): self.this = this self.thisown = 0 + def GetValue(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellEnumEditor_GetValue,(self,) + _args, _kwargs) + return val def __repr__(self): return "" % (self.this,) class wxGridCellEnumEditor(wxGridCellEnumEditorPtr): @@ -452,6 +476,9 @@ class wxGridCellAutoWrapStringEditorPtr(wxGridCellTextEditorPtr): def __init__(self,this): self.this = this self.thisown = 0 + def GetValue(self, *_args, **_kwargs): + val = apply(gridc.wxGridCellAutoWrapStringEditor_GetValue,(self,) + _args, _kwargs) + return val def __repr__(self): return "" % (self.this,) class wxGridCellAutoWrapStringEditor(wxGridCellAutoWrapStringEditorPtr): @@ -865,9 +892,12 @@ class wxGridTableMessagePtr : def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self,gridc=gridc): - if self.thisown == 1 : - gridc.delete_wxGridTableMessage(self) + def __del__(self, delfunc=gridc.delete_wxGridTableMessage): + if self.thisown == 1: + try: + delfunc(self) + except: + pass def SetTableObject(self, *_args, **_kwargs): val = apply(gridc.wxGridTableMessage_SetTableObject,(self,) + _args, _kwargs) return val @@ -906,9 +936,12 @@ class wxGridCellCoordsPtr : def __init__(self,this): self.this = this self.thisown = 0 - def __del__(self,gridc=gridc): - if self.thisown == 1 : - gridc.delete_wxGridCellCoords(self) + def __del__(self, delfunc=gridc.delete_wxGridCellCoords): + if self.thisown == 1: + try: + delfunc(self) + except: + pass def GetRow(self, *_args, **_kwargs): val = apply(gridc.wxGridCellCoords_GetRow,(self,) + _args, _kwargs) return val @@ -932,8 +965,16 @@ class wxGridCellCoordsPtr : return val def __repr__(self): return "" % (self.this,) - def __str__(self): return str(self.asTuple()) - def __repr__(self): return str(self.asTuple()) + + def __str__(self): return str(self.asTuple()) + def __repr__(self): return 'wxGridCellCoords'+str(self.asTuple()) + def __len__(self): return len(self.asTuple()) + def __getitem__(self, index): return self.asTuple()[index] + def __setitem__(self, index, val): + if index == 0: self.SetRow(val) + elif index == 1: self.SetCol(val) + else: raise IndexError + class wxGridCellCoords(wxGridCellCoordsPtr): def __init__(self,*_args,**_kwargs): self.this = apply(gridc.new_wxGridCellCoords,_args,_kwargs) @@ -1146,6 +1187,9 @@ class wxGridPtr(wxScrolledWindowPtr): def GetColLabelAlignment(self, *_args, **_kwargs): val = apply(gridc.wxGrid_GetColLabelAlignment,(self,) + _args, _kwargs) return val + def GetColLabelTextOrientation(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_GetColLabelTextOrientation,(self,) + _args, _kwargs) + return val def GetRowLabelValue(self, *_args, **_kwargs): val = apply(gridc.wxGrid_GetRowLabelValue,(self,) + _args, _kwargs) return val @@ -1187,6 +1231,9 @@ class wxGridPtr(wxScrolledWindowPtr): def SetColLabelAlignment(self, *_args, **_kwargs): val = apply(gridc.wxGrid_SetColLabelAlignment,(self,) + _args, _kwargs) return val + def SetColLabelTextOrientation(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_SetColLabelTextOrientation,(self,) + _args, _kwargs) + return val def SetRowLabelValue(self, *_args, **_kwargs): val = apply(gridc.wxGrid_SetRowLabelValue,(self,) + _args, _kwargs) return val @@ -1337,6 +1384,12 @@ class wxGridPtr(wxScrolledWindowPtr): def AutoSize(self, *_args, **_kwargs): val = apply(gridc.wxGrid_AutoSize,(self,) + _args, _kwargs) return val + def AutoSizeRowLabelSize(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_AutoSizeRowLabelSize,(self,) + _args, _kwargs) + return val + def AutoSizeColLabelSize(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_AutoSizeColLabelSize,(self,) + _args, _kwargs) + return val def SetColMinimalWidth(self, *_args, **_kwargs): val = apply(gridc.wxGrid_SetColMinimalWidth,(self,) + _args, _kwargs) return val @@ -1433,6 +1486,30 @@ class wxGridPtr(wxScrolledWindowPtr): def IsInSelection(self, *_args, **_kwargs): val = apply(gridc.wxGrid_IsInSelection,(self,) + _args, _kwargs) return val + def GetSelectedCells(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_GetSelectedCells,(self,) + _args, _kwargs) + return val + def GetSelectionBlockTopLeft(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_GetSelectionBlockTopLeft,(self,) + _args, _kwargs) + return val + def GetSelectionBlockBottomRight(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_GetSelectionBlockBottomRight,(self,) + _args, _kwargs) + return val + def GetSelectedRows(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_GetSelectedRows,(self,) + _args, _kwargs) + return val + def GetSelectedCols(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_GetSelectedCols,(self,) + _args, _kwargs) + return val + def DeselectRow(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_DeselectRow,(self,) + _args, _kwargs) + return val + def DeselectCol(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_DeselectCol,(self,) + _args, _kwargs) + return val + def DeselectCell(self, *_args, **_kwargs): + val = apply(gridc.wxGrid_DeselectCell,(self,) + _args, _kwargs) + return val def BlockToDeviceRect(self, *_args, **_kwargs): val = apply(gridc.wxGrid_BlockToDeviceRect,(self,) + _args, _kwargs) if val: val = wxRectPtr(val) ; val.thisown = 1