From fa4316d9ccf9198ccea138d60fbd1481d01b7e03 Mon Sep 17 00:00:00 2001 From: "pinkerton%netscape.com" Date: Tue, 28 Jul 1998 00:44:27 +0000 Subject: [PATCH] Added clickCountToOpen() and made some methods const. --- lib/mac/UserInterface/Tables/CStandardFlexTable.cp | 10 ++++------ lib/mac/UserInterface/Tables/CStandardFlexTable.h | 6 ++++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/mac/UserInterface/Tables/CStandardFlexTable.cp b/lib/mac/UserInterface/Tables/CStandardFlexTable.cp index f60cad6a0bd5..c017c1ff2360 100755 --- a/lib/mac/UserInterface/Tables/CStandardFlexTable.cp +++ b/lib/mac/UserInterface/Tables/CStandardFlexTable.cp @@ -886,16 +886,14 @@ Boolean CStandardFlexTable::ClickSelect( // user to double-click anywhere on the item to open it, like in the Finder. // Doing a double-click to edit an item doesn't make sense and the user // would get confused. - // ¥¥¥Double click check doesn't work right now.....will fix later....¥¥¥ - // open selection if we've got the right click count if (clickIsInTitle && mNameEditor && !(inMouseDown.macEvent.modifiers & shiftKey) && GetClickCount() != 2) - CDeferredTaskManager::Post1( + CDeferredTaskManager::Post( new CDeferredInlineEditTask(this, inCell, textRect), - this); - if (GetClickCount() == mClickCountToOpen) + this, true); + if (GetClickCount() == ClickCountToOpen()) { // Cancel inline editing. Probably redundant. if (mNameEditor) @@ -942,7 +940,7 @@ Boolean CStandardFlexTable::ClickSelect( else { // open selection if we've got the right click count - if (GetClickCount() == mClickCountToOpen) + if (GetClickCount() == ClickCountToOpen()) OpenSelection(); } } diff --git a/lib/mac/UserInterface/Tables/CStandardFlexTable.h b/lib/mac/UserInterface/Tables/CStandardFlexTable.h index 414cc3edabb2..a96d66a32d24 100755 --- a/lib/mac/UserInterface/Tables/CStandardFlexTable.h +++ b/lib/mac/UserInterface/Tables/CStandardFlexTable.h @@ -188,12 +188,14 @@ protected: virtual Boolean HitCellHotSpot( const STableCell &inCell, const Rect &inTotalSelectionRect ) ; + virtual Uint16 ClickCountToOpen ( ) const { return mClickCountToOpen; } + // the the cell rect in local coords even if scrolled out the the view virtual void GetLocalCellRectAnywhere( const STableCell &inCell, Rect &outCellRect) const; virtual void UnselectCellsNotInSelectionOutline( const Rect & selectionRect ) ; // override to turn off selection outline tracking - virtual Boolean TableDesiresSelectionTracking( ) { return true; } + virtual Boolean TableDesiresSelectionTracking( ) const { return true; } virtual const TableIndexT* GetUpdatedSelectionList(TableIndexT& outSelectionSize); // Returns a ONE-BASED list of TableIndexT, as it should. @@ -230,7 +232,7 @@ protected: virtual void InlineEditorTextChanged( ) { } virtual void InlineEditorDone( ) { } virtual void DoInlineEditing( const STableCell &inCell, Rect & inTextRect ); - virtual Boolean CanDoInlineEditing( ) { return true; } + virtual Boolean CanDoInlineEditing( ) const { return true; } virtual void DrawCell( const STableCell &inCell,