Files
UnrealEngineUWP/Engine/Source/Editor/ClassViewer/Public/ClassViewerModule.h
Thomas Sarkanen 694424c3c6 Added improved blackboard editor & replaced simple blackboard debug view.
Added new blackboard view based on MyBlueprint.
Class viewer can now optionally display "Display Names" for classes (this is used to make the names of blackboard entries more friendly).
SPropertyEditorEditInline now displays the class type icon as well as its name.
Blackboard entry details customization now hides the header for entries, so one level of expansion is no longer necessary.
Removed pointer to 'view' in the blackboard debugger & replaced with delegates where appropriate.
Fixed crash issue also mentioned here: https://github.com/EpicGames/UnrealEngine/pull/212
Added new detail customization used to display only the selected entry in the current blackboard.
Fixed crash when running services with no Blackboard (prevent access of NULL blackboard component).

TTP# 337669 - Behaviour Tree Editor: Integrate Blackboard debugging display with Blackboard Editor

reviewed by Andrew.Brown, Lukasz.Furman

[CL 2113798 by Thomas Sarkanen in Main branch]
2014-06-23 04:26:26 -04:00

132 lines
3.6 KiB
C++

// Copyright 1998-2014 Epic Games, Inc. All Rights Reserved.
#pragma once
/** Delegate used with the Class Viewer in 'class picking' mode. You'll bind a delegate when the
class viewer widget is created, which will be fired off when a class is selected in the list */
DECLARE_DELEGATE_OneParam( FOnClassPicked, UClass* );
namespace EClassViewerMode
{
enum Type
{
/** Allows all classes to be browsed and selected; syncs selection with the editor; drag and drop attachment, etc. */
ClassBrowsing,
/** Sets the class viewer to operate as a class 'picker'. */
ClassPicker,
};
}
namespace EClassViewerDisplayMode
{
enum Type
{
/** Default will choose what view mode based on if in Viewer or Picker mode. */
DefaultView,
/** Displays all classes as a tree. */
TreeView,
/** Displays all classes as a list. */
ListView,
};
}
/**
* Settings for the Class Viewer set by the programmer before spawning an instance of the widget. This
* is used to modify the class viewer's behavior in various ways, such as filtering in or out specific classes.
*/
class FClassViewerInitializationOptions
{
public:
/** The filter to use on classes in this instance. */
TSharedPtr<class IClassViewerFilter> ClassFilter;
/** Mode to operate in */
EClassViewerMode::Type Mode;
/** Mode to display the classes using. */
EClassViewerDisplayMode::Type DisplayMode;
/** Filters so only actors will be displayed. */
bool bIsActorsOnly;
/** Filters so only placeable actors will be displayed. Forces bIsActorsOnly to true. */
bool bIsPlaceableOnly;
/** Filters so only base blueprints will be displayed. */
bool bIsBlueprintBaseOnly;
/** Shows unloaded blueprints. Will not be filtered out based on non-bool filter options. */
bool bShowUnloadedBlueprints;
/** Shows a "None" option, only available in Picker mode. */
bool bShowNoneOption;
/** true will show the UObject root class. */
bool bShowObjectRootClass;
/** If true, root nodes will be expanded by default. */
bool bExpandRootNodes;
/** true allows class dynamic loading on selection */
bool bEnableClassDynamicLoading;
/** true shows display names of classes rather than full class names */
bool bShowDisplayNames;
/** the title string of the class viewer if required. */
FString ViewerTitleString;
/** The property this class viewer be working on. */
TSharedPtr<class IPropertyHandle> PropertyHandle;
public:
/** Constructor */
FClassViewerInitializationOptions()
: Mode( EClassViewerMode::ClassPicker )
, DisplayMode(EClassViewerDisplayMode::DefaultView)
, bIsActorsOnly(false)
, bIsPlaceableOnly(false)
, bIsBlueprintBaseOnly(false)
, bShowUnloadedBlueprints(true)
, bShowNoneOption(false)
, bShowObjectRootClass(false)
, bExpandRootNodes(true)
, bEnableClassDynamicLoading(true)
, bShowDisplayNames(false)
{
}
};
/**
* Class Viewer module
*/
class FClassViewerModule : public IModuleInterface
{
public:
/**
* Called right after the module DLL has been loaded and the module object has been created
*/
virtual void StartupModule();
/**
* Called before the module is unloaded, right before the module object is destroyed.
*/
virtual void ShutdownModule();
/**
* Creates a class viewer widget
*
* @param InitOptions Programmer-driven configuration for this widget instance
* @param OnClassPickedDelegate Optional callback when a class is selected in 'class picking' mode
*
* @return New class viewer widget
*/
virtual TSharedRef<class SWidget> CreateClassViewer(const FClassViewerInitializationOptions& InitOptions,
const FOnClassPicked& OnClassPickedDelegate );
};