]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/grid.i
Some error recovery and other tweaks
[wxWidgets.git] / wxPython / src / grid.i
index 8abc7cc0a673cd7df4a170476b6772083c68218e..bf6b371d04b5434016004bda1034f965855e687e 100644 (file)
 // Licence:     wxWindows license
 /////////////////////////////////////////////////////////////////////////////
 
-%module grid
+%define DOCSTRING
+"Classes for implementing a spreadsheet-like control."
+%enddef
+%module(docstring=DOCSTRING) grid
+
 
 %{
 #include "wx/wxPython/wxPython.h"
@@ -26,7 +30,8 @@
 //---------------------------------------------------------------------------
 
 %import windows.i
-%pythoncode { wx = core }
+%pythoncode { wx = _core }
+%pythoncode { __docfilter__ = wx.__DocFilter(globals()) }
 
 
 %include _grid_rename.i
@@ -1504,7 +1509,7 @@ public:
     bool operator!=( const wxGridCellCoords& other ) const;
 
     %extend {
-        PyObject* asTuple() {
+        PyObject* Get() {
             PyObject* tup = PyTuple_New(2);
             PyTuple_SET_ITEM(tup, 0, PyInt_FromLong(self->GetRow()));
             PyTuple_SET_ITEM(tup, 1, PyInt_FromLong(self->GetCol()));
@@ -1512,9 +1517,10 @@ public:
         }
     }
     %pythoncode {
-    def __str__(self):                   return str(self.asTuple())
-    def __repr__(self):                  return 'wxGridCellCoords'+str(self.asTuple())
-    def __len__(self):                   return len(self.asTuple())
+    asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
+    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 __setitem__(self, index, val):
         if index == 0: self.SetRow(val)
@@ -1552,7 +1558,17 @@ public:
             long style = wxWANTS_CHARS,
             const wxString& name = wxPyPanelNameStr);
 
+    %name(PreGrid) wxGrid();
+    
+    
+    bool Create( wxWindow *parent,
+                 wxWindowID id,
+                 const wxPoint& pos = wxDefaultPosition,
+                 const wxSize& size = wxDefaultSize,
+                 long style = wxWANTS_CHARS,
+                 const wxString& name = wxPyPanelNameStr );
 
+    
     enum wxGridSelectionModes {
         wxGridSelectCells,
         wxGridSelectRows,
@@ -1937,6 +1953,8 @@ public:
     wxWindow* GetGridCornerLabelWindow();
 
 
+    static wxVisualAttributes
+    GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
 };