API ReferenceSandbox.UI

StyleBlockclass

A CSS rule - ie ".chin { width: 100%; height: 100%; }"

objectStyleBlock
Namespace
Sandbox.UI
Assembly
Sandbox.Engine
Declaration
public sealed class Sandbox.UI.StyleBlock

Constructors1

Showing 1 constructors

Methods5

Showing 5 methods

public virtual sealed bool SetRawValue(string key, string value, string originalValue = null)PUBLICVIRTUAL

Update a raw style value

ParameterTypeDescription
keystring
valuestring
originalValue = nullstring
Returns:bool

public bool SetSelector(string selector, Sandbox.UI.StyleBlock parent = null)PUBLIC

ParameterTypeDescription
selectorstring
parent = nullStyleBlock
Returns:bool

public Sandbox.UI.StyleSelector Test(Sandbox.UI.IStyleTarget target, Sandbox.UI.PseudoClass forceFlag = 0)PUBLIC

Test whether target passes our selector tests. We use forceFlag to do alternate tests for flags like ::before and ::after. It's basically added to the target's pseudo class list for the test.

ParameterTypeDescription
targetIStyleTarget
forceFlag = 0PseudoClass
Returns:StyleSelector

public bool TestBroadphase(Sandbox.UI.IStyleTarget target)PUBLIC

Tests a few broadphase conditions to build a list of feasible styleblocks tailored for a panel.

ParameterTypeDescription
targetIStyleTarget
Returns:bool

Properties5

Showing 5 properties

public virtual sealed string Sandbox.UI.StyleBlock.AbsolutePath { get; set; }PUBLICVIRTUALGETSET

The absolute on disk filename for this style block (or null if not on disk)

Returns:string

public virtual sealed int Sandbox.UI.StyleBlock.FileLine { get; set; }PUBLICVIRTUALGETSET

The line in the file containing this style block

Returns:int

public virtual sealed string Sandbox.UI.StyleBlock.FileName { get; set; }PUBLICVIRTUALGETSET

The filename of the file containing this style block (or null if none)

Returns:string

public virtual sealed System.Collections.Generic.IEnumerable`1<string> Sandbox.UI.StyleBlock.SelectorStrings { get; set; }PUBLICVIRTUALGETSET

A list of selectors for this block

Returns:IEnumerable<string>

On this page