C# 클래스 SIL.FieldWorks.SharpViews.DivBox

Class that corresponds to a 'div' element in HTML. May only occur inside other divs. Enhance JohnT: Maybe also in table cells, when we get that far?
상속: PileBox
파일 보기 프로젝트 열기: sillsdev/FieldWorks

공개 메소드들

메소드 설명
DivBox ( AssembledStyles styles ) : System

비공개 메소드들

메소드 설명
FirstVisibleBox ( IVwGraphics vg, PaintTransform ptrans ) : Box

Answer the first box whose bottom comes below the top of the clip rectangle. Enhance JohnT: Could refine this to skip a box if only its margin is visible. Enhance JohnT: if we do separate page drawing, as in print preview, we may need a more precise way to eliminate boxes not on the page. Enhance JohnT: may need to include a box that is just out of sight, in case exceptionally long descenders or stacked diacritics extend below the bottom of the box?

IsAfterVisibleBoxes ( Box box, IVwGraphics vg, PaintTransform ptrans ) : bool

Answer true if the box is entirely below the clip rectangle. Enhance JohnT: Could refine this to skip a box if only its margin is visible. Enhance JohnT: if we do separate page drawing, as in print preview, we may need a more precise way to eliminate boxes not on the page. Enhance JohnT: may need to include a box that is just out of sight, in case exceptionally high stacked diacritics extend above the top of the box?

PrepareToPaint ( LayoutInfo transform, Box myPrevBox, int dysTop, int dysBottom ) : Box

This routine and its overrides are used to make sure that the part of the root box between yTop and yBottom (measured from the top of the root) can be painted successfully. To facilitate the process of replacing a lazy box with real boxes, it is passed the previous box in its container (or null if there is none) and returns the next box which the container should check is prepared to paint. By default this is simply the next box, but if a lazy box expands (part of) itself, it should answer the replacement box. Most box classes are always prepared to paint and do nothing. Lazy boxes convert all or part of themselves to real boxes if they intersect the specified vertical range (relative to the root as a whole). Boxes (currently DivBoxes only) which might contain lazy boxes pass the message on to their children, making the appropriate adjustment to the layout transform, just as when asking their children to Layout.

Relayout ( LayoutInfo transform, Rectangle>.Dictionary fixupMap, LayoutCallbacks lcb ) : bool

Keep in sync with PileBox.Layout. It's important to optimize relayout of DivBox, because they can be very large, and often the height of a child does not actually change. Also, this is currently the implementation inherited by root box, and the boolean returned from Relayout on the root is ignored; this routine must accomplish all needed layout itself. We override here rather than on PileBox because non-div piles are typically small and laying out the whole thing is not too expensive, while it is harder to predict how changes (e.g., in width) might affect parents. The parents of Divs can only be divs.

메소드 상세

DivBox() 공개 메소드

public DivBox ( AssembledStyles styles ) : System
styles AssembledStyles
리턴 System