Class type Goog.​Ui.​container

class type container = object..end

Inherits


method getKeyEventTarget : Dom_html.element Js.t Js.meth

Returns the DOM element on which the container is listening for keyboard events (null if none). Returns Element on which the container is listening for key events.

method setKeyEventTarget : 
'a. (#Dom_html.element as 'a) Js.t Js.optdef -> unit Js.meth

Attaches an element on which to listen for key events.

method getKeyHandler : Goog.Events.keyHandler Js.t Js.meth

Returns the keyboard event handler for this container, lazily created the first time this method is called. The keyboard event handler listens for keyboard events on the container's key event target, as determined by its renderer. Returns Keyboard event handler for this container.

method createDom : unit Js.meth

Creates the container's DOM. Overrides goog.ui.Component#createDom.

method getContentElement : Dom_html.element Js.t Js.meth

Returns the DOM element into which child components are to be rendered, or null if the container itself hasn't been rendered yet. Overrides goog.ui.Component#getContentElement by delegating to the renderer. Returns Element to contain child elements (null if none).

method canDecorate : 
'b. (#Dom_html.element as 'b) Js.t -> bool Js.t Js.meth

Returns true if the given element can be decorated by this container. Overrides goog.ui.Component#canDecorate. Returns True iff the element can be decorated.

method decorateInternal : 
'c. (#Dom_html.element as 'c) Js.t -> unit Js.meth

Decorates the given element with this container. Overrides goog.ui.Component#decorateInternal. Considered protected.

method enterDocument : unit Js.meth

Configures the container after its DOM has been rendered, and sets up event handling. Overrides goog.ui.Component#enterDocument.

method exitDocument : unit Js.meth

Cleans up the container before its DOM is removed from the document, and removes event handlers. Overrides goog.ui.Component#exitDocument.

method handleEnterItem : Goog.Events.event Js.t -> bool Js.t Js.meth

Handles ENTER events raised by child controls when they are navigated to. Returns Whether to prevent handleMouseOver from handling the event.

method handleHighlightItem : 
'd. (#Goog.Events.event as 'd) Js.t -> unit Js.meth

Handles HIGHLIGHT events dispatched by items in the container when they are highlighted.

method handleUnHighlightItem : 
'e. (#Goog.Events.event as 'e) Js.t -> unit Js.meth

Handles UNHIGHLIGHT events dispatched by items in the container when they are unhighlighted.

method handleOpenItem : 
'f. (#Goog.Events.event as 'f) Js.t -> unit Js.meth

Handles OPEN events dispatched by items in the container when they are opened.

method handleCloseItem : 'g. (#Goog.Events.event as 'g) -> unit Js.meth

Handles CLOSE events dispatched by items in the container when they are closed.

method handleMouseDown : 
'h. (#Goog.Events.browserEvent as 'h) Js.t -> unit Js.meth

Handles mousedown events over the container. The default implementation sets the "mouse button pressed" flag and, if the container is focusable, grabs keyboard focus.

method handleDocumentMouseUp : 
'i. (#Goog.Events.browserEvent as 'i) Js.t -> unit Js.meth

Handles mouseup events over the document. The default implementation clears the "mouse button pressed" flag.

method handleChildMouseEvents : 
'j. (#Goog.Events.browserEvent as 'j) Js.t -> unit Js.meth

Handles mouse events originating from nodes belonging to the controls hosted in the container. Locates the child control based on the DOM node that dispatched the event, and forwards the event to the control for handling.

method getOwnerControl : 
'k 'l.
(#Dom.node as 'k) Js.t ->
(#control as 'l) Js.t Js.opt -> unit Js.meth

Returns the child control that owns the given DOM node, or null if no such control is found. Returns Control hosted in the container to which the node belongs (if found).

method handleFocus : 'm. (#Goog.Events.event as 'm) Js.t -> unit Js.meth

Handles focus events raised when the container's key event target receives keyboard focus.

method handleBlur : 
'n. (#Goog.Events.browserEvent as 'n) Js.t -> unit Js.meth

Handles blur events raised when the container's key event target loses keyboard focus. The default implementation clears the highlight index.

method handleKeyEvent : Goog.Events.keyEvent Js.t -> bool Js.t Js.meth

Attempts to handle a keyboard event, if the control is enabled, by calling handleKeyEventInternal. Considered protected; should only be used within this package and by subclasses. Returns Whether the key event was handled.

method handleKeyEventInternal : 
Goog.Events.keyEvent Js.t -> bool Js.t Js.meth

Attempts to handle a keyboard event; returns true if the event was handled, false otherwise. If the container is enabled, and a child is highlighted, calls the child control's handleKeyEvent method to give the control a chance to handle the event first. Returns Whether the event was handled by the container (or one of its children).

method addChild : 
'o. (#control as 'o) Js.t -> bool Js.t Js.opt -> unit Js.meth

Adds the specified control as the last child of this container. See goog.ui.Container#addChildAt for detailed semantics.

method getChild : Js.js_string Js.t -> component Js.t Js.opt Js.meth

Overrides goog.ui.Container#getChild to make it clear that it only returns goog.ui.Controls. Returns The child with the given ID; null if none.

method getChildAt : int -> component Js.t Js.opt Js.meth

Overrides goog.ui.Container#getChildAt to make it clear that it only returns goog.ui.Controls. Returns The child with the given ID; null if none.

method addChildAt : 
control Js.t -> int -> bool Js.t Js.opt -> unit Js.meth

Adds the control as a child of this container at the given 0-based index. Overrides goog.ui.Component#addChildAt by also updating the container's highlight index. Since goog.ui.Component#addChild uses addChildAt internally, we only need to override this method.

method removeChild : 
'p.
(Js.js_string Js.t, (#control as 'p) Js.t) Goog.Tools.Union.t ->
bool Js.t Js.opt -> control Js.t Js.meth

Removes a child control. Overrides goog.ui.Component#removeChild by updating the highlight index. Since goog.ui.Component#removeChildAt uses #removeChild internally, we only need to override this method. Returns The removed control, if any.

method getOrientation : Container.orientation_pre Js.opt Js.meth

Returns the container's orientation. Returns Container orientation.

method setOrientation : Container.orientation_pre -> unit Js.meth

Sets the container's orientation.

method isVisible : bool Js.t Js.meth

Returns true if the container's visibility is set to visible, false if it is set to hidden. A container that is set to hidden is guaranteed to be hidden from the user, but the reverse isn't necessarily true. A container may be set to visible but can otherwise be obscured by another element, rendered off-screen, or hidden using direct CSS manipulation. Returns Whether the container is set to be visible.

method setVisible : bool Js.t -> bool Js.t Js.opt -> bool Js.t Js.meth

Shows or hides the container. Does nothing if the container already has the requested visibility. Otherwise, dispatches a SHOW or HIDE event as appropriate, giving listeners a chance to prevent the visibility change. Returns Whether the visibility was changed.

method isEnabled : bool Js.t Js.meth

Returns true if the container is enabled, false otherwise. Returns Whether the container is enabled.

method setEnabled : bool Js.t -> unit Js.meth

Enables/disables the container based on the enable argument. Dispatches an ENABLED or DISABLED event prior to changing the container's state, which may be caught and canceled to prevent the container from changing state. Also enables/disables child controls.

method isFocusable : bool Js.t Js.meth

Returns true if the container is focusable, false otherwise. The default is true. Focusable containers always have a tab index and allocate a key handler to handle keyboard events while focused. Returns Whether the component is focusable.

method setFocusable : bool Js.t -> unit Js.meth

Sets whether the container is focusable. The default is true. Focusable containers always have a tab index and allocate a key handler to handle keyboard events while focused.

method isFocusableChildrenAllowed : bool Js.t Js.meth

Returns true if the container allows children to be focusable, false otherwise. Only effective if the container is not focusable. Returns Whether children should be focusable.

method setFocusableChildrenAllowed : bool Js.t -> unit Js.meth

Sets whether the container allows children to be focusable, false otherwise. Only effective if the container is not focusable.

method getHighlightedIndex : int Js.meth

Returns the index of the currently highlighted item (-1 if none). Returns Index of the currently highlighted item.

method setHighlightedIndex : int -> unit Js.meth

Highlights the item at the given 0-based index (if any). If another item was previously highlighted, it is un-highlighted.

method setHighlighted : 'q. (#control as 'q) Js.t -> unit Js.meth

Highlights the given item if it exists and is a child of the container; otherwise un-highlights the currently highlighted item.

method getHighlighted : control Js.t Js.meth

Returns the currently highlighted item (if any). Returns Highlighted item (null if none).

method highlightFirst : unit Js.meth

Highlights the first highlightable item in the container

method highlightLast : unit Js.meth

Highlights the last highlightable item in the container.

method highlightNext : unit Js.meth

Highlights the next highlightable item (or the first if nothing is currently highlighted).

method highlightPrevious : unit Js.meth

Highlights the previous highlightable item (or the last if nothing is currently highlighted).

method highlightHelper : 
(int -> int -> int) Js.callback -> int -> bool Js.t Js.meth

Helper function that manages the details of moving the highlight among child controls in response to keyboard events. Returns Whether the highlight has changed.

method canHighlightItem : 'r. (#control as 'r) Js.t -> bool Js.t Js.meth

Returns whether the given item can be highlighted. Returns Whether the item can be highlighted.

method setHighlightedIndexFromKeyEvent : int -> unit Js.meth

Helper method that sets the highlighted index to the given index in response to a keyboard event. The base class implementation simply calls the setHighlightedIndex method, but subclasses can override this behavior as needed.

method isMouseButtonPressed : bool Js.t Js.meth

Returns true if the mouse button is pressed, false otherwise. Returns Whether the mouse button is pressed.

method setMouseButtonPressed : bool Js.t -> unit Js.meth

Sets or clears the "mouse button pressed" flag.