Navigation
API > API/Plugins > API/Plugins/ImageWidgets
Generic viewport for displaying and interacting with 2D image-like content. The drawing of the images is deferred to an
| Name | SImageViewport |
| Type | class |
| Header File | /Engine/Plugins/Experimental/ImageWidgets/Source/ImageWidgets/Public/SImageViewport.h |
| Include Path | #include "SImageViewport.h" |
Syntax
class SImageViewport : public SEditorViewport
Inheritance Hierarchy
- FSharedFromThisBase → TSharedFromThis → SWidget → SCompoundWidget → SEditorViewport → SImageViewport
- FSlateControlledConstruction → SWidget → SCompoundWidget → SEditorViewport → SImageViewport
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
SImageViewport() |
SImageViewport.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~SImageViewport() |
SImageViewport.h |
Classes
| Name | Remarks |
|---|---|
| FStatusBarExtender | Contains any extensions widgets for the viewport toolbar. |
Structs
| Name | Remarks |
|---|---|
| FArguments | |
| FControllerSettings | Settings related to viewport controls. |
| FDrawSettings | Settings related to drawing viewport contents other than the image itself. |
| FOverlaySettings | Settings related to the viewport overlay. |
| FPixelCoordinatesUnderCursorResult | Result for calls to |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| ABComparison | TPimplPtr< FImageABComparison > | Data and logic related to AB comparisons. This is effectively unused when | SImageViewport.h | |
| bABComparisonEnabled | bool | Flag that determines is AB comparison widgets are enabled or not. | SImageViewport.h | |
| DrawSettings | TAttribute< FDrawSettings > | Makes the draw settings available either as fixed values or via a callback to the outside of the viewport. | SImageViewport.h | |
| ImageViewer | TSharedPtr< IImageViewer > | The image viewer that holds and draws the actual images. | SImageViewport.h | |
| ImageViewportClient | TSharedPtr< FImageViewportClient > | The viewport client that takes care of camera controls and displaying the viewport contents. | SImageViewport.h | |
| ImageViewportToolbar | TSharedPtr< SImageViewportToolbar > | The toolbar that controls some of the behavior of the viewport and optionally also the image viewer via toolbar extensions. | SImageViewport.h | |
| OverlaySettings | TAttribute< FOverlaySettings > | Makes the overlay settings available either as fixed values or via a callback to the outside of the viewport. | SImageViewport.h | |
| StatusBarExtender | TSharedPtr< FStatusBarExtender > | Status bar extensions provided by the call to | SImageViewport.h | |
| ToolbarExtender | TSharedPtr< FExtender > | Toolbar extensions provided by the call to | SImageViewport.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void Construct
(
const FArguments& InArgs, |
Function used by Slate to construct the image viewport widget with the given arguments. | SImageViewport.h | |
| Provides access to the viewport toolbar, which is needed to dynamically generate certain toolbar widgets, e.g. an | SImageViewport.h | ||
| Provides the pixel coordinates under the cursor. | SImageViewport.h | ||
void RequestRedraw() |
Request to redraw the viewport contents as soon as possible. | SImageViewport.h | |
void ResetController
(
FIntPoint ImageSize |
Resets the camera controller to default values. | SImageViewport.h | |
void ResetMip() |
Resets the MIP level to the default. | SImageViewport.h | |
void ResetZoom
(
FIntPoint ImageSize |
Resets the zoom to default. | SImageViewport.h |
Overridden from SEditorViewport
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void BindCommands() |
SEditorViewport overrides - begin. | SImageViewport.h | |
virtual bool IsVisible() |
SImageViewport.h |
Protected
Overridden from SEditorViewport
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual TSharedRef< FEditorViewportClient > MakeEditorViewportClient() |
SImageViewport.h | ||
virtual void PopulateViewportOverlays
(
TSharedRef< SOverlay > Overlay |
SImageViewport.h |
See Also
- IImageViewer implementation that needs to be provided upon construction. This viewport only uses the metadata provided by the image viewer to have sufficient information about the image without being aware of its actual format or contents.