]> git.saurik.com Git - wxWidgets.git/blobdiff - src/ribbon/control.cpp
Fixed some warnings
[wxWidgets.git] / src / ribbon / control.cpp
index d80449445e475324f2a7f75f83998cbf3b9bfa77..9867ecf7d28d18426b573edd759c333c9ea3b02a 100644 (file)
@@ -18,6 +18,7 @@
 #if wxUSE_RIBBON
 
 #include "wx/ribbon/control.h"
+#include "wx/ribbon/bar.h"
 
 #ifndef WX_PRECOMP
 #endif
@@ -109,4 +110,16 @@ bool wxRibbonControl::Realize()
     return true;
 }
 
+wxRibbonBar* wxRibbonControl::GetAncestorRibbonBar()const
+{
+    for ( wxWindow* win = GetParent(); win; win = win->GetParent() )
+    {
+        wxRibbonBar* bar = wxDynamicCast(win, wxRibbonBar);
+        if ( bar )
+            return bar;
+    }
+
+    return NULL;
+}
+
 #endif // wxUSE_RIBBON