[wx-dev] [wxMac?] Zoom Size
Vadim Zeitlin
vadim at wxwindows.org
Sun Mar 4 11:14:51 PST 2007
On Sun, 4 Mar 2007 11:12:25 -0500 Ryan Wilcox <ryanwilcox at mac.com> wrote:
RW> Right now zooming a (top level) window on wxMac means the window takes
RW> up the entire screen - absolutely not what my application wants (nor
RW> should that be the desired size for any other rightly written Mac
RW> application). See the HIG notes on this at <http://tinyurl.com/cpf5v>
RW>
RW> I have a patch in progress to add this functionality to wxWidgets, but
RW> I have a question on how to retrieve the suggested size from the top
RW> level window subclass: should I create a method like
RW> GetSize()/GetClientSize(), or create a wxZOOM_SIZE event?
I don't think we should use events here as we don't use them for anything
related to determining the window sizes anywhere else. So it would be
better to have Set/GetAcceptableMaxSize() (please note that we shouldn't
use words like "best" here to avoid confusion with the existing functions
and that it should be explained in both the docs and the comments what
these functions are for in a way clear even for people who have no idea
about Macs).
However I wonder if SetAcceptableMaxSize() is needed at all in fact.
AFAICS this size would be normally computed from the current contents of
the window and so IMO it doesn't make much sense to set it. Instead what
about just adding virtual GetAcceptableMaxSize() returning wxDefaultSize by
default but which could be overridden and would be used by wxMac?
Thanks,
VZ
More information about the wx-dev
mailing list