- Rewrite wxHeaderCtrl to be virtual-like: even if we don't need an infinite

number of columns in it, it turns out that getting column information from
  the associated control is much easier than copying it into the control.
- Provide wxHeaderCtrlSimple derived class which can be used easily if
  callback approach of wxHeaderCtrl is not needed.
- Because of wxHeaderCtrl virtualization, port-specific implementations of
  wxHeaderColumn are not needed any more and were removed.
- Use wxHeaderCtrl in the generic wxDataViewCtrl: this means that column
  events are broken right now in it as they haven't been implemented by
  wxHeaderCtrl yet, this will be fixed a.s.a.p.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57161 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2008-12-07 14:47:55 +00:00
parent bc0289bf5e
commit e2bfe6731e
30 changed files with 725 additions and 2034 deletions

View File

@@ -49,11 +49,10 @@ public:
private:
// implement base class pure virtuals
virtual void DoSetCount(unsigned int count);
virtual unsigned int DoGetCount() const;
virtual void DoInsert(const wxHeaderColumn& col, unsigned int idx);
virtual void DoDelete(unsigned int idx);
virtual void DoShowColumn(unsigned int idx, bool show);
virtual void DoShowSortIndicator(unsigned int idx, int sortOrder);
virtual void DoUpdate(unsigned int idx);
virtual void DoScrollHorz(int dx);
// override wxWindow methods which must be implemented by a new control
@@ -65,6 +64,13 @@ private:
// common part of all ctors
void Init();
// wrapper around Header_{Set,Insert}Item(): either appends the item to the
// end or modifies the existing item by copying information from
// GetColumn(idx) to it
enum Operation { Set, Insert };
void DoSetOrInsertItem(Operation oper, unsigned int idx);
// the image list: initially NULL, created on demand
wxImageList *m_imageList;