C# Класс 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
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
__aa_dbugId int
dbugMark1 int
dbugMark2 int

Private Properties

Свойство Тип Описание
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

Открытые методы

Метод Описание
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

Защищенные методы

Метод Описание
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

Приватные методы

Метод Описание
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

Описание методов

AddNewAnonInline() публичный статический Метод

public static AddNewAnonInline ( CssBox parent ) : CssBox
parent CssBox
Результат CssBox

AppendChild() публичный Метод

public AppendChild ( CssBox box ) : void
box CssBox
Результат void

AppendToAbsoluteLayer() публичный Метод

append box to this element's absolute layer
public AppendToAbsoluteLayer ( CssBox box ) : void
box CssBox
Результат void

ChangeDisplayType() публичный статический Метод

public static ChangeDisplayType ( CssBox box, CssDisplay newdisplay ) : void
box CssBox
newdisplay CssDisplay
Результат void

Clear() публичный Метод

public Clear ( ) : void
Результат void

CssBox() публичный Метод

public CssBox ( BoxSpec spec, RootGraphic rootgfx ) : System
spec LayoutFarm.Css.BoxSpec
rootgfx RootGraphic
Результат System

CssBox() публичный Метод

public CssBox ( BoxSpec spec, RootGraphic rootgfx, CssDisplay displayType ) : System
spec LayoutFarm.Css.BoxSpec
rootgfx RootGraphic
displayType CssDisplay
Результат System

CustomContentHitTest() публичный Метод

public CustomContentHitTest ( float x, float y, CssBoxHitChain hitChain ) : bool
x float
y float
hitChain CssBoxHitChain
Результат bool

CustomRecomputedValue() публичный Метод

public CustomRecomputedValue ( CssBox containingBlock ) : void
containingBlock CssBox
Результат void

GetAbsoluteChildBoxBackwardIter() публичный Метод

public GetAbsoluteChildBoxBackwardIter ( ) : IEnumerable
Результат IEnumerable

GetAbsoluteChildBoxIter() публичный Метод

public GetAbsoluteChildBoxIter ( ) : IEnumerable
Результат IEnumerable

GetChildBoxIter() публичный Метод

public GetChildBoxIter ( ) : IEnumerable
Результат IEnumerable

GetEmHeight() публичный Метод

Gets the height of the font in the specified units
public GetEmHeight ( ) : float
Результат float

GetFirstChild() публичный Метод

public GetFirstChild ( ) : CssBox
Результат CssBox

GetGlobalLocation() публичный Метод

public GetGlobalLocation ( float &globalX, float &globalY ) : CssBox
globalX float
globalY float
Результат CssBox

GetGlobalLocationImpl() защищенный Метод

protected GetGlobalLocationImpl ( float &globalX, float &globalY ) : CssBox
globalX float
globalY float
Результат CssBox

GetRunIter() публичный Метод

public GetRunIter ( ) : IEnumerable
Результат IEnumerable

GetTopRootCssBox() публичный Метод

public GetTopRootCssBox ( ) : CssBox
Результат CssBox

InsertChild() публичный Метод

public InsertChild ( CssBox beforeBox, CssBox box ) : void
beforeBox CssBox
box CssBox
Результат void

InvalidateComputeValue() публичный статический Метод

public static InvalidateComputeValue ( CssBox box ) : void
box CssBox
Результат void

InvalidateGraphics() публичный Метод

public InvalidateGraphics ( ) : void
Результат void

InvalidateGraphics() публичный Метод

public InvalidateGraphics ( Rectangle clientArea ) : void
clientArea PixelFarm.Drawing.Rectangle
Результат void

IsPointInArea() публичный Метод

public IsPointInArea ( float x, float y ) : bool
x float
y float
Результат bool

MeasureRunsSize() публичный Метод

Assigns words its width and height
public MeasureRunsSize ( LayoutVisitor lay ) : void
lay LayoutVisitor
Результат void

Paint() публичный Метод

public Paint ( PaintVisitor p ) : void
p PaintVisitor
Результат void

Paint() публичный Метод

public Paint ( PaintVisitor p, RectangleF r ) : void
p PaintVisitor
r PixelFarm.Drawing.RectangleF
Результат void

PaintImp() защищенный Метод

protected PaintImp ( PaintVisitor p ) : void
p PaintVisitor
Результат void

PerformContentLayout() защищенный Метод

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
Результат void

PerformLayout() публичный Метод

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
Результат void

ReEvaluateFont() публичный Метод

public ReEvaluateFont ( IFonts iFonts, float parentFontSize ) : void
iFonts IFonts
parentFontSize float
Результат void

RemoveChild() публичный Метод

public RemoveChild ( CssBox box ) : void
box CssBox
Результат void

SetAsBrBox() публичный статический Метод

public static SetAsBrBox ( CssBox box ) : void
box CssBox
Результат void

SetAsCustomCssBox() защищенный статический Метод

protected static SetAsCustomCssBox ( CssBox box ) : void
box CssBox
Результат void

SetController() публичный Метод

public SetController ( object controller ) : void
controller object
Результат void

SetExpectedSize() публичный Метод

public SetExpectedSize ( float expectedW, float expectedH ) : void
expectedW float
expectedH float
Результат void

SetLocation() публичный Метод

set location relative to container box
public SetLocation ( float localX, float localY ) : void
localX float
localY float
Результат void

SetRowSpanAndColSpan() публичный Метод

public SetRowSpanAndColSpan ( int rowSpan, int colSpan ) : void
rowSpan int
colSpan int
Результат void

SetViewport() публичный Метод

public SetViewport ( int viewportX, int viewportY ) : void
viewportX int
viewportY int
Результат void

SetVisualHeight() публичный Метод

public SetVisualHeight ( float height ) : void
height float
Результат void

SetVisualSize() публичный Метод

set presentation (visual) size width,height
public SetVisualSize ( float width, float height ) : void
width float
height float
Результат void

SetVisualWidth() публичный Метод

public SetVisualWidth ( float width ) : void
width float
Результат void

ToString() публичный Метод

public ToString ( ) : string
Результат string

UnsafeGetBoxSpec() публичный статический Метод

public static UnsafeGetBoxSpec ( CssBox box ) : BoxSpec
box CssBox
Результат LayoutFarm.Css.BoxSpec

UnsafeGetController() публичный статический Метод

public static UnsafeGetController ( CssBox box ) : object
box CssBox
Результат object

UnsafeSetContentRuns() публичный статический Метод

public static UnsafeSetContentRuns ( CssBox box, List runs, bool isAllWhitespace ) : void
box CssBox
runs List
isAllWhitespace bool
Результат void

UnsafeSetParent() публичный статический Метод

public static UnsafeSetParent ( CssBox box, CssBox parent ) : void
box CssBox
parent CssBox
Результат void

UnsafeSetTextBuffer() публичный статический Метод

public static UnsafeSetTextBuffer ( CssBox box, char textBuffer ) : void
box CssBox
textBuffer char
Результат void

UpdateMarginTopCollapse() публичный Метод

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
Результат float

dbugPaint() публичный Метод

public dbugPaint ( PaintVisitor p, RectangleF r ) : void
p PaintVisitor
r PixelFarm.Drawing.RectangleF
Результат void

Описание свойств

__aa_dbugId публичное свойство

public int __aa_dbugId
Результат int

dbugMark1 публичное свойство

public int dbugMark1
Результат int

dbugMark2 публичное свойство

public int dbugMark2
Результат int