The BaseManagedModelTool class is a base class for tools
that handle managed models. It automatically manages
the different lists of views and provides a convenient interface to the
changing of the active view and model.

The BaseShellFactory class is a base class for shell factories. It
creates views that can be adapted to the IShell
interface.

id = 'dip.shell'

The identifier of a shell.

main_area_policy = Enum('multi', 'on_demand', 'single')

This determines how multiple views placed in the main area of the shell
are handled. ‘multi’ means that the area may contain any number of views
and will visualise the area in the same way irrespective of the number of
views. ‘on_demand’ means that the area may contain any number of views
but it may visualise the area differently if it contains a single view.
‘single’ means that the area may only ever contain one view and an old
view must be discarded before a new view is added.

tool_factories = List(Callable())

The tool factories. A factory should return an object that implements or
can be adapted to ITool.

window_title_template = Str()

The template from which the window title is derived. Tokens in the
template are replaced by their corresponding values:

[view] is replaced by the name of the active
view.

Note that, as with window_title, [*] will be
replaced with the application modification state by the toolkit.

The IManagedModelTool interface defines the API for a tool that
handles one or more managed models.

manager = Instance(IModelManagerTool)

The model manager that is managing this tool’s models.

model_policy = Enum('many', 'one', 'zero_or_one')

This defines how the tool handles multiple models. many means the
tool can handle any number of models at a time. one means that the
tool handles exactly one model at a time - this means a new model will be
created automatically without user intervention. zero_or_one means
that the tool handles no more than one model at time.

models = List(IManagedModel)

The managed models the tool is handling.

new_tool = Bool(True)

This is set if the tool is suitable for handling a model in the context
of a “New” operation.

open_tool = Bool(True)

This is set if the tool is suitable for handling a model in the context
of an “Open” operation.

The IModelManagerTool interface defines the API made available to
implementations of the IManagedModelTool interface.

model_factories = List(Callable())

The managed model factories. A factory should return an object that
implements or can be adapted to IManagedModel. If an
application may include more than one model type then the factory should
implement the IDisplay interface.

This determines how multiple views placed in the main area of the shell
are handled. ‘multi’ means that the area may contain any number of views
and will visualise the area in the same way irrespective of the number of
views. ‘on_demand’ means that the area may contain any number of views
but it may visualise the area differently if it contains a single view.
‘single’ means that the area may only ever contain one view and an old
view must be discarded before a new view is added.

publication_manager = Instance(IPublicationManager)

The publication manager.

tools = List(ITool)

The list of the shell’s tools.

views = List(IView)

The list of the shell’s views.

window_title_template = Str()

The template from which the window title is derived. Tokens in the
template are replaced by their corresponding values:

[view] is replaced by the name of the active
view.

Note that, as with window_title, [*] will be
replaced with the application modification state by the toolkit.