Files
UnrealEngineUWP/Engine/Source/Editor/DetailCustomizations/Private/DataTableCustomization.cpp
Ben Marsh 20bf0eb6a1 Updating copyright notices to 2017 (copying from //Tasks/UE4/Dev-Copyright-2017).
#rb none
#lockdown Nick.Penwarden

[CL 3226823 by Ben Marsh in Main branch]
2016-12-08 08:52:44 -05:00

35 lines
987 B
C++

// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved.
#include "DataTableCustomization.h"
#include "Widgets/Input/SSearchBox.h"
TSharedRef<SWidget> FDataTableCustomizationLayout::GetListContent()
{
SAssignNew(RowNameComboListView, SListView<TSharedPtr<FString> >)
.ListItemsSource(&RowNames)
.OnSelectionChanged(this, &FDataTableCustomizationLayout::OnSelectionChanged)
.OnGenerateRow(this, &FDataTableCustomizationLayout::HandleRowNameComboBoxGenarateWidget)
.SelectionMode(ESelectionMode::Single);
// Ensure no filter is applied at the time the menu opens
OnFilterTextChanged(FText::GetEmpty());
if (CurrentSelectedItem.IsValid())
{
RowNameComboListView->SetSelection(CurrentSelectedItem);
}
return SNew(SVerticalBox)
+ SVerticalBox::Slot()
.AutoHeight()
[
SNew(SSearchBox)
.OnTextChanged(this, &FDataTableCustomizationLayout::OnFilterTextChanged)
]
+ SVerticalBox::Slot()
.FillHeight(1.f)
[
RowNameComboListView.ToSharedRef()
];
}