add a possibility to disable individual grid rows/columns resizing

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60408 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2009-04-26 17:02:53 +00:00
parent fa531da023
commit 82edfbe7d9
7 changed files with 189 additions and 91 deletions

View File

@@ -107,7 +107,7 @@ public:
// we can't know in advance whether we can sort by this column or not
// with wxGrid API so suppose we can by default
int flags = wxCOL_SORTABLE;
if ( m_grid->CanDragColSize() )
if ( m_grid->CanDragColSize(m_col) )
flags |= wxCOL_RESIZABLE;
if ( m_grid->CanDragColMove() )
flags |= wxCOL_REORDERABLE;
@@ -500,9 +500,6 @@ public:
// Set the row default height or column default width
virtual void SetDefaultLineSize(wxGrid *grid, int size, bool resizeExisting) const = 0;
// True if rows/columns can be resized by user
virtual bool CanResizeLines(const wxGrid *grid) const = 0;
// Return the index of the line at the given position
//
@@ -572,10 +569,8 @@ public:
{ return grid->GetRowMinimalHeight(line); }
virtual void SetLineSize(wxGrid *grid, int line, int size) const
{ grid->SetRowSize(line, size); }
virtual bool CanResizeLines(const wxGrid *grid) const
{ return grid->CanDragRowSize(); }
virtual void SetDefaultLineSize(wxGrid *grid, int size, bool resizeExisting) const
{ grid->SetDefaultRowSize(size, resizeExisting); }
{ grid->SetDefaultRowSize(size, resizeExisting); }
virtual int GetLineAt(const wxGrid * WXUNUSED(grid), int line) const
{ return line; } // TODO: implement row reordering
@@ -635,10 +630,8 @@ public:
{ return grid->GetColMinimalWidth(line); }
virtual void SetLineSize(wxGrid *grid, int line, int size) const
{ grid->SetColSize(line, size); }
virtual bool CanResizeLines(const wxGrid *grid) const
{ return grid->CanDragColSize(); }
virtual void SetDefaultLineSize(wxGrid *grid, int size, bool resizeExisting) const
{ grid->SetDefaultColSize(size, resizeExisting); }
{ grid->SetDefaultColSize(size, resizeExisting); }
virtual int GetLineAt(const wxGrid *grid, int line) const
{ return grid->GetColAt(line); }