-void wxInfoBarGeneric::ChangeParentBackground()
-{
- wxWindow * const parent = GetParent();
- m_origParentBgCol = parent->GetBackgroundColour();
-
- wxSizer * const sizer = GetContainingSizer();
- if ( !sizer )
- return;
-
- wxWindow *sibling = NULL;
- for ( wxSizerItemList::compatibility_iterator
- node = sizer->GetChildren().GetFirst();
- node;
- node = node->GetNext() )
- {
- if ( node->GetData()->GetWindow() == this )
- {
- // find the next window following us
- for ( node = node->GetNext();
- node;
- node = node->GetNext() )
- {
- wxSizerItem * const item = node->GetData();
- if ( item->IsWindow() )
- {
- sibling = item->GetWindow();
- break;
- }
- }
-
- break;
- }
- }
-
- if ( sibling )
- parent->SetOwnBackgroundColour(sibling->GetBackgroundColour());
-}
-
-void wxInfoBarGeneric::RestoreParentBackground()
-{
- GetParent()->SetOwnBackgroundColour(m_origParentBgCol);
-}
-