# `ComponentManager`

class mnemosyne.libmnemosyne.component_manager.ComponentManager

  Manages the different components. Typically, instances of the different components are stored, as opposed to classes. In such a way, the component manager stores all the state of the user. Exceptions are widgets other than the main widget, which are lazily created for efficiency reasons.

  For certain components, many can be active at the same time (card types, filters, function hooks, …). For others, there can be only on active at the same time, like schedule, database … The idea is that the last one registered takes preference.

  add_gui_to_component(component_name, gui_component, in_front=False)

    Typical use case for this is when a plugin has a GUI component which obviously does not live inside libmnemosyne, and which needs to be added at a later stage.

  all(comp_type, used_for=None)

    For components for which there can be many active at once.

  current(comp_type, used_for=None)

    For components for which there can be only one active at any time.

  deactivate_all()
  debug(msg)

    Log a debugging message if debugging is enabled.

  register(component)
  unregister(component)