[RFE] Constrain window resizing

Started by Simon Felix, December 29, 2011, 13:20:23

Previous topic - Next topic

Simon Felix

Hey :)

I'd like to constrain the window resizing possible by the user. Things like minimum and maximum width/height would be nice. Also, I could really use an aspect-ratio lock - that way I just had to rescale the window contents.

Cheers,
Simon
Download Cultris II, the fastest Tetris clone from http://gewaltig.net/

Matzon

hmm, not completely sure how that would be done... I assume we could just respond to the events on windows, but not sure about linux and mac. anyone?

Simon Felix

Yup. It seems that WM_GETMINMAXINFO (http://msdn.microsoft.com/en-us/library/windows/desktop/ms632626(v=vs.85).aspx) and WM_SIZING (http://msdn.microsoft.com/en-us/library/windows/desktop/ms632647(v=VS.85).aspx) are the relevant events for Windows.

I'm mainly looking for a way to constrain the aspect ratio. People on the IRC argued yesterday that I should use a layout mechanism to handle various aspect ratios - but this is not a real solution in all cases. But maybe I'm the only one having this problem?
Download Cultris II, the fastest Tetris clone from http://gewaltig.net/