Fixed compilo
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48760 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -270,14 +270,14 @@ class wxDataViewTreeNode
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxDataViewTreeNode( wxDataViewTreeNode * parent = NULL )
|
wxDataViewTreeNode( wxDataViewTreeNode * parent = NULL )
|
||||||
{ this->parent = parent;
|
{ this->parent = parent;
|
||||||
if( parent == NULL )
|
if( parent == NULL )
|
||||||
open = true;
|
open = true;
|
||||||
else
|
else
|
||||||
open = false;
|
open = false;
|
||||||
hasChildren = false;
|
hasChildren = false;
|
||||||
subTreeCount = 0;
|
subTreeCount = 0;
|
||||||
}
|
}
|
||||||
//I don't know what I need to do in the destructure
|
//I don't know what I need to do in the destructure
|
||||||
~wxDataViewTreeNode()
|
~wxDataViewTreeNode()
|
||||||
{
|
{
|
||||||
@@ -313,13 +313,13 @@ public:
|
|||||||
int GetIndentLevel()
|
int GetIndentLevel()
|
||||||
{
|
{
|
||||||
int ret = 0 ;
|
int ret = 0 ;
|
||||||
wxDataViewTreeNode * node = this;
|
wxDataViewTreeNode * node = this;
|
||||||
while( node->GetParent()->GetParent() != NULL )
|
while( node->GetParent()->GetParent() != NULL )
|
||||||
{
|
{
|
||||||
node = node->GetParent();
|
node = node->GetParent();
|
||||||
ret ++;
|
ret ++;
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool IsOpen()
|
bool IsOpen()
|
||||||
@@ -587,7 +587,7 @@ public:
|
|||||||
virtual bool Cleared()
|
virtual bool Cleared()
|
||||||
{ return m_mainWindow->Cleared(); }
|
{ return m_mainWindow->Cleared(); }
|
||||||
virtual void Resort()
|
virtual void Resort()
|
||||||
{ m_mainWindow->Resort(); }
|
{ m_mainWindow->Resort(); }
|
||||||
|
|
||||||
wxDataViewMainWindow *m_mainWindow;
|
wxDataViewMainWindow *m_mainWindow;
|
||||||
};
|
};
|
||||||
@@ -2392,11 +2392,11 @@ void wxDataViewMainWindow::OnPaint( wxPaintEvent &WXUNUSED(event) )
|
|||||||
{
|
{
|
||||||
// get the cell value and set it into the renderer
|
// get the cell value and set it into the renderer
|
||||||
wxVariant value;
|
wxVariant value;
|
||||||
wxDataViewTreeNode * node = GetTreeNodeByRow(item);
|
wxDataViewTreeNode * node = GetTreeNodeByRow(item);
|
||||||
if( node == NULL )
|
if( node == NULL )
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxDataViewItem dataitem = node->GetItem();
|
wxDataViewItem dataitem = node->GetItem();
|
||||||
model->GetValue( value, dataitem, col->GetModelColumn());
|
model->GetValue( value, dataitem, col->GetModelColumn());
|
||||||
@@ -2775,7 +2775,7 @@ public:
|
|||||||
{
|
{
|
||||||
current ++;
|
current ++;
|
||||||
if( current == static_cast<int>(row))
|
if( current == static_cast<int>(row))
|
||||||
{
|
{
|
||||||
ret = node->GetItem() ;
|
ret = node->GetItem() ;
|
||||||
return DoJob::OK;
|
return DoJob::OK;
|
||||||
}
|
}
|
||||||
@@ -2803,7 +2803,7 @@ public:
|
|||||||
{
|
{
|
||||||
current ++;
|
current ++;
|
||||||
if( current == static_cast<int>(row))
|
if( current == static_cast<int>(row))
|
||||||
{
|
{
|
||||||
ret = wxDataViewItem( n ) ;
|
ret = wxDataViewItem( n ) ;
|
||||||
return DoJob::OK;
|
return DoJob::OK;
|
||||||
}
|
}
|
||||||
@@ -2839,7 +2839,7 @@ public:
|
|||||||
{
|
{
|
||||||
current ++;
|
current ++;
|
||||||
if( current == static_cast<int>(row))
|
if( current == static_cast<int>(row))
|
||||||
{
|
{
|
||||||
ret = node ;
|
ret = node ;
|
||||||
return DoJob::OK;
|
return DoJob::OK;
|
||||||
}
|
}
|
||||||
@@ -2873,7 +2873,7 @@ public:
|
|||||||
{
|
{
|
||||||
current ++;
|
current ++;
|
||||||
if( current == static_cast<int>(row))
|
if( current == static_cast<int>(row))
|
||||||
{
|
{
|
||||||
ret = new wxDataViewTreeNode( parent ) ;
|
ret = new wxDataViewTreeNode( parent ) ;
|
||||||
ret->SetItem( wxDataViewItem( n ));
|
ret->SetItem( wxDataViewItem( n ));
|
||||||
ret->SetHasChildren(false);
|
ret->SetHasChildren(false);
|
||||||
@@ -3254,11 +3254,11 @@ void wxDataViewMainWindow::OnChar( wxKeyEvent &event )
|
|||||||
break;
|
break;
|
||||||
//Add the process for tree expanding/collapsing
|
//Add the process for tree expanding/collapsing
|
||||||
case WXK_LEFT:
|
case WXK_LEFT:
|
||||||
OnCollapsing(m_currentRow);
|
OnCollapsing(m_currentRow);
|
||||||
break;
|
break;
|
||||||
case WXK_RIGHT:
|
case WXK_RIGHT:
|
||||||
OnExpanding( m_currentRow);
|
OnExpanding( m_currentRow);
|
||||||
break;
|
break;
|
||||||
case WXK_END:
|
case WXK_END:
|
||||||
if (!IsEmpty())
|
if (!IsEmpty())
|
||||||
OnArrowChar( GetRowCount() - 1, event );
|
OnArrowChar( GetRowCount() - 1, event );
|
||||||
@@ -3365,7 +3365,7 @@ void wxDataViewMainWindow::OnMouse( wxMouseEvent &event )
|
|||||||
m_underMouse = node;
|
m_underMouse = node;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (node!=NULL && !node->HasChildren())
|
if (node!=NULL && !node->HasChildren())
|
||||||
delete node;
|
delete node;
|
||||||
}
|
}
|
||||||
if (!hover)
|
if (!hover)
|
||||||
@@ -3461,21 +3461,21 @@ void wxDataViewMainWindow::OnMouse( wxMouseEvent &event )
|
|||||||
bool expander = false;
|
bool expander = false;
|
||||||
if (GetOwner()->GetExpanderColumn() == col)
|
if (GetOwner()->GetExpanderColumn() == col)
|
||||||
{
|
{
|
||||||
wxDataViewTreeNode * node = GetTreeNodeByRow(current);
|
wxDataViewTreeNode * node = GetTreeNodeByRow(current);
|
||||||
if( node!=NULL && node->HasChildren() )
|
if( node!=NULL && node->HasChildren() )
|
||||||
{
|
{
|
||||||
int indent = node->GetIndentLevel();
|
int indent = node->GetIndentLevel();
|
||||||
indent = GetOwner()->GetIndent()*indent;
|
indent = GetOwner()->GetIndent()*indent;
|
||||||
wxRect rect( xpos + indent + EXPANDER_MARGIN, current * m_lineHeight + EXPANDER_MARGIN, m_lineHeight-2*EXPANDER_MARGIN,m_lineHeight-2*EXPANDER_MARGIN);
|
wxRect rect( xpos + indent + EXPANDER_MARGIN, current * m_lineHeight + EXPANDER_MARGIN, m_lineHeight-2*EXPANDER_MARGIN,m_lineHeight-2*EXPANDER_MARGIN);
|
||||||
if( rect.Contains( x, y) )
|
if( rect.Contains( x, y) )
|
||||||
{
|
{
|
||||||
expander = true;
|
expander = true;
|
||||||
if( node->IsOpen() )
|
if( node->IsOpen() )
|
||||||
OnCollapsing(current);
|
OnCollapsing(current);
|
||||||
else
|
else
|
||||||
OnExpanding( current );
|
OnExpanding( current );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//If the user click the expander, we do not do editing even if the column with expander are editable
|
//If the user click the expander, we do not do editing even if the column with expander are editable
|
||||||
if (m_lastOnSame && !expander )
|
if (m_lastOnSame && !expander )
|
||||||
@@ -3965,7 +3965,7 @@ void wxDataViewCtrl::EnsureVisible( const wxDataViewItem & item, const wxDataVie
|
|||||||
if( row >= 0 )
|
if( row >= 0 )
|
||||||
{
|
{
|
||||||
if( column == NULL )
|
if( column == NULL )
|
||||||
return EnsureVisible(row, -1);
|
EnsureVisible(row, -1);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
int col = 0;
|
int col = 0;
|
||||||
|
Reference in New Issue
Block a user