C# Class LayoutFarm.HtmlBoxes.CssBox

Represents a CSS Box of text or replaced elements.
The Box can contains other boxes, that's the way that the CSS Tree is composed. To know more about boxes visit CSS spec: http://www.w3.org/TR/CSS21/box.html
Mostra file Open project: prepare/HTML-Renderer Class Usage Examples

Public Properties

Property Type Description
__aa_dbugId int
dbugMark1 int
dbugMark2 int

Private Properties

Property Type Description
AddLineBox void
CalculateMinimumWidth float
CalculateMinimumWidthAndWidestRun void
DirectSetBorderWidth void
EvaluateSpec void
FindContainerForAbsoluteBox CssBox
FindContainerForCenteredBox CssBox
FindContainerForFixedBox CssBox
GetFirstLineBox CssLineBox
GetGlobalLocationRelativeToRoot CssBox
GetHeightAfterMarginBottomCollapse float
GetLastLineBox CssLineBox
GetLatestCachedMinWidth float
GetLineBoxBackwardIter IEnumerable
GetLineBoxIter IEnumerable
GetNextNode CssBox
GetPrevNode CssBox
GetSplitInfo void
OffsetLocalTop void
PaintBackground void
PaintDecoration void
ReEvaluateComputedValues void
RecalculateMargin float
RecalculatePadding float
ResetLineBoxes void
ResetTextFlags void
SetCssBoxFromContainerAvailableWidth void
SetCssBoxHeight void
SetCssBoxWidth void
SetHeightToZero void
TransplateDisplayOutsideInside void
UnsafeGetChildren CssBoxCollection
UnsafeGetLinkedNode LinkedListNode
UnsafeGetRunList List
UnsafeGetTextBuffer char[]
UnsafeSetNodes void
UpdateIfHigher void
ValidateComputeValues void
dbugBeforeSetHeight void
dbugBeforeSetWidth void
dbugChangeSiblingOrder void
dbugCopyTextContent string

Public Methods

Method Description
AddNewAnonInline ( CssBox parent ) : CssBox
AppendChild ( CssBox box ) : void
AppendToAbsoluteLayer ( CssBox box ) : void

append box to this element's absolute layer

ChangeDisplayType ( CssBox box, CssDisplay newdisplay ) : void
Clear ( ) : void
CssBox ( BoxSpec spec, RootGraphic rootgfx ) : System
CssBox ( BoxSpec spec, RootGraphic rootgfx, CssDisplay displayType ) : System
CustomContentHitTest ( float x, float y, CssBoxHitChain hitChain ) : bool
CustomRecomputedValue ( CssBox containingBlock ) : void
GetAbsoluteChildBoxBackwardIter ( ) : IEnumerable
GetAbsoluteChildBoxIter ( ) : IEnumerable
GetChildBoxIter ( ) : IEnumerable
GetEmHeight ( ) : float

Gets the height of the font in the specified units

GetFirstChild ( ) : CssBox
GetGlobalLocation ( float &globalX, float &globalY ) : CssBox
GetRunIter ( ) : IEnumerable
GetTopRootCssBox ( ) : CssBox
InsertChild ( CssBox beforeBox, CssBox box ) : void
InvalidateComputeValue ( CssBox box ) : void
InvalidateGraphics ( ) : void
InvalidateGraphics ( Rectangle clientArea ) : void
IsPointInArea ( float x, float y ) : bool
MeasureRunsSize ( LayoutVisitor lay ) : void

Assigns words its width and height

Paint ( PaintVisitor p ) : void
Paint ( PaintVisitor p, RectangleF r ) : void
PerformLayout ( LayoutVisitor lay ) : void

Measures the bounds of box and children, recursively.
Performs layout of the DOM structure creating lines by set bounds restrictions.

ReEvaluateFont ( IFonts iFonts, float parentFontSize ) : void
RemoveChild ( CssBox box ) : void
SetAsBrBox ( CssBox box ) : void
SetController ( object controller ) : void
SetExpectedSize ( float expectedW, float expectedH ) : void
SetLocation ( float localX, float localY ) : void

set location relative to container box

SetRowSpanAndColSpan ( int rowSpan, int colSpan ) : void
SetViewport ( int viewportX, int viewportY ) : void
SetVisualHeight ( float height ) : void
SetVisualSize ( float width, float height ) : void

set presentation (visual) size width,height

SetVisualWidth ( float width ) : void
ToString ( ) : string
UnsafeGetBoxSpec ( CssBox box ) : BoxSpec
UnsafeGetController ( CssBox box ) : object
UnsafeSetContentRuns ( CssBox box, List runs, bool isAllWhitespace ) : void
UnsafeSetParent ( CssBox box, CssBox parent ) : void
UnsafeSetTextBuffer ( CssBox box, char textBuffer ) : void
UpdateMarginTopCollapse ( CssBox upperSibling ) : float

Gets the result of collapsing the vertical margins of the two boxes

dbugPaint ( PaintVisitor p, RectangleF r ) : void

Protected Methods

Method Description
GetGlobalLocationImpl ( float &globalX, float &globalY ) : CssBox
PaintImp ( PaintVisitor p ) : void
PerformContentLayout ( LayoutVisitor lay ) : void

Measures the bounds of box and children, recursively.
Performs layout of the DOM structure creating lines by set bounds restrictions.

SetAsCustomCssBox ( CssBox box ) : void

Private Methods

Method Description
AddLineBox ( CssLineBox linebox ) : void
CalculateMinimumWidth ( int calculationEpisode ) : float

Gets the minimum width that the box can be. *** The box can be as thin as the longest word plus padding

CalculateMinimumWidthAndWidestRun ( CssBox box, float &maxWidth, CssRun &maxWidthRun ) : void
DirectSetBorderWidth ( CssSide side, float w ) : void
EvaluateSpec ( BoxSpec spec ) : void
FindContainerForAbsoluteBox ( ) : CssBox
FindContainerForCenteredBox ( ) : CssBox
FindContainerForFixedBox ( ) : CssBox
GetFirstLineBox ( ) : CssLineBox
GetGlobalLocationRelativeToRoot ( float &globalX, float &globalY ) : CssBox
GetHeightAfterMarginBottomCollapse ( CssBox containerBox ) : float

Gets the result of collapsing the vertical margins of the two boxes

GetLastLineBox ( ) : CssLineBox
GetLatestCachedMinWidth ( CssBox targetBox ) : float

GetLineBoxBackwardIter ( ) : IEnumerable
GetLineBoxIter ( ) : IEnumerable
GetNextNode ( ) : CssBox
GetPrevNode ( ) : CssBox
GetSplitInfo ( CssBox box, CssLineBox lineBox, bool &isFirstLine, bool &isLastLine ) : void
OffsetLocalTop ( float dy ) : void
PaintBackground ( PaintVisitor p, RectangleF rect, bool isFirst, bool isLast ) : void

Paints the background of the box

PaintDecoration ( Canvas g, RectangleF rectangle, bool isFirst, bool isLast ) : void
ReEvaluateComputedValues ( IFonts iFonts, CssBox containingBlock ) : void

evaluate computed value

RecalculateMargin ( CssLength margin, float cbWidth ) : float

recalculate margin

RecalculatePadding ( CssLength padding, float cbWidth ) : float

recalculate padding

ResetLineBoxes ( ) : void
ResetTextFlags ( ) : void
SetCssBoxFromContainerAvailableWidth ( float containerClientWidth ) : void
SetCssBoxHeight ( float height ) : void
SetCssBoxWidth ( float width ) : void

set box width related to its boxsizing model and recalcualte visual width

SetHeightToZero ( ) : void
TransplateDisplayOutsideInside ( CssDisplay cssDisplay, CssDisplayOutside &outside, CssDisplayInside &inside ) : void
UnsafeGetChildren ( CssBox box ) : CssBoxCollection
UnsafeGetLinkedNode ( CssBox box ) : LinkedListNode
UnsafeGetRunList ( CssBox box ) : List
UnsafeGetTextBuffer ( CssBox box ) : char[]
UnsafeSetNodes ( CssBox childNode, CssBox parent, LinkedListNode linkNode ) : void
UpdateIfHigher ( CssBox box, float newHeight ) : void
ValidateComputeValues ( CssBox box ) : void
dbugBeforeSetHeight ( float height ) : void
dbugBeforeSetWidth ( float width ) : void
dbugChangeSiblingOrder ( int siblingIndex ) : void
dbugCopyTextContent ( ) : string

Method Details

AddNewAnonInline() public static method

public static AddNewAnonInline ( CssBox parent ) : CssBox
parent CssBox
return CssBox

AppendChild() public method

public AppendChild ( CssBox box ) : void
box CssBox
return void

AppendToAbsoluteLayer() public method

append box to this element's absolute layer
public AppendToAbsoluteLayer ( CssBox box ) : void
box CssBox
return void

ChangeDisplayType() public static method

public static ChangeDisplayType ( CssBox box, CssDisplay newdisplay ) : void
box CssBox
newdisplay CssDisplay
return void

Clear() public method

public Clear ( ) : void
return void

CssBox() public method

public CssBox ( BoxSpec spec, RootGraphic rootgfx ) : System
spec LayoutFarm.Css.BoxSpec
rootgfx RootGraphic
return System

CssBox() public method

public CssBox ( BoxSpec spec, RootGraphic rootgfx, CssDisplay displayType ) : System
spec LayoutFarm.Css.BoxSpec
rootgfx RootGraphic
displayType CssDisplay
return System

CustomContentHitTest() public method

public CustomContentHitTest ( float x, float y, CssBoxHitChain hitChain ) : bool
x float
y float
hitChain CssBoxHitChain
return bool

CustomRecomputedValue() public method

public CustomRecomputedValue ( CssBox containingBlock ) : void
containingBlock CssBox
return void

GetAbsoluteChildBoxBackwardIter() public method

public GetAbsoluteChildBoxBackwardIter ( ) : IEnumerable
return IEnumerable

GetAbsoluteChildBoxIter() public method

public GetAbsoluteChildBoxIter ( ) : IEnumerable
return IEnumerable

GetChildBoxIter() public method

public GetChildBoxIter ( ) : IEnumerable
return IEnumerable

GetEmHeight() public method

Gets the height of the font in the specified units
public GetEmHeight ( ) : float
return float

GetFirstChild() public method

public GetFirstChild ( ) : CssBox
return CssBox

GetGlobalLocation() public method

public GetGlobalLocation ( float &globalX, float &globalY ) : CssBox
globalX float
globalY float
return CssBox

GetGlobalLocationImpl() protected method

protected GetGlobalLocationImpl ( float &globalX, float &globalY ) : CssBox
globalX float
globalY float
return CssBox

GetRunIter() public method

public GetRunIter ( ) : IEnumerable
return IEnumerable

GetTopRootCssBox() public method

public GetTopRootCssBox ( ) : CssBox
return CssBox

InsertChild() public method

public InsertChild ( CssBox beforeBox, CssBox box ) : void
beforeBox CssBox
box CssBox
return void

InvalidateComputeValue() public static method

public static InvalidateComputeValue ( CssBox box ) : void
box CssBox
return void

InvalidateGraphics() public method

public InvalidateGraphics ( ) : void
return void

InvalidateGraphics() public method

public InvalidateGraphics ( Rectangle clientArea ) : void
clientArea PixelFarm.Drawing.Rectangle
return void

IsPointInArea() public method

public IsPointInArea ( float x, float y ) : bool
x float
y float
return bool

MeasureRunsSize() public method

Assigns words its width and height
public MeasureRunsSize ( LayoutVisitor lay ) : void
lay LayoutVisitor
return void

Paint() public method

public Paint ( PaintVisitor p ) : void
p PaintVisitor
return void

Paint() public method

public Paint ( PaintVisitor p, RectangleF r ) : void
p PaintVisitor
r PixelFarm.Drawing.RectangleF
return void

PaintImp() protected method

protected PaintImp ( PaintVisitor p ) : void
p PaintVisitor
return void

PerformContentLayout() protected method

Measures the bounds of box and children, recursively.
Performs layout of the DOM structure creating lines by set bounds restrictions.
protected PerformContentLayout ( LayoutVisitor lay ) : void
lay LayoutVisitor
return void

PerformLayout() public method

Measures the bounds of box and children, recursively.
Performs layout of the DOM structure creating lines by set bounds restrictions.
public PerformLayout ( LayoutVisitor lay ) : void
lay LayoutVisitor
return void

ReEvaluateFont() public method

public ReEvaluateFont ( IFonts iFonts, float parentFontSize ) : void
iFonts IFonts
parentFontSize float
return void

RemoveChild() public method

public RemoveChild ( CssBox box ) : void
box CssBox
return void

SetAsBrBox() public static method

public static SetAsBrBox ( CssBox box ) : void
box CssBox
return void

SetAsCustomCssBox() protected static method

protected static SetAsCustomCssBox ( CssBox box ) : void
box CssBox
return void

SetController() public method

public SetController ( object controller ) : void
controller object
return void

SetExpectedSize() public method

public SetExpectedSize ( float expectedW, float expectedH ) : void
expectedW float
expectedH float
return void

SetLocation() public method

set location relative to container box
public SetLocation ( float localX, float localY ) : void
localX float
localY float
return void

SetRowSpanAndColSpan() public method

public SetRowSpanAndColSpan ( int rowSpan, int colSpan ) : void
rowSpan int
colSpan int
return void

SetViewport() public method

public SetViewport ( int viewportX, int viewportY ) : void
viewportX int
viewportY int
return void

SetVisualHeight() public method

public SetVisualHeight ( float height ) : void
height float
return void

SetVisualSize() public method

set presentation (visual) size width,height
public SetVisualSize ( float width, float height ) : void
width float
height float
return void

SetVisualWidth() public method

public SetVisualWidth ( float width ) : void
width float
return void

ToString() public method

public ToString ( ) : string
return string

UnsafeGetBoxSpec() public static method

public static UnsafeGetBoxSpec ( CssBox box ) : BoxSpec
box CssBox
return LayoutFarm.Css.BoxSpec

UnsafeGetController() public static method

public static UnsafeGetController ( CssBox box ) : object
box CssBox
return object

UnsafeSetContentRuns() public static method

public static UnsafeSetContentRuns ( CssBox box, List runs, bool isAllWhitespace ) : void
box CssBox
runs List
isAllWhitespace bool
return void

UnsafeSetParent() public static method

public static UnsafeSetParent ( CssBox box, CssBox parent ) : void
box CssBox
parent CssBox
return void

UnsafeSetTextBuffer() public static method

public static UnsafeSetTextBuffer ( CssBox box, char textBuffer ) : void
box CssBox
textBuffer char
return void

UpdateMarginTopCollapse() public method

Gets the result of collapsing the vertical margins of the two boxes
public UpdateMarginTopCollapse ( CssBox upperSibling ) : float
upperSibling CssBox the previous box under the same parent
return float

dbugPaint() public method

public dbugPaint ( PaintVisitor p, RectangleF r ) : void
p PaintVisitor
r PixelFarm.Drawing.RectangleF
return void

Property Details

__aa_dbugId public_oe property

public int __aa_dbugId
return int

dbugMark1 public_oe property

public int dbugMark1
return int

dbugMark2 public_oe property

public int dbugMark2
return int