#pragma once #include "WSMenu.h" #include #include class Process; class WSMenuBar { public: explicit WSMenuBar(Process&); ~WSMenuBar(); void add_menu(WSMenu* menu) { m_menus.append(menu); } template void for_each_menu(Callback callback) { for (auto& menu : m_menus) { if (!callback(*menu)) return; } } private: WeakPtr m_process; Vector m_menus; };