Свойство | Type | Description | |
---|---|---|---|
GapBottom | int | ||
GapLeading | int | ||
GapTop | int | ||
GapTrailing | int | ||
PrepareToPaint | |||
Relayout | bool | ||
RelayoutParents | void | ||
RelayoutParents | void | ||
RelayoutWithParents | void | ||
RelayoutWithParents | void | ||
SurroundHeight | int | ||
SurroundWidth | int |
Méthode | Description | |
---|---|---|
Box ( |
||
CommonContainer ( |
||
CommonContainer ( |
Returns the closest container of this and other which is a container of both of them, and also the child of that container which is or contains each of them. Special cases: if they are the same box, all three return values are that box. if one of the boxes contains the other, the return value and the corresponding child output are both the containing box.
|
|
Contains ( |
Return true if this box contains the other one, that is, is one of its containers. Only group boxes can contain others.
|
|
FindBoxAt ( Point where, |
If there is a leaf box at the specified position, return it. Also return the paint transform that should be passed to operations on that box. By default we return this if the point is inside the box, and the transform we are passed. Where is in drawing coords. Todo JohnT: verify the point actually is in the box.
|
|
Follows ( |
Answer true if this box is in the sequence of boxes chained after other. Optimize JohnT: if we assume they are usually close together but either order is likely, it would usually be more efficient to have a double loop that searches both Next chains at once until one runs out or we find the other.
|
|
Layout ( |
Determine the height and width of the box for the circumstances indicated by the transform. Also positions (and lays out) any contained boxes.
|
|
NextInSelectionSequence ( bool includeChildren ) : |
Answer the next box in which to draw a selection after the current one. This is basically a sequence which considers a box to be come immediately before - its first child, if it has one, and if includeChildren is true; - otherwise, its Next box, if any; - otherwise, the Next box of its closest ancestor that has one. Todo JohnT: eventually will be able to be constrained to the same column.
|
|
PaintBackground ( IVwGraphics vg, |
Any box knows how to paint its background. Some subclasses may override.
|
|
PaintForeground ( IVwGraphics vg, |
Any box knows how to paint itself. Most subclasses should override.
|
|
PrepareFixupMap ( ) : Rectangle>.Dictionary |
Make a fixup map indicating that this box and all its containers need adjusting.
|
|
SelectAtEnd ( ) : |
Make a selection at the end of the box. Subclasses override.
|
|
SelectAtEnd ( |
This overload fulfils the interface contract for some kinds of Box to function as ClientRun. In general a box can select at end without needing to know its containing paragraph (if any) or index within it.
|
|
SelectAtStart ( ) : |
Make a selection at the start of the box. Subclasses override.
|
|
SelectAtStart ( |
This overload fulfils the interface contract for some kinds of Box to function as ClientRun. In general a box can select at start without needing to know its containing paragraph (if any) or index within it.
|
|
SwapIfRightToLeft ( int &left, int &right ) : void |
Méthode | Description | |
---|---|---|
GapBottom ( |
The gap at the bottom of the box (margin + border + pad) in layout pixels.
|
|
GapLeading ( |
The gap at the leading edge of the box (margin + border + pad) in layout pixels.
|
|
GapTop ( |
The gap at the top of the box (margin + border + pad) in layout pixels.
|
|
GapTrailing ( |
The gap at the top of the box (margin + border + pad) in layout pixels.
|
|
PrepareToPaint ( |
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 just answer Next. 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 ( |
When the contents of a box changes, and its size consequently might change, something needs to be done about the layout of that box and all its containers. The process begins by constructing a FixupMap, which contains the changed box and all its parents, each recording (against the box as a key) the invalidate rectangle appropriate to the old box layout. We then pass this to the Relayout method of the root box. By default, any box which finds itself in the map, or which has never been laid out (its height is zero), does a full normal layout, and invalidates its old (if any) rectangle. It can't invalidate its new rectangle, because at the point where relayout is called, the parent box may not have finalized the new position of the child... so return true if the parent needs to invalidate the new position. Relayout should not be used in cases where the available width may have changed, as this could affect the layout of boxes that are not in the map. Note that, if the box moves, invalidating its new size at its old position, or vice versa, may not do much good. If it moves, the containing box must do appropriate extra invalidating. Some boxes, notably VwDivBox, may not need to relayout all their children, or even to invalidate all their own contents. This can be an important optimization, but must be done with care to ensure that what is actually drawn is always correct.
|
|
RelayoutParents ( IGraphicsHolder gh ) : void |
This routine typically fires off the whole relayout process. It builds the fixmap and calls Relayout. It also invalidates the new area of this, if it has moved. Todo: write a test for this moving if that ever becomes possible, and implement.
|
|
RelayoutParents ( IGraphicsHolder gh, |
This variant of RelayoutParents is used if the caller also needs the lcb, and therefore must be the thing to create it.
|
|
RelayoutWithParents ( IGraphicsHolder gh ) : void | ||
RelayoutWithParents ( IGraphicsHolder gh, bool skipInvalidate ) : void | ||
SurroundHeight ( |
The sum of the top and bottom gaps, that is, how much higher a box is because of its top and bottom margin, border, and pad.
|
|
SurroundWidth ( |
The sum of the leading and trailing gaps, that is, how much wider a box is because of its leading and trailing margin, border, and pad.
|
public Box ( |
||
style | ||
Résultat | System |
public CommonContainer ( |
||
other | box to search for | |
thisChild | this or a container of this | |
otherChild | other or a container of other | |
Résultat |
public FindBoxAt ( Point where, |
||
where | Point | |
ptrans | ||
leafBoxTransform | ||
Résultat |
public abstract Layout ( |
||
transform | ||
Résultat | void |
public NextInSelectionSequence ( bool includeChildren ) : |
||
includeChildren | bool | |
Résultat |
public PaintBackground ( IVwGraphics vg, |
||
vg | IVwGraphics | |
ptrans | ||
Résultat | void |
public PaintForeground ( IVwGraphics vg, |
||
vg | IVwGraphics | |
ptrans | ||
Résultat | void |
public PrepareFixupMap ( ) : Rectangle>.Dictionary |
||
Résultat | Rectangle>.Dictionary |
public SelectAtEnd ( ) : |
||
Résultat |
public SelectAtEnd ( |
||
para | ||
Résultat |
public SelectAtStart ( ) : |
||
Résultat |
public SelectAtStart ( |
||
para | ||
Résultat |
public SwapIfRightToLeft ( int &left, int &right ) : void | ||
left | int | |
right | int | |
Résultat | void |