Files
UnrealEngineUWP/Engine/Source/Developer/AutomationWindow/Private/SAutomationWindowCommandBar.cpp
ben marsh 2b46ba7b94 Update copyright notices to 2019.
#rb none
#lockdown Nick.Penwarden

#ROBOMERGE-OWNER: ryan.gerleve
#ROBOMERGE-AUTHOR: ben.marsh
#ROBOMERGE-SOURCE: CL 4662404 in //UE4/Main/...
#ROBOMERGE-BOT: ENGINE (Main -> Dev-Networking)

[CL 4662413 by ben marsh in Dev-Networking branch]
2018-12-14 13:44:01 -05:00

66 lines
1.5 KiB
C++

// Copyright 1998-2019 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