core/menu: add QsMenuAnchor for more control of platform menus

This commit is contained in:
outfoxxed 2024-07-25 20:44:26 -07:00
parent 54350277be
commit 6b9b1fcb53
Signed by untrusted user: outfoxxed
GPG key ID: 4C88A185FB89301E
10 changed files with 245 additions and 21 deletions

View file

@ -13,6 +13,7 @@
#include <qtclasshelpermacros.h>
#include <qtmetamacros.h>
#include "popupanchor.hpp"
#include "qsmenu.hpp"
namespace qs::menu::platform {
@ -38,6 +39,7 @@ public:
Q_DISABLE_COPY_MOVE(PlatformMenuEntry);
bool display(QObject* parentWindow, int relativeX, int relativeY);
bool display(PopupAnchor* anchor);
static void registerCreationHook(std::function<void(PlatformMenuQMenu*)> hook);