Detailed Description

Base class for any property of an element that can be visually displayed, e.g. backgrounds and borders.

Inheritance diagram for Css.DisplayableProperty:
Css.BackgroundColour Css.BackgroundImage Css.BackgroundShadow Css.BorderProperty Css.DisplayablePropertyGroup Css.RasterDisplayableProperty Css.RoundBorderInverseProperty Css.SelectionRenderingProperty Css.TextRenderingProperty Css.TextShadowProperty Css.TextStrokeProperty

Public Member Functions

 DisplayableProperty (RenderableData data)
 Creates a new displayable property for the given render data. More...
 
MeshBlock GetFirstBlock (Renderman renderer)
 Gets the first rendered block of this property. Used during Paint passes. More...
 
void SetVisibility (bool visible)
 Call this when the visibility of this property as a whole changes. More...
 
virtual void OnBatchDestroy ()
 Called when the isolation batch for this property gets removed. More...
 
void Change (string property, Value newValue)
 Called when a named css property changes. More...
 
void ClearBlocks ()
 Clears all mesh blocks that this property has allocated. More...
 
void WentOffScreen ()
 
virtual bool Render (bool first, LayoutBox box, Renderman renderer)
 Make this property visible by forcing it to redraw. More...
 
virtual void ApplyTransform (Matrix4x4 delta, Renderman renderer)
 Transforms all the verts by the given delta matrix. Used during a Paint only. More...
 
virtual void RequestPaint ()
 Requests for a paint event to occur. Note that paint events are more efficient than a layout as they only refresh the mesh colours and uvs rather than the whole mesh. More...
 
void SetBatchMaterial (Renderman renderer, Material material)
 Sets the current batches material. More...
 
void RequestLayout ()
 Requests for a layout event to occur. Note that paint events are more efficient than a layout as they only refresh the mesh colours and uvs rather than the whole mesh. More...
 
virtual void Paint (LayoutBox box, Renderman renderer)
 Called when a paint event occurs. Paint events don't relocate the whole UI so are quick and efficient. More...
 
MeshBlock Add (Renderman renderer)
 
virtual void PostProcess (LayoutBox box, Renderman renderer)
 Called after a render pass. More...
 
void Isolate ()
 Isolates this property from the rest of the UI such that it can have a custom mesh/shader/texture etc. More...
 
void Include ()
 Reverses Css.DisplayableProperty.Isolate by re-including this property in the main UI batch. More...
 
bool IsIsolated ()
 Checks if this is an isolated property - that's one which is seperate and takes its own drawcall. More...
 
AtlasLocation RequireImage (AtlasEntity image)
 

Public Attributes

bool Visible
 True if this is currently visible on screen. More...
 
bool Isolated
 True if this property is isolated and has a seperate mesh and material from everything else. More...
 
short BlockCount
 The number of mesh blocks that this property has allocated. More...
 
RenderableData RenderData
 The parent render data that this is a property of. More...
 
bool GotBatchAlready
 Only applies to Isolated properties. Set to true when this property has allocated a UIBatch on the current layout. More...
 

Protected Member Functions

virtual void OnChange (string property, Value newValue)
 Called when a named css property changes. More...
 

Package Functions

virtual bool NowOnScreen ()
 Called when this element goes on screen. More...
 
virtual void NowOffScreen ()
 Called when this element goes off screen (or is removed from the DOM). More...
 
virtual void Layout (LayoutBox box, Renderman renderer)
 Called when a layout event occurs. Layout events relocate the whole UI so should be used less frequently than a paint event. More...
 

Package Attributes

UIBatch Batch
 The batch that this was allocated to. More...
 
int FirstBlockIndex
 The block index in the first buffer. With this, all blocks belonging to this property can be quickly discovered. More...
 

Properties

virtual int DrawOrder [get]
 This property's draw order. More...
 
virtual bool IsBackground [get]
 True if this paints across the whole background of the element. More...
 
bool Paintable [get]
 Checks if this property can be repainted. More...
 

Constructor & Destructor Documentation

Css.DisplayableProperty.DisplayableProperty ( RenderableData  data)
inline

Creates a new displayable property for the given render data.

Member Function Documentation

MeshBlock Css.DisplayableProperty.Add ( Renderman  renderer)
inline
virtual void Css.DisplayableProperty.ApplyTransform ( Matrix4x4  delta,
Renderman  renderer 
)
inlinevirtual

Transforms all the verts by the given delta matrix. Used during a Paint only.

Reimplemented in Css.DisplayablePropertyGroup.

void Css.DisplayableProperty.Change ( string  property,
Value  newValue 
)
inline

Called when a named css property changes.

Parameters
propertyThe css property that changed.
newValueThe properties new value. It may also be null.
void Css.DisplayableProperty.ClearBlocks ( )
inline

Clears all mesh blocks that this property has allocated.

MeshBlock Css.DisplayableProperty.GetFirstBlock ( Renderman  renderer)
inline

Gets the first rendered block of this property. Used during Paint passes.

void Css.DisplayableProperty.Include ( )
inline

Reverses Css.DisplayableProperty.Isolate by re-including this property in the main UI batch.

bool Css.DisplayableProperty.IsIsolated ( )
inline

Checks if this is an isolated property - that's one which is seperate and takes its own drawcall.

Returns
True if it is isolated; false otherwise.
void Css.DisplayableProperty.Isolate ( )
inline

Isolates this property from the rest of the UI such that it can have a custom mesh/shader/texture etc.

virtual void Css.DisplayableProperty.Layout ( LayoutBox  box,
Renderman  renderer 
)
inlinepackagevirtual
virtual void Css.DisplayableProperty.NowOffScreen ( )
inlinepackagevirtual

Called when this element goes off screen (or is removed from the DOM).

Reimplemented in Css.BackgroundImage, Css.TextRenderingProperty3D, Css.TextRenderingProperty, Css.RasterDisplayableProperty, and Css.DisplayablePropertyGroup.

virtual bool Css.DisplayableProperty.NowOnScreen ( )
inlinepackagevirtual
virtual void Css.DisplayableProperty.OnBatchDestroy ( )
inlinevirtual

Called when the isolation batch for this property gets removed.

Reimplemented in Css.BackgroundImage, and Css.DisplayablePropertyGroup.

virtual void Css.DisplayableProperty.OnChange ( string  property,
Value  newValue 
)
inlineprotectedvirtual

Called when a named css property changes.

Parameters
propertyThe css property that changed.
newValueThe properties new value. It may also be null.
virtual void Css.DisplayableProperty.Paint ( LayoutBox  box,
Renderman  renderer 
)
inlinevirtual
virtual void Css.DisplayableProperty.PostProcess ( LayoutBox  box,
Renderman  renderer 
)
inlinevirtual

Called after a render pass.

Reimplemented in Css.BorderProperty.

virtual bool Css.DisplayableProperty.Render ( bool  first,
LayoutBox  box,
Renderman  renderer 
)
inlinevirtual

Make this property visible by forcing it to redraw.

Reimplemented in Css.BorderProperty.

void Css.DisplayableProperty.RequestLayout ( )
inline

Requests for a layout event to occur. Note that paint events are more efficient than a layout as they only refresh the mesh colours and uvs rather than the whole mesh.

virtual void Css.DisplayableProperty.RequestPaint ( )
inlinevirtual

Requests for a paint event to occur. Note that paint events are more efficient than a layout as they only refresh the mesh colours and uvs rather than the whole mesh.

Reimplemented in Css.TextRenderingProperty3D.

AtlasLocation Css.DisplayableProperty.RequireImage ( AtlasEntity  image)
inline
void Css.DisplayableProperty.SetBatchMaterial ( Renderman  renderer,
Material  material 
)
inline

Sets the current batches material.

void Css.DisplayableProperty.SetVisibility ( bool  visible)
inline

Call this when the visibility of this property as a whole changes.

void Css.DisplayableProperty.WentOffScreen ( )
inline

Member Data Documentation

UIBatch Css.DisplayableProperty.Batch
package

The batch that this was allocated to.

short Css.DisplayableProperty.BlockCount

The number of mesh blocks that this property has allocated.

int Css.DisplayableProperty.FirstBlockIndex
package

The block index in the first buffer. With this, all blocks belonging to this property can be quickly discovered.

bool Css.DisplayableProperty.GotBatchAlready

Only applies to Isolated properties. Set to true when this property has allocated a UIBatch on the current layout.

bool Css.DisplayableProperty.Isolated

True if this property is isolated and has a seperate mesh and material from everything else.

RenderableData Css.DisplayableProperty.RenderData

The parent render data that this is a property of.

bool Css.DisplayableProperty.Visible

True if this is currently visible on screen.

Property Documentation

virtual int Css.DisplayableProperty.DrawOrder
get

This property's draw order.

virtual bool Css.DisplayableProperty.IsBackground
get

True if this paints across the whole background of the element.

bool Css.DisplayableProperty.Paintable
get

Checks if this property can be repainted.

Returns
True if this property has blocks allocated as they can be repainted; false otherwise.