]>
git.saurik.com Git - wxWidgets.git/blob - interface/wx/windowid.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: interface of wxIdManager
4 // Author: wxWidgets team
5 // Licence: wxWindows licence
6 /////////////////////////////////////////////////////////////////////////////
9 The type of unique identifiers (ID) used for wxWindow-derived classes.
11 typedef int wxWindowID
;
16 wxIdManager is responsible for allocating and releasing window IDs.
17 It is used by wxWindow::NewControlId() and wxWindow::UnreserveControlId(),
18 and can also be used be used directly.
23 @see wxWindow::NewControlId(), wxWindow::UnreserveControlId(),
24 @ref overview_windowids
30 Called directly by wxWindow::NewControlId(), this function will create
31 a new ID or range of IDs.
32 The IDs will be reserved until assigned to a wxWindowIDRef() or unreserved
33 with UnreserveControlId().
34 Only ID values that are not assigned to a wxWindowIDRef() need to be unreserved.
37 The number of sequential IDs to reserve.
39 @return The value of the first ID in the sequence, or wxID_NONE.
41 static wxWindowID
ReserveId(int count
= 1);
44 Called directly by wxWindow::UnreserveControlId(), this function will
45 unreserve an ID or range of IDs that is currently reserved.
46 This should only be called for IDs returned by ReserveControlId() that
47 have NOT been assigned to a wxWindowIDRef (see @ref overview_windowids).
50 The first of the range of IDs to unreserve.
52 The number of sequential IDs to unreserve.
54 @return The value of the first ID in the sequence, or wxID_NONE.
56 static void UnreserveId(wxWindowID id
, int count
= 1);