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


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

本文整理汇总了C++中TSharedRef::GetContent方法的典型用法代码示例。如果您正苦于以下问题:C++ TSharedRef::GetContent方法的具体用法?C++ TSharedRef::GetContent怎么用?C++ TSharedRef::GetContent使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TSharedRef的用法示例。


在下文中一共展示了TSharedRef::GetContent方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: PushMenu

	void PushMenu(TSharedRef<FMenuBase> InMenu, const FVector2D& InLocation)
	{
		check(InMenu->GetContent().IsValid());

		TSharedPtr<SWindow> ParentWindow = InMenu->GetParentWindow();
		check(ParentWindow.IsValid());

		// Transform InLocation into a position local to this panel (assumes the panel is in an overlay that covers the whole of the panel window) 
		FVector2D PanelInScreen = ParentWindow->GetRectInScreen().GetTopLeft();
		FVector2D PanelInWindow = ParentWindow->GetLocalToScreenTransform().Inverse().TransformPoint(PanelInScreen);
		FVector2D LocationInWindow = ParentWindow->GetLocalToScreenTransform().Inverse().TransformPoint(InLocation);
		FVector2D LocationInPanel = LocationInWindow - PanelInWindow;

		// Add the new menu into a slot on this panel and set the padding so that its position is correct
		AddSlot()
		.HAlign(HAlign_Left)
		.VAlign(VAlign_Top)
		.Padding(LocationInPanel.X, LocationInPanel.Y, 0, 0)
		[
			InMenu->GetContent().ToSharedRef()
		];

		// Make sure that the menu will remove itself from the panel when dismissed
		InMenu->GetOnMenuDismissed().AddSP(this, &SMenuPanel::OnMenuClosed);
	}
开发者ID:amyvmiwei,项目名称:UnrealEngine4,代码行数:25,代码来源:MenuStack.cpp

示例2: InvokeSizeMapTab

	virtual void InvokeSizeMapTab(const TArray<FName>& AssetPackageNames) override
	{
		TSharedRef<SDockTab> NewTab = FGlobalTabmanager::Get()->InvokeTab( SizeMapTabId );
		TSharedRef<SSizeMap> SizeMap = StaticCastSharedRef<SSizeMap>( NewTab->GetContent() );
		SizeMap->SetRootAssetPackageNames( AssetPackageNames );
	}
开发者ID:PickUpSU,项目名称:UnrealEngine4,代码行数:6,代码来源:SizeMapModule.cpp

示例3: InvokeReferenceViewerTab

	virtual void InvokeReferenceViewerTab(const TArray<FName>& GraphRootPackageNames) override
	{
		TSharedRef<SDockTab> NewTab = FGlobalTabmanager::Get()->InvokeTab( ReferenceViewerTabId );
		TSharedRef<SReferenceViewer> ReferenceViewer = StaticCastSharedRef<SReferenceViewer>( NewTab->GetContent() );
		ReferenceViewer->SetGraphRootPackageNames(GraphRootPackageNames);
	}
开发者ID:1vanK,项目名称:AHRUnrealEngine,代码行数:6,代码来源:ReferenceViewer.cpp

示例4: OnMenuClosed

	void OnMenuClosed(TSharedRef<IMenu> InMenu)
	{
		RemoveSlot(InMenu->GetContent().ToSharedRef());
	}
开发者ID:amyvmiwei,项目名称:UnrealEngine4,代码行数:4,代码来源:MenuStack.cpp


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