# enaml.core.include

Classes

`Include` | An object which dynamically inserts children into its parent.

class enaml.core.include.Include(parent=None, **kwargs)

  Bases: `Declarative`

  An object which dynamically inserts children into its parent.

  The ‘Include’ object is used to cleanly and easily insert objects into the children of its parent. ‘Object’ instances assigned to the ‘objects’ list of the ‘Include’ will be parented with the parent of the ‘Include’. Creating an ‘Include’ with no parent is a programming error.

  objects

    The list of objects belonging to this Include. Objects in this list will be automatically parented with the Include’s parent.

  destroy_old

    A boolean flag indicating whether to destroy the old objects that are removed from the parent. The default is True.

  initialize()

    A reimplemented initializer.

    This method will add the include objects to the parent of the include and ensure that they are initialized.

  destroy()

    A reimplemented destructor.

    The Include will destroy all of its objects if the ‘destroy_old’ flag is set and the parent is not also being destroyed.