]> git.saurik.com Git - wxWidgets.git/blobdiff - utils/wxPython/src/windows2.i
updates of some SWIG generated stuff
[wxWidgets.git] / utils / wxPython / src / windows2.i
index bd63b5136b3af954801c94bfd5234141e3d6048c..6aa7c46e7c5f20fc0543b367cc82bc09f251fa24 100644 (file)
@@ -120,7 +120,30 @@ public:
     %name(GetDefCellAlignment)int GetCellAlignment();
     wxColour& GetCellBackgroundColour(int row, int col);
     %name(GetDefCellBackgroundColour) wxColour& GetCellBackgroundColour();
+
     //wxGridCell *** GetCells();
+    %addmethods {
+        PyObject* GetCells() {
+            int row, col;
+            PyObject* rows = PyList_New(0);
+            for (row=0; row < self->GetRows(); row++) {
+                PyObject* rowList = PyList_New(0);
+                for (col=0; col < self->GetCols(); col++) {
+                    wxGridCell* cell = self->GetCell(row, col);
+
+                    bool doSave = wxPyRestoreThread();
+                    PyObject* pyCell = wxPyConstructObject(cell, "wxGridCell");
+                    wxPySaveThread(doSave);
+
+                    if (PyList_Append(rowList, pyCell) == -1)
+                        return NULL;
+                }
+                if (PyList_Append(rows, rowList) == -1)
+                    return NULL;
+            }
+            return rows;
+        }
+    }
     wxColour& GetCellTextColour(int row, int col);
     %name(GetDefCellTextColour)wxColour& GetCellTextColour();
     wxFont& GetCellTextFont(int row, int col);
@@ -174,6 +197,10 @@ public:
     void SetRowHeight(int row, int height);
 
     void UpdateDimensions();
+
+    bool GetEditInPlace();
+    void SetEditInPlace(int edit = TRUE);
+
 };
 
 
@@ -186,6 +213,13 @@ public:
     bool        m_control;
     bool        m_shift;
     wxGridCell* m_cell;
+
+    int GetRow();
+    int GetCol();
+    wxPoint GetPosition();
+    bool ControlDown();
+    bool ShiftDown();
+    wxGridCell* GetCell();
 };