Class NotebookWindowedLayout

Windowed list layout for the notebook.

Hierarchy (view full)

Constructors

Properties

_activeCell: null | Widget
_footer: null | Widget = null
_header: null | Widget = null
_topHiddenCodeCells: number = -1
_willBeRemoved: null | Widget = null

Accessors

  • get fitPolicy(): FitPolicy
  • Get the fit policy for the layout.

    Notes

    The fit policy controls the computed size constraints which are applied to the parent widget by the layout.

    Some layout implementations may ignore the fit policy.

    Returns FitPolicy

  • set fitPolicy(value): void
  • Set the fit policy for the layout.

    Notes

    The fit policy controls the computed size constraints which are applied to the parent widget by the layout.

    Some layout implementations may ignore the fit policy.

    Changing the fit policy will clear the current size constraint for the parent widget and then re-fit the parent.

    Parameters

    • value: FitPolicy

    Returns void

  • get isDisposed(): boolean
  • Test whether the layout is disposed.

    Returns boolean

  • get parent(): null | WindowedList<WindowedList.IModel<any>, any>
  • Specialized parent type definition

    Returns null | WindowedList<WindowedList.IModel<any>, any>

  • set parent(value): void
  • Parameters

    Returns void

  • get widgets(): readonly Widget[]
  • A read-only array of the widgets in the layout.

    Returns readonly Widget[]

Methods

  • Create an iterator over the widgets in the layout.

    Returns IterableIterator<Widget>

    A new iterator over the widgets in the layout.

  • Toggle "soft" visibility of the widget.

    Notes

    To ensure that user events reach the CodeMirror editor, this method does not toggle display nor visibility which have side effects, but instead hides it in the compositor and ensures that the bounding box is has an area equal to zero. To ensure we do not trigger style recalculation, we set the styles directly on the node instead of using a class.

    Parameters

    Returns void

  • Add a widget to the end of the layout.

    Parameters

    • widget: Widget

      The widget to add to the layout.

      Notes

      If the widget is already contained in the layout, it will be moved.

    Returns void

  • Attach a widget to the parent's DOM node.

    Parameters

    • index: number

      The current index of the widget in the layout.

    • widget: Widget

      The widget to attach to the parent.

      Notes

      This method is called automatically by the panel layout at the appropriate time. It should not be called directly by user code.

      The default implementation adds the widgets's node to the parent's node at the proper location, and sends the appropriate attach messages to the widget if the parent is attached to the DOM.

      Subclasses may reimplement this method to control how the widget's node is added to the parent's node.

    Returns void

  • Detach a widget from the parent's DOM node.

    Parameters

    • index: number

      The previous index of the widget in the layout.

    • widget: Widget

      The widget to detach from the parent.

      Notes

      This method is called automatically by the panel layout at the appropriate time. It should not be called directly by user code.

      The default implementation removes the widget's node from the parent's node, and sends the appropriate detach messages to the widget if the parent is attached to the DOM.

      Subclasses may reimplement this method to control how the widget's node is removed from the parent's node.

    Returns void

  • Perform layout initialization which requires the parent widget.

    Returns void

  • Insert a widget into the layout at the specified index.

    Parameters

    • index: number

      The index at which to insert the widget.

    • widget: Widget

      The widget to insert into the layout.

      Notes

      The index will be clamped to the bounds of the widgets.

      If the widget is already added to the layout, it will be moved.

      Undefined Behavior

      An index which is non-integral.

    Returns void

  • Move a widget in the parent's DOM node.

    Parameters

    • fromIndex: number

      The previous index of the widget in the layout.

    • toIndex: number

      The current index of the widget in the layout.

    • widget: Widget

      The widget to move in the parent.

      Notes

      This method is called automatically by the panel layout at the appropriate time. It should not be called directly by user code.

      The default implementation moves the widget's node to the proper location in the parent's node and sends the appropriate attach and detach messages to the widget if the parent is attached to the DOM.

      Subclasses may reimplement this method to control how the widget's node is moved in the parent's node.

    Returns void

  • A message handler invoked on an 'after-attach' message.

    Notes

    The default implementation of this method forwards the message to all widgets. It assumes all widget nodes are attached to the parent widget node.

    This may be reimplemented by subclasses as needed.

    Parameters

    • msg: Message

    Returns void

  • A message handler invoked on an 'after-detach' message.

    Notes

    The default implementation of this method forwards the message to all widgets. It assumes all widget nodes are attached to the parent widget node.

    This may be reimplemented by subclasses as needed.

    Parameters

    • msg: Message

    Returns void

  • A message handler invoked on an 'after-hide' message.

    Notes

    The default implementation of this method forwards the message to all non-hidden widgets. It assumes all widget nodes are attached to the parent widget node.

    This may be reimplemented by subclasses as needed.

    Parameters

    • msg: Message

    Returns void

  • A message handler invoked on an 'after-show' message.

    Notes

    The default implementation of this method forwards the message to all non-hidden widgets. It assumes all widget nodes are attached to the parent widget node.

    This may be reimplemented by subclasses as needed.

    Parameters

    • msg: Message

    Returns void

  • A message handler invoked on a 'before-attach' message.

    Notes

    The default implementation of this method forwards the message to all widgets. It assumes all widget nodes are attached to the parent widget node.

    This may be reimplemented by subclasses as needed.

    Parameters

    • msg: Message

    Returns void

  • A message handler invoked on a 'before-detach' message.

    Notes

    The default implementation of this method forwards the message to all widgets. It assumes all widget nodes are attached to the parent widget node.

    This may be reimplemented by subclasses as needed.

    Parameters

    • msg: Message

    Returns void

  • A message handler invoked on a 'before-hide' message.

    Notes

    The default implementation of this method forwards the message to all non-hidden widgets. It assumes all widget nodes are attached to the parent widget node.

    This may be reimplemented by subclasses as needed.

    Parameters

    • msg: Message

    Returns void

  • A message handler invoked on a 'before-show' message.

    Notes

    The default implementation of this method forwards the message to all non-hidden widgets. It assumes all widget nodes are attached to the parent widget node.

    This may be reimplemented by subclasses as needed.

    Parameters

    • msg: Message

    Returns void

  • A message handler invoked on a 'child-hidden' message.

    Notes

    The default implementation of this handler is a no-op.

    Parameters

    • msg: ChildMessage

    Returns void

  • A message handler invoked on a 'child-shown' message.

    Notes

    The default implementation of this handler is a no-op.

    Parameters

    • msg: ChildMessage

    Returns void

  • A message handler invoked on a 'fit-request' message.

    Notes

    The default implementation of this handler is a no-op.

    Parameters

    • msg: Message

    Returns void

  • A message handler invoked on a 'resize' message.

    Notes

    The layout should ensure that its widgets are resized according to the specified layout space, and that they are sent a 'resize' message if appropriate.

    The default implementation of this method sends an UnknownSize resize message to all widgets.

    This may be reimplemented by subclasses as needed.

    Parameters

    • msg: ResizeMessage

    Returns void

  • A message handler invoked on an 'update-request' message.

    Notes

    This is a reimplementation of the base class method, and is a no-op.

    Parameters

    • msg: Message

    Returns void

  • Process a message sent to the parent widget.

    Parameters

    • msg: Message

      The message sent to the parent widget.

      Notes

      This method is called by the parent widget to process a message.

      Subclasses may reimplement this method as needed.

    Returns void

    • A message handler invoked on a 'child-removed' message.

    Parameters

    • widget: Widget

      The widget to remove from the layout.

      Notes

      A widget is automatically removed from the layout when its parent is set to null. This method should only be invoked directly when removing a widget from a layout which has yet to be installed on a parent widget.

      This method does not modify the widget's parent.

    Returns void

  • Remove the widget at a given index from the layout.

    Parameters

    • index: number

      The index of the widget to remove.

      Notes

      A widget is automatically removed from the layout when its parent is set to null. This method should only be invoked directly when removing a widget from a layout which has yet to be installed on a parent widget.

      This method does not modify the widget's parent.

      Undefined Behavior

      An index which is non-integral.

    Returns void