mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-21 09:49:14 +00:00
Added RowIsContainer() with additional param to say if container is open or closed.
This commit is contained in:
parent
376777a1d3
commit
46227e6eb6
@ -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
|
||||
//
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user