diff --git a/include/wx/utils.h b/include/wx/utils.h index edbd7de380..c07fa4199e 100644 --- a/include/wx/utils.h +++ b/include/wx/utils.h @@ -273,13 +273,13 @@ inline bool wxPlatformIs(int platform) { return wxPlatform::Is(platform); } // ---------------------------------------------------------------------------- // Ensure subsequent IDs don't clash with this one -WXDLLIMPEXP_BASE void wxRegisterId(wxWindowID id); +WXDLLIMPEXP_BASE void wxRegisterId(int id); // Return the current ID -WXDLLIMPEXP_BASE wxWindowID wxGetCurrentId(); +WXDLLIMPEXP_BASE int wxGetCurrentId(); // Generate a unique ID -WXDLLIMPEXP_BASE wxWindowID wxNewId(); +WXDLLIMPEXP_BASE int wxNewId(); // ---------------------------------------------------------------------------- // Various conversions diff --git a/interface/wx/utils.h b/interface/wx/utils.h index ad37f8030c..4a8a54ef65 100644 --- a/interface/wx/utils.h +++ b/interface/wx/utils.h @@ -459,7 +459,7 @@ int wxFindMenuItemId(wxFrame* frame, const wxString& menuString, @header{wx/utils.h} */ -wxWindowID wxNewId(); +int wxNewId(); /** Ensures that Ids subsequently generated by wxNewId() do not clash with the @@ -467,7 +467,7 @@ wxWindowID wxNewId(); @header{wx/utils.h} */ -void wxRegisterId(wxWindowID id); +void wxRegisterId(int id); /** Opens the @a document in the application associated with the files of this diff --git a/src/common/utilscmn.cpp b/src/common/utilscmn.cpp index 5cd3d8e3c7..3d029034e3 100644 --- a/src/common/utilscmn.cpp +++ b/src/common/utilscmn.cpp @@ -714,9 +714,9 @@ long wxExecute(const wxString& command, // ---------------------------------------------------------------------------- // Id generation -static wxWindowID wxCurrentId = 100; +static int wxCurrentId = 100; -wxWindowID wxNewId() +int wxNewId() { // skip the part of IDs space that contains hard-coded values: if (wxCurrentId == wxID_LOWEST) @@ -725,11 +725,11 @@ wxWindowID wxNewId() return wxCurrentId++; } -wxWindowID +int wxGetCurrentId(void) { return wxCurrentId; } void -wxRegisterId (wxWindowID id) +wxRegisterId (int id) { if (id >= wxCurrentId) wxCurrentId = id + 1;