Class type Ext_layout_Layout.t


class type t = object .. end
Inherits
method _done : bool Js.t Js.prop

Used only during a layout run, this value indicates that a layout has finished its calculations. This flag is set to true prior to the call to calculate and should be set to false if this layout has more work to do.


method isLayout : bool Js.t Js.readonly_prop

true in this class to identify an object as an instantiated Layout, or subclass thereof.

Defaults to: true

method afterRemove : 'a. 'a Js.t -> unit Js.meth

Removes layout's itemCls and owning Container's itemCls. Clears the managed dimensions flags

Parameters:


method beginLayout : Ext_layout_ContextItem.t Js.t -> unit Js.meth

Called before any calculation cycles to prepare for layout.

This is a write phase and DOM reads should be strictly avoided when overridding this method.

Parameters:


method beginLayoutCycle : Ext_layout_ContextItem.t Js.t -> unit Js.meth

Called before any calculation cycles to reset DOM values and prepare for calculation.

This is a write phase and DOM reads should be strictly avoided when overridding this method.

Parameters:


method calculate : Ext_layout_ContextItem.t Js.t -> unit Js.meth

Called to perform the calculations for this layout. This method will be called at least once and may be called repeatedly if the done property is cleared before return to indicate that this layout is not yet done. The done property is always set to true before entering this method.

This is a read phase and DOM writes should be strictly avoided in derived classes. Instead, DOM writes need to be written to Ext.layout.ContextItem objects to be flushed at the next opportunity.

Parameters:


method completeLayout : Ext_layout_ContextItem.t Js.t -> unit Js.meth

This method (if implemented) is called at the end of the cycle in which this layout completes (by not setting done to false in calculate). It is possible for the layout to complete and yet become invalid before the end of the cycle, in which case, this method will not be called. It is also possible for this method to be called and then later the layout becomes invalidated. This will result in calculate being called again, followed by another call to this method.

This is a read phase and DOM writes should be strictly avoided in derived classes. Instead, DOM writes need to be written to Ext.layout.ContextItem objects to be flushed at the next opportunity.

This method need not be implemented by derived classes and, in fact, should only be implemented when needed.

Parameters:


method configureItem : 'b. (#Ext_Component.t as 'b) Js.t -> unit Js.meth

Called before an item is rendered to allow the layout to configure the item.

Parameters:


method destroy : unit Js.meth

Destroys this layout. This method removes a targetCls from the target element and calls onDestroy.

A derived class can override either this method or onDestroy but in all cases must call the base class versions of these methods to allow the base class to perform its cleanup.

This method (or onDestroy) are overridden by subclasses most often to purge event handlers or remove unmanged DOM nodes.


method finalizeLayout : Ext_layout_ContextItem.t Js.t -> unit Js.meth

This method (if implemented) is called after all layouts have completed. In most ways this is similar to completeLayout. This call can cause this (or any layout) to be become invalid (see Ext.layout.Context.invalidate), but this is best avoided. This method is intended to be where final reads are made and so it is best to avoid invalidating layouts at this point whenever possible. Even so, this method can be used to perform final checks that may require all other layouts to be complete and then invalidate some results.

This is a read phase and DOM writes should be strictly avoided in derived classes. Instead, DOM writes need to be written to Ext.layout.ContextItem objects to be flushed at the next opportunity.

This method need not be implemented by derived classes and, in fact, should only be implemented when needed.

Parameters:


method finishedLayout : Ext_layout_ContextItem.t Js.t -> unit Js.meth

This method is called after all layouts are complete and their calculations flushed to the DOM. No further layouts will be run and this method is only called once per layout run. The base component layout caches lastComponentSize.

This is a write phase and DOM reads should be avoided if possible when overridding this method.

This method need not be implemented by derived classes and, in fact, should only be implemented when needed.

Parameters:


method getItemSizePolicy : 'c. (#Ext_Component.t as 'c) Js.t -> Ext_layout_SizePolicy.t Js.t Js.meth

Returns an object describing how this layout manages the size of the given component. This method must be implemented by any layout that manages components.

Parameters:

Returns:


method getLayoutItems_empty : unit Js.meth

Returns the set of items to layout (empty by default).


method initLayout : unit Js.meth

A one-time initialization method called just before rendering.


method isValidParent : 'd 'e 'f. 'd Js.t -> 'e Js.t -> 'f Js.t -> unit Js.meth

Validates item is in the proper place in the dom.

Parameters:


method notifyOwner : Ext_layout_ContextItem.t Js.t -> unit Js.meth

This method (if implemented) is called after all layouts are finished, and all have a lastComponentSize cached. No further layouts will be run and this method is only called once per layout run. It is the bookend to beginLayout.

This is a write phase and DOM reads should be avoided if possible when overridding this method. This is the catch-all tail method to a layout and so the rules are more relaxed. Even so, for performance reasons, it is best to avoid reading the DOM. If a read is necessary, consider implementing a finalizeLayout method to do the required reads.

This method need not be implemented by derived classes and, in fact, should only be implemented when needed.

Parameters:


method onContentChange : 'g. (#Ext_Component.t as 'g) Js.t -> bool Js.t Js.meth

This method is called when a child item changes in some way. By default this calls Ext.AbstractComponent.updateLayout on this layout's owner.

Parameters:

Returns:


method renderItems : 'h 'i. 'h Js.t -> 'i Js.t -> unit Js.meth

Iterates over all passed items, ensuring they are rendered. If the items are already rendered, also determines if the items are in the proper place in the dom.

Parameters: