当前位置: 首页>>代码示例>>C++>>正文


C++ TSharedRef::GetDockArea方法代码示例

本文整理汇总了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);
	}	
}
开发者ID:RandomDeveloperM,项目名称:UE4_Hairworks,代码行数:33,代码来源:FDockingDragOperation.cpp

示例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() );
}
开发者ID:RandomDeveloperM,项目名称:UE4_Hairworks,代码行数:14,代码来源:FDockingDragOperation.cpp


注:本文中的TSharedRef::GetDockArea方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。