本文整理汇总了C++中TSharedRef::GetDockArea方法的典型用法代码示例。如果您正苦于以下问题:C++ TSharedRef::GetDockArea方法的具体用法?C++ TSharedRef::GetDockArea怎么用?C++ TSharedRef::GetDockArea使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TSharedRef
的用法示例。
在下文中一共展示了TSharedRef::GetDockArea方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CanDockInNode
bool FDockingDragOperation::CanDockInNode(const TSharedRef<SDockingNode>& DockNode, EViaTabwell IsDockingViaTabwell ) const
{
const TSharedRef<FTabManager> TargetTabManager = DockNode->GetDockArea()->GetTabManager();
const TSharedRef<FTabManager> TabManagerOfOrigin = this->TabOwnerAreaOfOrigin->GetTabManager();
if (TabBeingDragged->GetTabRole() == ETabRole::NomadTab)
{
if ( IsDockingViaTabwell == FDockingDragOperation::DockingViaTabWell )
{
// Nomad tabs can be docked in in any tab well.
return true;
}
else
{
return TargetTabManager != FGlobalTabmanager::Get();
}
}
else if (TabBeingDragged->GetTabRole() == ETabRole::MajorTab)
{
// Major tabs can only be stacked; they should not
// be allowed to split areas. They are also confined to their
// tab manager of origin.
// The only exception is an empty area, where docking the tab should be really easy.
const bool bTabManagerMatches = TargetTabManager == TabManagerOfOrigin;
const bool bCanDockInEmptyArea = DockNode->GetNodeType() == SDockingNode::DockArea && StaticCastSharedRef<SDockingArea>(DockNode)->GetChildNodes().Num() == 0;
return bTabManagerMatches && (IsDockingViaTabwell == FDockingDragOperation::DockingViaTabWell || bCanDockInEmptyArea);
}
else
{
// Most commonly, tabs are confined to their tab manager of origin.
return (TargetTabManager == TabManagerOfOrigin);
}
}
示例2: OnTabWellEntered
/**
* DragTestArea widgets invoke this method when a drag enters them
*
* @param ThePanel That tab well that we just dragged something into.
*/
void FDockingDragOperation::OnTabWellEntered( const TSharedRef<class SDockingTabWell>& ThePanel )
{
// We just pulled the tab into some TabWell (in some DockNode).
// Hide our decorator window and let the DockNode handle previewing what will happen if we drop the node.
HoveredTabPanelPtr = ThePanel;
CursorDecoratorWindow->HideWindow();
TabBeingDragged->SetDraggedOverDockArea( ThePanel->GetDockArea() );
}