class type t =Inheritsobject
..end
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:
_ Js.t
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:
Ext_layout_Layout.t Js.t
Js.js_string Js.t
The property name that blocked the layout (e.g., 'width').
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:
Ext_layout_Layout.t Js.t
Js.js_string Js.t
The property name that blocked the layout (e.g., 'width').
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:
Js.js_string Js.t
The property name (e.g., 'width').
Returns:
_ Js.t
The property value or undefined if not yet set or is dirty.
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:
_ Js.t
The element or the name of an owned element
_ Js.t
(optional)
The owner of the named element if the passed "nameOrEl" parameter is a String. Defaults to this ContextItem's "target" property. For more details on owned elements see childEls and renderSelectors
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:
Js.js_string Js.t
The property name that blocked the layout (e.g., 'width').
Returns:
_ Js.t
The property value or undefined if not yet set.
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:
Js.js_string Js.t
The CSS style name.
Returns:
_ Js.t
The value of the DOM style (parsed as necessary).
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:
Js.js_string Js.t Js.js_array Js.t
The CSS style names.
Js.js_string Js.t Js.js_array Js.t
(optional)
The alternate names for the returned styles. If given,
these names must correspond one-for-one to the styleNames
.
Returns:
_ Js.t
The values of the DOM styles (parsed as necessary).
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:
Js.js_string Js.t
The property name (e.g., 'width').
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:
Js.js_string Js.t
The property name (e.g., 'width').
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:
_ Js.t
An object describing how to handle the invalidation.
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:
Js.js_string Js.t
The name of the property to recover.
_ Js.t
The old "props" object from which to recover values.
_ Js.t
The old "dirty" object from which to recover state.
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:
_ Js.t
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:
_ Js.t
The element or the name of an owned element
_ Js.t
(optional)
The owner of the named element if the passed "nameOrEl" parameter is a String. Defaults to this ContextItem's "target" property.
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:
_ Js.t
_ Js.t
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:
_ Js.t
_ Js.t
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:
_ Js.t
_ Js.t
_ Js.t
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:
_ Js.t
_ Js.t
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:
Js.number Js.t
The height.
bool Js.t
(optional)
Specifies if the value is currently in the DOM. A
value of false
indicates that the value is already in the DOM.
Returns:
Js.number Js.t
The actual height after constraining.
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:
Js.js_string Js.t
The property name (e.g., 'width').
_ Js.t
The new value of the property.
bool Js.t
Optionally specifies if the value is currently in the DOM
(default is true
which indicates the value is not in the DOM and must be flushed
at some point).
Returns:
Js.number Js.t
1 if this call specified the property value, 0 if not.
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:
Js.number Js.t
The width.
bool Js.t
(optional)
Specifies if the value is currently in the DOM. A
value of false
indicates that the value is already in the DOM.
Returns:
Js.number Js.t
The actual width after constraining.