- 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:
@@ -2527,7 +2527,6 @@ wxDataViewColumn::wxDataViewColumn( const wxString &title, wxDataViewRenderer *c
|
||||
{
|
||||
Init( align, flags, width );
|
||||
|
||||
gtk_tree_view_column_set_clickable( GTK_TREE_VIEW_COLUMN(m_column), TRUE );
|
||||
SetTitle( title );
|
||||
}
|
||||
|
||||
@@ -2570,10 +2569,6 @@ void wxDataViewColumn::Init(wxAlignment align, int flags, int width)
|
||||
wxGtkTreeCellDataFunc, (gpointer) GetRenderer(), NULL );
|
||||
}
|
||||
|
||||
wxDataViewColumn::~wxDataViewColumn()
|
||||
{
|
||||
}
|
||||
|
||||
void wxDataViewColumn::OnInternalIdle()
|
||||
{
|
||||
if (m_isConnected)
|
||||
@@ -2693,7 +2688,21 @@ void wxDataViewColumn::SetSortable( bool sortable )
|
||||
{
|
||||
GtkTreeViewColumn *column = GTK_TREE_VIEW_COLUMN(m_column);
|
||||
|
||||
if (sortable)
|
||||
gtk_tree_view_column_set_clickable( GTK_TREE_VIEW_COLUMN(m_column),
|
||||
sortable );
|
||||
}
|
||||
|
||||
bool wxDataViewColumn::IsSortable() const
|
||||
{
|
||||
GtkTreeViewColumn *column = GTK_TREE_VIEW_COLUMN(m_column);
|
||||
return gtk_tree_view_column_get_clickable( column );
|
||||
}
|
||||
|
||||
void wxDataViewColumn::SetAsSortKey( bool sort )
|
||||
{
|
||||
GtkTreeViewColumn *column = GTK_TREE_VIEW_COLUMN(m_column);
|
||||
|
||||
if (sort)
|
||||
{
|
||||
gtk_tree_view_column_set_sort_column_id( column, GetModelColumn() );
|
||||
}
|
||||
@@ -2704,7 +2713,7 @@ void wxDataViewColumn::SetSortable( bool sortable )
|
||||
}
|
||||
}
|
||||
|
||||
bool wxDataViewColumn::IsSortable() const
|
||||
bool wxDataViewColumn::IsSortKey() const
|
||||
{
|
||||
GtkTreeViewColumn *column = GTK_TREE_VIEW_COLUMN(m_column);
|
||||
return (gtk_tree_view_column_get_sort_column_id( column ) != -1);
|
||||
|
Reference in New Issue
Block a user