add wxPosixPermissions enumeration; it provides more readable synonims for wxS_I...
[wxWidgets.git] / interface / wx / windowid.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: windowid.h
3 // Purpose: interface of wxIdManager
4 // Author: wxWidgets team
5 // RCS-ID: $Id$
6 // Licence: wxWindows license
7 /////////////////////////////////////////////////////////////////////////////
8
9 /**
10 @class wxIdManager
11
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.
15
16 @library{wxcore}
17 @category{misc}
18
19 @see wxWindow::NewControlId(), wxWindow::UnreserveControlId(),
20 @ref overview_windowids
21 */
22 class wxIdManager
23 {
24 public:
25 /**
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.
31
32 @param count
33 The number of sequential IDs to reserve.
34
35 @return The value of the first ID in the sequence, or wxID_NONE.
36 */
37 static wxWindowID ReserveControlId(int count = 1);
38
39 /**
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).
44
45 @param id
46 The first of the range of IDs to unreserve.
47 @param count
48 The number of sequential IDs to unreserve.
49
50 @return The value of the first ID in the sequence, or wxID_NONE.
51 */
52 static wxWindowID UnreserveControlId(wxWindowID id, int count = 1);
53 };
54