MCPcopy Create free account
hub / github.com/20tab/UnrealEnginePython / SPythonLog

Class SPythonLog

Source/PythonConsole/Private/SPythonLog.h:92–171  ·  view source on GitHub ↗

* Widget which holds a list view of logs of the program output * as well as a combo box for entering in new commands */

Source from the content-addressed store, hash-verified

90 * as well as a combo box for entering in new commands
91 */
92class SPythonLog
93 : public SCompoundWidget, public FOutputDevice
94{
95
96public:
97
98 SLATE_BEGIN_ARGS( SPythonLog )
99 : _Messages()
100 {}
101
102 /** All messages captured before this log window has been created */
103 SLATE_ARGUMENT( TArray< TSharedPtr<FLogMessage> >, Messages )
104
105 SLATE_END_ARGS()
106
107 /** Destructor for output log, so we can unregister from notifications */
108 ~SPythonLog();
109
110 /**
111 * Construct this widget. Called by the SNew() Slate macro.
112 *
113 * @param InArgs Declaration used by the SNew() macro to construct this widget
114 */
115 void Construct( const FArguments& InArgs );
116
117 /**
118 * Creates FLogMessage objects from FOutputDevice log callback
119 *
120 * @param V Message text
121 * @param Verbosity Message verbosity
122 * @param Category Message category
123 * @param OutMessages Array to receive created FLogMessage messages
124 * @param Filters [Optional] Filters to apply to Messages
125 *
126 * @return true if any messages have been created, false otherwise
127 */
128 static bool CreateLogMessages(const TCHAR* V, ELogVerbosity::Type Verbosity, const class FName& Category, TArray< TSharedPtr<FLogMessage> >& OutMessages);
129
130protected:
131
132 virtual void Serialize( const TCHAR* V, ELogVerbosity::Type Verbosity, const class FName& Category ) override;
133
134protected:
135 /**
136 * Extends the context menu used by the text box
137 */
138 void ExtendTextBoxMenu(FMenuBuilder& Builder);
139
140 /**
141 * Called when delete all is selected
142 */
143 void OnClearLog();
144
145 /**
146 * Called when the user scrolls the log window vertically
147 */
148 void OnUserScrolled(float ScrollOffset);
149

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected