]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/msw/grid.py
added functions to read/write several elements at once (patch 754986)
[wxWidgets.git] / wxPython / src / msw / grid.py
index 36e48aae8b4566de9b99688bc2df621d51e819f3..258b2736ec6ee2a8680d9dfa1039e36e82a9ba72 100644 (file)
@@ -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 "<C wxGridCellTextEditor instance at %s>" % (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 "<C wxGridCellNumberEditor instance at %s>" % (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 "<C wxGridCellFloatEditor instance at %s>" % (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 "<C wxGridCellBoolEditor instance at %s>" % (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 "<C wxGridCellChoiceEditor instance at %s>" % (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 "<C wxGridCellEnumEditor instance at %s>" % (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 "<C wxGridCellAutoWrapStringEditor instance at %s>" % (self.this,)
 class wxGridCellAutoWrapStringEditor(wxGridCellAutoWrapStringEditorPtr):
@@ -500,6 +527,12 @@ class wxGridCellAttrPtr :
     def SetAlignment(self, *_args, **_kwargs):
         val = apply(gridc.wxGridCellAttr_SetAlignment,(self,) + _args, _kwargs)
         return val
+    def SetSize(self, *_args, **_kwargs):
+        val = apply(gridc.wxGridCellAttr_SetSize,(self,) + _args, _kwargs)
+        return val
+    def SetOverflow(self, *_args, **_kwargs):
+        val = apply(gridc.wxGridCellAttr_SetOverflow,(self,) + _args, _kwargs)
+        return val
     def SetReadOnly(self, *_args, **_kwargs):
         val = apply(gridc.wxGridCellAttr_SetReadOnly,(self,) + _args, _kwargs)
         return val
@@ -548,6 +581,12 @@ class wxGridCellAttrPtr :
     def GetAlignment(self, *_args, **_kwargs):
         val = apply(gridc.wxGridCellAttr_GetAlignment,(self,) + _args, _kwargs)
         return val
+    def GetSize(self, *_args, **_kwargs):
+        val = apply(gridc.wxGridCellAttr_GetSize,(self,) + _args, _kwargs)
+        return val
+    def GetOverflow(self, *_args, **_kwargs):
+        val = apply(gridc.wxGridCellAttr_GetOverflow,(self,) + _args, _kwargs)
+        return val
     def GetRenderer(self, *_args, **_kwargs):
         val = apply(gridc.wxGridCellAttr_GetRenderer,(self,) + _args, _kwargs)
         return val
@@ -853,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
@@ -894,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
@@ -920,8 +965,16 @@ class wxGridCellCoordsPtr :
         return val
     def __repr__(self):
         return "<C wxGridCellCoords instance at %s>" % (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)
@@ -943,6 +996,9 @@ class wxGridPtr(wxScrolledWindowPtr):
     def SetSelectionMode(self, *_args, **_kwargs):
         val = apply(gridc.wxGrid_SetSelectionMode,(self,) + _args, _kwargs)
         return val
+    def GetSelectionMode(self, *_args, **_kwargs):
+        val = apply(gridc.wxGrid_GetSelectionMode,(self,) + _args, _kwargs)
+        return val
     def GetNumberRows(self, *_args, **_kwargs):
         val = apply(gridc.wxGrid_GetNumberRows,(self,) + _args, _kwargs)
         return val
@@ -1000,6 +1056,9 @@ class wxGridPtr(wxScrolledWindowPtr):
     def ForceRefresh(self, *_args, **_kwargs):
         val = apply(gridc.wxGrid_ForceRefresh,(self,) + _args, _kwargs)
         return val
+    def Refresh(self, *_args, **_kwargs):
+        val = apply(gridc.wxGrid_Refresh,(self,) + _args, _kwargs)
+        return val
     def IsEditable(self, *_args, **_kwargs):
         val = apply(gridc.wxGrid_IsEditable,(self,) + _args, _kwargs)
         return val
@@ -1128,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
@@ -1169,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
@@ -1214,6 +1279,9 @@ class wxGridPtr(wxScrolledWindowPtr):
     def CanDragGridSize(self, *_args, **_kwargs):
         val = apply(gridc.wxGrid_CanDragGridSize,(self,) + _args, _kwargs)
         return val
+    def SetAttr(self, *_args, **_kwargs):
+        val = apply(gridc.wxGrid_SetAttr,(self,) + _args, _kwargs)
+        return val
     def SetRowAttr(self, *_args, **_kwargs):
         val = apply(gridc.wxGrid_SetRowAttr,(self,) + _args, _kwargs)
         return val
@@ -1280,6 +1348,15 @@ class wxGridPtr(wxScrolledWindowPtr):
     def GetCellAlignment(self, *_args, **_kwargs):
         val = apply(gridc.wxGrid_GetCellAlignment,(self,) + _args, _kwargs)
         return val
+    def GetDefaultCellOverflow(self, *_args, **_kwargs):
+        val = apply(gridc.wxGrid_GetDefaultCellOverflow,(self,) + _args, _kwargs)
+        return val
+    def GetCellOverflow(self, *_args, **_kwargs):
+        val = apply(gridc.wxGrid_GetCellOverflow,(self,) + _args, _kwargs)
+        return val
+    def GetCellSize(self, *_args, **_kwargs):
+        val = apply(gridc.wxGrid_GetCellSize,(self,) + _args, _kwargs)
+        return val
     def SetDefaultRowSize(self, *_args, **_kwargs):
         val = apply(gridc.wxGrid_SetDefaultRowSize,(self,) + _args, _kwargs)
         return val
@@ -1307,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
@@ -1337,6 +1420,15 @@ class wxGridPtr(wxScrolledWindowPtr):
     def SetCellAlignment(self, *_args, **_kwargs):
         val = apply(gridc.wxGrid_SetCellAlignment,(self,) + _args, _kwargs)
         return val
+    def SetDefaultCellOverflow(self, *_args, **_kwargs):
+        val = apply(gridc.wxGrid_SetDefaultCellOverflow,(self,) + _args, _kwargs)
+        return val
+    def SetCellOverflow(self, *_args, **_kwargs):
+        val = apply(gridc.wxGrid_SetCellOverflow,(self,) + _args, _kwargs)
+        return val
+    def SetCellSize(self, *_args, **_kwargs):
+        val = apply(gridc.wxGrid_SetCellSize,(self,) + _args, _kwargs)
+        return val
     def SetDefaultRenderer(self, *_args, **_kwargs):
         val = apply(gridc.wxGrid_SetDefaultRenderer,(self,) + _args, _kwargs)
         return val
@@ -1394,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