2008-03-08 13:52:38 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: windowid.h
|
2008-03-10 15:24:38 +00:00
|
|
|
// Purpose: interface of wxIdManager
|
2008-03-08 13:52:38 +00:00
|
|
|
// Author: wxWidgets team
|
|
|
|
// RCS-ID: $Id$
|
2010-07-13 13:29:13 +00:00
|
|
|
// Licence: wxWindows licence
|
2008-03-08 13:52:38 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2008-12-04 20:42:25 +00:00
|
|
|
/**
|
|
|
|
The type of unique identifiers (ID) used for wxWindow-derived classes.
|
|
|
|
*/
|
|
|
|
typedef int wxWindowID;
|
|
|
|
|
2008-03-08 13:52:38 +00:00
|
|
|
/**
|
|
|
|
@class wxIdManager
|
2008-03-08 14:43:31 +00:00
|
|
|
|
2008-09-27 10:27:44 +00: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 14:43:31 +00:00
|
|
|
|
2008-03-08 13:52:38 +00:00
|
|
|
@library{wxcore}
|
2009-02-20 11:34:52 +00:00
|
|
|
@category{cfg}
|
2008-03-08 14:43:31 +00:00
|
|
|
|
2008-09-27 10:27:44 +00:00
|
|
|
@see wxWindow::NewControlId(), wxWindow::UnreserveControlId(),
|
|
|
|
@ref overview_windowids
|
2008-03-08 13:52:38 +00:00
|
|
|
*/
|
2008-03-08 14:43:31 +00:00
|
|
|
class wxIdManager
|
2008-03-08 13:52:38 +00:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
/**
|
2008-09-27 10:27:44 +00: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 13:45:17 +00:00
|
|
|
|
2008-03-08 14:43:31 +00:00
|
|
|
@param count
|
2008-03-09 12:33:59 +00:00
|
|
|
The number of sequential IDs to reserve.
|
2008-03-20 13:45:17 +00:00
|
|
|
|
2008-05-11 01:38:53 +00:00
|
|
|
@return The value of the first ID in the sequence, or wxID_NONE.
|
2008-03-08 13:52:38 +00:00
|
|
|
*/
|
|
|
|
static wxWindowID ReserveControlId(int count = 1);
|
2008-09-27 10:27:44 +00: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.
|
|
|
|
*/
|
|
|
|
static wxWindowID UnreserveControlId(wxWindowID id, int count = 1);
|
2008-03-08 13:52:38 +00:00
|
|
|
};
|
2008-03-10 15:24:38 +00:00
|
|
|
|