.. wxPython Phoenix documentation

   This file was generated by Phoenix's sphinx generator and associated
   tools, do not edit by hand.

   Copyright: (c) 2011-2017 by Total Control Software
   License:   wxWindows License

.. include:: headings.inc



.. _wx.IdManager:

==========================================================================================================================================
|phoenix_title|  **wx.IdManager**
==========================================================================================================================================

:ref:`wx.IdManager`  is responsible for allocating and releasing window IDs.          

It is used by :meth:`wx.Window.NewControlId`   and :meth:`wx.Window.UnreserveControlId` , and can also be used be used directly. 







         



.. seealso:: :meth:`wx.Window.NewControlId` , :meth:`wx.Window.UnreserveControlId` , :ref:`Window IDs <window ids>`    







|

|class_hierarchy| Class Hierarchy
=================================

.. raw:: html

   <div id="toggleBlock" onclick="return toggleVisibility(this)" class="closed" style="cursor:pointer;">
   <img id="toggleBlock-trigger" src="_static/images/closed.png"/>
   Inheritance diagram for class <strong>IdManager</strong>:
   </div>
   <div id="toggleBlock-summary" style="display:block;"></div>
   <div id="toggleBlock-content" style="display:none;">
   <p class="graphviz">
   <center><img src="_static/images/inheritance/wx.IdManager_inheritance.png" alt="Inheritance diagram of IdManager" usemap="#dummy" class="inheritance"/></center>
   </div>
   <script type="text/javascript">toggleVisibilityOnLoad(document.getElementById('toggleBlock'))</script>
   <map id="dummy" name="dummy"> <area shape="rect" id="node1" href="wx.IdManager.html" title="wx.IdManager" alt="" coords="5,5,115,35"/> </map> 
   </p>

|


|method_summary| Methods Summary
================================

================================================================================ ================================================================================
:meth:`~wx.IdManager.ReserveId`                                                  Called directly by :meth:`wx.Window.NewControlId` , this function will create a new ``ID`` or range of IDs.
:meth:`~wx.IdManager.UnreserveId`                                                Called directly by :meth:`wx.Window.UnreserveControlId` , this function will unreserve an ``ID`` or range of IDs that is currently reserved.
================================================================================ ================================================================================


|


|api| Class API
===============


.. class:: wx.IdManager(object)

   IdManager is responsible for allocating and releasing window IDs.



   .. staticmethod:: ReserveId(count=1)

      Called directly by :meth:`wx.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: :ref:`wx.WindowID`



                  



      :returns: 

         The value of the first ``ID`` in the sequence, or ``wx.ID_NONE``.   








   .. staticmethod:: UnreserveId(id, count=1)

      Called directly by :meth:`wx.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 <window ids>`). 




      :param `id`: The first of the range of IDs to unreserve.   
      :type `id`: wx.WindowID
      :param `count`: The number of sequential IDs to unreserve.  
      :type `count`: int






                  



      :returns: 

         The value of the first ``ID`` in the sequence, or ``wx.ID_NONE``.   







