I have a large patcher window that needs to open to 1064x690 on both Mac and Windows (XP, Vista, and 7). Given that all of those platforms have different amounts of workarea because of their various menubars, windowframes, taskbars, etc., I'm trying to create some flexibility. Here are the things I need to have happen.
1. Window opens to 1064 x 690 BUT not at a predetermined location
2. User can make the window smaller than 1064x690, but not larger
3. If monitor resolution is larger than the window, the window fully opens to its fixed size of 1064x690 with no scroll bars
4. If monitor resolution is smaller than the window, the window fully opens, but with scroll bars
When I try to do this, these are the issues I run into.
1. I can make the window open to a fixed size with the window size message to [thispatcher] but that requires me to set the window location. Is it possible to just set the window size without setting the coordinates?
2. If I use the window constrain function, it always adds scroll bars to the patcher even if there is plenty of room on the desktop because it includes the width of the title bar in the measurement. I can offset the constrain value by the width of the title bar, but then I need to know the title bar's width and it is different on all the platforms.
Please take a look at this patcher for details.