SBarVisualizer

Bars Visualizer. Contains a list of bars for each profiler category

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

TaskGraph

Header

/Engine/Source/Developer/TaskGraph/Public/SBarVisualizer.h

Include

#include "SBarVisualizer.h"

Syntax

class SBarVisualizer : public SCompoundWidget

Remarks

Bars Visualizer. Contains a list of bars for each profiler category

Variables

Name Description

Protected variable

TSharedPtr< SLi...

 

BarGraphsList

A pointer to the ListView of threads graph bars

Protected variable

bool

 

bSuppressBarGraphSelectionChangedDelegate

Should the OnBarGraphSelectionChangedDelegate be suppressed to avoid event loops

Protected variable

TArray< TShared...

 

Graphs

List of all SGraphBar widgets in the tree

Protected variable

FOnBarEventSele...

 

OnBarEventSelectionChangedDelegate

Delegate used when single event on the bar graph is selected

Protected variable

FOnBarGraphCont...

 

OnBarGraphContextMenuDelegate

Delegate used when the user right-clicks on a bar graph

Protected variable

FOnBarGraphExpa...

 

OnBarGraphExpansionChangedDelegate

Delegate used when bar graph selection changes

Protected variable

FOnBarGraphSele...

 

OnBarGraphSelectionChangedDelegate

Delegate used when bar graph selection changes

Protected variable

TSharedPtr< FVi...

 

ProfileData

Original profiler data

Protected variable

TArray< TShared...

 

ProfileDataView

Profiler data view (filtered data)

Protected variable

TSharedPtr< SSc...

 

ScrollBar

A pointer to the horizontal scrollbar widget

Protected variable

float

 

ScrollbarOffset

Scrollbar offset

Protected variable

TSharedPtr< FVi...

 

SelectedBarGraph

Currently selected bar graph

Protected variable

TSharedPtr< STi...

 

Timeline

A pointer to the horizontal scrollbar widget

Protected variable

EVisualizerView...

 

ViewMode

Bar visualizer view mode

Protected variable

TSharedPtr< STe...

 

ZoomLabel

A pointer to the Zoom Label widget

Protected variable

float

 

ZoomSliderValue

Zoom slider value

Functions

Name Description

Protected function

void

 

AdjustTimeline

(
    TSharedPtr< FVisualizerEvent > InEv...
)

Adjusts timeline to match the selected event's start and duration

Protected function Const

bool

 

CheckViewMode

(
    EVisualizerViewMode::Type InMode
)

Given a view mode checks if it's the currently selected one

Protected function

void

 

ClearBarSelection

(
    TSharedPtr< FVisualizerEvent > Grap...,
    TSharedPtr< FVisualizerEvent > Sele...
)

Recursively clears selection on all bar graphs

Public function

void

 

Construct

(
    const FArguments& InArgs
)

Construct the widget

Protected function

void

 

CreateDataView()

Creates filtered data

Protected function

void

 

CreateFlattenedData

(
    TSharedPtr< FVisualizerEvent > InDa...,
    TArray< TSharedPtr< FVisualizerEven...
)

Creates flattened data view

Protected function

FReply

 

ExpandBar

(
    TSharedPtr< FVisualizerEvent > BarG...
)

Called when the user clicked bar graph's expand button

Protected function

TSharedPtr< ...

 

FindSelectedEventsParent

(
    TArray< TSharedPtr< FVisualizerEven...,
    TSharedPtr< FVisualizerEvent > Sele...
)

Protected function Const

EVisibility

 

GetHomeButtonVisibility()

Checks if home button should be visible

Protected function Const

float

 

GetMaxGraphOffset()

Gets the maximum graph offset value for the graph bars

Protected function Const

float

 

GetMaxScrollOffsetFraction()

Gets the maximum scroll offset fraction value for the horizontal scrollbar

Protected function Const

FText

 

GetSelectedCategoryName()

Gets the currently displayed hierarchy node name

Protected function Const

EVisibility

 

GetToParentButtonVisibility()

Checks if 'to parent' button should be visible

Protected function Const

float

 

GetZoom()

Gets the actual zoom level for the graph bars

Protected function Const

FText

 

GetZoomLabel()

Constructs the zoom label string based on the current zoom level value.

Protected function Const

float

 

GetZoomValue()

Callback used to get the current zoom slider value.

Public function

void

 

HandleEventSelectionChanged

(
    TSharedPtr< FVisualizerEvent > Sele...
)

Handles selection change in the events tree

Protected function

bool

 

IsExpandable

(
    TSharedPtr< FVisualizerEvent > InEv...
)

Checks if the selected event has children with children

Protected function

void

 

OnBarEventSelectionChanged

(
    TSharedPtr< FVisualizerEvent > Sele...,
    ESelectInfo::Type SelectInfo,
    int32 BarId
)

Function called when the user selects an event bar in the graph

Protected function

void

 

OnBarGeometryChanged

(
    FGeometry Geometry
)

Called when bar graph geometry (size) changes

Protected function

void

 

OnBarGraphSelectionChanged

(
    TSharedPtr< FVisualizerEvent > Sele...,
    ESelectInfo::Type SelectInfo
)

Function called when the currently selected bar graph changes

Protected function

FReply

 

OnBarRightClicked

(
    const FGeometry& BarGeometry,
    const FPointerEvent& MouseEvent,
    TSharedPtr< FVisualizerEvent > Sele...
)

Forwards right-click event to the visualizer main frame

Protected function

TSharedRef< ...

 

OnGenerateWidgetForList

(
    TSharedPtr< FVisualizerEvent > InIt...,
    const TSharedRef< STableViewBase > ...
)

Generates SGraphBar widget for the threads list

Protected function

void

 

OnGetChildrenForList

(
    TSharedPtr< FVisualizerEvent > InIt...,
    TArray< TSharedPtr< FVisualizerEven...
)

Generates children for the specified tree view item

Protected function

FReply

 

OnHomeClicked()

Handles clickong on 'Home' button

Protected function

void

 

OnSetZoomValue

(
    float NewValue
)

Callback used to handle zoom slider

Protected function

FReply

 

OnToParentClicked()

Handles clicking on 'Back to parent' button

Protected function

void

 

ScrollBar_OnUserScrolled

(
    float InScrollOffsetFraction
)

Callback for scrolling the horizontal scrollbar

Protected function

void

 

SetViewMode

(
    EVisualizerViewMode::Type InMode
)

Sets the current view mode

Classes

Name

Description

Public struct

FArguments

Typedefs

Name

Description

FOnBarEventSelectionChanged

Delegate used when a single event on the bar graph is selected

FOnBarGraphContextMenu

Delegate used when the user right-clicks on a bar graph

FOnBarGraphExpansionChanged

Delegate used when bar graph expansion changes

FOnBarGraphSelectionChanged

Delegate used when bar graph selection changes

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss