.. include:: headings.inc .. _IdManager: ========================================================================================================================================== |phoenix_title| **IdManager** ========================================================================================================================================== :ref:`IdManager` is responsible for allocating and releasing window IDs. It is used by :meth:`Window.NewControlId` and :meth:`Window.UnreserveControlId` , and can also be used be used directly. .. seealso:: :meth:`Window.NewControlId` , :meth:`Window.UnreserveControlId` , :ref:`Window IDs ` | |class_hierarchy| Inheritance Diagram ===================================== Inheritance diagram for class **IdManager** .. raw:: html

Inheritance diagram of IdManager

| |method_summary| Methods Summary ================================ ================================================================================ ================================================================================ :meth:`~IdManager.ReserveId` Called directly by :meth:`Window.NewControlId` , this function will create a new ``ID`` or range of IDs. :meth:`~IdManager.UnreserveId` Called directly by :meth:`Window.UnreserveControlId` , this function will unreserve an ``ID`` or range of IDs that is currently reserved. ================================================================================ ================================================================================ | |api| Class API =============== .. class:: IdManager(object) IdManager is responsible for allocating and releasing window IDs. .. staticmethod:: ReserveId(count=1) Called directly by :meth:`Window.NewControlId` , this function will create a new ``ID`` or range of IDs. The IDs will be reserved until assigned to a WindowIDRef() or unreserved with UnreserveControlId(). Only ``ID`` values that are not assigned to a WindowIDRef() need to be unreserved. :param `count`: The number of sequential IDs to reserve. :type `count`: int :rtype: `int` :returns: The value of the first ``ID`` in the sequence, or ``ID_NONE``. .. staticmethod:: UnreserveId(id, count=1) Called directly by :meth:`Window.UnreserveControlId` , this function will unreserve an ``ID`` or range of IDs that is currently reserved. This should only be called for IDs returned by ReserveControlId() that have ``NOT`` been assigned to a WindowIDRef (see :ref:`Window IDs `). :param `id`: The first of the range of IDs to unreserve. :type `id`: int :param `count`: The number of sequential IDs to unreserve. :type `count`: int :returns: The value of the first ``ID`` in the sequence, or ``ID_NONE``.