本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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;
}
示例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()
];
}
示例6:
TSharedRef<SDockTab> FNiagaraEffectEditor::SpawnTab_CurveEd(const FSpawnTabArgs& Args)
{
check(Args.GetTabId().TabType == CurveEditorTabID);
TSharedRef<SDockTab> SpawnedTab =
SNew(SDockTab)
[
SAssignNew(TimeLine, SNiagaraTimeline)
];
return SpawnedTab;
}
示例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;
}
示例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()
];
}
示例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()
];
}
示例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
];
}
示例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
];
}
示例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;
}