2008-03-08 08:52:38 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: windowid.h
|
2008-03-10 11:24:38 -04:00
|
|
|
// Purpose: interface of wxIdManager
|
2008-03-08 08:52:38 -05:00
|
|
|
// Author: wxWidgets team
|
|
|
|
// RCS-ID: $Id$
|
2010-07-13 09:29:13 -04:00
|
|
|
// Licence: wxWindows licence
|
2008-03-08 08:52:38 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2008-12-04 15:42:25 -05:00
|
|
|
/**
|
|
|
|
The type of unique identifiers (ID) used for wxWindow-derived classes.
|
|
|
|
*/
|
|
|
|
typedef int wxWindowID;
|
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
/**
|
|
|
|
@class wxIdManager
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-09-27 06:27:44 -04:00
|
|
|
wxIdManager is responsible for allocating and releasing window IDs.
|
|
|
|
It is used by wxWindow::NewControlId() and wxWindow::UnreserveControlId(),
|
|
|
|
and can also be used be used directly.
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-03-08 08:52:38 -05:00
|
|
|
@library{wxcore}
|
2009-02-20 06:34:52 -05:00
|
|
|
@category{cfg}
|
2008-03-08 09:43:31 -05:00
|
|
|
|
2008-09-27 06:27:44 -04:00
|
|
|
@see wxWindow::NewControlId(), wxWindow::UnreserveControlId(),
|
|
|
|
@ref overview_windowids
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
2008-03-08 09:43:31 -05:00
|
|
|
class wxIdManager
|
2008-03-08 08:52:38 -05:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
/**
|
2008-09-27 06:27:44 -04:00
|
|
|
Called directly by wxWindow::NewControlId(), this function will create
|
|
|
|
a new ID or range of IDs.
|
|
|
|
The IDs will be reserved until assigned to a wxWindowIDRef() or unreserved
|
|
|
|
with UnreserveControlId().
|
|
|
|
Only ID values that are not assigned to a wxWindowIDRef() need to be unreserved.
|
2008-03-20 09:45:17 -04:00
|
|
|
|
2008-03-08 09:43:31 -05:00
|
|
|
@param count
|
2008-03-09 08:33:59 -04:00
|
|
|
The number of sequential IDs to reserve.
|
2008-03-20 09:45:17 -04:00
|
|
|
|
2008-05-10 21:38:53 -04:00
|
|
|
@return The value of the first ID in the sequence, or wxID_NONE.
|
2008-03-08 08:52:38 -05:00
|
|
|
*/
|
2010-11-19 02:57:19 -05:00
|
|
|
static wxWindowID ReserveId(int count = 1);
|
2008-09-27 06:27:44 -04:00
|
|
|
|
|
|
|
/**
|
|
|
|
Called directly by wxWindow::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 wxWindowIDRef (see @ref overview_windowids).
|
|
|
|
|
|
|
|
@param id
|
|
|
|
The first of the range of IDs to unreserve.
|
|
|
|
@param count
|
|
|
|
The number of sequential IDs to unreserve.
|
|
|
|
|
|
|
|
@return The value of the first ID in the sequence, or wxID_NONE.
|
|
|
|
*/
|
2010-11-19 02:57:19 -05:00
|
|
|
static void UnreserveId(wxWindowID id, int count = 1);
|
2008-03-08 08:52:38 -05:00
|
|
|
};
|
2008-03-10 11:24:38 -04:00
|
|
|
|