]> git.saurik.com Git - wxWidgets.git/blob - interface/wx/windowid.h
supporting alignment in single line controls, see #14452
[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 licence
7 /////////////////////////////////////////////////////////////////////////////
8
9 /**
10 The type of unique identifiers (ID) used for wxWindow-derived classes.
11 */
12 typedef int wxWindowID;
13
14 /**
15 @class wxIdManager
16
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.
20
21 @library{wxcore}
22 @category{cfg}
23
24 @see wxWindow::NewControlId(), wxWindow::UnreserveControlId(),
25 @ref overview_windowids
26 */
27 class wxIdManager
28 {
29 public:
30 /**
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.
36
37 @param count
38 The number of sequential IDs to reserve.
39
40 @return The value of the first ID in the sequence, or wxID_NONE.
41 */
42 static wxWindowID ReserveId(int count = 1);
43
44 /**
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).
49
50 @param id
51 The first of the range of IDs to unreserve.
52 @param count
53 The number of sequential IDs to unreserve.
54
55 @return The value of the first ID in the sequence, or wxID_NONE.
56 */
57 static void UnreserveId(wxWindowID id, int count = 1);
58 };
59