Avoid recommending deprecated wxNewId in the docs

This commit is contained in:
catalinr
2021-02-03 12:10:37 +02:00
parent a571ec6fbb
commit baabb37f8f
2 changed files with 4 additions and 6 deletions

View File

@@ -15,8 +15,8 @@ the following two situations:
@li when creating a new window you may specify @c wxID_ANY to let @li when creating a new window you may specify @c wxID_ANY to let
wxWidgets assign an unused identifier to it automatically wxWidgets assign an unused identifier to it automatically
@li when installing an event handler using either the event table @li when installing an event handler using wxEvtHandler::Bind,
macros or wxEvtHandler::Connect, wxEvtHandler::Connect or the event table macros,
you may use it to indicate that you want to handle the events you may use it to indicate that you want to handle the events
coming from any control, regardless of its identifier coming from any control, regardless of its identifier
@@ -27,7 +27,8 @@ wxWidgets also defines a few standard command identifiers which may be used by
the user code and also are sometimes used by wxWidgets itself. These reserved the user code and also are sometimes used by wxWidgets itself. These reserved
identifiers are all in the range between @c wxID_LOWEST and identifiers are all in the range between @c wxID_LOWEST and
@c wxID_HIGHEST and, accordingly, the user code should avoid defining its @c wxID_HIGHEST and, accordingly, the user code should avoid defining its
own constants in this range (e.g. by using wxNewId()). own constants in this range (e.g. by using @c wxID_ANY and retrieving the
control's id after it was created).
Refer to @ref page_stockitems "the list of stock items" for the subset of standard IDs Refer to @ref page_stockitems "the list of stock items" for the subset of standard IDs
which are stock IDs as well. which are stock IDs as well.

View File

@@ -873,9 +873,6 @@ positive.
See @ref page_stdevtid for the list of standard identifiers available. See @ref page_stdevtid for the list of standard identifiers available.
You can use wxID_HIGHEST to determine the number above which it is safe to You can use wxID_HIGHEST to determine the number above which it is safe to
define your own identifiers. Or, you can use identifiers below wxID_LOWEST. define your own identifiers. Or, you can use identifiers below wxID_LOWEST.
Finally, you can allocate identifiers dynamically using wxNewId() function too.
If you use wxNewId() consistently in your application, you can be sure that
your identifiers don't conflict accidentally.
@subsection overview_events_with_mouse_capture Event Handlers and Mouse Capture @subsection overview_events_with_mouse_capture Event Handlers and Mouse Capture