Detailed Description

Used by the core layout system. They store full box information such as padding and margin, then they get converted into basic box regions once the render process is complete.

Inheritance diagram for Css.LayoutBox:
Css.BoxRegion Css.ScreenRegion

Public Member Functions

float VisiblePercentageX ()
 How much of this elements horizontal content is currently visible? Used by scrolling. More...
 
float VisiblePercentageY ()
 How much of this elements vertical content is currently visible? Used by scrolling. More...
 
bool IsOffset ()
 Checks if this element is offset or positioned. More...
 
void SetDimensions (bool widthUndefined, bool heightUndefined)
 Figures out the pixel width/pixel height using padding, border and inner dimensions. More...
 
override string ToString ()
 
- Public Member Functions inherited from Css.BoxRegion
 BoxRegion ()
 
 BoxRegion (float x, float y, float width, float height)
 Creates a new box. More...
 
override bool Contains (float x, float y)
 Checks if this box contains the given co-ordinates. More...
 
void Set (float x, float y, float width, float height)
 Applies new values to an existing box. More...
 
void SetPoints (float minX, float minY, float maxX, float maxY)
 
void SetPoint (float x, float y)
 Sets this region to being the given point (with a w/h of 0). More...
 
void AddPoint (float x, float y)
 Adds the given point to the region. More...
 
void Combine (BoxRegion r)
 Adds the given region into this one. More...
 
bool Overlaps (BoxRegion box)
 Evaluates if one box overlaps another. More...
 
void ClipByAffecting (BoxRegion bound, BoxRegion affect)
 Makes sure this box fits inside the given one by clipping it so it does. Any pixels sliced off this box are also sliced off affect. More...
 
void ClipBy (BoxRegion box)
 Makes sure this box fits inside the given one by clipping it so it does. More...
 
bool ClipByChecked (BoxRegion box)
 Makes sure this box fits inside the given one by clipping it so it does. More...
 
float ClipLeft (float line)
 Clips the left side of this box, making sure it does not extend beyond the given value. More...
 
float ClipRight (float line)
 Clips the right side of this box, making sure it does not extend beyond the given value. More...
 
float ClipTop (float line)
 Clips the top of this box, making sure it does not extend beyond the given value. More...
 
float ClipBottom (float line)
 Clips the bottom of this box, making sure it does not extend beyond the given value. More...
 
void RemoveFromLeft (float px)
 Removes up to the given amount of pixels from the left side of the box. It is bounded to ensure a negative width is not created. More...
 
void RemoveFromRight (float px)
 Removes up to the given amount of pixels from the right side of the box. It is bounded to ensure a negative width is not created. More...
 
void RemoveFromTop (float px)
 Removes up to the given amount of pixels from the top side of the box. It is bounded to ensure a negative height is not created. More...
 
void RemoveFromBottom (float px)
 Removes up to the given amount of pixels from the bottom side of the box. It is bounded to ensure a negative height is not created. More...
 
override string ToString ()
 Produces an easy to read summary of this boxes shape. More...
 

Public Attributes

LayoutBox NextLineStart
 Elements are added in lines. We've got a linked list of line starts as well as a linked list of elements on each line. More...
 
LayoutBox NextOnLine
 When being rendered, a linked list of computed styles on this line is built up. This is the next one on this line. More...
 
LayoutBox NextInElement
 The linked list of layout boxes that belong to a particular node. More...
 
LayoutBox FirstChild
 If this box has child boxes, the first one. Note that it'll be a line start too. More...
 
LayoutBox Parent
 The parent layout box, if there is one. Note that this is not the same as the parent element (as we can be e.g. inside a secondary line of a span). More...
 
float FontSize
 The active font size. More...
 
InfiniText.FontFace FontFace
 The font face in use. More...
 
float ParentOffsetTop
 
float ParentOffsetLeft
 
float EndSpaceSize
 The size of a space at the end of the text. More...
 
int TextStart
 The start index in the TextRenderingProperty glyph array (inclusive). More...
 
int TextEnd
 The end index in the TextRenderingProperty glyph array (exclusive - allows it to 'select' 0 characters). More...
 
TableMeta TableMeta
 Table metadata. Used by display table-cell/ table. More...
 
bool OrdinaryInline =true
 False for 'replaced' inline elements. More...
 
int UnicodeBidi
 The bidirectional draw mode. Typically it'll be leftwards or neutral. More...
 
int DisplayMode
 Display mode. More...
 
int FloatMode
 Float: value. More...
 
int PositionMode
 Position: value. More...
 
float InnerWidth
 The width of interior of this element. Used by the scrolling system. More...
 
float InnerHeight
 The height of interior of this element. Used by the scrolling system. More...
 
float ContentWidth
 The width of content in this element. Used by the scrolling system. More...
 
float ContentHeight
 The height of the content in this element. Used by the scrolling system. More...
 
float Baseline
 The distance between the bottom of this box and the baseline. More...
 
int Visibility =VisibilityMode.Visible
 Defines the visibility of this element. More...
 
int OverflowX =VisibilityMode.Visible
 Defines how horizontally overflowing content is treated. Visible by default. Only applicable to block/inline-block elements. More...
 
int OverflowY =VisibilityMode.Visible
 Defines how vertically overflowing content is treated. Visible by default. Only applicable to block/inline-block elements. More...
 
BoxStyle Position
 Position. More...
 
BoxStyle Padding
 Padding. More...
 
BoxStyle Margin
 Margin. More...
 
BoxStyle Border
 Border width. More...
 
BoxStyle Scroll
 Accumulated scrolling state (the total of this and all parents). More...
 
bool BorderBox
 True if this was made with border-box. More...
 
- Public Attributes inherited from Css.BoxRegion
float X
 The X coordinate of the box. More...
 
float Y
 The Y coordinate of the box. More...
 
float MaxX
 The Maximum X value of the box. X+Width. More...
 
float MaxY
 The Maximum Y value of the box. Y+Height. More...
 
float Width
 The width of the box. More...
 
float Height
 The height of the box. More...
 

Properties

bool NoEndingSpace [get]
 True if this box contains text and it doesn't end in a space. More...
 
float TotalWidth [get]
 Width plus margin. More...
 
float TotalHeight [get]
 Height plus margin. More...
 
float InnerEndX [get]
 InnerStartX+InnerWidth More...
 
float InnerEndY [get]
 InnerStartY+InnerHeight More...
 
float InnerStartX [get]
 X+StyleOffsetLeft More...
 
float InnerStartY [get]
 Y+StyleOffsetTop More...
 
float BorderedWidth [get]
 Padding plus inner width plus border. Typically the same as PixelWidth (but directly computes it). More...
 
float BorderedHeight [get]
 Padding plus inner height. Typically the same as PixelHeight (but directly computes it). More...
 
float PaddedWidth [get]
 Padding plus inner width. More...
 
float PaddedHeight [get]
 Padding plus inner height. More...
 
float FixedStyleOffsetLeft [get]
 The offset of style from the left of the screen without scroll. More...
 
float FixedStyleOffsetTop [get]
 The offset of style from the top of the screen without scroll. More...
 
float StyleOffsetTop [get]
 The offset of style from the top of the screen. More...
 
float StyleOffsetBottom [get]
 The size of style at the bottom. More...
 
float StyleOffsetLeft [get]
 The offset of style from the left of the screen. More...
 
float InlineStyleOffsetLeft [get]
 The offset of style from the left of the screen as used by inline elements. More...
 
float InlineStyleOffsetTop [get]
 The offset of style from the top of the screen as used by inline elements. More...
 
- Properties inherited from Css.BoxRegion
static BoxRegion Empty [get]
 An all zero box region. More...
 
override float ScreenMinX [get]
 
override float ScreenMinY [get]
 
override float ScreenMaxX [get]
 
override float ScreenMaxY [get]
 
bool IsNotEmpty [get]
 True if this region is non-zero. More...
 
bool IsEmpty [get]
 True if this region is all zero. More...
 
- Properties inherited from Css.ScreenRegion
virtual float ScreenMinX [get]
 
virtual float ScreenMinY [get]
 
virtual float ScreenMaxX [get]
 
virtual float ScreenMaxY [get]
 

Member Function Documentation

bool Css.LayoutBox.IsOffset ( )
inline

Checks if this element is offset or positioned.

Returns
True if this element is offset/positioned in any way.
void Css.LayoutBox.SetDimensions ( bool  widthUndefined,
bool  heightUndefined 
)
inline

Figures out the pixel width/pixel height using padding, border and inner dimensions.

override string Css.LayoutBox.ToString ( )
inline
float Css.LayoutBox.VisiblePercentageX ( )
inline

How much of this elements horizontal content is currently visible? Used by scrolling.

Returns
A value from 0-1 of how much of the horizontal content is visible. 1 is all of it.
float Css.LayoutBox.VisiblePercentageY ( )
inline

How much of this elements vertical content is currently visible? Used by scrolling.

Returns
A value from 0-1 of how much of the vertical content is visible. 1 is all of it.

Member Data Documentation

float Css.LayoutBox.Baseline

The distance between the bottom of this box and the baseline.

BoxStyle Css.LayoutBox.Border

Border width.

bool Css.LayoutBox.BorderBox

True if this was made with border-box.

float Css.LayoutBox.ContentHeight

The height of the content in this element. Used by the scrolling system.

float Css.LayoutBox.ContentWidth

The width of content in this element. Used by the scrolling system.

int Css.LayoutBox.DisplayMode

Display mode.

float Css.LayoutBox.EndSpaceSize

The size of a space at the end of the text.

LayoutBox Css.LayoutBox.FirstChild

If this box has child boxes, the first one. Note that it'll be a line start too.

int Css.LayoutBox.FloatMode

Float: value.

InfiniText.FontFace Css.LayoutBox.FontFace

The font face in use.

float Css.LayoutBox.FontSize

The active font size.

float Css.LayoutBox.InnerHeight

The height of interior of this element. Used by the scrolling system.

float Css.LayoutBox.InnerWidth

The width of interior of this element. Used by the scrolling system.

BoxStyle Css.LayoutBox.Margin

Margin.

LayoutBox Css.LayoutBox.NextInElement

The linked list of layout boxes that belong to a particular node.

LayoutBox Css.LayoutBox.NextLineStart

Elements are added in lines. We've got a linked list of line starts as well as a linked list of elements on each line.

LayoutBox Css.LayoutBox.NextOnLine

When being rendered, a linked list of computed styles on this line is built up. This is the next one on this line.

bool Css.LayoutBox.OrdinaryInline =true

False for 'replaced' inline elements.

int Css.LayoutBox.OverflowX =VisibilityMode.Visible

Defines how horizontally overflowing content is treated. Visible by default. Only applicable to block/inline-block elements.

int Css.LayoutBox.OverflowY =VisibilityMode.Visible

Defines how vertically overflowing content is treated. Visible by default. Only applicable to block/inline-block elements.

BoxStyle Css.LayoutBox.Padding

Padding.

LayoutBox Css.LayoutBox.Parent

The parent layout box, if there is one. Note that this is not the same as the parent element (as we can be e.g. inside a secondary line of a span).

float Css.LayoutBox.ParentOffsetLeft
float Css.LayoutBox.ParentOffsetTop
BoxStyle Css.LayoutBox.Position

Position.

int Css.LayoutBox.PositionMode

Position: value.

BoxStyle Css.LayoutBox.Scroll

Accumulated scrolling state (the total of this and all parents).

TableMeta Css.LayoutBox.TableMeta

Table metadata. Used by display table-cell/ table.

int Css.LayoutBox.TextEnd

The end index in the TextRenderingProperty glyph array (exclusive - allows it to 'select' 0 characters).

int Css.LayoutBox.TextStart

The start index in the TextRenderingProperty glyph array (inclusive).

int Css.LayoutBox.UnicodeBidi

The bidirectional draw mode. Typically it'll be leftwards or neutral.

int Css.LayoutBox.Visibility =VisibilityMode.Visible

Defines the visibility of this element.

Property Documentation

float Css.LayoutBox.BorderedHeight
get

Padding plus inner height. Typically the same as PixelHeight (but directly computes it).

float Css.LayoutBox.BorderedWidth
get

Padding plus inner width plus border. Typically the same as PixelWidth (but directly computes it).

float Css.LayoutBox.FixedStyleOffsetLeft
get

The offset of style from the left of the screen without scroll.

float Css.LayoutBox.FixedStyleOffsetTop
get

The offset of style from the top of the screen without scroll.

float Css.LayoutBox.InlineStyleOffsetLeft
get

The offset of style from the left of the screen as used by inline elements.

float Css.LayoutBox.InlineStyleOffsetTop
get

The offset of style from the top of the screen as used by inline elements.

float Css.LayoutBox.InnerEndX
get

InnerStartX+InnerWidth

float Css.LayoutBox.InnerEndY
get

InnerStartY+InnerHeight

float Css.LayoutBox.InnerStartX
get

X+StyleOffsetLeft

float Css.LayoutBox.InnerStartY
get

Y+StyleOffsetTop

bool Css.LayoutBox.NoEndingSpace
get

True if this box contains text and it doesn't end in a space.

float Css.LayoutBox.PaddedHeight
get

Padding plus inner height.

float Css.LayoutBox.PaddedWidth
get

Padding plus inner width.

float Css.LayoutBox.StyleOffsetBottom
get

The size of style at the bottom.

float Css.LayoutBox.StyleOffsetLeft
get

The offset of style from the left of the screen.

float Css.LayoutBox.StyleOffsetTop
get

The offset of style from the top of the screen.

float Css.LayoutBox.TotalHeight
get

Height plus margin.

float Css.LayoutBox.TotalWidth
get

Width plus margin.