]> git.saurik.com Git - wxWidgets.git/commitdiff
No real changes, just use clearer names for wxMSW wxToolTip methods.
authorVadim Zeitlin <vadim@wxwidgets.org>
Thu, 5 Apr 2012 13:55:51 +0000 (13:55 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Thu, 5 Apr 2012 13:55:51 +0000 (13:55 +0000)
Rename wxToolTip::DoAddOtherWindow() to DoAddHWND() as it should be used for
adding any window associated with the tooltip, either the main or an auxiliary
one. And rename wxToolTip::Add() to AddOtherWindow() because it shouldn't be
used for the main window.

See #14184.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71096 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/msw/tooltip.h
src/msw/combobox.cpp
src/msw/radiobox.cpp
src/msw/spinctrl.cpp
src/msw/tooltip.cpp

index a5184071af015550c4891c301a289291cbc4d8cc..ae512d928b092f867b2efaa89e963b959f8034b7 100644 (file)
@@ -60,7 +60,7 @@ public:
     static void RelayEvent(WXMSG *msg);
 
     // add a window to the tooltip control
-    void Add(WXHWND hwnd);
+    void AddOtherWindow(WXHWND hwnd);
 
     // remove any tooltip from the window
     static void Remove(WXHWND hwnd, unsigned int id, const wxRect& rc);
@@ -72,7 +72,7 @@ public:
 
 private:
     // Adds a window other than our main m_window to this tooltip.
-    void DoAddOtherWindow(WXHWND hWnd);
+    void DoAddHWND(WXHWND hWnd);
 
     // Perform the specified operation for the given window only.
     void DoSetTip(WXHWND hWnd);
index c5a74dc211f2f993f8bd0a143ae044414e6c207e..1b99ac7f0f545605ed013e6df033ba0ae28628d6 100644 (file)
@@ -665,7 +665,7 @@ void wxComboBox::DoSetToolTip(wxToolTip *tip)
     wxChoice::DoSetToolTip(tip);
 
     if ( tip && !HasFlag(wxCB_READONLY) )
-        tip->Add(GetEditHWND());
+        tip->AddOtherWindow(GetEditHWND());
 }
 
 #endif // wxUSE_TOOLTIPS
index c33b5644748fe6d6760e3e428d224b5f5fb38413..1414e04eddd078bb2a19f29a5d477bc6bea1ff0b 100644 (file)
@@ -498,7 +498,7 @@ void wxRadioBox::DoSetItemToolTip(unsigned int item, wxToolTip *tooltip)
     // we have already checked for the item to be valid in wxRadioBoxBase
     const HWND hwndRbtn = (*m_radioButtons)[item];
     if ( tooltip != NULL )
-        tooltip->Add(hwndRbtn);
+        tooltip->AddOtherWindow(hwndRbtn);
     else // unset the tooltip
         wxToolTip::Remove(hwndRbtn, 0, wxRect(0,0,0,0));
         // the second parameter can be zero since it's ignored by Remove()
index 7919453f856fe706c9a608987c7a8891b8a0d3a0..71c1221f49be07b52c16cb111dec65ab5401f6a0 100644 (file)
@@ -604,7 +604,7 @@ void wxSpinCtrl::DoSetToolTip(wxToolTip *tip)
     wxSpinButton::DoSetToolTip(tip);
 
     if ( tip )
-        tip->Add(m_hwndBuddy);
+        tip->AddOtherWindow(m_hwndBuddy);
 }
 
 #endif // wxUSE_TOOLTIPS
index d18525e22b99a58506e4b6aa574a33eb8ddd70ac..853b96ac633d751858aabe1d71b5c41ee5d5fe38 100644 (file)
@@ -374,17 +374,17 @@ void wxToolTip::Remove()
     DoForAllWindows(&wxToolTip::DoRemove);
 }
 
-void wxToolTip::Add(WXHWND hWnd)
+void wxToolTip::AddOtherWindow(WXHWND hWnd)
 {
     if ( !m_others )
         m_others = new wxToolTipOtherWindows;
 
     m_others->push_back(hWnd);
 
-    DoAddOtherWindow(hWnd);
+    DoAddHWND(hWnd);
 }
 
-void wxToolTip::DoAddOtherWindow(WXHWND hWnd)
+void wxToolTip::DoAddHWND(WXHWND hWnd)
 {
     HWND hwnd = (HWND)hWnd;
 
@@ -502,7 +502,7 @@ void wxToolTip::SetWindow(wxWindow *win)
     // add the window itself
     if ( m_window )
     {
-        Add(m_window->GetHWND());
+        AddOtherWindow(m_window->GetHWND());
     }
 #if !defined(__WXUNIVERSAL__)
     // and all of its subcontrols (e.g. radio buttons in a radiobox) as well
@@ -526,7 +526,7 @@ void wxToolTip::SetWindow(wxWindow *win)
             // must have it by now!
             wxASSERT_MSG( hwnd, wxT("no hwnd for subcontrol?") );
 
-            Add((WXHWND)hwnd);
+            AddOtherWindow((WXHWND)hwnd);
         }
     }
 #endif // !defined(__WXUNIVERSAL__)