AViewport
- Module
- Arc
- Header
#include "Arc/Framework/AViewport.h"- Namespace
Arcf
Public functions
| Returns | Name | Description |
|---|---|---|
ARC_WIDGET_ARGS | ||
ArcVec2 | ComputeDesiredSize | |
bool | CanCacheDesiredSize | A constant minimum. |
bool | DesiredSizeDependsOnChildren | |
bool | CanRetainPaint | Refused: the surface behind it is re-rendered every frame, and the client draws over it from state no widget setter covers. |
int32_t | OnPaint | |
CReply | OnMouseButtonDown | |
CReply | OnMouseButtonUp | |
CReply | OnMouseMove | |
CReply | OnMouseWheel | |
CReply | OnKeyDown | |
CReply | OnKeyUp | |
void | SetViewportClient | |
void | SetRenderTarget | |
void | SetRenderTargetUVMax | Top-left fraction of the target that holds valid content — the active subrect when the source is a dynamic-resolution chain allocated larger than the frame rendered. |
void | SetLateRenderTarget | A target the render thread swaps after this widget painted (see CArcLateTexture); it wins over SetRenderTarget while set. |
const char* | GetTypeName | |
uint64_t | GetPaintCount | How many times the viewport has been painted. |
Function details
ARC_WIDGET_ARGS
ARC_WIDGET_ARGS(AViewport) ARC_ARG(IArcViewportClient*, ViewportClient) ARC_ARG(IArcRHITexture*, RenderTarget) ARC_WIDGET_ARGS_END() void Construct(const CArguments& args)ComputeDesiredSize
ArcVec2 ComputeDesiredSize(float scale) const overrideCanCacheDesiredSize
bool CanCacheDesiredSize() const overrideA constant minimum. The render target behind it changes every frame and never reaches layout — the viewport takes the space its slot gives it.
DesiredSizeDependsOnChildren
bool DesiredSizeDependsOnChildren() const overrideCanRetainPaint
bool CanRetainPaint() const overrideRefused: the surface behind it is re-rendered every frame, and the client draws over it from state no widget setter covers.
OnPaint
int32_t OnPaint(const CArcPaintArgs& args, const CGeometry& geo, CArcUIRenderer& renderer, int32_t layerId) const overrideOnMouseButtonDown
CReply OnMouseButtonDown(const CGeometry& geo, const CPointerEvent& event) overrideOnMouseButtonUp
CReply OnMouseButtonUp(const CGeometry& geo, const CPointerEvent& event) overrideOnMouseMove
CReply OnMouseMove(const CGeometry& geo, const CPointerEvent& event) overrideOnMouseWheel
CReply OnMouseWheel(const CGeometry& geo, const CPointerEvent& event) overrideOnKeyDown
CReply OnKeyDown(const CGeometry& geo, const CKeyEvent& event) overrideOnKeyUp
CReply OnKeyUp(const CGeometry& geo, const CKeyEvent& event) overrideSetViewportClient
void SetViewportClient(IArcViewportClient* client)SetRenderTarget
void SetRenderTarget(IArcRHITexture* target)SetRenderTargetUVMax
void SetRenderTargetUVMax(const ArcVec2& uvMax)Top-left fraction of the target that holds valid content — the active subrect when the source is a dynamic-resolution chain allocated larger than the frame rendered. (1,1) samples it all.
SetLateRenderTarget
void SetLateRenderTarget(const std::shared_ptr<CArcLateTexture>& late)A target the render thread swaps after this widget painted (see CArcLateTexture); it wins over SetRenderTarget while set.
GetTypeName
const char* GetTypeName() const overrideGetPaintCount
uint64_t GetPaintCount() constHow many times the viewport has been painted. A host stops rendering into a viewport whose count stops moving: its tab is behind another, or its window is gone, and nothing shows the image.