2014-03-14 14:13:41 -04:00
|
|
|
// Copyright 1998-2014 Epic Games, Inc. All Rights Reserved.
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Interface for settings editor modules.
|
|
|
|
|
*/
|
|
|
|
|
class ISettingsEditorModule
|
|
|
|
|
: public IModuleInterface
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Creates a settings editor widget.
|
|
|
|
|
*
|
2014-05-14 14:51:08 -04:00
|
|
|
* @param Model The view model.
|
2014-03-14 14:13:41 -04:00
|
|
|
* @return The new widget.
|
|
|
|
|
* @see CreateController
|
|
|
|
|
*/
|
|
|
|
|
virtual TSharedRef<SWidget> CreateEditor( const ISettingsEditorModelRef& Model ) = 0;
|
|
|
|
|
|
|
|
|
|
/**
|
2014-05-14 14:51:08 -04:00
|
|
|
* Creates a view model for the settings editor widget.
|
2014-03-14 14:13:41 -04:00
|
|
|
*
|
2014-05-14 14:51:08 -04:00
|
|
|
* @param SettingsContainer The settings container.
|
2014-03-14 14:13:41 -04:00
|
|
|
* @return The controller.
|
|
|
|
|
* @see CreateEditor
|
|
|
|
|
*/
|
|
|
|
|
virtual ISettingsEditorModelRef CreateModel( const ISettingsContainerRef& SettingsContainer ) = 0;
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Gets a reference to the SettingsEditor module instance.
|
|
|
|
|
*
|
|
|
|
|
* @todo gmp: better implementation using dependency injection / abstract factory.
|
|
|
|
|
*
|
|
|
|
|
* @return A reference to the SettingsEditor module.
|
|
|
|
|
*/
|
|
|
|
|
static ISettingsEditorModule& GetRef( )
|
|
|
|
|
{
|
|
|
|
|
return FModuleManager::GetModuleChecked<ISettingsEditorModule>("SettingsEditor");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Virtual destructor.
|
|
|
|
|
*/
|
|
|
|
|
virtual ~ISettingsEditorModule( ) { }
|
|
|
|
|
};
|