:mod:`dip.shell.tools.form` =========================== .. module:: dip.shell.tools.form This module contains a base implementation of a :term:`tool` that handles the editing of a model using a form. :class:`FormTool` ----------------- .. class:: FormTool Base class: :class:`~dip.shell.BaseManagedModelTool` The FormTool class is a :term:`tool` that uses an automatically generated :term:`view` (a :class:`~dip.ui.Form` by default) to manipulate a :term:`managed model`. .. attribute:: area = Str() The identifier of the area where the view should be placed. .. attribute:: controller_factory = Callable() The controller factory. This must return an object that implements or can be adapted to the :class:`~dip.ui.IController` interface. .. attribute:: model_type = Instance(type) The type of model that the tool can handle. .. attribute:: view_factory = Instance(ViewFactory) The factory used to create the tool's views. .. method:: FormTool.create_views(model) Create the views for a managed model. :param model: is the model. :return: the list of views. .. method:: FormTool.handles(model) Check if the tool can handle a particular model. :param model: is the model. :return: ``True`` if a tool can handle the model.