program.hpp 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. struct Panel : VerticalLayout {
  2. using VerticalLayout::VerticalLayout;
  3. };
  4. using View = HorizontalLayout;
  5. #include "system-selection.hpp"
  6. #include "home.hpp"
  7. #include "game-manager.hpp"
  8. #include "game-importer.hpp"
  9. struct ProgramWindow : Window {
  10. ProgramWindow();
  11. auto show(Panel&) -> void;
  12. auto hide(Panel&) -> void;
  13. MenuBar menuBar{this};
  14. Menu actionMenu{&menuBar};
  15. MenuItem quitAction{&actionMenu};
  16. Menu settingsMenu{&menuBar};
  17. MenuCheckItem createManifests{&settingsMenu};
  18. MenuCheckItem useDatabase{&settingsMenu};
  19. MenuCheckItem useHeuristics{&settingsMenu};
  20. Menu helpMenu{&menuBar};
  21. MenuItem aboutAction{&helpMenu};
  22. HorizontalLayout panels{this};
  23. SystemSelection systemSelection{&panels};
  24. HorizontalResizeGrip resizeGrip{&panels, Size{7, ~0}};
  25. Home home{&panels};
  26. GameManager gameManager{&panels};
  27. GameImporter gameImporter{&panels};
  28. maybe<Panel&> activePanel;
  29. float resizeWidth = 0;
  30. };
  31. namespace Instances { extern Instance<ProgramWindow> programWindow; }
  32. extern ProgramWindow& programWindow;