/*============================================ SUMiscUtils::FindSibblingPaneByID ==============================================*/ LPane *SUMiscUtils::FindSibblingPaneByID( LPane *inPane, PaneIDT inPaneID ) { ThrowIfNil_( inPane ); LView *topView = SUMiscUtils::GetTopView( inPane ); ThrowIfNil_( topView ); return( topView->FindPaneByID( inPaneID ) ); }
void CPrintAttachment::SetOwnerHost(LAttachable* inOwnerHost) { LAttachment::SetOwnerHost(inOwnerHost); if (mBrowserShell == nil) { if (mBrowserShellPaneID != PaneIDT_Unspecified) { LView* container = GetTopmostView(dynamic_cast<LPane*>(mOwnerHost)); if (container != nil) { LPane* targetPane = container->FindPaneByID(mBrowserShellPaneID); if (targetPane != nil) mBrowserShell = dynamic_cast<CBrowserShell*>(targetPane); } } else mBrowserShell = dynamic_cast<CBrowserShell*>(mOwnerHost); Assert_(mBrowserShell != nil); // Programmer error } }