2.9.16
Coherent GT
A modern user interface library for games
Coherent::UIGT::ViewInfo Struct Reference

Encapsulates the options of a View. More...

#include <Coherent/Coherent/UIGT/ViewInfo.h>

Public Attributes

unsigned Width
 The Width of a View in pixels.
 
unsigned Height
 The Height of a View in pixels.
 
bool IsTransparent
 Defines if a view is transparent or not. A transparent view can be have transparent parts that will be correctly blended with the client's surfaces. Non-transparent views are always implicitly composited as if on a white background. More...
 
ResourceHandlerResourceHandlerInstance
 Pointer to the resource handler used when the View needs to load some local resource.
 
ViewListenerViewListenerInstance
 The ViewListener is used to listen to events fired by the View.
 
float ClickThroughAlphaThreshold
 The alpha threshold for click-through queries.
 
float AnimationFrameDefer
 Sets the minimal frame time between invocations of requested animation frames in seconds. Decreasing the number will trigger animations more often but will consume more CPU. A good figure is around half the frame-rate of the application.
 
bool EmitPerformanceWarnings
 If the value is set to 'true', Coherent GT will measure the performance of the View and emit warnings if it detects long execution times or other unusual patterns, it will emit a warning. You can change the threshold via the PerformanceThresholds member. More...
 
PerfWarningThresholds PerformanceThresholds
 Values that govern the threshold that will cause a performance warning if exceeded.
 
bool EnableAdditionalDefaultStyles
 If true, in the page will be added additional default styles for scrollbars. Those styles will allow pages outside the user control to look correctly (like websites), but incur a performance penalty. More...
 
bool InterceptResourceLoading
 If true the ResourceHandleManager will use ResourceHandler::OnShouldLoadResourceRequest which allow you to intercept specific resources or modify specific headers.
 
bool OffscreenCanvasRendering
 By default offscreen canvas rendering is disabled and all rendering commands execution is deferred until the canvas becomes visible. Setting this to true will force offscreen canvases commands to be executed every frame.
 
unsigned MinimumVertexBufferSize
 This controls the mininum count of vertices allocated when creating vertex buffers. If equal to 0 then default count will be used which is 32768.
 
unsigned MinimumIndexBufferSize
 This controls the mininum count of indices allocated when creating index buffers. If equal to 0 then default count will be used which is 49152.
 
bool AllowInspecting
 This will allow the inspector to show and work with this view. The default value is true.
 

Detailed Description

Encapsulates the options of a View.

Member Data Documentation

◆ EmitPerformanceWarnings

bool Coherent::UIGT::ViewInfo::EmitPerformanceWarnings

If the value is set to 'true', Coherent GT will measure the performance of the View and emit warnings if it detects long execution times or other unusual patterns, it will emit a warning. You can change the threshold via the PerformanceThresholds member.

Note
Warning are timed and will not spam the log. After a warning has fired, a certain amount of time and frames will pass before the warning is repeated.
Warnings will not be emitted while a View is loading.

◆ EnableAdditionalDefaultStyles

bool Coherent::UIGT::ViewInfo::EnableAdditionalDefaultStyles

If true, in the page will be added additional default styles for scrollbars. Those styles will allow pages outside the user control to look correctly (like websites), but incur a performance penalty.

Note
If possible leave this option off and manually style only the scrollbars of elements that will effectively have them. Enabling them can reduce perfromance in pages with many animations and complex styles. Avoid also setting the "scrollbar" styles on all elements manually. Prefer the most sepcific CSS selector possible.

◆ IsTransparent

bool Coherent::UIGT::ViewInfo::IsTransparent

Defines if a view is transparent or not. A transparent view can be have transparent parts that will be correctly blended with the client's surfaces. Non-transparent views are always implicitly composited as if on a white background.

Note
Do not blend non-transparent views.