# enaml.widgets.dock_area

Classes

`DockArea` | A component which arranges dock item children.

class enaml.widgets.dock_area.DockArea(parent=None, **kwargs)

  Bases: `ConstraintsWidget`

  A component which arranges dock item children.

  layout

    The layout of dock items for the area. This attribute is not kept in sync with the layout state of the widget at runtime. The ‘save_layout’ method should be called to retrieve the current layout state.

  tab_position

    The default tab position for newly created dock tabs.

  live_drag

    Whether the dock items resize as a dock splitter is being dragged (True), or if a simple indicator is drawn until the drag handle is released (False). The default is True.

  style

    The name of the registered style to apply to the dock area. The list of available styles can be retrieved by calling the function available_styles in the enaml.stdlib.dock_area_styles module. The default is a style inspired by Visual Studio 2010

    Users can also define and use their own custom style sheets with the dock area. Simply set this attribute to an empty string so the default styling is disabled, and proceed to use style sheets as with any other widget (see the stdlib styles for inspiration).

    Only one mode of styling should be used for the dock area at a time. Using both modes simultaneously is undefined.

  dock_events_enabled

    Whether or not dock events are enabled for the area.

  dock_event

    An event emitted when a dock event occurs in the dock area. dock_events_enabled must be True in order to recieve events.

  hug_width

    A Stack expands freely in height and width by default

  hug_height

    How strongly a widget hugs it’s height hint. This is equivalent to the constraint:

        (height == hint) | hug_height

  proxy

    A reference to the ProxyStack widget.

  initialize()

    A reimplemented initializer method.

    This method ensures the internal style sheet is created.

  dock_items()

    Get the dock items defined on the stack

  save_layout()

    Save the current layout state of the dock area.

    Returns:

      result – The current layout state of the dock area.

    Return type:

      docklayout

  apply_layout(layout)

    Apply a new layout to the dock area.

    Parameters:

      layout (DockLayout) – The dock layout to apply to the dock area.

  update_layout(ops)

    Update the layout configuration using layout operations.

    Parameters:

      ops (DockLayoutOp or iterable) – A single DockLayoutOp instance or an iterable of the same. The operations will be executed in order. If a given op is not valid for the current layout state, it will be skipped.

  suppress_dock_events()

    A context manager which supresses dock events.

    This manager will disable dock events for the duration of the context, and restore the old value upon exit.

  activated

    An event fired when an object’s proxy is activated. It is triggered once during the object lifetime, at the end of the activate_proxy method.

  background

    The background color of the widget.

  destroyed

    An event fired when an object has been destroyed. It is triggered once during the object lifetime, just before the object is removed from the tree structure.

  enabled

    Whether or not the widget is enabled.

  initialized

    An event fired when an object is initialized. It is triggered once during the object lifetime, at the end of the initialize method.

  name

    Export the ‘name’ attribute as a declarative member.

  style_class

    The style class to which this item belongs. Multiple classes can be separated with whitespace. An empty string indicates the widget does not belong to any style class.