2016-01-07 08:17:16 -05:00
|
|
|
// Copyright 1998-2016 Epic Games, Inc. All Rights Reserved.
|
2014-03-14 14:13:41 -04:00
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
2014-10-14 22:50:06 -04:00
|
|
|
#include "SlateBasics.h"
|
2014-03-14 14:13:41 -04:00
|
|
|
|
|
|
|
|
/** Style of the debug console */
|
|
|
|
|
namespace EDebugConsoleStyle
|
|
|
|
|
{
|
|
|
|
|
enum Type
|
|
|
|
|
{
|
|
|
|
|
/** Shows the debug console input line with tab completion only */
|
|
|
|
|
Compact,
|
|
|
|
|
|
|
|
|
|
/** Shows a scrollable log window with the input line on the bottom */
|
|
|
|
|
WithLog,
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
2014-09-04 10:49:55 -04:00
|
|
|
struct FDebugConsoleDelegates
|
|
|
|
|
{
|
2014-10-30 12:29:36 -04:00
|
|
|
FSimpleDelegate OnFocusLost;
|
2014-09-04 10:49:55 -04:00
|
|
|
FSimpleDelegate OnConsoleCommandExecuted;
|
|
|
|
|
};
|
2014-03-14 14:13:41 -04:00
|
|
|
|
|
|
|
|
class FOutputLogModule : public IModuleInterface
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
virtual void StartupModule();
|
|
|
|
|
virtual void ShutdownModule();
|
|
|
|
|
|
|
|
|
|
/** Generates a console input box widget. Remember, this widget will become invalid if the
|
|
|
|
|
output log DLL is unloaded on the fly. */
|
|
|
|
|
virtual TSharedRef< SWidget > MakeConsoleInputBox( TSharedPtr< SEditableTextBox >& OutExposedEditableTextBox ) const;
|
|
|
|
|
|
|
|
|
|
/** Opens a debug console in the specified window, if not already open */
|
2014-09-04 10:49:55 -04:00
|
|
|
virtual void ToggleDebugConsoleForWindow( const TSharedRef< SWindow >& Window, const EDebugConsoleStyle::Type InStyle, const FDebugConsoleDelegates& DebugConsoleDelegates );
|
2014-03-14 14:13:41 -04:00
|
|
|
|
|
|
|
|
/** Closes the debug console for the specified window */
|
2014-09-04 10:49:55 -04:00
|
|
|
virtual void CloseDebugConsole();
|
2014-03-14 14:13:41 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
|
|
|
|
/** Weak pointer to a debug console that's currently open, if any */
|
|
|
|
|
TWeakPtr< SWidget > DebugConsole;
|
|
|
|
|
};
|