New RowIsContainer method which can replace CellHasDropFlag to determine if the row is a container and if it is currently expanded or collapsed. Fixed auto-expand d&d to use this instead of CellHasDropFlag so it will still autoexpand when drop flags are not used.
git-svn-id: svn://10.0.0.236/trunk@8728 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -1909,7 +1909,7 @@ void CStandardFlexTable::InsideDropArea(DragReference inDragRef)
|
||||
// the user's holding the mouse down on this row, & we just noticed
|
||||
STableCell cell(mDropRow, GetHiliteColumn());
|
||||
Boolean expanded;
|
||||
if (CellHasDropFlag(cell, expanded) && !expanded)
|
||||
if (RowIsContainer(mDropRow, &expanded) && !expanded)
|
||||
{
|
||||
SetCellExpansion(cell, true);
|
||||
// The revealed rows should be there now, just draw them.
|
||||
@@ -2623,6 +2623,21 @@ void CStandardFlexTable::ClickCountToOpen ( Uint16 inNewCount )
|
||||
} // CStandardFlexTable::TableSupportsNaturalOrderSort
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------------------
|
||||
Boolean
|
||||
CStandardFlexTable :: RowIsContainer( const TableIndexT & inRow, Boolean* outIsExpanded ) const
|
||||
// Default implementation, just returns false.
|
||||
//----------------------------------------------------------------------------------------
|
||||
{
|
||||
Assert_(outIsExpanded != NULL);
|
||||
if ( outIsExpanded )
|
||||
*outIsExpanded = false;
|
||||
|
||||
return false;
|
||||
|
||||
} // RowIsContainer
|
||||
|
||||
|
||||
#pragma mark -
|
||||
#if defined(QAP_BUILD)
|
||||
|
||||
|
||||
@@ -369,6 +369,8 @@ protected:
|
||||
TableIndexT inDropRow);
|
||||
virtual Boolean RowIsContainer(
|
||||
const TableIndexT & /* inRow */ ) const { return false; }
|
||||
virtual Boolean RowIsContainer(
|
||||
const TableIndexT & /* inRow */, Boolean* /*outIsExpanded*/ ) const ;
|
||||
void ComputeItemDropAreas(
|
||||
const Rect& inLocalCellRect,
|
||||
Rect& outTop,
|
||||
|
||||
Reference in New Issue
Block a user