]> git.saurik.com Git - wxWidgets.git/blobdiff - utils/wxPython/src/windows2.i
fixed interpretation of <font size>: was always relative to current size, now conform...
[wxWidgets.git] / utils / wxPython / src / windows2.i
index bd63b5136b3af954801c94bfd5234141e3d6048c..b54df654a44a3bf869d3457255f7c704821c324e 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();
 };
 
 
@@ -299,7 +333,7 @@ public:
     void Initialize(wxWindow* window);
     bool IsSplit();
 
-
+    bool ReplaceWindow(wxWindow * winOld, wxWindow * winNew);
     void SetBorderSize(int width);
     void SetSashPosition(int position, int redraw = TRUE);
     void SetSashSize(int width);