]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/scrolwin.cpp
Fix stc doxygen warnings and regen stc files.
[wxWidgets.git] / src / gtk / scrolwin.cpp
index 37cf570e1374587d47cf20ba3ab6fb164c25bf4b..9b39077a3dbcaa465dc06c2c63609c6803509be1 100644 (file)
@@ -181,6 +181,23 @@ GtkPolicyType GtkPolicyFromWX(wxScrollbarVisibility visibility)
 
 } // anonymous namespace
 
+bool wxScrollHelper::IsScrollbarShown(int orient) const
+{
+    GtkScrolledWindow * const scrolled = GTK_SCROLLED_WINDOW(m_win->m_widget);
+    if ( !scrolled )
+    {
+        // By default, all windows are scrollable.
+        return true;
+    }
+
+    GtkPolicyType hpolicy, vpolicy;
+    gtk_scrolled_window_get_policy(scrolled, &hpolicy, &vpolicy);
+
+    GtkPolicyType policy = orient == wxHORIZONTAL ? hpolicy : vpolicy;
+
+    return policy != GTK_POLICY_NEVER;
+}
+
 void wxScrollHelper::DoShowScrollbars(wxScrollbarVisibility horz,
                                       wxScrollbarVisibility vert)
 {