X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e94f3031736c1a23eba37892b4076893b1f6e416..616c0d1f3ac084bb92f0a75dc48812e8647f1b22:/include/wx/window.h?ds=sidebyside diff --git a/include/wx/window.h b/include/wx/window.h index 774be3539d..af1b4886ea 100644 --- a/include/wx/window.h +++ b/include/wx/window.h @@ -379,6 +379,13 @@ public: *h = s.y; } + // Determine the best size in the other direction if one of them is + // fixed. This is used with windows that can wrap their contents and + // returns input-independent best size for the others. + int GetBestHeight(int width) const; + int GetBestWidth(int height) const; + + void SetScrollHelper( wxScrollHelper *sh ) { m_scrollHelper = sh; } wxScrollHelper *GetScrollHelper() { return m_scrollHelper; } @@ -740,6 +747,10 @@ public: // is this window a top level one? virtual bool IsTopLevel() const; + // is this window a child or grand child of this one (inside the same + // TLW)? + bool IsDescendant(wxWindowBase* win) const; + // it doesn't really change parent, use Reparent() instead void SetParent( wxWindowBase *parent ) { m_parent = (wxWindow *)parent; } // change the real parent of this window, return true if the parent @@ -1683,6 +1694,14 @@ protected: // (GetBorderSize() will be used to add them) virtual wxSize DoGetBestClientSize() const { return wxDefaultSize; } + // These two methods can be overridden to implement intelligent + // width-for-height and/or height-for-width best size determination for the + // window. By default the fixed best size is used. + virtual int DoGetBestClientHeight(int WXUNUSED(width)) const + { return wxDefaultCoord; } + virtual int DoGetBestClientWidth(int WXUNUSED(height)) const + { return wxDefaultCoord; } + // this is the virtual function to be overridden in any derived class which // wants to change how SetSize() or Move() works - it is called by all // versions of these functions in the base class