X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a77bf68f69758e933a9719b83ce3076d10fc1790..0190c47234148dbbb778fb3150d7a375389dbb8b:/wxPython/src/grid.i diff --git a/wxPython/src/grid.i b/wxPython/src/grid.i index 771190095b..90d1855378 100644 --- a/wxPython/src/grid.i +++ b/wxPython/src/grid.i @@ -1592,6 +1592,7 @@ class wxGrid : public wxScrolledWindow { public: %pythonAppend wxGrid "self._setOORInfo(self)" + %typemap(out) wxGrid*; // turn off this typemap wxGrid( wxWindow *parent, wxWindowID id=-1, @@ -1602,6 +1603,10 @@ public: %name(PreGrid) wxGrid(); + + // Turn it back on again + %typemap(out) wxGrid* { $result = wxPyMake_wxObject($1, $owner); } + bool Create( wxWindow *parent, wxWindowID id=-1, @@ -1806,11 +1811,22 @@ public: void DisableDragGridSize(); bool CanDragGridSize(); + void EnableDragCell( bool enable = True ); + void DisableDragCell(); + bool CanDragCell(); + // this sets the specified attribute for all cells in this row/col void SetAttr(int row, int col, wxGridCellAttr *attr); void SetRowAttr(int row, wxGridCellAttr *attr); void SetColAttr(int col, wxGridCellAttr *attr); + // returns the attribute we may modify in place: a new one if this cell + // doesn't have any yet or the existing one if it does + // + // DecRef() must be called on the returned pointer, as usual + wxGridCellAttr *GetOrCreateCellAttr(int row, int col) const; + + // shortcuts for setting the column parameters // set the format for the data in the column: default is string @@ -2097,6 +2113,7 @@ public: %constant wxEventType wxEVT_GRID_EDITOR_SHOWN; %constant wxEventType wxEVT_GRID_EDITOR_HIDDEN; %constant wxEventType wxEVT_GRID_EDITOR_CREATED; +%constant wxEventType wxEVT_GRID_CELL_BEGIN_DRAG; @@ -2117,6 +2134,7 @@ EVT_GRID_SELECT_CELL = wx.PyEventBinder( wxEVT_GRID_SELECT_CELL ) EVT_GRID_EDITOR_SHOWN = wx.PyEventBinder( wxEVT_GRID_EDITOR_SHOWN ) EVT_GRID_EDITOR_HIDDEN = wx.PyEventBinder( wxEVT_GRID_EDITOR_HIDDEN ) EVT_GRID_EDITOR_CREATED = wx.PyEventBinder( wxEVT_GRID_EDITOR_CREATED ) +EVT_GRID_CELL_BEGIN_DRAG = wx.PyEventBinder( wxEVT_GRID_CELL_BEGIN_DRAG ) %# The same as above but with the ability to specify an identifier @@ -2136,6 +2154,8 @@ EVT_GRID_CMD_SELECT_CELL = wx.PyEventBinder( wxEVT_GRID_SELECT_CELL, EVT_GRID_CMD_EDITOR_SHOWN = wx.PyEventBinder( wxEVT_GRID_EDITOR_SHOWN, 1 ) EVT_GRID_CMD_EDITOR_HIDDEN = wx.PyEventBinder( wxEVT_GRID_EDITOR_HIDDEN, 1 ) EVT_GRID_CMD_EDITOR_CREATED = wx.PyEventBinder( wxEVT_GRID_EDITOR_CREATED, 1 ) +EVT_GRID_CMD_CELL_BEGIN_DRAG = wx.PyEventBinder( wxEVT_GRID_CELL_BEGIN_DRAG, 1 ) + } //---------------------------------------------------------------------------