FLevelViewportLayout

Base class for level viewport layout configurations Handles maximizing and restoring well as visibility of specific viewports.

Unreal Engine C++ API Reference > Editor > LevelEditor

Inheritance Hierarchy

References

   
Module LevelEditor
Header /Engine/Source/Editor/LevelEditor/Public/LevelViewportLayout.h
Include #include "LevelViewportLayout.h"

Syntax

class FLevelViewportLayout : public [FAssetEditorViewportLayout](API\Editor\UnrealEd\FAssetEditorViewportLayout)  

Remarks

Base class for level viewport layout configurations Handles maximizing and restoring well as visibility of specific viewports.

Variables

Type Name Description
bool bIsImmersive True if we're currently in immersive mode
bool bIsMaximized True if we're currently maximized
bool bIsMaximizeSupported True if the layout supports maximizing one viewport, false if the feature is disabled
bool bIsQueryingLayoutMetrics Temporarily set to true while we are querying layout metrics and want all widgets to be visible
bool bIsReplacement True if the user selected this layout, false if it's the initial layout loaded
bool bIsTransitioning True if we've started an animation and are waiting for it to finish
bool bWasImmersive True when transitioning from an immersive state
bool bWasMaximized True when transitioning from a maximized state
TWeakPtr< SWind... CachedOwnerWindow Caches the window that our widgets are contained within
TArray< FMaximi... DeferredMaximizeCommands  
FCurveSequence MaximizeAnimation Curve for animating from a "restored" state to a maximized state
FName MaximizedViewport The current maximized viewport if any
FVector2D MaximizedViewportStartPosition Window-space start position of the viewport that's currently being maximized
FVector2D MaximizedViewportStartSize Window-space start size of the viewport that's currently being maximized
TWeakPtr< ILeve... ParentLevelEditor The optional parent level editor for this layout
TSharedPtr< SWi... ViewportReplacementWidget Dummy widget that we'll inline-replace viewport widgets with while a view is maximized (or made immersive)
FThrottleReques... ViewportResizeThrottleRequest Viewport resize draw throttle request
TSharedPtr< SWi... ViewportsOverlayWidget When maximizing viewports (or making them immersive), this stores the widget we create to wrap the viewport

Constructors

Type Name Description
  FLevelViewportLayout () Constructor

Destructors

Type Name Description
  ~FLevelViewportLayout () Destructor

Functions

Type Name Description
void BeginThrottleForAnimatedResize () Begins a draw throttle for responsiveness when animating a viewports size
void EndThrottleForAnimatedResize () Ends a draw throttle for responsiveness when animating a viewports size
void FinishMaximizeTransition () If a viewport animation is in progress, finishes that transition immediately
FVector2D GetMaximizedViewportPositionOnCanvas () Returns the widget position for viewport transition animations
FVector2D GetMaximizedViewportSizeOnCanvas () Returns the widget size for viewport transition animations
void InitCommonLayoutFromString ( const FString& LayoutString, const FName PerspectiveViewportKey ) Called in after factory of a new layout functions for derived types of layout to init values common to all types
bool IsLevelViewportVisible ( FName InViewport ) Checks to see the specified level viewport is visible in this layout A viewport is visible in a layout if the layout is visible and the viewport is the maximized viewport or there is no maximized viewport
bool IsMaximizeSupported () Checks to see if the specified level viewport supports maximizing one pane
bool IsTransitioning () Returns whether a viewport animation is currently taking place
bool IsViewportImmersive ( FName InViewport ) Checks to see if the specified level viewport is in immersive mode
bool IsViewportMaximized ( FName InViewport ) Checks to see if the specified level viewport is maximized
void MaximizeViewport ( FName ViewportToMaximize, const bool bWantMaximize, const bool bWantImmersive, const bool bAllowAnimation ) Maximizes a specific viewport and hides the others in this layout
void RequestMaximizeViewport ( FName ViewportToMaximize, const bool bWantMaximize, const bool bWantImmersive, const bool bAllowAnimation ) Makes a request to maximize a specific viewport and hide the others in this layout
void SaveCommonLayoutString ( const FString& SpecificLayoutStrin... ) Called in SaveConfig() functions for derived types of layout to save values common to all types
void SetIsReplacement ( bool bInIsReplacement ) Tells this layout whether it was the intial layout or replaced an existing one when the user switched layouts
void TakeHighResScreenShot () Method for taking high res screen shots of viewports

Overridden from FAssetEditorViewportLayout

Type Name Description
TSharedRef< ... BuildViewportLayout ( TSharedPtr< SDockTab > InParentDock..., TSharedPtr< FEditorViewportTabConte..., const FString& LayoutString ) Builds a viewport layout and returns the widget containing the layout
TSharedRef< ... FactoryViewport ( FName InTypeName, const FAssetEditorViewportConstruct... ) Create an instance of a custom viewport from the specified viewport type name
EVisibility OnGetNonMaximizedVisibility () Delegate called to get the visibility of the non-maximized viewports The non-maximized viewports are not visible if there is a maximized viewport on top of them

Overridden from FEditorViewportLayout

Type Name Description
bool IsVisible ()  
void LoadConfig ( const FString& LayoutString )  
void SaveConfig ( const FString& LayoutString )  

Overridden from FTickableObjectBase

Type Name Description
TStatId GetStatId () Return the stat id to use for this tickable
bool IsTickable () Virtual that can be overloaded by the inheriting class.
void Tick ( float DeltaTime ) FTickableEditorObject interface

Classes

Type Name Description
Protected struct FMaximizeViewportCommand Maximize/immersive commands can be queued up at startup to be executed on the first tick.

Ask questions and help your peers Developer Forums

Write your own tutorials or read those from others Learning Library