You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
#lockdown nick.penwarden
Change 2889481 on 2016/03/02 by Richard.TalbotWatkin
Fixed socket preview component in Static Mesh Editor so that it remains correctly attached if the socket is renamed (Contributed by Manny-MADE).
PR #2094
#jira UE-27338 - GitHub 2094 : BUGFIX: Socket preview component broken in Static Mesh Editor
FSlateAtlasedTextureResource
Made changes to the Perforce source control provider so that operations can be cancelled with immediate effect if there is an issue connecting to the server.
#jira UE-24632 - "Updating file(s) source control status..." dialog doesn't allow Cancel
#RB Thomas.Sarkanen
Change 2890359 on 2016/03/02 by Nick.Darnell
Jira Mirroring - Adding some tools for matching gits sha to perforce commits. Also adding the program for scraping jira issues and pushing them elsewhere.
Change 2892008 on 2016/03/03 by Richard.TalbotWatkin
Back out changelist 2813475
Change 2892086 on 2016/03/03 by Richard.TalbotWatkin
Back out changelist 2813457
Change 2892117 on 2016/03/03 by Richard.TalbotWatkin
Back out changelist 2812830
Change 2892316 on 2016/03/03 by Richard.TalbotWatkin
Fixed conversion of brushes to volumes so that the original transform isn't lost.
#jira UE-24404 - Convert Actor from BSP to volume can affect the actor transform
Change 2892765 on 2016/03/03 by Andrew.Rodham
Changed public facing level editor classes to use ILevelEditor instead of SLevelEditor
#codereview Mike.Fricker
Change 2894154 on 2016/03/04 by Richard.TalbotWatkin
Fixed error in USplineComponent::GetSegmentLength when the segment is linear or constant.
Change 2894481 on 2016/03/04 by Cody.Albert
#jira UE-27830
Fixed mismatched layout name
Change 2896339 on 2016/03/06 by Richard.TalbotWatkin
Fixed undo issues in texture paint mode.
#jira UE-21206 - Texture Painting bugs
Change 2896713 on 2016/03/07 by Joe.Conley
Replacing #ifndef with #pragma once
Change 2896955 on 2016/03/07 by Cody.Albert
#jira UE-27711
Added initialization for LastHighlightInteractionTime
Change 2898895 on 2016/03/08 by Richard.TalbotWatkin
More optimizations to editing actors with a large number of components. Improved performance when executing construction scripts.
#jira UE-24821 - Blueprints with thousands of components perform very badly when selected in the Level Viewport
Change 2900770 on 2016/03/09 by Joe.Conley
Change #ifndef to #pragma once for headers under Runtime/Engine/Public
Change 2900835 on 2016/03/09 by Richard.TalbotWatkin
Fixed issues with scrolling items into view in STileView. Also fixed bugs in STileView::ReGenerateItems.
#jira UE-20441 - Hitting F2 to rename an asset in the Content Browser moves the asset out of view if the CB is at default size and location
#jira UE-20807 - Browse to Asset in Content Browser focuses just on the text
#codereview Nick.Atamas
Change 2900837 on 2016/03/09 by Richard.TalbotWatkin
Added an OnKeyDownHandler to SSearchBox and SAssetSearchBox so that functionality for handling keypresses which is normally handled by SEditableText can be overridden. Added custom behavior to SAssetPicker and SAssetSearchBox so that up/down cursor keys can be used to change focus from the text box to the menu.
#jira UE-20567 - UX Regression on Open Asset Panel
This also addresses a similar issue with the auto-complete popup in the Content Browser search bar.
Change 2900847 on 2016/03/09 by Richard.TalbotWatkin
Fixed include dependency.
Change 2900951 on 2016/03/09 by Richard.TalbotWatkin
Fixed non-dependent name lookup for superclass member access.
Change 2901325 on 2016/03/09 by Jamie.Dale
PR #2107: Output Log Filtering (Contributed by phoboz-net)
Change 2901391 on 2016/03/09 by Jamie.Dale
Some more output log filter improvements
We now defer the search until you finish typing, and the filter list itself now uses toggle buttons (like the content browser) so that you can toggle multiple filters without having to re-open the menu.
Change 2901736 on 2016/03/09 by Alexis.Matte
#jira UE-14632
Export staticmeshactor which are base on blueprint class as a blueprint instead of exporting it as an actor.
#codereview nick.darnell
Change 2903162 on 2016/03/10 by Alexis.Matte
Fbx scene importer, Fix crash when changing the material base path in the material tab page
#codereview nick.darnell
Change 2903903 on 2016/03/10 by Richard.TalbotWatkin
Fixed crash when attempting to paste an object from the level viewport into the content browser.
#jira UE-26100 - Crash when attempting to copy an object from the world into the content browser
Change 2903947 on 2016/03/10 by Richard.TalbotWatkin
[CL 2937134 by Nick Darnell in Main branch]
337 lines
9.7 KiB
C++
337 lines
9.7 KiB
C++
// Copyright 1998-2016 Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
#include "BaseTextLayoutMarshaller.h"
|
|
#include "TextFilterExpressionEvaluator.h"
|
|
|
|
class FOutputLogTextLayoutMarshaller;
|
|
class SSearchBox;
|
|
|
|
/**
|
|
* A single log message for the output log, holding a message and
|
|
* a style, for color and bolding of the message.
|
|
*/
|
|
struct FLogMessage
|
|
{
|
|
TSharedRef<FString> Message;
|
|
ELogVerbosity::Type Verbosity;
|
|
FName Style;
|
|
|
|
FLogMessage(const TSharedRef<FString>& NewMessage, FName NewStyle = NAME_None)
|
|
: Message(NewMessage)
|
|
, Verbosity(ELogVerbosity::Log)
|
|
, Style(NewStyle)
|
|
{
|
|
}
|
|
|
|
FLogMessage(const TSharedRef<FString>& NewMessage, ELogVerbosity::Type NewVerbosity, FName NewStyle = NAME_None)
|
|
: Message(NewMessage)
|
|
, Verbosity(NewVerbosity)
|
|
, Style(NewStyle)
|
|
{
|
|
}
|
|
};
|
|
|
|
/**
|
|
* Console input box with command-completion support
|
|
*/
|
|
class SConsoleInputBox
|
|
: public SCompoundWidget
|
|
{
|
|
|
|
public:
|
|
DECLARE_DELEGATE_OneParam(FExecuteConsoleCommand, const FString& /*ExecCommand*/)
|
|
|
|
SLATE_BEGIN_ARGS( SConsoleInputBox )
|
|
: _SuggestionListPlacement( MenuPlacement_BelowAnchor )
|
|
{}
|
|
|
|
/** Where to place the suggestion list */
|
|
SLATE_ARGUMENT( EMenuPlacement, SuggestionListPlacement )
|
|
|
|
/** Custom executor for console command, will be used when bound */
|
|
SLATE_EVENT( FExecuteConsoleCommand, ConsoleCommandCustomExec)
|
|
|
|
/** Called when a console command is executed */
|
|
SLATE_EVENT( FSimpleDelegate, OnConsoleCommandExecuted )
|
|
SLATE_END_ARGS()
|
|
|
|
/** Protected console input box widget constructor, called by Slate */
|
|
SConsoleInputBox();
|
|
|
|
/**
|
|
* Construct this widget. Called by the SNew() Slate macro.
|
|
*
|
|
* @param InArgs Declaration used by the SNew() macro to construct this widget
|
|
*/
|
|
void Construct( const FArguments& InArgs );
|
|
|
|
/** Returns the editable text box associated with this widget. Used to set focus directly. */
|
|
TSharedRef< SEditableTextBox > GetEditableTextBox()
|
|
{
|
|
return InputText.ToSharedRef();
|
|
}
|
|
|
|
/** SWidget interface */
|
|
virtual void Tick( const FGeometry& AllottedGeometry, const double InCurrentTime, const float InDeltaTime ) override;
|
|
|
|
protected:
|
|
|
|
virtual bool SupportsKeyboardFocus() const override { return true; }
|
|
|
|
// e.g. Tab or Key_Up
|
|
virtual FReply OnPreviewKeyDown( const FGeometry& MyGeometry, const FKeyEvent& KeyEvent ) override;
|
|
|
|
void OnFocusLost( const FFocusEvent& InFocusEvent ) override;
|
|
|
|
/** Handles entering in a command */
|
|
void OnTextCommitted(const FText& InText, ETextCommit::Type CommitInfo);
|
|
|
|
void OnTextChanged(const FText& InText);
|
|
|
|
/** Makes the widget for the suggestions messages in the list view */
|
|
TSharedRef<ITableRow> MakeSuggestionListItemWidget(TSharedPtr<FString> Message, const TSharedRef<STableViewBase>& OwnerTable);
|
|
|
|
void SuggestionSelectionChanged(TSharedPtr<FString> NewValue, ESelectInfo::Type SelectInfo);
|
|
|
|
void SetSuggestions(TArray<FString>& Elements, bool bInHistoryMode);
|
|
|
|
void MarkActiveSuggestion();
|
|
|
|
void ClearSuggestions();
|
|
|
|
FString GetSelectionText() const;
|
|
|
|
private:
|
|
|
|
/** Editable text widget */
|
|
TSharedPtr< SEditableTextBox > InputText;
|
|
|
|
/** history / auto completion elements */
|
|
TSharedPtr< SMenuAnchor > SuggestionBox;
|
|
|
|
/** All log messages stored in this widget for the list view */
|
|
TArray< TSharedPtr<FString> > Suggestions;
|
|
|
|
/** The list view for showing all log messages. Should be replaced by a full text editor */
|
|
TSharedPtr< SListView< TSharedPtr<FString> > > SuggestionListView;
|
|
|
|
/** Delegate to call when a console command is executed */
|
|
FSimpleDelegate OnConsoleCommandExecuted;
|
|
|
|
/** Delegate to call to execute console command */
|
|
FExecuteConsoleCommand ConsoleCommandCustomExec;
|
|
|
|
/** -1 if not set, otherwise index into Suggestions */
|
|
int32 SelectedSuggestion;
|
|
|
|
/** to prevent recursive calls in UI callback */
|
|
bool bIgnoreUIUpdate;
|
|
};
|
|
|
|
/**
|
|
* Holds information about filters
|
|
*/
|
|
struct FLogFilter
|
|
{
|
|
/** true to show Logs. */
|
|
bool bShowLogs;
|
|
|
|
/** true to show Warnings. */
|
|
bool bShowWarnings;
|
|
|
|
/** true to show Errors. */
|
|
bool bShowErrors;
|
|
|
|
/** Enable all filters by default */
|
|
FLogFilter() : TextFilterExpressionEvaluator(ETextFilterExpressionEvaluatorMode::BasicString)
|
|
{
|
|
bShowErrors = bShowLogs = bShowWarnings = true;
|
|
}
|
|
|
|
/** Returns true if any messages should be filtered out */
|
|
bool IsFilterSet() { return !bShowErrors || !bShowLogs || !bShowWarnings || TextFilterExpressionEvaluator.GetFilterType() != ETextFilterExpressionType::Empty || !TextFilterExpressionEvaluator.GetFilterText().IsEmpty(); }
|
|
|
|
/** Checks the given message against set filters */
|
|
bool IsMessageAllowed(const TSharedPtr<FLogMessage>& Message);
|
|
|
|
/** Set the Text to be used as the Filter's restrictions */
|
|
void SetFilterText(const FText& InFilterText) { TextFilterExpressionEvaluator.SetFilterText(InFilterText); }
|
|
|
|
/** Returns Evaluator syntax errors (if any) */
|
|
FText GetSyntaxErrors() { return TextFilterExpressionEvaluator.GetFilterErrorText(); }
|
|
|
|
private:
|
|
/** Expression evaluator that can be used to perform complex text filter queries */
|
|
FTextFilterExpressionEvaluator TextFilterExpressionEvaluator;
|
|
};
|
|
|
|
/**
|
|
* Widget which holds a list view of logs of the program output
|
|
* as well as a combo box for entering in new commands
|
|
*/
|
|
class SOutputLog
|
|
: public SCompoundWidget, public FOutputDevice
|
|
{
|
|
|
|
public:
|
|
|
|
SLATE_BEGIN_ARGS( SOutputLog )
|
|
: _Messages()
|
|
{}
|
|
|
|
/** All messages captured before this log window has been created */
|
|
SLATE_ARGUMENT( TArray< TSharedPtr<FLogMessage> >, Messages )
|
|
|
|
SLATE_END_ARGS()
|
|
|
|
/** Destructor for output log, so we can unregister from notifications */
|
|
~SOutputLog();
|
|
|
|
/**
|
|
* Construct this widget. Called by the SNew() Slate macro.
|
|
*
|
|
* @param InArgs Declaration used by the SNew() macro to construct this widget
|
|
*/
|
|
void Construct( const FArguments& InArgs );
|
|
|
|
/**
|
|
* Creates FLogMessage objects from FOutputDevice log callback
|
|
*
|
|
* @param V Message text
|
|
* @param Verbosity Message verbosity
|
|
* @param Category Message category
|
|
* @param OutMessages Array to receive created FLogMessage messages
|
|
* @param Filters [Optional] Filters to apply to Messages
|
|
*
|
|
* @return true if any messages have been created, false otherwise
|
|
*/
|
|
static bool CreateLogMessages(const TCHAR* V, ELogVerbosity::Type Verbosity, const class FName& Category, TArray< TSharedPtr<FLogMessage> >& OutMessages);
|
|
|
|
protected:
|
|
|
|
virtual void Serialize( const TCHAR* V, ELogVerbosity::Type Verbosity, const class FName& Category ) override;
|
|
|
|
protected:
|
|
/**
|
|
* Extends the context menu used by the text box
|
|
*/
|
|
void ExtendTextBoxMenu(FMenuBuilder& Builder);
|
|
|
|
/**
|
|
* Called when delete all is selected
|
|
*/
|
|
void OnClearLog();
|
|
|
|
/**
|
|
* Called when the user scrolls the log window vertically
|
|
*/
|
|
void OnUserScrolled(float ScrollOffset);
|
|
|
|
/**
|
|
* Called to determine whether delete all is currently a valid command
|
|
*/
|
|
bool CanClearLog() const;
|
|
|
|
/** Called when a console command is entered for this output log */
|
|
void OnConsoleCommandExecuted();
|
|
|
|
/** Request we immediately force scroll to the bottom of the log */
|
|
void RequestForceScroll();
|
|
|
|
/** Converts the array of messages into something the text box understands */
|
|
TSharedPtr< FOutputLogTextLayoutMarshaller > MessagesTextMarshaller;
|
|
|
|
/** The editable text showing all log messages */
|
|
TSharedPtr< SMultiLineEditableTextBox > MessagesTextBox;
|
|
|
|
/** The editable text showing all log messages */
|
|
TSharedPtr< SSearchBox > FilterTextBox;
|
|
|
|
/** True if the user has scrolled the window upwards */
|
|
bool bIsUserScrolled;
|
|
|
|
private:
|
|
/** Called by Slate when the filter box changes text. */
|
|
void OnFilterTextChanged(const FText& InFilterText);
|
|
|
|
/** Make the "Filters" menu. */
|
|
TSharedRef<SWidget> MakeAddFilterMenu();
|
|
|
|
/** Fills in the filter menu. */
|
|
void FillVerbosityEntries(FMenuBuilder& MenuBuilder);
|
|
|
|
/** A simple function for the filters to keep them enabled. */
|
|
bool Menu_CanExecute() const;
|
|
|
|
/** Toggles "Logs" true/false. */
|
|
void MenuLogs_Execute();
|
|
|
|
/** Returns the state of "Logs". */
|
|
bool MenuLogs_IsChecked() const;
|
|
|
|
/** Toggles "Warnings" true/false. */
|
|
void MenuWarnings_Execute();
|
|
|
|
/** Returns the state of "Warnings". */
|
|
bool MenuWarnings_IsChecked() const;
|
|
|
|
/** Toggles "Errors" true/false. */
|
|
void MenuErrors_Execute();
|
|
|
|
/** Returns the state of "Errors". */
|
|
bool MenuErrors_IsChecked() const;
|
|
|
|
/** Forces re-population of the messages list */
|
|
void Refresh();
|
|
|
|
public:
|
|
/** Visible messages filter */
|
|
FLogFilter Filter;
|
|
};
|
|
|
|
/** Output log text marshaller to convert an array of FLogMessages into styled lines to be consumed by an FTextLayout */
|
|
class FOutputLogTextLayoutMarshaller : public FBaseTextLayoutMarshaller
|
|
{
|
|
public:
|
|
|
|
static TSharedRef< FOutputLogTextLayoutMarshaller > Create(TArray< TSharedPtr<FLogMessage> > InMessages, FLogFilter* InFilter);
|
|
|
|
virtual ~FOutputLogTextLayoutMarshaller();
|
|
|
|
// ITextLayoutMarshaller
|
|
virtual void SetText(const FString& SourceString, FTextLayout& TargetTextLayout) override;
|
|
virtual void GetText(FString& TargetString, const FTextLayout& SourceTextLayout) override;
|
|
|
|
bool AppendMessage(const TCHAR* InText, const ELogVerbosity::Type InVerbosity, const FName& InCategory);
|
|
void ClearMessages();
|
|
|
|
void CountMessages();
|
|
|
|
int32 GetNumMessages() const;
|
|
int32 GetNumFilteredMessages();
|
|
|
|
void MarkMessagesCacheAsDirty();
|
|
|
|
protected:
|
|
|
|
FOutputLogTextLayoutMarshaller(TArray< TSharedPtr<FLogMessage> > InMessages, FLogFilter* InFilter);
|
|
|
|
void AppendMessageToTextLayout(const TSharedPtr<FLogMessage>& InMessage);
|
|
void AppendMessagesToTextLayout(const TArray<TSharedPtr<FLogMessage>>& InMessages);
|
|
|
|
/** All log messages to show in the text box */
|
|
TArray< TSharedPtr<FLogMessage> > Messages;
|
|
|
|
/** Holds cached numbers of messages to avoid unnecessary re-filtering */
|
|
int32 CachedNumMessages;
|
|
|
|
/** Flag indicating the messages count cache needs rebuilding */
|
|
bool bNumMessagesCacheDirty;
|
|
|
|
/** Visible messages filter */
|
|
FLogFilter* Filter;
|
|
|
|
FTextLayout* TextLayout;
|
|
};
|