cohtml.Net.ViewSettings
Settings used when initializing a View.
Inherits from SystemIDisposable
Public Functions
Section titled “Public Functions”| Name | |
|---|---|
| virtual void | Dispose() |
| ViewSettings() |
Public Properties
Section titled “Public Properties”| Name | |
|---|---|
| IViewListener | Listener The ViewListener is notified of events happening in the View. |
| ITimeZoneProvider | TimezoneProvider The ITimeZoneProvider is queried for the timezone. |
| uint | Width The Width of the View. |
| uint | Height The Height of the View. |
| global.System.IntPtr | UserData Passed to the OnRenderingTasksAvailable and OnMonotonicallyIncreasingTimeRequest callbacks. |
| bool | EnableComplexCSSSelectorsStyling Tells if to enable complex CSS selectors when doing style matching. By complex in this context we mean any CSS selector that requires walking the DOM tree to match - that is selectors with any combinator (https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Selectors#Combinators) and selectors with pseudo-classes that depend on the tree like :nth-child(), :first etc. This flag has a performance implication. Views that don’t need such selectors should leave it disabled, which makes style matching significantly faster. |
| bool | InterceptResourceRequests Allows you to intercept resource requests for this view in order to restrict resource access of the view to only specified sets of urls. If InterceptResourceRequests is not explicitly set to true, the default behavior will be to allow every request. |
| Mode | InspectorContextMode The inspector network tab mode. InspectorContextSetting.Mode.Enabled is used by default. This mode is ignored if inspector is completely disabled by cohtml.SystemSettings.EnableDebugger option. |
| uint | MinimumVertexBufferSize Controls the minimum count of vertices allocated when creating vertex buffers. If equal to 0 then default count will be used which is 32768. |
| uint | MinimumIndexBufferSize Controls the minimum count of indices allocated when creating index buffers. If equal to 0 then default count will be used which is 49152. |
| uint | VertexIndexBufferRingSize Controls the size of each ring buffer (the VB ring buffer and the IB ring buffer). Every call to BeginFrame rotates the ring buffer and takes the next available buffer that the GPU should not be using. The acceptable range is between 1 and 8. |
| uint | DoubleClickTime The double-click time is the maximum number of milliseconds that may occur between the first and second click of a double-click. |
| ITextInputHandler | TextInputHandler Notifies of changes to an input elements Can be set to nullptr if the user is not interested in receiving the events. |
| float | StartPanThreshold Controls the minimum length of pans to be performed. |
| bool | ExecuteCommandProcessingWithLayout Tells the view to process all collected front-end commands right after the layout execution on the same thread. When this setting is enabled, Cohtml’s rendering library will be used on two different threads the UI and the render thread. Normally the library will detect that but if you have a use case where your custom engine can execute “UI thread” and rendering tasks on the same thread, you’ll have to enable the multithreaded awareness manually by setting LibraryParams.AllowMultithreadedCommandProcessing to true. |
| bool | EnableComplexTextLayout Legacy option used to manually control the proper display of complex text in languages like Arabic, Hebrew, Farsi, etc. Not used anymore, Cohtml now automatically detects complex text at no additional performance cost. This option is deprecated and will be removed in the future. |
| bool | EnableUISurfacePartitioning Changes the rendering flow so that the user RT is not cleared and the con-partitioned elements are drawn in separate scratch space. |
| bool | EnableImmediateLayout Enabling this immediately recalculates layout before returning a value from some JS methods. |
| bool | EnableUnloadingOfHiddenImages When enabled, elements with background/border/mask images that are hidden by display:none will release their reference to the image resource. An image resource without references will be unloaded from the GPU. References to the same image resource can be held with JS to prevent undesired unloading. When disabled, hidden elements will keep a reference to the image resources which assures that the image will be available on the first draw when the element is shown. |
| bool | EnableGlobalSimpleOpacity This option controls the behaviour of ‘coh-simple-opacity: auto’ (the default value for ‘coh-simple-opacity’) When enabled, all elements with ‘opacity’ will use simple opacity unless ‘coh-simple-opacity: off’ is specified. When disabled, all elements with ‘opacity’ will not use simple opacity unless ‘coh-simple-opacity: on’ is specified. |
| LayoutAlgorithm | LayoutAlgorithm Determines wether the layout algorithm will try to match old yoga behavior, or a more web-compliant one. |
| CompatibilityFlags | CompatibilitySettings Compatibility settings that can be used to enable or disable specific legacy behaviors in the View. |
| global.System.IntPtr | DeveloperOptions Reserved property for internal usage. Do not use it. |
Protected Attributes
Section titled “Protected Attributes”| Name | |
|---|---|
| bool | swigCMemOwn |
Public Functions Documentation
Section titled “Public Functions Documentation”function Dispose
Section titled “function Dispose”virtual void Dispose()function ViewSettings
Section titled “function ViewSettings”ViewSettings()Public Property Documentation
Section titled “Public Property Documentation”property Listener
Section titled “property Listener”IViewListener Listener;The ViewListener is notified of events happening in the View.
property TimezoneProvider
Section titled “property TimezoneProvider”ITimeZoneProvider TimezoneProvider;The ITimeZoneProvider is queried for the timezone.
property Width
Section titled “property Width”uint Width;The Width of the View.
property Height
Section titled “property Height”uint Height;The Height of the View.
property UserData
Section titled “property UserData”global.System.IntPtr UserData;Passed to the OnRenderingTasksAvailable and OnMonotonicallyIncreasingTimeRequest callbacks.
property EnableComplexCSSSelectorsStyling
Section titled “property EnableComplexCSSSelectorsStyling”bool EnableComplexCSSSelectorsStyling;Tells if to enable complex CSS selectors when doing style matching. By complex in this context we mean any CSS selector that requires walking the DOM tree to match - that is selectors with any combinator (https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Selectors#Combinators) and selectors with pseudo-classes that depend on the tree like :nth-child(), :first etc. This flag has a performance implication. Views that don’t need such selectors should leave it disabled, which makes style matching significantly faster.
property InterceptResourceRequests
Section titled “property InterceptResourceRequests”bool InterceptResourceRequests;Allows you to intercept resource requests for this view in order to restrict resource access of the view to only specified sets of urls. If InterceptResourceRequests is not explicitly set to true, the default behavior will be to allow every request.
property InspectorContextMode
Section titled “property InspectorContextMode”Mode InspectorContextMode;The inspector network tab mode. InspectorContextSetting.Mode.Enabled is used by default. This mode is ignored if inspector is completely disabled by cohtml.SystemSettings.EnableDebugger option.
property MinimumVertexBufferSize
Section titled “property MinimumVertexBufferSize”uint MinimumVertexBufferSize;Controls the minimum count of vertices allocated when creating vertex buffers. If equal to 0 then default count will be used which is 32768.
property MinimumIndexBufferSize
Section titled “property MinimumIndexBufferSize”uint MinimumIndexBufferSize;Controls the minimum count of indices allocated when creating index buffers. If equal to 0 then default count will be used which is 49152.
property VertexIndexBufferRingSize
Section titled “property VertexIndexBufferRingSize”uint VertexIndexBufferRingSize;Controls the size of each ring buffer (the VB ring buffer and the IB ring buffer). Every call to BeginFrame rotates the ring buffer and takes the next available buffer that the GPU should not be using. The acceptable range is between 1 and 8.
property DoubleClickTime
Section titled “property DoubleClickTime”uint DoubleClickTime;The double-click time is the maximum number of milliseconds that may occur between the first and second click of a double-click.
property TextInputHandler
Section titled “property TextInputHandler”ITextInputHandler TextInputHandler;Notifies of changes to an input elements Can be set to nullptr if the user is not interested in receiving the events.
property StartPanThreshold
Section titled “property StartPanThreshold”float StartPanThreshold;Controls the minimum length of pans to be performed.
property ExecuteCommandProcessingWithLayout
Section titled “property ExecuteCommandProcessingWithLayout”bool ExecuteCommandProcessingWithLayout;Tells the view to process all collected front-end commands right after the layout execution on the same thread. When this setting is enabled, Cohtml’s rendering library will be used on two different threads the UI and the render thread. Normally the library will detect that but if you have a use case where your custom engine can execute “UI thread” and rendering tasks on the same thread, you’ll have to enable the multithreaded awareness manually by setting LibraryParams.AllowMultithreadedCommandProcessing to true.
property EnableComplexTextLayout
Section titled “property EnableComplexTextLayout”bool EnableComplexTextLayout;Legacy option used to manually control the proper display of complex text in languages like Arabic, Hebrew, Farsi, etc. Not used anymore, Cohtml now automatically detects complex text at no additional performance cost. This option is deprecated and will be removed in the future.
property EnableUISurfacePartitioning
Section titled “property EnableUISurfacePartitioning”bool EnableUISurfacePartitioning;Changes the rendering flow so that the user RT is not cleared and the con-partitioned elements are drawn in separate scratch space.
property EnableImmediateLayout
Section titled “property EnableImmediateLayout”bool EnableImmediateLayout;Enabling this immediately recalculates layout before returning a value from some JS methods.
property EnableUnloadingOfHiddenImages
Section titled “property EnableUnloadingOfHiddenImages”bool EnableUnloadingOfHiddenImages;When enabled, elements with background/border/mask images that are hidden by display:none will release their reference to the image resource. An image resource without references will be unloaded from the GPU. References to the same image resource can be held with JS to prevent undesired unloading. When disabled, hidden elements will keep a reference to the image resources which assures that the image will be available on the first draw when the element is shown.
property EnableGlobalSimpleOpacity
Section titled “property EnableGlobalSimpleOpacity”bool EnableGlobalSimpleOpacity;This option controls the behaviour of ‘coh-simple-opacity: auto’ (the default value for ‘coh-simple-opacity’) When enabled, all elements with ‘opacity’ will use simple opacity unless ‘coh-simple-opacity: off’ is specified. When disabled, all elements with ‘opacity’ will not use simple opacity unless ‘coh-simple-opacity: on’ is specified.
property LayoutAlgorithm
Section titled “property LayoutAlgorithm”LayoutAlgorithm LayoutAlgorithm;Determines wether the layout algorithm will try to match old yoga behavior, or a more web-compliant one.
property CompatibilitySettings
Section titled “property CompatibilitySettings”CompatibilityFlags CompatibilitySettings;Compatibility settings that can be used to enable or disable specific legacy behaviors in the View.
property DeveloperOptions
Section titled “property DeveloperOptions”global.System.IntPtr DeveloperOptions;Reserved property for internal usage. Do not use it.
Protected Attributes Documentation
Section titled “Protected Attributes Documentation”variable swigCMemOwn
Section titled “variable swigCMemOwn”bool swigCMemOwn;© 2026 Coherent Labs. All rights reserved.