Files
UnrealEngineUWP/Engine/Source/Editor/DetailCustomizations/Private/SourceCodeAccessSettingsDetails.h
Thomas Sarkanen 2e3d1f5aae #summary Source code access is now done via plugins
#ttp 330039 	EDITOR: Platform-agnostic editor code depends on Windows-only VSAccessor headers
#detail 	Source code access is now extensible via plugins, so any new editors can be easily added.
#add 	Added SourceCodeAccess module that routes access via plugins.
#change 	Moved much of the old VSAccessor code into a new VisualStudioSourceCodeAccess plugin.
#add 	Added a counterpart XCode plugin & migrated the code from FSourceCodeNavigation (Applescript etc.) into there.
#remove 	Removed applescript for XCode access (it is now done via code).
#remove 	Removed source code access functionality from platform layer.
#add 	Added details customization for source code access settings, so users can choose their own accessor.
#remove 	Removed dependencies on VSAccessor.
#change 	Changed API in SWidget to not require building a string to be parsed, instead this acesses and forwards filenames & line numbers.
#extra 	Tested on Mac by Mark S.
reviewed by 	Andrew.Brown

[CL 2048697 by Thomas Sarkanen in Main branch]
2014-04-23 19:19:51 -04:00

42 lines
1.2 KiB
C++

// Copyright 1998-2014 Epic Games, Inc. All Rights Reserved.
#pragma once
struct FAccessorItem
{
FAccessorItem(const FText& InText, const FName& InName)
: Text(InText)
, Name(InName)
{
}
/** Text to display */
FText Text;
/** Name of the accessor */
FName Name;
};
class FSourceCodeAccessSettingsDetails : public IDetailCustomization
{
public:
/** Makes a new instance of this detail layout class for a specific detail view requesting it */
static TSharedRef<IDetailCustomization> MakeInstance();
/** IDetailCustomization interface */
virtual void CustomizeDetails( IDetailLayoutBuilder& DetailLayout ) OVERRIDE;
private:
/** Generate a row widget for display in the list view */
TSharedRef<SWidget> OnGenerateWidget( TSharedPtr<FAccessorItem> InItem );
/** Set the accessor when we change selection */
void OnSelectionChanged(TSharedPtr<FAccessorItem> InItem, ESelectInfo::Type InSeletionInfo, TSharedRef<IPropertyHandle> PreferredProviderPropertyHandle);
/** Get the text to display on the accessor drop-down */
FText GetAccessorText() const;
private:
/** Accessor names to display in a drop-down list */
TArray<TSharedPtr<FAccessorItem>> Accessors;
};