]> git.saurik.com Git - wxWidgets.git/commitdiff
use wxWindow::NewControlId() instead of wxNewId() to avoid clashes with the user...
authorVadim Zeitlin <vadim@wxwidgets.org>
Thu, 18 Jan 2007 14:15:54 +0000 (14:15 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Thu, 18 Jan 2007 14:15:54 +0000 (14:15 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44243 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/tbarbase.h
include/wx/timer.h
include/wx/xrc/xmlres.h
src/common/menucmn.cpp
src/generic/choicbkg.cpp
src/generic/listbkg.cpp
src/generic/toolbkg.cpp
src/generic/treebkg.cpp
src/xrc/xmlres.cpp

index 3aa70ce99dc4b62ee6c8fb6dc4f1328275aa496b..582fb2da81a80575fafb7e2173db930b7b3e9886 100644 (file)
@@ -76,7 +76,7 @@ public:
         m_tbar = tbar;
         m_id = toolid;
         if (m_id == wxID_ANY)
-            m_id = wxNewId();
+            m_id = wxWindow::NewControlId();
         m_clientData = clientData;
 
         m_bmpNormal = bmpNormal;
index b0efc9d3ad305f7a884b6cfb5e4d6172f05c25af..2ce27b648c3bf8761f658eb17e782cda1f38266d 100644 (file)
@@ -51,8 +51,12 @@ public:
 
     // same as ctor above
     void SetOwner(wxEvtHandler *owner, int timerid = wxID_ANY)
-        { m_owner = owner; m_idTimer = timerid == wxID_ANY ? wxNewId() : timerid; }
-    wxEvtHandler * GetOwner() const { return m_owner; }
+    {
+        m_owner = owner;
+        m_idTimer = timerid == wxID_ANY ? wxWindow::NewControlId() : timerid;
+    }
+
+    wxEvtHandler *GetOwner() const { return m_owner; }
 
     virtual ~wxTimerBase();
 
index c581aafc8b4b1778c790b4009fd50b412bce2daa..a2758acef80d569b194e68c857018fdebaee78e5 100644 (file)
@@ -223,7 +223,7 @@ public:
     // resource. If an unknown str_id is requested (i.e. other than wxID_XXX
     // or integer), a new record is created which associates the given string
     // with a number. If value_if_not_found == wxID_NONE, the number is obtained via
-    // wxNewId(). Otherwise value_if_not_found is used.
+    // wxWindow::NewControlId(). Otherwise value_if_not_found is used.
     // Macro XRCID(name) is provided for convenient use in event tables.
     static int GetXRCID(const wxChar *str_id, int value_if_not_found = wxID_NONE);
 
index 49f3a00d9e08b8f9deef1edbf56b38949f59a60e..7d5185c1b51d0b043bacddbef01e13d14292bc55 100644 (file)
@@ -375,7 +375,7 @@ wxMenuItemBase::wxMenuItemBase(wxMenu *parentMenu,
     m_id          = id;
     m_kind        = kind;
     if (m_id == wxID_ANY)
-        m_id = wxNewId();
+        m_id = wxWindow::NewControlId();
     if (m_id == wxID_SEPARATOR)
         m_kind = wxITEM_SEPARATOR;
 
index 6eb021982140d50bd6862c49ac9ece583655012c..5a69921346f4c6e951c3e9265d4b17c89dcd2d41 100644 (file)
@@ -54,7 +54,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxChoicebookEvent, wxNotifyEvent)
 const wxEventType wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGING = wxNewEventType();
 const wxEventType wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGED = wxNewEventType();
 #endif
-const int wxID_CHOICEBOOKCHOICE = wxNewId();
+const int wxID_CHOICEBOOKCHOICE = wxWindow::NewControlId();
 
 BEGIN_EVENT_TABLE(wxChoicebook, wxBookCtrlBase)
     EVT_CHOICE(wxID_CHOICEBOOKCHOICE, wxChoicebook::OnChoiceSelected)
index a898d9827682fd60dde15e6d94e42f0c0b00b859..fa585a19ddf6dbb12fa6e67b6cf2aad514ac8b23 100644 (file)
@@ -54,7 +54,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxListbookEvent, wxNotifyEvent)
 const wxEventType wxEVT_COMMAND_LISTBOOK_PAGE_CHANGING = wxNewEventType();
 const wxEventType wxEVT_COMMAND_LISTBOOK_PAGE_CHANGED = wxNewEventType();
 #endif
-const int wxID_LISTBOOKLISTVIEW = wxNewId();
+const int wxID_LISTBOOKLISTVIEW = wxWindow::NewControlId();
 
 BEGIN_EVENT_TABLE(wxListbook, wxBookCtrlBase)
     EVT_SIZE(wxListbook::OnSize)
index 310c29ab71d29dbc5eb4beaec420a652bc9b3a6e..30b39328d838edda16d9e2505d35de679fe72fc7 100644 (file)
@@ -50,7 +50,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxToolbookEvent, wxNotifyEvent)
 const wxEventType wxEVT_COMMAND_TOOLBOOK_PAGE_CHANGING = wxNewEventType();
 const wxEventType wxEVT_COMMAND_TOOLBOOK_PAGE_CHANGED = wxNewEventType();
 #endif
-const int wxID_TOOLBOOKTOOLBAR = wxNewId();
+const int wxID_TOOLBOOKTOOLBAR = wxWindow::NewControlId();
 
 BEGIN_EVENT_TABLE(wxToolbook, wxBookCtrlBase)
     EVT_SIZE(wxToolbook::OnSize)
index 3b8b22c21ea955d42800cdac0b397ba4632dca21..c82869767b3ccf21b2b4b46595070ea00d439d69 100644 (file)
@@ -54,7 +54,7 @@ const wxEventType wxEVT_COMMAND_TREEBOOK_PAGE_CHANGED = wxNewEventType();
 const wxEventType wxEVT_COMMAND_TREEBOOK_NODE_COLLAPSED = wxNewEventType();
 const wxEventType wxEVT_COMMAND_TREEBOOK_NODE_EXPANDED = wxNewEventType();
 #endif
-const int wxID_TREEBOOKTREEVIEW = wxNewId();
+const int wxID_TREEBOOKTREEVIEW = wxWindow::NewControlId();
 
 BEGIN_EVENT_TABLE(wxTreebook, wxBookCtrlBase)
     EVT_TREE_SEL_CHANGED   (wxID_TREEBOOKTREEVIEW, wxTreebook::OnTreeSelectionChange)
index 479dbbd138ed7ed1cf6ab7f877325b4566643405..cd05c3f70da3904a7534dad995665d985237fb48 100644 (file)
@@ -1594,7 +1594,7 @@ static int XRCID_Lookup(const wxChar *str_id, int value_if_not_found = wxID_NONE
         }
         else
         {
-            (*rec_var)->id = wxNewId();
+            (*rec_var)->id = wxWindow::NewControlId();
         }
     }