window.hpp 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. #if defined(Hiro_Window)
  2. namespace hiro {
  3. struct pWindow : pObject {
  4. Declare(Window, Object)
  5. auto append(sMenuBar menuBar) -> void;
  6. auto append(sSizable sizable) -> void;
  7. auto append(sStatusBar statusBar) -> void;
  8. auto focused() const -> bool override;
  9. auto frameMargin() const -> Geometry;
  10. auto handle() const -> uintptr_t;
  11. auto monitor() const -> uint;
  12. auto remove(sMenuBar menuBar) -> void;
  13. auto remove(sSizable sizable) -> void;
  14. auto remove(sStatusBar statusBar) -> void;
  15. auto setBackgroundColor(Color color) -> void;
  16. auto setDismissable(bool dismissable) -> void;
  17. auto setDroppable(bool droppable) -> void;
  18. auto setEnabled(bool enabled) -> void override;
  19. auto setFocused() -> void override;
  20. auto setFullScreen(bool fullScreen) -> void;
  21. auto setGeometry(Geometry geometry) -> void;
  22. auto setMaximized(bool maximized) -> void;
  23. auto setMaximumSize(Size size) -> void;
  24. auto setMinimized(bool minimized) -> void;
  25. auto setMinimumSize(Size size) -> void;
  26. auto setModal(bool modal) -> void;
  27. auto setResizable(bool resizable) -> void;
  28. auto setTitle(const string& text) -> void;
  29. auto setVisible(bool visible) -> void;
  30. auto _append(mWidget& widget) -> void;
  31. auto _menuHeight() const -> uint;
  32. auto _menuTextHeight() const -> uint;
  33. auto _statusHeight() const -> uint;
  34. auto _statusTextHeight() const -> uint;
  35. auto _updateFrameGeometry() -> void;
  36. QtWindow* qtWindow = nullptr;
  37. QVBoxLayout* qtLayout = nullptr;
  38. QMenuBar* qtMenuBar = nullptr;
  39. QStatusBar* qtStatusBar = nullptr;
  40. QWidget* qtContainer = nullptr;
  41. Geometry windowedGeometry{128, 128, 256, 256};
  42. };
  43. }
  44. #endif