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


C++ FSpawnTabArgs::GetTabId方法代码示例

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


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

示例1: if

TSharedRef<SDockTab> FCurveAssetEditor::SpawnTab_CurveAsset( const FSpawnTabArgs& Args )
{
	check( Args.GetTabId().TabType == CurveTabId );

	ViewMinInput=0.f;
	ViewMaxInput=5.f;

	InputSnap = 0.1f;
	OutputSnap = 0.05f;

	TSharedRef<SDockTab> NewDockTab = SNew(SDockTab)
		.Icon( FEditorStyle::GetBrush("CurveAssetEditor.Tabs.Properties") )
		.Label( FText::Format(LOCTEXT("CurveAssetEditorTitle", "{0} Curve Asset"), FText::FromString(GetTabPrefix())))
		.TabColorScale( GetTabColorScale() )
		[
			SNew(SBorder)
			.BorderImage( FEditorStyle::GetBrush("ToolPanel.GroupBorder") )
			.Padding(0.0f)
			[
				SAssignNew(TrackWidget, SCurveEditor)
				.ViewMinInput(this, &FCurveAssetEditor::GetViewMinInput)
				.ViewMaxInput(this, &FCurveAssetEditor::GetViewMaxInput)
				.InputSnap(this, &FCurveAssetEditor::GetInputSnap)
				.OutputSnap(this, &FCurveAssetEditor::GetOutputSnap)
				.TimelineLength(this, &FCurveAssetEditor::GetTimelineLength)
				.OnSetInputViewRange(this, &FCurveAssetEditor::SetInputViewRange)
				.HideUI(false)
				.AlwaysDisplayColorCurves(true)
				.ShowZoomButtons(false)
			]
		];

	UCurveBase* Curve = Cast<UCurveBase>(GetEditingObject());
	UCurveFloat* FloatCurve = Cast<UCurveFloat>(Curve);
	UCurveVector* VectorCurve = Cast<UCurveVector>(Curve);
	UCurveLinearColor* LinearColorCurve = Cast<UCurveLinearColor>(Curve);

	FCurveOwnerInterface* CurveOwner = NULL;
	if(FloatCurve != NULL)
	{
		CurveOwner = FloatCurve;
	}
	else if(LinearColorCurve != NULL)
	{
		CurveOwner = LinearColorCurve;
	}
	else
	{
		CurveOwner = VectorCurve;
	}

	if (CurveOwner != NULL)
	{
		check(TrackWidget.IsValid());
		// Set this curve as the SCurveEditor's selected curve
		TrackWidget->SetCurveOwner(CurveOwner);
	}

	return NewDockTab;
}
开发者ID:1vanK,项目名称:AHRUnrealEngine,代码行数:60,代码来源:CurveAssetEditor.cpp

示例2: SNew

TSharedRef<SDockTab> FContentBrowserSingleton::SpawnContentBrowserTab( const FSpawnTabArgs& SpawnTabArgs, int32 BrowserIdx )
{	
	TAttribute<FText> Label = TAttribute<FText>::Create( TAttribute<FText>::FGetter::CreateRaw( this, &FContentBrowserSingleton::GetContentBrowserTabLabel, BrowserIdx ) );

	TSharedRef<SDockTab> NewTab = SNew(SDockTab)
		.TabRole(ETabRole::NomadTab)
		.Label( Label )
		.ToolTip( IDocumentation::Get()->CreateToolTip( Label, nullptr, "Shared/ContentBrowser", "Tab" ) );

	TSharedRef<SContentBrowser> NewBrowser =
		SNew( SContentBrowser, SpawnTabArgs.GetTabId().TabType )
		.IsEnabled( FSlateApplication::Get().GetNormalExecutionAttribute() )
		.ContainingTab( NewTab );

	AllContentBrowsers.Add(NewBrowser);

	if ( !PrimaryContentBrowser.IsValid() )
	{
		ChooseNewPrimaryBrowser();
	}

	// Add wrapper for tutorial highlighting
	TSharedRef<STutorialWrapper> Wrapper = 
		SNew(STutorialWrapper)
		.Name(FName(TEXT("ContentBrowser")))
		.Content()
		[
			NewBrowser
		];

	NewTab->SetContent( Wrapper );

	return NewTab;
}
开发者ID:Tigrouzen,项目名称:UnrealEngine-4,代码行数:34,代码来源:ContentBrowserSingleton.cpp

示例3: TEXT

TSharedRef<SDockTab> FSubstanceEditor::SpawnTab_SubstanceEditor( const FSpawnTabArgs& Args )
{
	check( Args.GetTabId().TabType == SubstanceTabId );

	TSharedRef<SDockTab> SpawnedTab =
		SNew(SDockTab)
			.TabRole( ETabRole::NomadTab )
			.Label(FText::FromString(GetTabPrefix() + TEXT("Substance Editor")))
			[
				SubstanceEditorPanel.ToSharedRef()
			];

	AddToSpawnedToolPanels( Args.GetTabId().TabType, SpawnedTab );

	return SpawnedTab;
}
开发者ID:RandomDeveloperM,项目名称:UE4_Hairworks,代码行数:16,代码来源:SubstanceEditor.cpp

示例4: SNew

TSharedRef<SDockTab> FPropertyEditorToolkit::SpawnTab_PropertyTable( const FSpawnTabArgs& Args ) 
{
	check( Args.GetTabId() == GridTabId );

	FPropertyEditorModule& PropertyEditorModule = FModuleManager::GetModuleChecked<FPropertyEditorModule>( "PropertyEditor" );
	TSharedRef<SDockTab> GridToolkitTab = SNew(SDockTab)
		.Icon( FEditorStyle::GetBrush("PropertyEditor.Grid.TabIcon") )
		.Label( LOCTEXT("GenericGridTitle", "Grid") )
		.TabColorScale( GetTabColorScale() )
		.Content()
		[
			SNew( SOverlay )
			+SOverlay::Slot()
			[
				PropertyEditorModule.CreatePropertyTableWidget( PropertyTable.ToSharedRef() )
			]
			+SOverlay::Slot()
			.HAlign( HAlign_Right )
			.VAlign( VAlign_Top )
			.Padding( FMargin( 0, 3, 0, 0 ) )
			[
				SNew( SHorizontalBox )
				+SHorizontalBox::Slot()
				.AutoWidth()
				.HAlign( HAlign_Center )
				.VAlign( VAlign_Center )
				[
					SNew( SImage )
					.Image( FEditorStyle::GetBrush( "PropertyEditor.AddColumnOverlay" ) )
					.Visibility( this, &FPropertyEditorToolkit::GetAddColumnInstructionsOverlayVisibility )
				]

				+SHorizontalBox::Slot()
				.AutoWidth()
				.HAlign( HAlign_Center )
				.VAlign( VAlign_Center )
				[
					SNew( SImage )
					.Image( FEditorStyle::GetBrush( "PropertyEditor.RemoveColumn" ) )
					.Visibility( this, &FPropertyEditorToolkit::GetAddColumnInstructionsOverlayVisibility )
				]

				+SHorizontalBox::Slot()
				.AutoWidth()
				.HAlign( HAlign_Center )
				.VAlign( VAlign_Center )
				.Padding( FMargin( 0, 0, 3, 0 ) )
				[
					SNew( STextBlock )
					.Font( FEditorStyle::GetFontStyle( "PropertyEditor.AddColumnMessage.Font" ) )
					.Text( LOCTEXT("GenericPropertiesTitle", "Pin Properties to Add Columns") )
					.Visibility( this, &FPropertyEditorToolkit::GetAddColumnInstructionsOverlayVisibility )
					.ColorAndOpacity( FEditorStyle::GetColor( "PropertyEditor.AddColumnMessage.ColorAndOpacity" ) )
				]
			]
		];	

	return GridToolkitTab;
}
开发者ID:kidaa,项目名称:UnrealEngineVR,代码行数:59,代码来源:PropertyEditorToolkit.cpp

示例5: SNew

TSharedRef<SDockTab> FSoundCueEditor::SpawnTab_Properties(const FSpawnTabArgs& Args)
{
	check( Args.GetTabId() == PropertiesTabId );

	return SNew(SDockTab)
		.Icon(FEditorStyle::GetBrush("LevelEditor.Tabs.Details"))
		.Label(LOCTEXT("SoundCueDetailsTitle", "Details"))
		[
			SoundCueProperties.ToSharedRef()
		];
}
开发者ID:PickUpSU,项目名称:UnrealEngine4,代码行数:11,代码来源:SoundCueEditor.cpp

示例6:

TSharedRef<SDockTab> FNiagaraEffectEditor::SpawnTab_CurveEd(const FSpawnTabArgs& Args)
{
	check(Args.GetTabId().TabType == CurveEditorTabID);

	TSharedRef<SDockTab> SpawnedTab =
		SNew(SDockTab)
		[
			SAssignNew(TimeLine, SNiagaraTimeline)
		];

	return SpawnedTab;
}
开发者ID:ErwinT6,项目名称:T6Engine,代码行数:12,代码来源:NiagaraEffectEditor.cpp

示例7: SNew

TSharedRef<SDockTab> FSoundClassEditor::SpawnTab_GraphCanvas(const FSpawnTabArgs& Args)
{
	check( Args.GetTabId() == GraphCanvasTabId );

	TSharedRef<SDockTab> SpawnedTab = SNew(SDockTab)
		.Label(LOCTEXT("GraphCanvasTitle", "Graph"))
		[
			GraphEditor.ToSharedRef()
		];

	return SpawnedTab;
}
开发者ID:zhaoyizheng0930,项目名称:UnrealEngine,代码行数:12,代码来源:SoundClassEditor.cpp

示例8: SNew

TSharedRef<SDockTab> FSequencerAssetEditor::SpawnTab_SequencerMain(const FSpawnTabArgs& Args)
{
	check(Args.GetTabId() == SequencerMainTabId);

	return SNew(SDockTab)
		.Icon( FEditorStyle::GetBrush("Sequencer.Tabs.SequencerMain") )
		.Label( LOCTEXT("SequencerMainTitle", "Sequencer") )
		.TabColorScale( GetTabColorScale() )
		[
			Sequencer->GetSequencerWidget()
		];
}
开发者ID:PickUpSU,项目名称:UnrealEngine4,代码行数:12,代码来源:SequencerAssetEditor.cpp

示例9: SNew

TSharedRef<SDockTab> FSimpleAssetEditor::SpawnPropertiesTab( const FSpawnTabArgs& Args )
{
	check( Args.GetTabId() == PropertiesTabId );

	return SNew(SDockTab)
		.Icon( FEditorStyle::GetBrush("GenericEditor.Tabs.Properties") )
		.Label( LOCTEXT("GenericDetailsTitle", "Details") )
		.TabColorScale( GetTabColorScale() )
		[
			DetailsView.ToSharedRef()
		];
}
开发者ID:1vanK,项目名称:AHRUnrealEngine,代码行数:12,代码来源:SimpleAssetEditor.cpp

示例10: SNew

TSharedRef<SDockTab> FNiagaraEditor::SpawnTab_NodeGraph( const FSpawnTabArgs& Args )
{
	check( Args.GetTabId().TabType == NodeGraphTabId );

	TSharedRef<SGraphEditor> NodeGraphEditor = CreateGraphEditorWidget(Source->NodeGraph);

	NodeGraphEditorPtr = NodeGraphEditor; // Keep pointer to editor

	return SNew(SDockTab)
		.Label( LOCTEXT("NodeGraph", "Node Graph") )
		.TabColorScale( GetTabColorScale() )
		[
			NodeGraphEditor
		];
}
开发者ID:PickUpSU,项目名称:UnrealEngine4,代码行数:15,代码来源:NiagaraEditor.cpp

示例11: SNew

TSharedRef<SDockTab> FNiagaraEffectEditor::SpawnTab(const FSpawnTabArgs& Args)
{
	check(Args.GetTabId().TabType == UpdateTabId);

	TSharedRef<SNiagaraEffectEditorWidget> Editor = CreateEditorWidget(Effect);

	UpdateEditorPtr = Editor; // Keep pointer to editor

	return SNew(SDockTab)
		.Label(LOCTEXT("NiagaraEffect", "Niagara Effect"))
		.TabColorScale(GetTabColorScale())
		[
			Editor
		];
}
开发者ID:ErwinT6,项目名称:T6Engine,代码行数:15,代码来源:NiagaraEffectEditor.cpp

示例12: SNew

TSharedRef<SDockTab> FAssetEditorToolkit::SpawnTab_Toolbar( const FSpawnTabArgs& Args )
{
	check( Args.GetTabId() == ToolbarTabId );

	TSharedRef<SDockTab> DockTab = SNew(SDockTab)
		.Label( NSLOCTEXT("AssetEditorToolkit", "Toolbar_TabTitle", "Toolbar") )
		.Icon(FEditorStyle::GetBrush("LevelEditor.Tabs.Toolbar"))
		.ShouldAutosize(true)
		[
			SAssignNew(ToolbarWidgetContent, SBorder)
			.Padding(0)
			.BorderImage(FEditorStyle::GetBrush("NoBorder"))
		];

	if (Toolbar.IsValid())
	{
		ToolbarWidgetContent->SetContent(Toolbar.ToSharedRef());
	}

	return DockTab;
}
开发者ID:RandomDeveloperM,项目名称:UE4_Hairworks,代码行数:21,代码来源:AssetEditorToolkit.cpp


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