2014-12-07 19:09:38 -05:00
|
|
|
// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.
|
2014-10-27 07:53:55 -04:00
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "ModuleInterface.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// forward declarations
|
|
|
|
|
class ISettingsContainer;
|
|
|
|
|
class ISettingsEditorModel;
|
|
|
|
|
class SWidget;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Interface for settings editor modules.
|
|
|
|
|
*/
|
|
|
|
|
class ISettingsEditorModule
|
|
|
|
|
: public IModuleInterface
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Creates a settings editor widget.
|
|
|
|
|
*
|
|
|
|
|
* @param Model The view model.
|
|
|
|
|
* @return The new widget.
|
2015-02-16 07:54:27 -05:00
|
|
|
* @see CreateModel
|
2014-10-27 07:53:55 -04:00
|
|
|
*/
|
|
|
|
|
virtual TSharedRef<SWidget> CreateEditor( const TSharedRef<ISettingsEditorModel>& Model ) = 0;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Creates a view model for the settings editor widget.
|
|
|
|
|
*
|
|
|
|
|
* @param SettingsContainer The settings container.
|
|
|
|
|
* @return The controller.
|
|
|
|
|
* @see CreateEditor
|
|
|
|
|
*/
|
2015-02-16 07:54:27 -05:00
|
|
|
virtual TSharedRef<ISettingsEditorModel> CreateModel( const TSharedRef<ISettingsContainer>& SettingsContainer ) = 0;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Called when the settings have been changed such that an application restart is required for them to be fully applied
|
|
|
|
|
*/
|
|
|
|
|
virtual void OnApplicationRestartRequired() = 0;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Set the delegate that should be called when a setting editor needs to restart the application
|
|
|
|
|
*
|
|
|
|
|
* @param InRestartApplicationDelegate The new delegate to call
|
|
|
|
|
*/
|
|
|
|
|
virtual void SetRestartApplicationCallback( FSimpleDelegate InRestartApplicationDelegate ) = 0;
|
2014-10-27 07:53:55 -04:00
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
/** Virtual destructor. */
|
|
|
|
|
virtual ~ISettingsEditorModule() { }
|
|
|
|
|
};
|