settings.hpp 977 B

1234567891011121314151617181920212223242526272829
  1. namespace hiro {
  2. struct Settings {
  3. Settings();
  4. ~Settings();
  5. //Windows 8+ draws windows with almost no visible borders
  6. //to allow resizing the window, the OS places transparent margins around each window
  7. //this causes AdjustFrameRect and SetWindowPos to hold values larger than the actual window
  8. //as a result, attempts to call Window::setAlignment(Window) fail to position windows correctly
  9. //pWindow::setVisible() attempts to compute the actual window bounds to correct Window::frameMargin()
  10. //note: different window styles have different extended frame bounds
  11. struct ExtendedFrameBounds {
  12. uint x = 0;
  13. uint y = 0;
  14. uint width = 0;
  15. uint height = 0;
  16. };
  17. //these are the default values for Windows 10 ... they will be updated later if they are incorrect
  18. ExtendedFrameBounds efbPopup { 0, 0, 0, 0};
  19. ExtendedFrameBounds efbFixed { 2, 0, 4, 2};
  20. ExtendedFrameBounds efbResizable{10, 0, 20, 10};
  21. };
  22. static Settings settings;
  23. }