]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/wincmn.cpp
Don't define wxArrayPGProperty as std::vector in STL build.
[wxWidgets.git] / src / common / wincmn.cpp
index b337a659e4e41693d1ced64483f4e2b276ca3596..d36b727cf0d97187cee33e5343d32a86ab08ba83 100644 (file)
@@ -474,7 +474,7 @@ static bool wxHasRealChildren(const wxWindowBase* win)
           node = node->GetNext() )
     {
         wxWindow *win = node->GetData();
           node = node->GetNext() )
     {
         wxWindow *win = node->GetData();
-        if ( !win->IsTopLevel() && win->IsShown() 
+        if ( !win->IsTopLevel() && win->IsShown()
 #if wxUSE_SCROLLBAR
             && !win->IsKindOf(CLASSINFO(wxScrollBar))
 #endif
 #if wxUSE_SCROLLBAR
             && !win->IsKindOf(CLASSINFO(wxScrollBar))
 #endif
@@ -896,6 +896,20 @@ void wxWindowBase::SendSizeEventToParent(int flags)
         parent->SendSizeEvent(flags);
 }
 
         parent->SendSizeEvent(flags);
 }
 
+bool wxWindowBase::HasScrollbar(int orient) const
+{
+    // if scrolling in the given direction is disabled, we can't have the
+    // corresponding scrollbar no matter what
+    if ( !CanScroll(orient) )
+        return false;
+
+    const wxSize sizeVirt = GetVirtualSize();
+    const wxSize sizeClient = GetClientSize();
+
+    return orient == wxHORIZONTAL ? sizeVirt.x > sizeClient.x
+                                  : sizeVirt.y > sizeClient.y;
+}
+
 // ----------------------------------------------------------------------------
 // show/hide/enable/disable the window
 // ----------------------------------------------------------------------------
 // ----------------------------------------------------------------------------
 // show/hide/enable/disable the window
 // ----------------------------------------------------------------------------