X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f029f1d15b04dd70522008cdf105be87140fabc6..28dd9a9d035b5435897d626d1b57b4308daa0371:/include/wx/window.h diff --git a/include/wx/window.h b/include/wx/window.h index 218e2ce79e..33d33ce50d 100644 --- a/include/wx/window.h +++ b/include/wx/window.h @@ -449,12 +449,24 @@ public: virtual void SetMinSize(const wxSize& minSize) { m_minWidth = minSize.x; m_minHeight = minSize.y; } virtual void SetMaxSize(const wxSize& maxSize) { m_maxWidth = maxSize.x; m_maxHeight = maxSize.y; } + // Like Set*Size, but for client, not window, size + virtual void SetMinClientSize(const wxSize& size) + { SetMinSize(ClientToWindowSize(size)); } + virtual void SetMaxClientSize(const wxSize& size) + { SetMaxSize(ClientToWindowSize(size)); } + // Override these methods to impose restrictions on min/max size. // The easier way is to call SetMinSize() and SetMaxSize() which // will have the same effect. Doing both is non-sense. virtual wxSize GetMinSize() const { return wxSize(m_minWidth, m_minHeight); } virtual wxSize GetMaxSize() const { return wxSize(m_maxWidth, m_maxHeight); } + // Like Get*Size, but for client, not window, size + virtual wxSize GetMinClientSize() const + { return WindowToClientSize(GetMinSize()); } + virtual wxSize GetMaxClientSize() const + { return WindowToClientSize(GetMaxSize()); } + // Get the min and max values one by one int GetMinWidth() const { return GetMinSize().x; } int GetMinHeight() const { return GetMinSize().y; }