// Author: Peter Cawley
// Modified by:
// Created: 2009-06-05
-// RCS-ID: $Id$
// Copyright: (C) Peter Cawley
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#if wxUSE_RIBBON
#include "wx/ribbon/control.h"
+#include "wx/ribbon/bar.h"
#ifndef WX_PRECOMP
#endif
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