Theia API Documentation v1.65.0
    Preparing search index...

    A layout which arranges its widgets into resizable sections.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    The renderer used by the split layout.

    widgetOffset: number

    Accessors

    • get alignment(): SplitLayout.Alignment

      Get the content alignment for the split layout.

      This is the alignment of the widgets in the layout direction.

      The alignment has no effect if the widgets can expand to fill the entire split layout.

      Returns SplitLayout.Alignment

    • set alignment(value: SplitLayout.Alignment): void

      Set the content alignment for the split layout.

      This is the alignment of the widgets in the layout direction.

      The alignment has no effect if the widgets can expand to fill the entire split layout.

      Parameters

      Returns void

    • get fitPolicy(): FitPolicy

      Get the fit policy for the layout.

      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: FitPolicy): void

      Set the fit policy for the layout.

      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

      Returns void

    • get handles(): readonly HTMLDivElement[]

      A read-only array of the split handles in the layout.

      Returns readonly HTMLDivElement[]

    • get isDisposed(): boolean

      Test whether the layout is disposed.

      Returns boolean

    • get parent(): null | Widget

      Get the parent widget of the layout.

      Returns null | Widget

    • set parent(value: null | Widget): void

      Set the parent widget of the layout.

      This is set automatically when installing the layout on the parent widget. The parent widget should not be set directly by user code.

      Parameters

      Returns void

    • get spacing(): number

      Get the inter-element spacing for the split layout.

      Returns number

    • set spacing(value: number): void

      Set the inter-element spacing for the split layout.

      Parameters

      • value: number

      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.

    • Get the absolute sizes of the widgets in the layout.

      Returns number[]

      A new array of the absolute sizes of the widgets.

      This method does not measure the DOM nodes.

    • Add a widget to the end of the layout.

      Parameters

      • widget: Widget

        The widget to add to the layout.

        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.

        This is a reimplementation of the superclass method.

      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.

        This is a reimplementation of the superclass method.

      Returns void

    • Dispose of the resources held by the layout.

      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.

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

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

        An index which is non-integral.

      Returns void

    • Move the offset position of a split handle.

      Parameters

      • index: number

        The index of the handle of the interest.

      • position: number

        The desired offset position of the handle.

        The position is relative to the offset parent.

        This will move the handle as close as possible to the desired position. The sibling widgets will be adjusted as necessary.

      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.

        This is a reimplementation of the superclass method.

      Returns void

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

      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

      Returns void

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

      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

      Returns void

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

      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

      Returns void

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

      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

      Returns void

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

      Parameters

      Returns void

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

      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

      Returns void

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

      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

      Returns void

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

      Parameters

      Returns void

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

      This will remove the child widget from the layout.

      Subclasses should not typically reimplement this method.

      Parameters

      Returns void

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

      Parameters

      Returns void

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

      Parameters

      Returns void

    • Process a message sent to the parent widget.

      Parameters

      • msg: Message

        The message sent to the parent widget.

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

        Subclasses may reimplement this method as needed.

      Returns void

    • Get the relative sizes of the widgets in the layout.

      Returns number[]

      A new array of the relative sizes of the widgets.

      The returned sizes reflect the sizes of the widgets normalized relative to their siblings.

      This method does not measure the DOM nodes.

    • Remove a widget from the layout.

      Parameters

      • widget: Widget

        The widget to remove from the layout.

        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.

        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.

        An index which is non-integral.

      Returns void

    • Set the relative sizes for the widgets in the layout.

      Parameters

      • sizes: number[]

        The relative sizes for the widgets in the panel.

      • Optionalupdate: boolean

        Update the layout after setting relative sizes. Default is True.

        Extra values are ignored, too few will yield an undefined layout.

        The actual geometry of the DOM nodes is updated asynchronously.

      Returns void

    • Update the item position.

      Parameters

      • i: number

        Item index

      • isHorizontal: boolean

        Whether the layout is horizontal or not

      • left: number

        Left position in pixels

      • top: number

        Top position in pixels

      • height: number

        Item height

      • width: number

        Item width

      • size: number

        Item size

      Returns void