Files
UnrealEngineUWP/Engine/Source/Developer/AutomationWindow/Private/SAutomationWindowCommandBar.cpp
Matthew Griffin bb70b349ce Merging CL 2804086 from //UE4/Release-4.11 to Dev-Main (//UE4/Dev-Main) to isolate copyright update
#lockdown Nick.Penwarden

[CL 2819020 by Matthew Griffin in Main branch]
2016-01-07 08:17:16 -05:00

63 lines
1.4 KiB
C++

// Copyright 1998-2016 Epic Games, Inc. All Rights Reserved.
#include "AutomationWindowPrivatePCH.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