]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/gtk/grid.py
make wxArtProvider pure virtual (I was not so on
[wxWidgets.git] / wxPython / src / gtk / grid.py
index d45de410e552069cfbcb89c7a3085070a8a197ec..cfbddc55b44633e4eedfa2261907637eafed8667 100644 (file)
@@ -5,6 +5,8 @@ from misc import *
 
 from gdi import *
 
+from fonts import *
+
 from windows import *
 
 from clip_dnd import *
@@ -59,6 +61,9 @@ def EVT_GRID_EDITOR_SHOWN(win, fn):
 def EVT_GRID_EDITOR_HIDDEN(win, fn):
     win.Connect(-1, -1, wxEVT_GRID_EDITOR_HIDDEN, fn)
 
+def EVT_GRID_EDITOR_CREATED(win, fn):
+    win.Connect(-1, -1, wxEVT_GRID_EDITOR_CREATED, fn)
+
 
 class wxGridCellRendererPtr :
     def __init__(self,this):
@@ -97,8 +102,8 @@ class wxPyGridCellRendererPtr(wxGridCellRendererPtr):
     def __init__(self,this):
         self.this = this
         self.thisown = 0
-    def _setSelf(self, *_args, **_kwargs):
-        val = apply(gridc.wxPyGridCellRenderer__setSelf,(self,) + _args, _kwargs)
+    def _setCallbackInfo(self, *_args, **_kwargs):
+        val = apply(gridc.wxPyGridCellRenderer__setCallbackInfo,(self,) + _args, _kwargs)
         return val
     def base_SetParameters(self, *_args, **_kwargs):
         val = apply(gridc.wxPyGridCellRenderer_base_SetParameters,(self,) + _args, _kwargs)
@@ -109,7 +114,7 @@ class wxPyGridCellRenderer(wxPyGridCellRendererPtr):
     def __init__(self,*_args,**_kwargs):
         self.this = apply(gridc.new_wxPyGridCellRenderer,_args,_kwargs)
         self.thisown = 1
-        self._setSelf(self, wxPyGridCellRenderer)
+        self._setCallbackInfo(self, wxPyGridCellRenderer)
 
 
 
@@ -182,6 +187,48 @@ class wxGridCellBoolRenderer(wxGridCellBoolRendererPtr):
 
 
 
+class wxGridCellDateTimeRendererPtr(wxGridCellStringRendererPtr):
+    def __init__(self,this):
+        self.this = this
+        self.thisown = 0
+    def __repr__(self):
+        return "<C wxGridCellDateTimeRenderer instance at %s>" % (self.this,)
+class wxGridCellDateTimeRenderer(wxGridCellDateTimeRendererPtr):
+    def __init__(self,*_args,**_kwargs):
+        self.this = apply(gridc.new_wxGridCellDateTimeRenderer,_args,_kwargs)
+        self.thisown = 1
+
+
+
+
+class wxGridCellEnumRendererPtr(wxGridCellStringRendererPtr):
+    def __init__(self,this):
+        self.this = this
+        self.thisown = 0
+    def __repr__(self):
+        return "<C wxGridCellEnumRenderer instance at %s>" % (self.this,)
+class wxGridCellEnumRenderer(wxGridCellEnumRendererPtr):
+    def __init__(self,*_args,**_kwargs):
+        self.this = apply(gridc.new_wxGridCellEnumRenderer,_args,_kwargs)
+        self.thisown = 1
+
+
+
+
+class wxGridCellAutoWrapStringRendererPtr(wxGridCellStringRendererPtr):
+    def __init__(self,this):
+        self.this = this
+        self.thisown = 0
+    def __repr__(self):
+        return "<C wxGridCellAutoWrapStringRenderer instance at %s>" % (self.this,)
+class wxGridCellAutoWrapStringRenderer(wxGridCellAutoWrapStringRendererPtr):
+    def __init__(self,*_args,**_kwargs):
+        self.this = apply(gridc.new_wxGridCellAutoWrapStringRenderer,_args,_kwargs)
+        self.thisown = 1
+
+
+
+
 class wxGridCellEditorPtr :
     def __init__(self,this):
         self.this = this
@@ -191,7 +238,6 @@ class wxGridCellEditorPtr :
         return val
     def GetControl(self, *_args, **_kwargs):
         val = apply(gridc.wxGridCellEditor_GetControl,(self,) + _args, _kwargs)
-        if val: val = wxControlPtr(val) 
         return val
     def SetControl(self, *_args, **_kwargs):
         val = apply(gridc.wxGridCellEditor_SetControl,(self,) + _args, _kwargs)
@@ -258,8 +304,8 @@ class wxPyGridCellEditorPtr(wxGridCellEditorPtr):
     def __init__(self,this):
         self.this = this
         self.thisown = 0
-    def _setSelf(self, *_args, **_kwargs):
-        val = apply(gridc.wxPyGridCellEditor__setSelf,(self,) + _args, _kwargs)
+    def _setCallbackInfo(self, *_args, **_kwargs):
+        val = apply(gridc.wxPyGridCellEditor__setCallbackInfo,(self,) + _args, _kwargs)
         return val
     def base_SetSize(self, *_args, **_kwargs):
         val = apply(gridc.wxPyGridCellEditor_base_SetSize,(self,) + _args, _kwargs)
@@ -270,6 +316,9 @@ class wxPyGridCellEditorPtr(wxGridCellEditorPtr):
     def base_PaintBackground(self, *_args, **_kwargs):
         val = apply(gridc.wxPyGridCellEditor_base_PaintBackground,(self,) + _args, _kwargs)
         return val
+    def base_IsAcceptedKey(self, *_args, **_kwargs):
+        val = apply(gridc.wxPyGridCellEditor_base_IsAcceptedKey,(self,) + _args, _kwargs)
+        return val
     def base_StartingKey(self, *_args, **_kwargs):
         val = apply(gridc.wxPyGridCellEditor_base_StartingKey,(self,) + _args, _kwargs)
         return val
@@ -291,7 +340,7 @@ class wxPyGridCellEditor(wxPyGridCellEditorPtr):
     def __init__(self,*_args,**_kwargs):
         self.this = apply(gridc.new_wxPyGridCellEditor,_args,_kwargs)
         self.thisown = 1
-        self._setSelf(self, wxPyGridCellEditor)
+        self._setCallbackInfo(self, wxPyGridCellEditor)
 
 
 
@@ -366,7 +415,41 @@ class wxGridCellChoiceEditor(wxGridCellChoiceEditorPtr):
 
 
 
+class wxGridCellEnumEditorPtr(wxGridCellChoiceEditorPtr):
+    def __init__(self,this):
+        self.this = this
+        self.thisown = 0
+    def __repr__(self):
+        return "<C wxGridCellEnumEditor instance at %s>" % (self.this,)
+class wxGridCellEnumEditor(wxGridCellEnumEditorPtr):
+    def __init__(self,*_args,**_kwargs):
+        self.this = apply(gridc.new_wxGridCellEnumEditor,_args,_kwargs)
+        self.thisown = 1
+
+
+
+
+class wxGridCellAutoWrapStringEditorPtr(wxGridCellTextEditorPtr):
+    def __init__(self,this):
+        self.this = this
+        self.thisown = 0
+    def __repr__(self):
+        return "<C wxGridCellAutoWrapStringEditor instance at %s>" % (self.this,)
+class wxGridCellAutoWrapStringEditor(wxGridCellAutoWrapStringEditorPtr):
+    def __init__(self,*_args,**_kwargs):
+        self.this = apply(gridc.new_wxGridCellAutoWrapStringEditor,_args,_kwargs)
+        self.thisown = 1
+
+
+
+
 class wxGridCellAttrPtr :
+    Any = gridc.wxGridCellAttr_Any
+    Default = gridc.wxGridCellAttr_Default
+    Cell = gridc.wxGridCellAttr_Cell
+    Row = gridc.wxGridCellAttr_Row
+    Col = gridc.wxGridCellAttr_Col
+    Merged = gridc.wxGridCellAttr_Merged
     def __init__(self,this):
         self.this = this
         self.thisown = 0
@@ -374,6 +457,9 @@ class wxGridCellAttrPtr :
         val = apply(gridc.wxGridCellAttr_Clone,(self,) + _args, _kwargs)
         if val: val = wxGridCellAttrPtr(val) 
         return val
+    def MergeWith(self, *_args, **_kwargs):
+        val = apply(gridc.wxGridCellAttr_MergeWith,(self,) + _args, _kwargs)
+        return val
     def IncRef(self, *_args, **_kwargs):
         val = apply(gridc.wxGridCellAttr_IncRef,(self,) + _args, _kwargs)
         return val
@@ -401,6 +487,9 @@ class wxGridCellAttrPtr :
     def SetEditor(self, *_args, **_kwargs):
         val = apply(gridc.wxGridCellAttr_SetEditor,(self,) + _args, _kwargs)
         return val
+    def SetKind(self, *_args, **_kwargs):
+        val = apply(gridc.wxGridCellAttr_SetKind,(self,) + _args, _kwargs)
+        return val
     def HasTextColour(self, *_args, **_kwargs):
         val = apply(gridc.wxGridCellAttr_HasTextColour,(self,) + _args, _kwargs)
         return val
@@ -419,17 +508,20 @@ class wxGridCellAttrPtr :
     def HasEditor(self, *_args, **_kwargs):
         val = apply(gridc.wxGridCellAttr_HasEditor,(self,) + _args, _kwargs)
         return val
+    def HasReadWriteMode(self, *_args, **_kwargs):
+        val = apply(gridc.wxGridCellAttr_HasReadWriteMode,(self,) + _args, _kwargs)
+        return val
     def GetTextColour(self, *_args, **_kwargs):
         val = apply(gridc.wxGridCellAttr_GetTextColour,(self,) + _args, _kwargs)
-        if val: val = wxColourPtr(val) 
+        if val: val = wxColourPtr(val) ; val.thisown = 1
         return val
     def GetBackgroundColour(self, *_args, **_kwargs):
         val = apply(gridc.wxGridCellAttr_GetBackgroundColour,(self,) + _args, _kwargs)
-        if val: val = wxColourPtr(val) 
+        if val: val = wxColourPtr(val) ; val.thisown = 1
         return val
     def GetFont(self, *_args, **_kwargs):
         val = apply(gridc.wxGridCellAttr_GetFont,(self,) + _args, _kwargs)
-        if val: val = wxFontPtr(val) 
+        if val: val = wxFontPtr(val) ; val.thisown = 1
         return val
     def GetAlignment(self, *_args, **_kwargs):
         val = apply(gridc.wxGridCellAttr_GetAlignment,(self,) + _args, _kwargs)
@@ -495,8 +587,8 @@ class wxPyGridCellAttrProviderPtr(wxGridCellAttrProviderPtr):
     def __init__(self,this):
         self.this = this
         self.thisown = 0
-    def _setSelf(self, *_args, **_kwargs):
-        val = apply(gridc.wxPyGridCellAttrProvider__setSelf,(self,) + _args, _kwargs)
+    def _setCallbackInfo(self, *_args, **_kwargs):
+        val = apply(gridc.wxPyGridCellAttrProvider__setCallbackInfo,(self,) + _args, _kwargs)
         return val
     def base_GetAttr(self, *_args, **_kwargs):
         val = apply(gridc.wxPyGridCellAttrProvider_base_GetAttr,(self,) + _args, _kwargs)
@@ -517,12 +609,12 @@ class wxPyGridCellAttrProvider(wxPyGridCellAttrProviderPtr):
     def __init__(self,*_args,**_kwargs):
         self.this = apply(gridc.new_wxPyGridCellAttrProvider,_args,_kwargs)
         self.thisown = 1
-        self._setSelf(self, wxPyGridCellAttrProvider)
+        self._setCallbackInfo(self, wxPyGridCellAttrProvider)
 
 
 
 
-class wxGridTableBasePtr :
+class wxGridTableBasePtr(wxObjectPtr):
     def __init__(self,this):
         self.this = this
         self.thisown = 0
@@ -538,7 +630,6 @@ class wxGridTableBasePtr :
         return val
     def GetView(self, *_args, **_kwargs):
         val = apply(gridc.wxGridTableBase_GetView,(self,) + _args, _kwargs)
-        if val: val = wxGridPtr(val) 
         return val
     def GetNumberRows(self, *_args, **_kwargs):
         val = apply(gridc.wxGridTableBase_GetNumberRows,(self,) + _args, _kwargs)
@@ -644,8 +735,8 @@ class wxPyGridTableBasePtr(wxGridTableBasePtr):
     def __init__(self,this):
         self.this = this
         self.thisown = 0
-    def _setSelf(self, *_args, **_kwargs):
-        val = apply(gridc.wxPyGridTableBase__setSelf,(self,) + _args, _kwargs)
+    def _setCallbackInfo(self, *_args, **_kwargs):
+        val = apply(gridc.wxPyGridTableBase__setCallbackInfo,(self,) + _args, _kwargs)
         return val
     def Destroy(self, *_args, **_kwargs):
         val = apply(gridc.wxPyGridTableBase_Destroy,(self,) + _args, _kwargs)
@@ -714,7 +805,7 @@ class wxPyGridTableBase(wxPyGridTableBasePtr):
     def __init__(self,*_args,**_kwargs):
         self.this = apply(gridc.new_wxPyGridTableBase,_args,_kwargs)
         self.thisown = 1
-        self._setSelf(self, wxPyGridTableBase)
+        self._setCallbackInfo(self, wxPyGridTableBase)
 
 
 
@@ -745,7 +836,6 @@ class wxGridTableMessagePtr :
         return val
     def GetTableObject(self, *_args, **_kwargs):
         val = apply(gridc.wxGridTableMessage_GetTableObject,(self,) + _args, _kwargs)
-        if val: val = wxGridTableBasePtr(val) 
         return val
     def SetId(self, *_args, **_kwargs):
         val = apply(gridc.wxGridTableMessage_SetId,(self,) + _args, _kwargs)
@@ -839,7 +929,6 @@ class wxGridPtr(wxScrolledWindowPtr):
         return val
     def GetTable(self, *_args, **_kwargs):
         val = apply(gridc.wxGrid_GetTable,(self,) + _args, _kwargs)
-        if val: val = wxGridTableBasePtr(val) 
         return val
     def SetTable(self, *_args, **_kwargs):
         val = apply(gridc.wxGrid_SetTable,(self,) + _args, _kwargs)
@@ -871,9 +960,6 @@ class wxGridPtr(wxScrolledWindowPtr):
     def DrawTextRectangle(self, *_args, **_kwargs):
         val = apply(gridc.wxGrid_DrawTextRectangle,(self,) + _args, _kwargs)
         return val
-    def StringToLines(self, *_args, **_kwargs):
-        val = apply(gridc.wxGrid_StringToLines,(self,) + _args, _kwargs)
-        return val
     def GetTextBoxSize(self, *_args, **_kwargs):
         val = apply(gridc.wxGrid_GetTextBoxSize,(self,) + _args, _kwargs)
         return val
@@ -886,6 +972,9 @@ class wxGridPtr(wxScrolledWindowPtr):
     def GetBatchCount(self, *_args, **_kwargs):
         val = apply(gridc.wxGrid_GetBatchCount,(self,) + _args, _kwargs)
         return val
+    def ForceRefresh(self, *_args, **_kwargs):
+        val = apply(gridc.wxGrid_ForceRefresh,(self,) + _args, _kwargs)
+        return val
     def IsEditable(self, *_args, **_kwargs):
         val = apply(gridc.wxGrid_IsEditable,(self,) + _args, _kwargs)
         return val
@@ -1028,6 +1117,12 @@ class wxGridPtr(wxScrolledWindowPtr):
         val = apply(gridc.wxGrid_GetCellHighlightColour,(self,) + _args, _kwargs)
         if val: val = wxColourPtr(val) ; val.thisown = 1
         return val
+    def GetCellHighlightPenWidth(self, *_args, **_kwargs):
+        val = apply(gridc.wxGrid_GetCellHighlightPenWidth,(self,) + _args, _kwargs)
+        return val
+    def GetCellHighlightROPenWidth(self, *_args, **_kwargs):
+        val = apply(gridc.wxGrid_GetCellHighlightROPenWidth,(self,) + _args, _kwargs)
+        return val
     def SetRowLabelSize(self, *_args, **_kwargs):
         val = apply(gridc.wxGrid_SetRowLabelSize,(self,) + _args, _kwargs)
         return val
@@ -1061,6 +1156,12 @@ class wxGridPtr(wxScrolledWindowPtr):
     def SetCellHighlightColour(self, *_args, **_kwargs):
         val = apply(gridc.wxGrid_SetCellHighlightColour,(self,) + _args, _kwargs)
         return val
+    def SetCellHighlightPenWidth(self, *_args, **_kwargs):
+        val = apply(gridc.wxGrid_SetCellHighlightPenWidth,(self,) + _args, _kwargs)
+        return val
+    def SetCellHighlightROPenWidth(self, *_args, **_kwargs):
+        val = apply(gridc.wxGrid_SetCellHighlightROPenWidth,(self,) + _args, _kwargs)
+        return val
     def EnableDragRowSize(self, *_args, **_kwargs):
         val = apply(gridc.wxGrid_EnableDragRowSize,(self,) + _args, _kwargs)
         return val
@@ -1312,12 +1413,25 @@ class wxGridPtr(wxScrolledWindowPtr):
     def SetMargins(self, *_args, **_kwargs):
         val = apply(gridc.wxGrid_SetMargins,(self,) + _args, _kwargs)
         return val
+    def GetGridWindow(self, *_args, **_kwargs):
+        val = apply(gridc.wxGrid_GetGridWindow,(self,) + _args, _kwargs)
+        return val
+    def GetGridRowLabelWindow(self, *_args, **_kwargs):
+        val = apply(gridc.wxGrid_GetGridRowLabelWindow,(self,) + _args, _kwargs)
+        return val
+    def GetGridColLabelWindow(self, *_args, **_kwargs):
+        val = apply(gridc.wxGrid_GetGridColLabelWindow,(self,) + _args, _kwargs)
+        return val
+    def GetGridCornerLabelWindow(self, *_args, **_kwargs):
+        val = apply(gridc.wxGrid_GetGridCornerLabelWindow,(self,) + _args, _kwargs)
+        return val
     def __repr__(self):
         return "<C wxGrid instance at %s>" % (self.this,)
 class wxGrid(wxGridPtr):
     def __init__(self,*_args,**_kwargs):
         self.this = apply(gridc.new_wxGrid,_args,_kwargs)
         self.thisown = 1
+        self._setOORInfo(self)
 
 
 
@@ -1443,6 +1557,38 @@ class wxGridRangeSelectEvent(wxGridRangeSelectEventPtr):
 
 
 
+class wxGridEditorCreatedEventPtr(wxCommandEventPtr):
+    def __init__(self,this):
+        self.this = this
+        self.thisown = 0
+    def GetRow(self, *_args, **_kwargs):
+        val = apply(gridc.wxGridEditorCreatedEvent_GetRow,(self,) + _args, _kwargs)
+        return val
+    def GetCol(self, *_args, **_kwargs):
+        val = apply(gridc.wxGridEditorCreatedEvent_GetCol,(self,) + _args, _kwargs)
+        return val
+    def GetControl(self, *_args, **_kwargs):
+        val = apply(gridc.wxGridEditorCreatedEvent_GetControl,(self,) + _args, _kwargs)
+        return val
+    def SetRow(self, *_args, **_kwargs):
+        val = apply(gridc.wxGridEditorCreatedEvent_SetRow,(self,) + _args, _kwargs)
+        return val
+    def SetCol(self, *_args, **_kwargs):
+        val = apply(gridc.wxGridEditorCreatedEvent_SetCol,(self,) + _args, _kwargs)
+        return val
+    def SetControl(self, *_args, **_kwargs):
+        val = apply(gridc.wxGridEditorCreatedEvent_SetControl,(self,) + _args, _kwargs)
+        return val
+    def __repr__(self):
+        return "<C wxGridEditorCreatedEvent instance at %s>" % (self.this,)
+class wxGridEditorCreatedEvent(wxGridEditorCreatedEventPtr):
+    def __init__(self,*_args,**_kwargs):
+        self.this = apply(gridc.new_wxGridEditorCreatedEvent,_args,_kwargs)
+        self.thisown = 1
+
+
+
+
 
 
 #-------------- FUNCTION WRAPPERS ------------------
@@ -1484,6 +1630,7 @@ wxEVT_GRID_CELL_CHANGE = gridc.wxEVT_GRID_CELL_CHANGE
 wxEVT_GRID_SELECT_CELL = gridc.wxEVT_GRID_SELECT_CELL
 wxEVT_GRID_EDITOR_SHOWN = gridc.wxEVT_GRID_EDITOR_SHOWN
 wxEVT_GRID_EDITOR_HIDDEN = gridc.wxEVT_GRID_EDITOR_HIDDEN
+wxEVT_GRID_EDITOR_CREATED = gridc.wxEVT_GRID_EDITOR_CREATED
 
 
 #-------------- USER INCLUDE -----------------------
@@ -1495,6 +1642,7 @@ wxEVT_GRID_EDITOR_HIDDEN = gridc.wxEVT_GRID_EDITOR_HIDDEN
 wx.wxGridEventPtr                  = wxGridEventPtr
 wx.wxGridSizeEventPtr              = wxGridSizeEventPtr
 wx.wxGridRangeSelectEventPtr       = wxGridRangeSelectEventPtr
+wx.wxGridEditorCreatedEventPtr     = wxGridEditorCreatedEventPtr
 wx.wxGridCellRendererPtr           = wxGridCellRendererPtr
 wx.wxPyGridCellRendererPtr         = wxPyGridCellRendererPtr
 wx.wxGridCellEditorPtr             = wxGridCellEditorPtr