Added RowIsContainer() with additional param to say if container is open or closed.

This commit is contained in:
pinkerton%netscape.com 1998-08-28 20:34:43 +00:00
parent 376777a1d3
commit 46227e6eb6
2 changed files with 32 additions and 2 deletions

View File

@ -947,6 +947,35 @@ CHyperTreeFlexTable :: RowIsContainer ( const TableIndexT & inRow ) const
} // RowIsContainer
//
// RowIsContainer
//
// Same as above, but also tells us if the container is open.
//
Boolean
CHyperTreeFlexTable :: RowIsContainer( const TableIndexT & inRow, Boolean* outIsExpanded ) const
{
Assert_(outIsExpanded != NULL);
if ( outIsExpanded )
*outIsExpanded = false;
else
return false;
if ( RowIsContainer(inRow) ) {
HT_Resource node = HT_GetNthItem(GetHTView(), URDFUtilities::PPRowToHTRow(inRow) );
if ( node ) {
PRBool openState;
if ( HT_GetOpenState(node, &openState) == HT_NoErr )
*outIsExpanded = openState;
}
return true;
}
else
return false;
} // RowIsContainer
//
// HiliteDropRow
//

View File

@ -75,7 +75,7 @@ public:
virtual void RedrawRow ( HT_Resource ) ;
virtual void SetupColumns ( ) ;
protected:
// Background image tiling stuff
@ -92,7 +92,8 @@ protected:
virtual Boolean RowCanAcceptDrop ( DragReference inDragRef, TableIndexT inDropRow ) ;
virtual Boolean RowCanAcceptDropBetweenAbove( DragReference inDragRef, TableIndexT inDropRow ) ;
virtual void HiliteDropRow ( TableIndexT inRow, Boolean inDrawBarAbove ) ;
virtual Boolean RowIsContainer ( const TableIndexT & /* inRow */ ) const ;
virtual Boolean RowIsContainer ( const TableIndexT & inRow ) const ;
virtual Boolean RowIsContainer ( const TableIndexT & inRow, Boolean* outIsExpanded ) const ;
virtual void DrawCellContents( const STableCell &inCell, const Rect &inLocalRect);
virtual void EraseCellBackground( const STableCell& inCell, const Rect& inLocalRect);
virtual ResIDT GetIconID(TableIndexT inRow) const;