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

    A layout which provides a flexible docking arrangement.

    The consumer of this layout is responsible for handling all signals from the generated tab bars and managing the visibility of widgets and tab bars as needed.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    The renderer used by the dock layout.

    Accessors

    • 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 hiddenMode(): HiddenMode

      The method for hiding child widgets.

      If there is only one child widget, Display hiding mode will be used regardless of this setting.

      Returns HiddenMode

    • set hiddenMode(v: HiddenMode): void

      Parameters

      Returns void

    • get isDisposed(): boolean

      Test whether the layout is disposed.

      Returns boolean

    • get isEmpty(): boolean

      Whether the dock layout is empty.

      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 dock layout.

      Returns number

    • set spacing(value: number): void

      Set the inter-element spacing for the dock layout.

      Parameters

      • value: number

      Returns void

    Methods

    • Create an iterator over all widgets in the layout.

      Returns IterableIterator<Widget>

      A new iterator over the widgets in the layout.

      This iterator includes the generated tab bars.

    • Add a widget to the dock layout.

      Parameters

      • widget: Widget

        The widget to add to the dock layout.

      • Optionaloptions: DockLayout.IAddOptions

        The additional options for adding the widget.

        The widget will be moved if it is already contained in the layout.

        An error will be thrown if the reference widget is invalid.

      Returns void

    • Attach the widget to the layout parent widget.

      Parameters

      • widget: Widget

        The widget to attach to the parent.

        This is a no-op if the widget is already attached.

      Returns void

    • Detach the widget from the layout parent widget.

      Parameters

      • widget: Widget

        The widget to detach from the parent.

        This is a no-op if the widget is not attached.

      Returns void

    • Dispose of the resources held by the layout.

      This will clear and dispose all widgets in the layout.

      Returns void

    • Create an iterator over the handles in the layout.

      Returns IterableIterator<HTMLDivElement>

      A new iterator over the handles in the layout.

    • Find the tab area which contains the given client position.

      Parameters

      • clientX: number

        The client X position of interest.

      • clientY: number

        The client Y position of interest.

      Returns null | ITabAreaGeometry

      The geometry of the tab area at the given position, or null if there is no tab area at the given position.

    • Perform layout initialization which requires the parent widget.

      Returns void

    • Move a handle to the given offset position.

      Parameters

      • handle: HTMLDivElement

        The handle to move.

      • offsetX: number

        The desired offset X position of the handle.

      • offsetY: number

        The desired offset Y position of the handle.

        If the given handle is not contained in the layout, this is no-op.

        The handle will be moved as close as possible to the desired position without violating any of the layout constraints.

        Only one of the coordinates is used depending on the orientation of the handle. This method accepts both coordinates to make it easy to invoke from a mouse move event without needing to know the handle orientation.

      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-hidden' 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 'child-shown' message.

      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

    • 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

    • Restore the layout to a previously saved configuration.

      Parameters

      • config: DockLayout.ILayoutConfig

        The layout configuration to restore.

        Widgets which currently belong to the layout but which are not contained in the config will be unparented.

      Returns void

    • Save the current configuration of the dock layout.

      Returns DockLayout.ILayoutConfig

      A new config object for the current layout state.

      The return value can be provided to the restoreLayout method in order to restore the layout to its current configuration.

    • Create an iterator over the selected widgets in the layout.

      Returns IterableIterator<Widget>

      A new iterator over the selected user widgets.

      This iterator yields the widgets corresponding to the current tab of each tab bar in the layout.

    • Create an iterator over the tab bars in the layout.

      Returns IterableIterator<TabBar<Widget>>

      A new iterator over the tab bars in the layout.

      This iterator does not include the user widgets.

    • Create an iterator over the user widgets in the layout.

      Returns IterableIterator<Widget>

      A new iterator over the user widgets in the layout.

      This iterator does not include the generated tab bars.