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