Holds computed layout boxes for nodes and any style information.
Public Member Functions | |
void | RequestPaintAll () |
Requests that the document repaints this element, when possible. More... | |
void | RequestPaint () |
Requests that the document repaints this element, when possible. More... | |
void | RequestLayout () |
Requests that the renderer performs a layout on the next update. Note that layouts are more expensive than a paint. Paints simply update vertex colours and uvs where as layouts rebuild the whole mesh. More... | |
void | RequestFastLayout () |
Requests that the renderer performs a shortform layout on the next update. More... | |
float | ScaleToWorldX (float value) |
Maps the given pixel value to an amount in world units. More... | |
float | ScaleToWorldY (float value) |
Maps the given pixel value to an amount in world units. More... | |
void | RepaintAll (Renderman renderer) |
Repaints this and all its childnodes. More... | |
void | Repaint (Renderman renderer) |
Repaints this at OffsetLeft/OffsetTop with the given PixelWidth and PixelHeight values. A paint is less intensive than a layout as it only updates the uv/vert colours of the mesh. More... | |
TextRenderingProperty | RequireTextProperty () |
Creates a TextRenderingProperty if one doesn't exist yet. Note that it can be created as a 3D one if text-extrude is set. More... | |
LayoutBox | BoxAt (float x, float y) |
Gets the box which contains the given x/y coords. More... | |
RenderableData (Node node) | |
DisplayableProperty | GetProperty (Type propertyType) |
Gets a render property of the given type. More... | |
int | GetPropertyIndex (Type propertyType) |
Gets the index of a render property of the given type. -1 if it's not found. More... | |
void | AddOrReplaceProperty (DisplayableProperty property, Type propertyType) |
Adds or replaces a render property of the given type. More... | |
void | Render (bool first, LayoutBox box, Renderman renderer) |
Draws this at OffsetLeft/OffsetTop with the given PixelWidth and PixelHeight values. More... | |
void | Render (Renderman renderer) |
This is the second pass of layout requests. It positions the element in global screen space and also fires the render events which in turn generate or reallocates mesh blocks. This call applies to all it's children elements too. More... | |
void | WentOffScreen () |
virtual void | UpdateCss (Renderman renderer) |
Called just before reflow to update CSS. More... | |
float | ShrinkToFit () |
This nodes 'shrink to fit' width. More... | |
float | GetWidth (bool noAuto, out bool wasAuto) |
Obtains a defined width for non-inline elements. (Special case for things like img though). More... | |
virtual void | Reflow (Renderman renderer) |
Positions this node and all its children relative to their parent. More... | |
void | RuleRemoved (Css.StyleRule rule) |
Refreshes this elements css style if the given selector matches its own. More... | |
void | RuleAdded (Css.StyleRule rule) |
Refreshes this elements css style if the given selector matches its own. More... | |
Public Attributes | |
Node | Node |
The node that this is CSS data for. More... | |
float | ValueScale =1f |
The zoom scale for all pixel based values on this style. More... | |
UpdateMode | NextUpdateMode =UpdateMode.None |
True if this element is being repainted on the next frame. More... | |
LayoutBox | FirstBox |
The first layout box. Forms a linked list using NextInElement. More... | |
LayoutBox | LastBox |
The last layout box. Forms a linked list using NextInElement. More... | |
RenderableData | Next |
Used for paint events. The next element style to paint. More... | |
RenderableData | Ancestor |
This data's rendering ancestor. Used to resolve relative units and for rapid reflow. Usually set to Node.parentNode in the normal flow. More... | |
SortedDictionary< int, RenderableData > | StackingContexts |
All stacking contexts can have child stacking contexts. This exists if this is a stacking context. It will always contain at least 1 entry (at index 0) which refers to this node. That essentially enables negative z-index values to render before the normal flow. More... | |
VirtualElements | Virtuals |
The set of virtual elements if it exists. More... | |
DisplayableProperty[] | RenderProperties |
The set of renderable properties on this element. More... | |
Package Functions | |
float | ParentInnerWidth () |
Gets the most suitable parent inner width. More... | |
float | ResolveParentDecimal (CssProperty prop) |
Resolves the value from the parent of this node for the given property. More... | |
Package Attributes | |
ScreenRegion | OnScreenRegion |
The region that this element takes on the screen. Null if it's offscreen. More... | |
Properties | |
RasterDisplayableProperty | RasterProperty [get, set] |
Gets or sets a RasterDisplayableProperty. More... | |
bool | IsStackingContext [get, set] |
True if this is a stacking context. More... | |
bool | IsOutOfFlow [get] |
True if this is not positioned in the flow More... | |
ReflowDocument | Document [get] |
A reflow-capable document. More... | |
Node | parentNode [get] |
Gets the parent node. More... | |
int | BoxCount [get] |
Counts the number of boxes in the box linked list (starting at FirstBox). More... | |
RenderableData | parentData [get] |
The parent renderable data. More... | |
ComputedStyle | computedStyle [get] |
The computed style to use. More... | |
float | OffsetTop [get] |
The global offset from the top edge. Computed in secondary layout pass. More... | |
float | OffsetLeft [get] |
The global offset from the left edge. Computed in secondary layout pass. More... | |
float | PixelWidth [get] |
The total width in pixels of this element. More... | |
float | PixelHeight [get] |
The total height in pixels of this element. More... | |
float | ContentWidth [get] |
The width of the content inside the box. Note that this is different from both InnerWidth and PixelWidth (which describe the "window" in which the content is seen). More... | |
float | ContentHeight [get] |
The width of the content inside the box. Note that this is different from both InnerWidth and PixelWidth (which describe the "window" in which the content is seen). More... | |
float | InnerWidth [get] |
The width of this element, excluding the border and padding. More... | |
float | InnerHeight [get] |
The height of this element, excluding the border and padding. More... | |
bool | Ready [get] |
True if the box model is ready and loaded. More... | |
BorderProperty | Border [get, set] |
This handles rendering the border around this element, if any. More... | |
BackgroundImage | BGImage [get, set] |
This handles rendering a tiled, clipped, offset background image for this element. More... | |
BackgroundColour | BGColour [get, set] |
This handles rendering a solid background colour for this element. More... | |
int | EndSpaceSize [get] |
The width in pixels of the last whitespace of this element, if it's got one. More... | |
TextRenderingProperty | Text [get, set] |
This handles rendering text contained by this element. More... | |
TextRenderingProperty3D | Text3D [get, set] |
This handles rendering 3D text contained by this element. Use text-extrude CSS property (a number). More... | |
SelectionRenderingProperty | Selection [get, set] |
Selection zone. More... | |
bool | HasBackground [get] |
True if this element has any form of background. More... | |
Private Member Functions | |
void | ApplyTransform (Matrix4x4 delta, Renderman renderer) |
Applies the transform (rotate, scale etc) of this element to its background/border/content. More... | |
float | ParentInnerHeight () |
Gets the most suitable parent inner height. More... | |
void | RemoveProperty (int index) |
Removes the render property at the given index. Use AddOrReplace instead. More... | |
void | AddProperty (DisplayableProperty property) |
Adds the given render property. Use AddOrReplace instead. More... | |
|
inline |
|
inline |
Adds or replaces a render property of the given type.
|
inlineprivate |
Adds the given render property. Use AddOrReplace instead.
|
inlineprivate |
Applies the transform (rotate, scale etc) of this element to its background/border/content.
|
inline |
Gets the box which contains the given x/y coords.
|
inline |
Gets a render property of the given type.
|
inline |
Gets the index of a render property of the given type. -1 if it's not found.
|
inline |
Obtains a defined width for non-inline elements. (Special case for things like img though).
|
inlineprivate |
Gets the most suitable parent inner height.
|
inlinepackage |
Gets the most suitable parent inner width.
|
inlinevirtual |
Positions this node and all its children relative to their parent.
Reimplemented in Css.TextRenderableData.
|
inlineprivate |
Removes the render property at the given index. Use AddOrReplace instead.
Draws this at OffsetLeft/OffsetTop with the given PixelWidth and PixelHeight values.
|
inline |
This is the second pass of layout requests. It positions the element in global screen space and also fires the render events which in turn generate or reallocates mesh blocks. This call applies to all it's children elements too.
relativeTo | The current style we are positioning relative to. |
|
inline |
Repaints this at OffsetLeft/OffsetTop with the given PixelWidth and PixelHeight values. A paint is less intensive than a layout as it only updates the uv/vert colours of the mesh.
|
inline |
Repaints this and all its childnodes.
|
inline |
Requests that the renderer performs a shortform layout on the next update.
|
inline |
Requests that the renderer performs a layout on the next update. Note that layouts are more expensive than a paint. Paints simply update vertex colours and uvs where as layouts rebuild the whole mesh.
|
inline |
Requests that the document repaints this element, when possible.
|
inline |
Requests that the document repaints this element, when possible.
|
inline |
Creates a TextRenderingProperty if one doesn't exist yet. Note that it can be created as a 3D one if text-extrude is set.
|
inlinepackage |
Resolves the value from the parent of this node for the given property.
|
inline |
Refreshes this elements css style if the given selector matches its own.
type | The type of the given selector. |
rule | The selector to match with. |
|
inline |
Refreshes this elements css style if the given selector matches its own.
type | The type of the given selector. |
rule | The selector to match with. |
|
inline |
Maps the given pixel value to an amount in world units.
|
inline |
Maps the given pixel value to an amount in world units.
|
inline |
This nodes 'shrink to fit' width.
|
inlinevirtual |
Called just before reflow to update CSS.
Reimplemented in Css.TextRenderableData.
|
inline |
RenderableData Css.RenderableData.Ancestor |
This data's rendering ancestor. Used to resolve relative units and for rapid reflow. Usually set to Node.parentNode in the normal flow.
LayoutBox Css.RenderableData.FirstBox |
The first layout box. Forms a linked list using NextInElement.
LayoutBox Css.RenderableData.LastBox |
The last layout box. Forms a linked list using NextInElement.
RenderableData Css.RenderableData.Next |
Used for paint events. The next element style to paint.
UpdateMode Css.RenderableData.NextUpdateMode =UpdateMode.None |
True if this element is being repainted on the next frame.
Node Css.RenderableData.Node |
The node that this is CSS data for.
|
package |
The region that this element takes on the screen. Null if it's offscreen.
DisplayableProperty [] Css.RenderableData.RenderProperties |
The set of renderable properties on this element.
SortedDictionary<int,RenderableData> Css.RenderableData.StackingContexts |
All stacking contexts can have child stacking contexts. This exists if this is a stacking context. It will always contain at least 1 entry (at index 0) which refers to this node. That essentially enables negative z-index values to render before the normal flow.
float Css.RenderableData.ValueScale =1f |
The zoom scale for all pixel based values on this style.
VirtualElements Css.RenderableData.Virtuals |
The set of virtual elements if it exists.
|
getset |
This handles rendering a solid background colour for this element.
|
getset |
This handles rendering a tiled, clipped, offset background image for this element.
|
getset |
This handles rendering the border around this element, if any.
|
get |
Counts the number of boxes in the box linked list (starting at FirstBox).
|
get |
The computed style to use.
|
get |
The width of the content inside the box. Note that this is different from both InnerWidth and PixelWidth (which describe the "window" in which the content is seen).
|
get |
The width of the content inside the box. Note that this is different from both InnerWidth and PixelWidth (which describe the "window" in which the content is seen).
|
get |
A reflow-capable document.
|
get |
The width in pixels of the last whitespace of this element, if it's got one.
|
get |
True if this element has any form of background.
|
get |
The height of this element, excluding the border and padding.
|
get |
The width of this element, excluding the border and padding.
|
get |
True if this is not positioned in the flow
|
getset |
True if this is a stacking context.
|
get |
The global offset from the left edge. Computed in secondary layout pass.
|
get |
The global offset from the top edge. Computed in secondary layout pass.
|
get |
The parent renderable data.
|
get |
Gets the parent node.
|
get |
The total height in pixels of this element.
|
get |
The total width in pixels of this element.
|
getset |
Gets or sets a RasterDisplayableProperty.
|
get |
True if the box model is ready and loaded.
|
getset |
Selection zone.
|
getset |
This handles rendering text contained by this element.
|
getset |
This handles rendering 3D text contained by this element. Use text-extrude CSS property (a number).