window.hpp 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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& title) -> void;
  29. auto setVisible(bool visible) -> void override;
  30. auto _append(mWidget& widget) -> void;
  31. auto _append(mMenu& menu) -> void;
  32. auto _menuHeight() const -> int;
  33. auto _menuTextHeight() const -> int;
  34. auto _setIcon(const string& basename) -> bool;
  35. auto _setMenuEnabled(bool enabled) -> void;
  36. auto _setMenuFont(const Font& font) -> void;
  37. auto _setMenuVisible(bool visible) -> void;
  38. auto _setStatusEnabled(bool enabled) -> void;
  39. auto _setStatusFont(const Font& font) -> void;
  40. auto _setStatusText(const string& text) -> void;
  41. auto _setStatusVisible(bool visible) -> void;
  42. auto _statusHeight() const -> int;
  43. auto _statusTextHeight() const -> int;
  44. auto _synchronizeGeometry() -> void;
  45. auto _synchronizeMargin() -> void;
  46. auto _synchronizeState() -> void;
  47. GtkWidget* widget = nullptr;
  48. GtkWidget* menuContainer = nullptr;
  49. GtkWidget* formContainer = nullptr;
  50. GtkWidget* statusContainer = nullptr;
  51. GtkWidget* gtkMenu = nullptr;
  52. GtkWidget* gtkStatus = nullptr;
  53. GtkAllocation lastMove = {0};
  54. GtkAllocation lastSize = {0};
  55. bool screenSaver = true;
  56. };
  57. }
  58. #endif