extract (and expand and clean up and document) the header window implementation used inside the generic wxDataViewCtrl in a separate wxHeaderCtrl class which could be reused in (generic) wxListCtrl and, most importantly, wxGrid later

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57093 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2008-12-03 21:53:10 +00:00
parent 878770b854
commit 56873923f3
51 changed files with 3043 additions and 477 deletions

View File

@@ -0,0 +1,44 @@
///////////////////////////////////////////////////////////////////////////////
// Name: src/common/headerctrlcmn.cpp
// Purpose: implementation of wxHeaderCtrlBase
// Author: Vadim Zeitlin
// Created: 2008-12-02
// RCS-ID: $Id$
// Copyright: (c) 2008 Vadim Zeitlin <vadim@wxwidgets.org>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
// ============================================================================
// declarations
// ============================================================================
// ----------------------------------------------------------------------------
// headers
// ----------------------------------------------------------------------------
// for compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#ifndef WX_PRECOMP
#endif // WX_PRECOMP
#include "wx/headerctrl.h"
// ============================================================================
// wxHeaderCtrlBase implementation
// ============================================================================
WXDLLIMPEXP_DATA_CORE(const char) wxHeaderCtrlNameStr[] = "wxHeaderCtrl";
void wxHeaderCtrlBase::DeleteAllColumns()
{
const unsigned count = GetColumnCount();
for ( unsigned n = 0; n < count; n++ )
DeleteColumn(0);
}