/***************************************************************************** Put click exapansion on down rather than up because OnClick() will not be called if a TitleTip is showing *****************************************************************************/ void CGridTreeCellBase::OnClickDown( CPoint PointCellRelative) { ASSERT( m_pTreeColumn != NULL); if( TreeHitPlusMinus( PointCellRelative) ) // relative coordinates of mouse click { // returns: T=hit a plus or minus; F=Missed it or tree cell has no plus or minus m_pTreeColumn->TreeExpandCollapseToggle( m_iRow); // Grid row of node to toggle } }
void CGridTreeBtnCell::OnClickDown( CPoint PointCellRelative) { ASSERT( m_pTreeColumn != NULL); if( TreeHitPlusMinus( PointCellRelative) ) // relative coordinates of mouse click { // returns: T=hit a plus or minus; F=Missed it or tree cell has no plus or minus m_pTreeColumn->TreeExpandCollapseToggle( m_iRow); // Grid row of node to toggle return; } PointCellRelative.x -= GetTreeIndent(); // adjust point clicked to account for tree m_GridBtnCell.OnClickDown( PointCellRelative); }
void CGridTreeCellBase::OnDblClick( CPoint PointCellRelative) { ASSERT( m_pTreeColumn != NULL); if( GetState() & GVIS_READONLY || !m_pTreeColumn->GetGrid()->IsEditable() ) { if( TreeHitPlusMinus( PointCellRelative) ) // relative coordinates of mouse click { // returns: T=hit a plus or minus; F=Missed it or tree cell has no plus or minus m_pTreeColumn->TreeExpandCollapseToggle( m_iRow); // Grid row of node to toggle } } }
void CGridTreeBtnCell::OnDblClick( CPoint PointCellRelative) { ASSERT( m_pTreeColumn != NULL); if( GetState() & GVIS_READONLY || !m_pTreeColumn->GetGrid()->IsEditable() ) { if( !TreeHitPlusMinus( PointCellRelative) ) // relative coordinates of mouse click { // returns: T=hit a plus or minus; F=Missed it or tree cell has no plus or minus m_pTreeColumn->TreeExpandCollapseToggle( m_iRow); // Grid row of node to toggle return; } } PointCellRelative.x -= GetTreeIndent(); // adjust point clicked to account for tree m_GridBtnCell.OnDblClick( PointCellRelative); }