Class type Ext_layout_ContextItem.t


class type t = object .. end
Inherits
method state : 'a. 'a Js.t Js.prop

State variables that are cleared when invalidated. Only applies to component items.


method wrapsComponent : bool Js.t Js.readonly_prop

True if this item wraps a Component (rather than an Element).

Defaults to: false

method addCls : 'b. 'b Js.t -> unit Js.meth

Queue the addition of a class name (or array of class names) to this ContextItem's target when next flushed.

Parameters:


method block : 'c. 'c Js.t -> Js.js_string Js.t -> unit Js.meth

Registers a layout in the block list for the given property. Once the property is set in the Ext.layout.Context, the layout is unblocked.

Parameters:


method clearMarginCache : unit Js.meth

clears the margin cache so that marginInfo get re-read from the dom on the next call to getMarginInfo() This is needed in some special cases where the margins have changed since the last layout, making the cached values invalid. For example collapsed window headers have different margin than expanded ones.


method domBlock : 'd. 'd Js.t -> Js.js_string Js.t -> unit Js.meth

Registers a layout in the DOM block list for the given property. Once the property flushed to the DOM by the Ext.layout.Context, the layout is unblocked.

Parameters:


method flush : unit Js.meth

Flushes any updates in the dirty collection to the DOM. This is only called if there are dirty entries because this object is only added to the flushQueue of the Ext.layout.Context when entries become dirty.


method getBorderInfo : 'e. 'e Js.t Js.meth

Gets the border information for the element as an object with left, top, right and bottom properties holding border size in pixels. This object is only read from the DOM on first request and is cached.


method getClassList : unit Js.meth

Returns a ClassList-like object to buffer access to this item's element's classes.


method getDomProp : 'f. Js.js_string Js.t -> 'f Js.t Js.meth

Gets a property of this object if it is correct in the DOM. Also tracks the current layout as dependent on this property so that DOM writes of it will trigger the layout to be recalculated.

Parameters:

Returns:


method getEl : 'g 'h.
'g Js.t ->
'h Js.t Js.optdef ->
(< addCls : 'b. 'b Js.t -> unit Js.meth;
block : 'c. 'c Js.t -> Js.js_string Js.t -> unit Js.meth;
callParent : 'k 'l. 'k Js.t -> 'l Js.t Js.meth;
callSuper : 'm 'n. 'm Js.t -> 'n Js.t Js.meth;
clearMarginCache : unit Js.meth;
domBlock : 'd. 'd Js.t -> Js.js_string Js.t -> unit Js.meth;
flush : unit Js.meth; getBorderInfo : 'e. 'e Js.t Js.meth;
getClassList : unit Js.meth;
getDomProp : 'f. Js.js_string Js.t -> 'f Js.t Js.meth;
getEl : 'g 'h. 'i; getFrameInfo : 'o. 'o Js.t Js.meth;
getInitialConfig : 'p. Js.js_string Js.t Js.optdef -> 'p Js.t Js.meth;
getMarginInfo : 'q. 'q Js.t Js.meth;
getPaddingInfo : 'r. 'r Js.t Js.meth;
getProp : 's. Js.js_string Js.t -> 's Js.t Js.meth;
getStyle : 't. Js.js_string Js.t -> 't Js.t Js.meth;
getStyles : 'u.
Js.js_string Js.t Js.js_array Js.t ->
Js.js_string Js.t Js.js_array Js.t Js.optdef ->
'u Js.t Js.meth;
hasDomProp : Js.js_string Js.t -> bool Js.t Js.meth;
hasProp : Js.js_string Js.t -> bool Js.t Js.meth;
initConfig : 'v. 'v Js.t -> 'j Js.t Js.meth;
invalidate : 'w. 'w Js.t -> unit Js.meth;
recoverProp : 'x 'y.
Js.js_string Js.t -> 'x Js.t -> 'y Js.t -> unit Js.meth;
removeCls : 'z. 'z Js.t -> unit Js.meth;
removeEl : 'a1 'b1. 'a1 Js.t -> 'b1 Js.t Js.optdef -> unit Js.meth;
self : Ext_Class.t Js.t Js.prop;
setAttribute : 'c1 'd1. 'c1 Js.t -> 'd1 Js.t -> unit Js.meth;
setContentHeight : 'e1 'f1. 'e1 Js.t -> 'f1 Js.t -> unit Js.meth;
setContentSize : 'g1 'h1 'i1.
'g1 Js.t -> 'h1 Js.t -> 'i1 Js.t -> unit Js.meth;
setContentWidth : 'j1 'k1. 'j1 Js.t -> 'k1 Js.t -> unit Js.meth;
setHeight : Js.number Js.t ->
bool Js.t Js.optdef -> Js.number Js.t Js.meth;
setProp : 'l1.
Js.js_string Js.t ->
'l1 Js.t -> bool Js.t -> Js.number Js.t Js.meth;
setWidth : Js.number Js.t ->
bool Js.t Js.optdef -> Js.number Js.t Js.meth;
state : 'a. 'a Js.t Js.prop; statics : Ext_Class.t Js.t Js.meth;
wrapsComponent : bool Js.t Js.readonly_prop; .. >
as 'j)
Js.t Js.meth as 'i

Returns the context item for an owned element. This should only be called on a component's item. The list of child items is used to manage invalidating calculated results.

Overridden in Ext.diag.layout.ContextItem.

Parameters:


method getFrameInfo : 'o. 'o Js.t Js.meth

Gets the "frame" information for the element as an object with left, top, right and bottom properties holding border+framing size in pixels. This object is calculated on first request and is cached.


method getMarginInfo : 'q. 'q Js.t Js.meth

Gets the margin information for the element as an object with left, top, right and bottom properties holding margin size in pixels. This object is only read from the DOM on first request and is cached.


method getPaddingInfo : 'r. 'r Js.t Js.meth

Gets the padding information for the element as an object with left, top, right and bottom properties holding padding size in pixels. This object is only read from the DOM on first request and is cached.


method getProp : 's. Js.js_string Js.t -> 's Js.t Js.meth

Gets a property of this object. Also tracks the current layout as dependent on this property so that changes to it will trigger the layout to be recalculated.

Parameters:

Returns:


method getStyle : 't. Js.js_string Js.t -> 't Js.t Js.meth

Returns a style for this item. Each style is read from the DOM only once on first request and is then cached. If the value is an integer, it is parsed automatically (so '5px' is not returned, but rather 5).

Parameters:

Returns:


method getStyles : 'u.
Js.js_string Js.t Js.js_array Js.t ->
Js.js_string Js.t Js.js_array Js.t Js.optdef -> 'u Js.t Js.meth

Returns styles for this item. Each style is read from the DOM only once on first request and is then cached. If the value is an integer, it is parsed automatically (so '5px' is not returned, but rather 5).

Parameters:

Returns:


method hasDomProp : Js.js_string Js.t -> bool Js.t Js.meth

Returns true if the given property is correct in the DOM. This is equivalent to calling getDomProp and not getting an undefined result. In particular, this call registers the current layout to be triggered by flushes of this property.

Parameters:


method hasProp : Js.js_string Js.t -> bool Js.t Js.meth

Returns true if the given property has been set. This is equivalent to calling getProp and not getting an undefined result. In particular, this call registers the current layout to be triggered by changes to this property.

Parameters:


method invalidate : 'w. 'w Js.t -> unit Js.meth

Invalidates the component associated with this item. The layouts for this component and all of its contained items will be re-run after first clearing any computed values.

If state needs to be carried forward beyond the invalidation, the options parameter can be used.

Overridden in Ext.diag.layout.ContextItem.

Parameters:


method recoverProp : 'x 'y. Js.js_string Js.t -> 'x Js.t -> 'y Js.t -> unit Js.meth

Recovers a property value from the last computation and restores its value and dirty state.

Parameters:


method removeCls : 'z. 'z Js.t -> unit Js.meth

Queue the removal of a class name (or array of class names) from this ContextItem's target when next flushed.

Parameters:


method removeEl : 'a1 'b1. 'a1 Js.t -> 'b1 Js.t Js.optdef -> unit Js.meth

Removes a cached ContextItem that was created using getEl. It may be necessary to call this method if the dom reference for owned element changes so that getEl can be called again to reinitialize the ContextItem with the new element.

Parameters:


method setAttribute : 'c1 'd1. 'c1 Js.t -> 'd1 Js.t -> unit Js.meth

Queue the setting of a DOM attribute on this ContextItem's target when next flushed.

Parameters:


method setContentHeight : 'e1 'f1. 'e1 Js.t -> 'f1 Js.t -> unit Js.meth

Sets the contentHeight property. If the component uses raw content, then only the measured height is acceptable.

Calculated values can sometimes be NaN or undefined, which generally mean the calculation is not done. To indicate that such as value was passed, 0 is returned. Otherwise, 1 is returned.

If the caller is not measuring (i.e., they are calculating) and the component has raw content, 1 is returned indicating that the caller is done.

Parameters:


method setContentSize : 'g1 'h1 'i1. 'g1 Js.t -> 'h1 Js.t -> 'i1 Js.t -> unit Js.meth

Sets the contentWidth and contentHeight properties. If the component uses raw content, then only the measured values are acceptable.

Calculated values can sometimes be NaN or undefined, which generally means that the calculation is not done. To indicate that either passed value was such a value, false returned. Otherwise, true is returned.

If the caller is not measuring (i.e., they are calculating) and the component has raw content, true is returned indicating that the caller is done.

Parameters:


method setContentWidth : 'j1 'k1. 'j1 Js.t -> 'k1 Js.t -> unit Js.meth

Sets the contentWidth property. If the component uses raw content, then only the measured width is acceptable.

Calculated values can sometimes be NaN or undefined, which generally means that the calculation is not done. To indicate that such as value was passed, 0 is returned. Otherwise, 1 is returned.

If the caller is not measuring (i.e., they are calculating) and the component has raw content, 1 is returned indicating that the caller is done.

Parameters:


method setHeight : Js.number Js.t -> bool Js.t Js.optdef -> Js.number Js.t Js.meth

Sets the height and constrains the height to min/maxHeight range.

Overridden in Ext.diag.layout.ContextItem.

Parameters:

Returns:


method setProp : 'l1. Js.js_string Js.t -> 'l1 Js.t -> bool Js.t -> Js.number Js.t Js.meth

Sets a property value. This will unblock and/or trigger dependent layouts if the property value is being changed. Values of NaN and undefined are not accepted by this method.

Overridden in Ext.diag.layout.ContextItem.

Parameters:

Returns:


method setWidth : Js.number Js.t -> bool Js.t Js.optdef -> Js.number Js.t Js.meth

Sets the height and constrains the width to min/maxWidth range.

Overridden in Ext.diag.layout.ContextItem.

Parameters:

Returns: