]>
git.saurik.com Git - wxWidgets.git/blob - interface/wx/windowid.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: interface of wxIdManager
4 // Author: wxWidgets team
6 // Licence: wxWindows license
7 /////////////////////////////////////////////////////////////////////////////
12 wxIdManager is responsible for allocating and releasing window IDs.
13 It is used by wxWindow::NewControlId() and wxWindow::UnreserveControlId(),
14 and can also be used be used directly.
19 @see wxWindow::NewControlId(), wxWindow::UnreserveControlId(),
20 @ref overview_windowids
26 Called directly by wxWindow::NewControlId(), this function will create
27 a new ID or range of IDs.
28 The IDs will be reserved until assigned to a wxWindowIDRef() or unreserved
29 with UnreserveControlId().
30 Only ID values that are not assigned to a wxWindowIDRef() need to be unreserved.
33 The number of sequential IDs to reserve.
35 @return The value of the first ID in the sequence, or wxID_NONE.
37 static wxWindowID
ReserveControlId(int count
= 1);
40 Called directly by wxWindow::UnreserveControlId(), this function will
41 unreserve an ID or range of IDs that is currently reserved.
42 This should only be called for IDs returned by ReserveControlId() that
43 have NOT been assigned to a wxWindowIDRef (see @ref overview_windowids).
46 The first of the range of IDs to unreserve.
48 The number of sequential IDs to unreserve.
50 @return The value of the first ID in the sequence, or wxID_NONE.
52 static wxWindowID
UnreserveControlId(wxWindowID id
, int count
= 1);