diff --git a/cmd/macfe/rdfui/CHyperTreeFlexTable.cp b/cmd/macfe/rdfui/CHyperTreeFlexTable.cp index f27e01e8eb13..55dd4bd45c3d 100644 --- a/cmd/macfe/rdfui/CHyperTreeFlexTable.cp +++ b/cmd/macfe/rdfui/CHyperTreeFlexTable.cp @@ -1538,4 +1538,54 @@ CHyperTreeSelector :: SyncSelectorWithHT ( ) curr = HT_GetNextSelection(mTreeView, curr); } -} // SyncSelectorWithHT \ No newline at end of file +} // SyncSelectorWithHT + + +#pragma mark - + +CPopdownFlexTable :: CPopdownFlexTable ( LStream* inStream ) + : CHyperTreeFlexTable(inStream) +{ + +} + + +CPopdownFlexTable :: ~CPopdownFlexTable ( ) +{ +} + + +// +// OpenRow +// +// Do the normal thing, but close up the tree afterwards. +// +void +CPopdownFlexTable :: OpenRow ( TableIndexT inRow ) +{ + CHyperTreeFlexTable::OpenRow(inRow); + BroadcastMessage ( msg_ClosePopdownTree, NULL ); + +} // OpenRow + +#if 0 +// +// OpenSelection +// +// The inherited version of this routine iterates over the selection and opens each row in +// turn. The problem, as you may be able to see from OpenRow() above, is that as soon as +// we open a row, the tree goes away. Guess what then happens when it tries to fetch the +// next selected row from a tree that has been obliterated.... +// +// To avoid this nasty happening, only open the first selected item we encounter, even if +// many things are selected. What would it mean to open all of them in the browser window +// anyway? +// +void +CPopdownFlexTable :: OpenSelection() +{ + TableIndexT selectedRow = 0; + if ( GetNextSelectedRow(selectedRow) && !CmdPeriod() ) + OpenRow(selectedRow); +} +#endif \ No newline at end of file diff --git a/cmd/macfe/rdfui/CHyperTreeFlexTable.h b/cmd/macfe/rdfui/CHyperTreeFlexTable.h index 2134d4ddabcd..0e43b53b647b 100644 --- a/cmd/macfe/rdfui/CHyperTreeFlexTable.h +++ b/cmd/macfe/rdfui/CHyperTreeFlexTable.h @@ -196,4 +196,32 @@ protected: HT_View mTreeView; -}; // class CHyperTreeSelector \ No newline at end of file +}; // class CHyperTreeSelector + + +#pragma mark -- class CPopdownFlexTable -- + + +// +// class CPopdownFlexTable +// +// The flex table used by the popdown view. It needs to broadcast some messages to the +// coordinator (such as when to close up) and do funny things to handle closing when +// items are opened. +// + +class CPopdownFlexTable : public CHyperTreeFlexTable +{ +public: + enum { class_ID = 'pdFT' }; + enum { msg_ClosePopdownTree = 'clos' }; + + CPopdownFlexTable(LStream *inStream); + ~CPopdownFlexTable(); + +private: + +// void OpenSelection(); + void OpenRow ( TableIndexT inRow ) ; + +}; // class CPopdownFlexTable \ No newline at end of file