Files
UnrealEngineUWP/Engine/Source/Editor/DetailCustomizations/Private/DataTableCustomization.cpp
Ben Marsh 149375b14b Update copyright notices to 2015.
[CL 2379638 by Ben Marsh in Main branch]
2014-12-07 19:09:38 -05:00

36 lines
1017 B
C++

// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.
#include "DetailCustomizationsPrivatePCH.h"
#include "DataTableCustomization.h"
#include "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()
];
}