X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/170acdc90e9f92f8b8120fa6c04acdbf45c89582..bb8bd6ef8a5b96c74f47ebe73a2fa877900ed67f:/include/wx/window.h diff --git a/include/wx/window.h b/include/wx/window.h index 3d39594bc4..04b76e9670 100644 --- a/include/wx/window.h +++ b/include/wx/window.h @@ -359,6 +359,7 @@ public: // returns the results. wxSize GetEffectiveMinSize() const; wxDEPRECATED( wxSize GetBestFittingSize() const ); // replaced by GetEffectiveMinSize + wxDEPRECATED( wxSize GetAdjustedMinSize() const ); // replaced by GetEffectiveMinSize // A 'Smart' SetSize that will fill in default size values with 'best' // size. Sets the minsize to what was passed in. @@ -383,8 +384,11 @@ public: virtual void FitInside(); - // Methods for setting size hints. This is only used - // for toplevel windows. + // SetSizeHints is actually for setting the size hints + // for the wxTLW for a Window Manager - hence the name - + // and it is therefore overridden in wxTLW to do that. + // In wxWindow(Base), it has (unfortunately) been abused + // to mean the same as SetMinSize() and SetMaxSize(). virtual void SetSizeHints( int minW, int minH, int maxW = wxDefaultCoord, int maxH = wxDefaultCoord, @@ -396,11 +400,9 @@ public: const wxSize& incSize=wxDefaultSize) { DoSetSizeHints(minSize.x, minSize.y, maxSize.x, maxSize.y, incSize.x, incSize.y); } - virtual void DoSetSizeHints( int WXUNUSED(minW), int WXUNUSED(minH), - int WXUNUSED(maxW), int WXUNUSED(maxH), - int WXUNUSED(incW), int WXUNUSED(incH) ) - { - } + virtual void DoSetSizeHints( int minW, int minH, + int maxW, int maxH, + int incW, int incH ); // Methods for setting virtual size hints // FIXME: What are virtual size hints? @@ -471,6 +473,11 @@ public: return wxSize( wxMax( client.x, best.x ), wxMax( client.y, best.y ) ); } + // return the size of the left/right and top/bottom borders in x and y + // components of the result respectively + virtual wxSize GetWindowBorderSize() const; + + // window state // ------------ @@ -499,9 +506,14 @@ public: void SetWindowStyle( long style ) { SetWindowStyleFlag(style); } long GetWindowStyle() const { return GetWindowStyleFlag(); } + // check if the flag is set bool HasFlag(int flag) const { return (m_windowStyle & flag) != 0; } virtual bool IsRetained() const { return HasFlag(wxRETAINED); } + // turn the flag on if it had been turned off before and vice versa, + // return true if the flag is currently turned on + bool ToggleWindowStyle(int flag); + // extra style: the less often used style bits which can't be set with // SetWindowStyleFlag() virtual void SetExtraStyle(long exStyle) { m_exStyle = exStyle; } @@ -1124,6 +1136,10 @@ public: // behaviour in the most common case virtual bool ShouldInheritColours() const { return false; } + // returns true if the window can be positioned outside of parent's client + // area (normal windows can't, but e.g. menubar or statusbar can): + virtual bool CanBeOutsideClientArea() const { return false; } + protected: // event handling specific to wxWindow virtual bool TryValidator(wxEvent& event);