You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
This new delegate give users the capability to intercept and handle the submit instead of the regular flows. Depending on the reply from the delegate the current flow will be: - interrupted if the submit is handled by the delegate - interrupted and set to fail state if the delegate returns an error - continued if the delegate cannot handle the current source provider #rb Stuart.Hill, brooke.hubert, Patrick.Enfedaque [CL 28533359 by benoit chauvin in ue5-main branch]
55 lines
1.4 KiB
C++
55 lines
1.4 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "Containers/Union.h"
|
|
|
|
#include "Modules/ModuleInterface.h"
|
|
#include "Modules/ModuleManager.h"
|
|
|
|
/**
|
|
* SourceControlWindows module interface
|
|
*/
|
|
|
|
enum class FSubmitOverrideReply
|
|
{
|
|
Handled,
|
|
ProviderNotSupported,
|
|
Error,
|
|
|
|
Num
|
|
};
|
|
|
|
struct SSubmitOverrideParameters
|
|
{
|
|
TUnion<FString, TArray<FString>> ToSubmit;
|
|
FString Description;
|
|
};
|
|
|
|
DECLARE_DELEGATE_RetVal_OneParam(FSubmitOverrideReply, FSubmitOverrideDelegate, SSubmitOverrideParameters /*InParameters*/);
|
|
|
|
class ISourceControlWindowsModule : public IModuleInterface
|
|
{
|
|
public:
|
|
/**
|
|
* Get reference to the SourceControlWindows module instance
|
|
*/
|
|
static inline ISourceControlWindowsModule& Get()
|
|
{
|
|
return FModuleManager::LoadModuleChecked<ISourceControlWindowsModule>("SourceControlWindows");
|
|
}
|
|
|
|
static inline ISourceControlWindowsModule* TryGet()
|
|
{
|
|
return FModuleManager::GetModulePtr<ISourceControlWindowsModule>("SourceControlWindows");
|
|
}
|
|
|
|
virtual void ShowChangelistsTab() = 0;
|
|
virtual bool CanShowChangelistsTab() const = 0;
|
|
virtual void SelectFiles(const TArray<FString>& Filenames) = 0;
|
|
|
|
DECLARE_EVENT_OneParam(ISourceControlWindowsModule, FChangelistFileDoubleClickedEvent, const FString&);
|
|
virtual FChangelistFileDoubleClickedEvent& OnChangelistFileDoubleClicked() = 0;
|
|
|
|
FSubmitOverrideDelegate SubmitOverrideDelegate;
|
|
}; |