Tracker: Reimplement BSlowContextPopup as BPopUpNavMenu.

BSlowContextPopup was mostly a duplicate class of BNavMenu
only on top of BPopUpMenu instead of BMenu. Now, BPopUpNavMenu
just subclasses BNavMenu and adds the few features of BPopUpMenu
neccessary.

Drag-and-drop of files using the pop-up nav menu seems to still work fine.

Change-Id: Ic1f49c5bed60fff7a3076a22f74aebc6eba51d57
This commit is contained in:
Augustin Cavalier
2023-08-30 17:04:24 -04:00
parent 18ee9c8397
commit 8e8c7a073f
7 changed files with 107 additions and 707 deletions
+24
View File
@@ -148,6 +148,30 @@ protected:
TrackingHookData fTrackingHook;
};
class BPopUpNavMenu : public BNavMenu {
public:
BPopUpNavMenu(const char* title);
~BPopUpNavMenu();
void ClearMenu();
void Go(BPoint where);
bool IsShowing() const;
protected:
BPoint ScreenLocation();
private:
void _WaitForTrackThread();
static int32 _TrackThread(void* menu);
private:
BPoint fWhere;
thread_id fTrackThread;
};
// Spring Loaded Folder convenience routines
// used in both Tracker and Deskbar
#ifndef _IMPEXP_TRACKER