add wxEVT_COMMAND_HEADER_SEPARATOR_DCLICK and semi-automatic header resizing support

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57186 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2008-12-08 12:15:17 +00:00
parent 04a33b5031
commit 3bfaa5a7e4
8 changed files with 173 additions and 28 deletions

View File

@@ -88,12 +88,25 @@ public:
wxDataViewCtrl *GetOwner() const
{ return static_cast<wxDataViewCtrl *>(GetParent()); }
private:
protected:
// implement/override wxHeaderCtrl functions by forwarding them to the main
// control
virtual wxHeaderColumnBase& GetColumn(unsigned int idx)
{
return *(GetOwner()->GetColumn(idx));
}
virtual bool UpdateColumnWidthToFit(unsigned int idx, int widthTitle)
{
wxDataViewCtrl * const owner = GetOwner();
int widthContents = owner->GetBestColumnWidth(idx);
owner->GetColumn(idx)->SetWidth(wxMax(widthTitle, widthContents));
return true;
}
private:
bool SendEvent(wxEventType type, unsigned int n)
{
wxDataViewCtrl * const owner = GetOwner();