From 3958cd059f80f27fd45fa7fe3d502b70727ecc5f Mon Sep 17 00:00:00 2001 From: "pinkerton%netscape.com" Date: Fri, 28 Aug 1998 20:32:00 +0000 Subject: [PATCH] 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 --- .../UserInterface/Tables/CStandardFlexTable.cp | 17 ++++++++++++++++- .../UserInterface/Tables/CStandardFlexTable.h | 2 ++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/mozilla/lib/mac/UserInterface/Tables/CStandardFlexTable.cp b/mozilla/lib/mac/UserInterface/Tables/CStandardFlexTable.cp index 55357e73cf1..5eaad503c6d 100755 --- a/mozilla/lib/mac/UserInterface/Tables/CStandardFlexTable.cp +++ b/mozilla/lib/mac/UserInterface/Tables/CStandardFlexTable.cp @@ -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) diff --git a/mozilla/lib/mac/UserInterface/Tables/CStandardFlexTable.h b/mozilla/lib/mac/UserInterface/Tables/CStandardFlexTable.h index 556d466ee06..c1d91234856 100755 --- a/mozilla/lib/mac/UserInterface/Tables/CStandardFlexTable.h +++ b/mozilla/lib/mac/UserInterface/Tables/CStandardFlexTable.h @@ -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,