Compartilhar via


IElementBehaviorLayout interface

Implemented by a binary element behavior to use in the layout process.

Members

The IElementBehaviorLayout interface inherits from the IUnknown interface but does not have additional members.

Remarks

A binary element behavior exposes an IElementBehaviorLayout interface to use in the layout process. The layout engine requests this interface. If the interface exists, the layout engine calls the IElementBehaviorLayout::GetLayoutInfo method. The behavior returns a value that indicates whether it registers for layout participation before or after natural sizing occurs.

If the behavior registers for full delegation, MSHTML synchronously calls the behavior's IElementBehaviorLayout::GetSize method during the layout of the element. MSHTML passes the proposed size, which is the parent size, to the behavior callback. MSHTML then uses the callback's returned size as the element size. If the behavior requests full delegation, MSHTML skips natural sizing.

If the behavior does not request full delegation, then MSHTML performs natural sizing. If the behavior requests that the natural value be modified, MSHTML calls the behavior's IElementBehaviorLayout::GetSize method while calculating element size. MSHTML passes the proposed size of the element and the natural size of the content to the method, and the behavior modifies the element's size. The proposed size of the element is based on typical formatting of the element due to its properties, the size of its parent, and the content size.

Because MSHTML calls the behavior's IElementBehaviorLayout::GetSize method synchronously, it is important not to call any functions that might modify the document tree.

Requirements

Minimum supported client

Windows XP

Minimum supported server

Windows 2000 Server

Header

Mshtml.h

IDL

Mshtml.idl