Files
UnrealEngineUWP/Engine/Source/Developer/AutomationWindow/Private/SAutomationWindowCommandBar.cpp
ryan durand 471d972e62 Updating copyright for Engine Developer.
#rnx
#rb none


#ROBOMERGE-SOURCE: CL 10869240 via CL 10869516 via CL 10869902
#ROBOMERGE-BOT: (v613-10869866)

[CL 10870584 by ryan durand in Main branch]
2019-12-26 15:32:37 -05:00

66 lines
1.5 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#include "SAutomationWindowCommandBar.h"
#include "Widgets/SBoxPanel.h"
#include "Widgets/Input/SButton.h"
#include "SAutomationExportMenu.h"
#define LOCTEXT_NAMESPACE "SAutomationWindowCommandBar"
/* SAutomationWindowCommandBar interface
*****************************************************************************/
void SAutomationWindowCommandBar::Construct( const FArguments& InArgs, const TSharedRef< SNotificationList >& InNotificationList )
{
OnCopyLogClicked = InArgs._OnCopyLogClicked;
ChildSlot
[
SNew(SHorizontalBox)
+SHorizontalBox::Slot()
.FillWidth(1.0f)
+SHorizontalBox::Slot()
.AutoWidth()
.HAlign(HAlign_Right)
[
SNew(SAutomationExportMenu, InNotificationList)
]
+ SHorizontalBox::Slot()
.AutoWidth()
.Padding(4.0f, 0.0f, 0.0f, 0.0f)
[
// copy button
SAssignNew(CopyButton, SButton)
.ContentPadding(FMargin(6.0, 2.0))
.IsEnabled(false)
.Text(LOCTEXT("AutomationCopyButtonText", "Copy"))
.ToolTipText(LOCTEXT("AutomationCopyButtonTooltip", "Copy the selected log messages to the clipboard"))
.OnClicked(this, &SAutomationWindowCommandBar::HandleCopyButtonClicked)
]
];
}
FReply SAutomationWindowCommandBar::HandleCopyButtonClicked( )
{
if (OnCopyLogClicked.IsBound())
{
OnCopyLogClicked.Execute();
}
return FReply::Handled();
}
void SAutomationWindowCommandBar::SetNumLogMessages( int32 Count )
{
CopyButton->SetEnabled(Count > 0);
}
#undef LOCTEXT_NAMESPACE