From 22a35096a0a9c3fe4d3d32b8d68a361126ef9677 Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Wed, 13 Sep 2006 17:12:25 +0000 Subject: [PATCH] renamed wxRect::Inside() to wxRect::Contains(), wxRect::Inside(wxRect) is too confusing git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41198 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/gdicmn.h | 20 +++++++++++++++++--- src/aui/auibook.cpp | 10 +++++----- src/aui/framemanager.cpp | 4 ++-- src/common/combocmn.cpp | 2 +- src/common/gbsizer.cpp | 2 +- src/common/gdicmn.cpp | 6 +++--- src/common/image.cpp | 4 ++-- src/common/popupcmn.cpp | 2 +- src/common/toplvcmn.cpp | 8 ++++---- src/common/utilscmn.cpp | 2 +- src/dfb/window.cpp | 2 +- src/generic/combog.cpp | 2 +- src/generic/hyperlink.cpp | 8 ++++---- src/generic/listbkg.cpp | 4 ++-- src/generic/listctrl.cpp | 6 +++--- src/generic/tipwin.cpp | 2 +- src/generic/toolbkg.cpp | 4 ++-- src/generic/treebkg.cpp | 4 ++-- src/gtk/listbox.cpp | 2 +- src/gtk/notebook.cpp | 2 +- src/gtk/radiobox.cpp | 2 +- src/msw/combo.cpp | 2 +- src/msw/notebook.cpp | 2 +- src/msw/treectrl.cpp | 2 +- src/os2/listctrl.cpp | 4 ++-- src/os2/treectrl.cpp | 2 +- src/univ/notebook.cpp | 4 ++-- src/univ/slider.cpp | 2 +- src/univ/spinbutt.cpp | 4 ++-- src/univ/themes/win32.cpp | 14 +++++++------- 30 files changed, 74 insertions(+), 60 deletions(-) diff --git a/include/wx/gdicmn.h b/include/wx/gdicmn.h index 1c02e3dfc9..c2fbc87d75 100644 --- a/include/wx/gdicmn.h +++ b/include/wx/gdicmn.h @@ -417,10 +417,17 @@ public: bool operator!=(const wxRect& rect) const { return !(*this == rect); } // return true if the point is (not strcitly) inside the rect - bool Inside(int x, int y) const; - bool Inside(const wxPoint& pt) const { return Inside(pt.x, pt.y); } + bool Contains(int x, int y) const; + bool Contains(const wxPoint& pt) const { return Contains(pt.x, pt.y); } // return true if the rectangle is (not strcitly) inside the rect - bool Inside(const wxRect& rect) const; + bool Contains(const wxRect& rect) const; + +#if WXWIN_COMPATIBILITY_2_6 + // use Contains() instead + wxDEPRECATED( bool Inside(int x, int y) const ); + wxDEPRECATED( bool Inside(const wxPoint& pt) const ); + wxDEPRECATED( bool Inside(const wxRect& rect) const ); +#endif // WXWIN_COMPATIBILITY_2_6 // return true if the rectangles have a non empty intersection bool Intersects(const wxRect& rect) const; @@ -453,6 +460,13 @@ public: int x, y, width, height; }; +#if WXWIN_COMPATIBILITY_2_6 +inline bool wxRect::Inside(int x, int y) const { return Contains(x, y); } +inline bool wxRect::Inside(const wxPoint& pt) const { return Contains(pt); } +inline bool wxRect::Inside(const wxRect& rect) const { return Contains(rect); } +#endif // WXWIN_COMPATIBILITY_2_6 + + // --------------------------------------------------------------------------- // Management of pens, brushes and fonts // --------------------------------------------------------------------------- diff --git a/src/aui/auibook.cpp b/src/aui/auibook.cpp index 20ba5eb324..0b67e2e8f9 100644 --- a/src/aui/auibook.cpp +++ b/src/aui/auibook.cpp @@ -500,7 +500,7 @@ void wxAuiTabContainer::Render(wxDC* raw_dc) // true if a tab was hit, otherwise false bool wxAuiTabContainer::TabHitTest(int x, int y, wxWindow** hit) const { - if (!m_rect.Inside(x,y)) + if (!m_rect.Contains(x,y)) return false; size_t i, page_count = m_pages.GetCount(); @@ -508,7 +508,7 @@ bool wxAuiTabContainer::TabHitTest(int x, int y, wxWindow** hit) const for (i = 0; i < page_count; ++i) { wxAuiNotebookPage& page = m_pages.Item(i); - if (page.rect.Inside(x,y)) + if (page.rect.Contains(x,y)) { *hit = page.window; return true; @@ -523,7 +523,7 @@ bool wxAuiTabContainer::TabHitTest(int x, int y, wxWindow** hit) const bool wxAuiTabContainer::ButtonHitTest(int x, int y, wxAuiTabContainerButton** hit) const { - if (!m_rect.Inside(x,y)) + if (!m_rect.Contains(x,y)) return false; size_t i, button_count = m_buttons.GetCount(); @@ -531,7 +531,7 @@ bool wxAuiTabContainer::ButtonHitTest(int x, int y, for (i = 0; i < button_count; ++i) { wxAuiTabContainerButton& button = m_buttons.Item(i); - if (button.rect.Inside(x,y)) + if (button.rect.Contains(x,y)) { *hit = &button; return true; @@ -1455,7 +1455,7 @@ wxAuiTabCtrl* wxAuiMultiNotebook::GetTabCtrlFromPoint(const wxPoint& pt) continue; wxTabFrame* tabframe = (wxTabFrame*)all_panes.Item(i).window; - if (tabframe->m_tab_rect.Inside(pt)) + if (tabframe->m_tab_rect.Contains(pt)) return tabframe->m_tabs; } diff --git a/src/aui/framemanager.cpp b/src/aui/framemanager.cpp index 25e9ebbfc9..3dc1ac038b 100644 --- a/src/aui/framemanager.cpp +++ b/src/aui/framemanager.cpp @@ -562,7 +562,7 @@ wxDockUIPart* wxFrameManager::HitTest(int x, int y) continue; // if the point is inside the rectangle, we have a hit - if (item->rect.Inside(x,y)) + if (item->rect.Contains(x,y)) result = item; } @@ -2371,7 +2371,7 @@ bool wxFrameManager::DoDrop(wxDockInfoArray& docks, // should float if being dragged over center pane windows if (!part->dock->fixed || part->dock->dock_direction == wxAUI_DOCK_CENTER) { - if (m_last_rect.IsEmpty() || m_last_rect.Inside(pt.x, pt.y )) + if (m_last_rect.IsEmpty() || m_last_rect.Contains(pt.x, pt.y )) { m_skipping = true; } diff --git a/src/common/combocmn.cpp b/src/common/combocmn.cpp index 666049997d..cb1ae22dfc 100644 --- a/src/common/combocmn.cpp +++ b/src/common/combocmn.cpp @@ -1825,7 +1825,7 @@ void wxComboCtrlBase::OnPopupDismiss() // If cursor not on dropdown button, then clear its state // (technically not required by all ports, but do it for all just in case) - if ( !m_btnArea.Inside(ScreenToClient(::wxGetMousePosition())) ) + if ( !m_btnArea.Contains(ScreenToClient(::wxGetMousePosition())) ) m_btnState = 0; // Return parent's tab traversal flag. diff --git a/src/common/gbsizer.cpp b/src/common/gbsizer.cpp index a3ad1e92a8..8188383c6a 100644 --- a/src/common/gbsizer.cpp +++ b/src/common/gbsizer.cpp @@ -409,7 +409,7 @@ wxGBSizerItem* wxGridBagSizer::FindItemAtPoint(const wxPoint& pt) wxGBSizerItem* item = (wxGBSizerItem*)node->GetData(); wxRect rect(item->GetPosition(), item->GetSize()); rect.Inflate(m_hgap, m_vgap); - if ( rect.Inside(pt) ) + if ( rect.Contains(pt) ) return item; node = node->GetNext(); } diff --git a/src/common/gdicmn.cpp b/src/common/gdicmn.cpp index d7314afc0c..1146416f61 100644 --- a/src/common/gdicmn.cpp +++ b/src/common/gdicmn.cpp @@ -183,7 +183,7 @@ wxRect& wxRect::Inflate(wxCoord dx, wxCoord dy) return *this; } -bool wxRect::Inside(int cx, int cy) const +bool wxRect::Contains(int cx, int cy) const { return ( (cx >= x) && (cy >= y) && ((cy - y) < height) @@ -191,9 +191,9 @@ bool wxRect::Inside(int cx, int cy) const ); } -bool wxRect::Inside(const wxRect& rect) const +bool wxRect::Contains(const wxRect& rect) const { - return Inside(rect.GetTopLeft()) && Inside(rect.GetBottomRight()); + return Contains(rect.GetTopLeft()) && Contains(rect.GetBottomRight()); } wxRect& wxRect::Intersect(const wxRect& rect) diff --git a/src/common/image.cpp b/src/common/image.cpp index 545afb1301..f771aecf99 100644 --- a/src/common/image.cpp +++ b/src/common/image.cpp @@ -999,8 +999,8 @@ void wxImage::SetRGB( const wxRect& rect_, unsigned char r, unsigned char g, uns } else { - wxCHECK_RET( imageRect.Inside(rect.GetTopLeft()) && - imageRect.Inside(rect.GetBottomRight()), + wxCHECK_RET( imageRect.Contains(rect.GetTopLeft()) && + imageRect.Contains(rect.GetBottomRight()), wxT("invalid bounding rectangle") ); } diff --git a/src/common/popupcmn.cpp b/src/common/popupcmn.cpp index de7f0683b6..41b8878af3 100644 --- a/src/common/popupcmn.cpp +++ b/src/common/popupcmn.cpp @@ -373,7 +373,7 @@ void wxPopupTransientWindow::OnIdle(wxIdleEvent& event) wxPoint pos = ScreenToClient(wxGetMousePosition()); wxRect rect(GetSize()); - if ( rect.Inside(pos) ) + if ( rect.Contains(pos) ) { if ( m_child->HasCapture() ) { diff --git a/src/common/toplvcmn.cpp b/src/common/toplvcmn.cpp index 101f64677f..aa07d2f096 100644 --- a/src/common/toplvcmn.cpp +++ b/src/common/toplvcmn.cpp @@ -210,8 +210,8 @@ void wxTopLevelWindowBase::DoCentre(int dir) // parent frame under Mac but could happen elsewhere too if the frame // was hidden/moved away for some reason), don't use it as otherwise // this window wouldn't be visible at all - if ( !rectDisplay.Inside(rectParent.GetTopLeft()) && - !rectParent.Inside(rectParent.GetBottomRight()) ) + if ( !rectDisplay.Contains(rectParent.GetTopLeft()) && + !rectParent.Contains(rectParent.GetBottomRight()) ) { // this is enough to make IsEmpty() test below pass rectParent.width = 0; @@ -235,9 +235,9 @@ void wxTopLevelWindowBase::DoCentre(int dir) // we don't want to place the window off screen if Centre() is called as // this is (almost?) never wanted and it would be very difficult to prevent // it from happening from the user code if we didn't check for it here - if ( rectDisplay.Inside(rect.GetTopLeft()) ) + if ( rectDisplay.Contains(rect.GetTopLeft()) ) { - if ( !rectDisplay.Inside(rect.GetBottomRight()) ) + if ( !rectDisplay.Contains(rect.GetBottomRight()) ) { // check if we can move the window so that the bottom right corner // is visible without hiding the top left one diff --git a/src/common/utilscmn.cpp b/src/common/utilscmn.cpp index 2f359b7cc7..911731b7d8 100644 --- a/src/common/utilscmn.cpp +++ b/src/common/utilscmn.cpp @@ -1077,7 +1077,7 @@ wxWindow* wxFindWindowAtPoint(wxWindow* win, const wxPoint& pt) } wxRect rect(pos, sz); - if (rect.Inside(pt)) + if (rect.Contains(pt)) return win; return NULL; diff --git a/src/dfb/window.cpp b/src/dfb/window.cpp index 30e38e9827..ff3b103a89 100644 --- a/src/dfb/window.cpp +++ b/src/dfb/window.cpp @@ -697,7 +697,7 @@ void wxWindowDFB::PaintWindow(const wxRect& rect) wxRect clientRect(GetClientRect()); // only send wxNcPaintEvent if drawing at least part of nonclient area: - if ( !clientRect.Inside(rect) ) + if ( !clientRect.Contains(rect) ) { wxNcPaintEvent eventNc(GetId()); eventNc.SetEventObject(this); diff --git a/src/generic/combog.cpp b/src/generic/combog.cpp index d970168df3..4e602748e8 100644 --- a/src/generic/combog.cpp +++ b/src/generic/combog.cpp @@ -280,7 +280,7 @@ void wxGenericComboControl::OnPaintEvent( wxPaintEvent& WXUNUSED(event) ) void wxGenericComboControl::OnMouseEvent( wxMouseEvent& event ) { - bool isOnButtonArea = m_btnArea.Inside(event.m_x,event.m_y); + bool isOnButtonArea = m_btnArea.Contains(event.m_x,event.m_y); int handlerFlags = isOnButtonArea ? wxCC_MF_ON_BUTTON : 0; // Preprocessing fabricates double-clicks and prevents diff --git a/src/generic/hyperlink.cpp b/src/generic/hyperlink.cpp index 9d96c5e296..864ff142b1 100644 --- a/src/generic/hyperlink.cpp +++ b/src/generic/hyperlink.cpp @@ -202,13 +202,13 @@ void wxHyperlinkCtrl::OnPaint(wxPaintEvent& WXUNUSED(event)) void wxHyperlinkCtrl::OnLeftDown(wxMouseEvent& event) { // the left click must start from the hyperlink rect - m_clicking = GetLabelRect().Inside(event.GetPosition()); + m_clicking = GetLabelRect().Contains(event.GetPosition()); } void wxHyperlinkCtrl::OnLeftUp(wxMouseEvent& event) { // the click must be started and ended in the hyperlink rect - if (!m_clicking || !GetLabelRect().Inside(event.GetPosition())) + if (!m_clicking || !GetLabelRect().Contains(event.GetPosition())) return; SetForegroundColour(m_visitedColour); @@ -225,7 +225,7 @@ void wxHyperlinkCtrl::OnLeftUp(wxMouseEvent& event) void wxHyperlinkCtrl::OnRightUp(wxMouseEvent& event) { if( GetWindowStyle() & wxHL_CONTEXTMENU ) - if ( GetLabelRect().Inside(event.GetPosition()) ) + if ( GetLabelRect().Contains(event.GetPosition()) ) DoContextMenu(wxPoint(event.m_x, event.m_y)); } @@ -233,7 +233,7 @@ void wxHyperlinkCtrl::OnMotion(wxMouseEvent& event) { wxRect textrc = GetLabelRect(); - if (textrc.Inside(event.GetPosition())) + if (textrc.Contains(event.GetPosition())) { SetCursor(wxCursor(wxCURSOR_HAND)); SetForegroundColour(m_hoverColour); diff --git a/src/generic/listbkg.cpp b/src/generic/listbkg.cpp index 67059a7197..b21319248a 100644 --- a/src/generic/listbkg.cpp +++ b/src/generic/listbkg.cpp @@ -173,7 +173,7 @@ int wxListbook::HitTest(const wxPoint& pt, long *flags) const const wxPoint listPt = list->ScreenToClient(ClientToScreen(pt)); // is the point inside list control? - if ( wxRect(list->GetSize()).Inside(listPt) ) + if ( wxRect(list->GetSize()).Contains(listPt) ) { int flagsList; pagePos = list->HitTest(listPt, flagsList); @@ -193,7 +193,7 @@ int wxListbook::HitTest(const wxPoint& pt, long *flags) const } else // not over list control at all { - if ( flags && GetPageRect().Inside(pt) ) + if ( flags && GetPageRect().Contains(pt) ) *flags |= wxBK_HITTEST_ONPAGE; } diff --git a/src/generic/listctrl.cpp b/src/generic/listctrl.cpp index 286057886c..ceb6fe802b 100644 --- a/src/generic/listctrl.cpp +++ b/src/generic/listctrl.cpp @@ -961,7 +961,7 @@ bool wxListItemData::IsHit( int x, int y ) const { wxCHECK_MSG( m_rect, false, _T("can't be called in this mode") ); - return wxRect(GetX(), GetY(), GetWidth(), GetHeight()).Inside(x, y); + return wxRect(GetX(), GetY(), GetWidth(), GetHeight()).Contains(x, y); } int wxListItemData::GetX() const @@ -2381,7 +2381,7 @@ long wxListMainWindow::HitTestLine(size_t line, int x, int y) const wxListLineData *ld = GetLine(line); - if ( ld->HasImage() && GetLineIconRect(line).Inside(x, y) ) + if ( ld->HasImage() && GetLineIconRect(line).Contains(x, y) ) return wxLIST_HITTEST_ONITEMICON; // VS: Testing for "ld->HasText() || InReportView()" instead of @@ -2392,7 +2392,7 @@ long wxListMainWindow::HitTestLine(size_t line, int x, int y) const wxRect rect = InReportView() ? GetLineRect(line) : GetLineLabelRect(line); - if ( rect.Inside(x, y) ) + if ( rect.Contains(x, y) ) return wxLIST_HITTEST_ONITEMLABEL; } diff --git a/src/generic/tipwin.cpp b/src/generic/tipwin.cpp index 36dd8b550a..12087b7b4b 100644 --- a/src/generic/tipwin.cpp +++ b/src/generic/tipwin.cpp @@ -362,7 +362,7 @@ void wxTipWindowView::OnMouseMove(wxMouseEvent& event) const wxRect& rectBound = m_parent->m_rectBound; if ( rectBound.width && - !rectBound.Inside(ClientToScreen(event.GetPosition())) ) + !rectBound.Contains(ClientToScreen(event.GetPosition())) ) { // mouse left the bounding rect, disappear m_parent->Close(); diff --git a/src/generic/toolbkg.cpp b/src/generic/toolbkg.cpp index 0ae9b0b607..f85a27462b 100644 --- a/src/generic/toolbkg.cpp +++ b/src/generic/toolbkg.cpp @@ -321,7 +321,7 @@ int wxToolbook::HitTest(const wxPoint& pt, long *flags) const const wxPoint tbarPt = tbar->ScreenToClient(ClientToScreen(pt)); // is the point over the toolbar? - if ( wxRect(tbar->GetSize()).Inside(tbarPt) ) + if ( wxRect(tbar->GetSize()).Contains(tbarPt) ) { const wxToolBarToolBase * const tool = tbar->FindToolForPosition(tbarPt.x, tbarPt.y); @@ -335,7 +335,7 @@ int wxToolbook::HitTest(const wxPoint& pt, long *flags) const } else // not over the toolbar { - if ( flags && GetPageRect().Inside(pt) ) + if ( flags && GetPageRect().Contains(pt) ) *flags |= wxBK_HITTEST_ONPAGE; } diff --git a/src/generic/treebkg.cpp b/src/generic/treebkg.cpp index 066e30edff..2bcb1da8dd 100644 --- a/src/generic/treebkg.cpp +++ b/src/generic/treebkg.cpp @@ -743,7 +743,7 @@ int wxTreebook::HitTest(wxPoint const & pt, long * flags) const const wxPoint treePt = tree->ScreenToClient(ClientToScreen(pt)); // is it over the tree? - if ( wxRect(tree->GetSize()).Inside(treePt) ) + if ( wxRect(tree->GetSize()).Contains(treePt) ) { int flagsTree; wxTreeItemId id = tree->HitTest(treePt, flagsTree); @@ -769,7 +769,7 @@ int wxTreebook::HitTest(wxPoint const & pt, long * flags) const } else // not over the tree { - if ( flags && GetPageRect().Inside( pt ) ) + if ( flags && GetPageRect().Contains( pt ) ) *flags |= wxBK_HITTEST_ONPAGE; } diff --git a/src/gtk/listbox.cpp b/src/gtk/listbox.cpp index 884593028c..75a80a78a7 100644 --- a/src/gtk/listbox.cpp +++ b/src/gtk/listbox.cpp @@ -1022,7 +1022,7 @@ int wxListBox::DoListHitTest(const wxPoint& point) const { // gtk_tree_view_get_path_at_pos() also gets items that are not visible and // we only want visible items we need to check for it manually here - if ( !GetClientRect().Inside(point) ) + if ( !GetClientRect().Contains(point) ) return wxNOT_FOUND; // need to translate from master window since it is in client coords diff --git a/src/gtk/notebook.cpp b/src/gtk/notebook.cpp index f95f03dce6..948917069c 100644 --- a/src/gtk/notebook.cpp +++ b/src/gtk/notebook.cpp @@ -804,7 +804,7 @@ int wxNotebook::HitTest(const wxPoint& pt, long *flags) const wxPoint pos = GetPosition(); rect.x -= pos.x; rect.y -= pos.y; - if ( rect.Inside( pt ) ) + if ( rect.Contains( pt ) ) *flags |= wxBK_HITTEST_ONPAGE; } } diff --git a/src/gtk/radiobox.cpp b/src/gtk/radiobox.cpp index d00e6cfc76..a16eaf5679 100644 --- a/src/gtk/radiobox.cpp +++ b/src/gtk/radiobox.cpp @@ -688,7 +688,7 @@ int wxRadioBox::GetItemFromPoint(const wxPoint& point) const for ( wxRadioBoxButtonsInfoList::compatibility_iterator node = m_buttonsInfo.GetFirst(); node; node = node->GetNext(), n++ ) { - if ( m_buttonsInfo[n]->rect.Inside(pt) ) + if ( m_buttonsInfo[n]->rect.Contains(pt) ) return n; } diff --git a/src/msw/combo.cpp b/src/msw/combo.cpp index 50025b1eed..3c28925719 100644 --- a/src/msw/combo.cpp +++ b/src/msw/combo.cpp @@ -489,7 +489,7 @@ void wxComboCtrl::OnPaintEvent( wxPaintEvent& WXUNUSED(event) ) void wxComboCtrl::OnMouseEvent( wxMouseEvent& event ) { - bool isOnButtonArea = m_btnArea.Inside(event.m_x,event.m_y); + bool isOnButtonArea = m_btnArea.Contains(event.m_x,event.m_y); int handlerFlags = isOnButtonArea ? wxCC_MF_ON_BUTTON : 0; // Preprocessing fabricates double-clicks and prevents diff --git a/src/msw/notebook.cpp b/src/msw/notebook.cpp index 4ba885a266..571f6506fc 100644 --- a/src/msw/notebook.cpp +++ b/src/msw/notebook.cpp @@ -819,7 +819,7 @@ int wxNotebook::HitTest(const wxPoint& pt, long *flags) const *flags |= wxBK_HITTEST_ONICON; if ((hitTestInfo.flags & TCHT_ONITEMLABEL) == TCHT_ONITEMLABEL) *flags |= wxBK_HITTEST_ONLABEL; - if ( item == wxNOT_FOUND && GetPageSize().Inside(pt) ) + if ( item == wxNOT_FOUND && GetPageSize().Contains(pt) ) *flags |= wxBK_HITTEST_ONPAGE; } diff --git a/src/msw/treectrl.cpp b/src/msw/treectrl.cpp index 8a7ce13525..c6bd87b086 100644 --- a/src/msw/treectrl.cpp +++ b/src/msw/treectrl.cpp @@ -2056,7 +2056,7 @@ WXLRESULT wxTreeCtrl::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lPara GetBoundingRect(event.m_item, ItemRect, false); // If the point is inside the bounding rectangle, use it as the click position. // This should be the case for WM_CONTEXTMENU as the result of a right-click - if (ItemRect.Inside(MenuPoint)) + if (ItemRect.Contains(MenuPoint)) { event.m_pointDrag = MenuPoint; } diff --git a/src/os2/listctrl.cpp b/src/os2/listctrl.cpp index 8e7e76cb04..d9ef51e05b 100644 --- a/src/os2/listctrl.cpp +++ b/src/os2/listctrl.cpp @@ -2168,7 +2168,7 @@ long wxListCtrl::FindItem ( vLibRect.SetTop(vRect.yTop); vLibRect.SetRight(vRect.xRight); vLibRect.SetBottom(vRect.yBottom); - if (vLibRect.Inside(rPoint)) + if (vLibRect.Contains(rPoint)) return pRecord->m_ulItemId; for (i = lStart + 1; i < vCnrInfo.cRecords; i++) @@ -2188,7 +2188,7 @@ long wxListCtrl::FindItem ( vLibRect.SetTop(vRect.yTop); vLibRect.SetRight(vRect.xRight); vLibRect.SetBottom(vRect.yBottom); - if (vLibRect.Inside(rPoint)) + if (vLibRect.Contains(rPoint)) return pRecord->m_ulItemId; } return -1L; diff --git a/src/os2/treectrl.cpp b/src/os2/treectrl.cpp index 42ec46e572..9ee999969a 100644 --- a/src/os2/treectrl.cpp +++ b/src/os2/treectrl.cpp @@ -1093,7 +1093,7 @@ bool wxTreeCtrl::IsVisible ( vWxRectContainer.SetTop(vRectContainer.yTop); vWxRectContainer.SetRight(vRectContainer.xRight); vWxRectContainer.SetBottom(vRectContainer.yBottom); - return (vWxRectContainer.Inside(wxPoint(vWxRectRecord.x, vWxRectRecord.y))); + return (vWxRectContainer.Contains(wxPoint(vWxRectRecord.x, vWxRectRecord.y))); } // end of wxTreeCtrl::IsVisible bool wxTreeCtrl::ItemHasChildren ( diff --git a/src/univ/notebook.cpp b/src/univ/notebook.cpp index 4fe59855e8..237b4b73e2 100644 --- a/src/univ/notebook.cpp +++ b/src/univ/notebook.cpp @@ -588,7 +588,7 @@ int wxNotebook::HitTest(const wxPoint& pt, long *flags) const *flags = wxBK_HITTEST_NOWHERE; // first check that it is in this window at all - if ( !GetClientRect().Inside(pt) ) + if ( !GetClientRect().Contains(pt) ) { return -1; } @@ -626,7 +626,7 @@ int wxNotebook::HitTest(const wxPoint& pt, long *flags) const { GetTabSize(n, &rectTabs.width, &rectTabs.height); - if ( rectTabs.Inside(pt) ) + if ( rectTabs.Contains(pt) ) { if ( flags ) { diff --git a/src/univ/slider.cpp b/src/univ/slider.cpp index 25d5e99541..01bd035af2 100644 --- a/src/univ/slider.cpp +++ b/src/univ/slider.cpp @@ -832,7 +832,7 @@ wxScrollThumb::Shaft wxSlider::HitTest(const wxPoint& pt) const CalcThumbRect(&rectShaft, &rectThumb, NULL); // check for possible shaft or thumb hit - if (!rectShaft.Inside(pt) && !rectThumb.Inside(pt)) + if (!rectShaft.Contains(pt) && !rectThumb.Contains(pt)) { return wxScrollThumb::Shaft_None; } diff --git a/src/univ/spinbutt.cpp b/src/univ/spinbutt.cpp index e3adb55cc1..93e674502a 100644 --- a/src/univ/spinbutt.cpp +++ b/src/univ/spinbutt.cpp @@ -329,9 +329,9 @@ wxScrollArrows::Arrow wxSpinButton::HitTest(const wxPoint& pt) const wxRect rectArrow1, rectArrow2; CalcArrowRects(&rectArrow1, &rectArrow2); - if ( rectArrow1.Inside(pt) ) + if ( rectArrow1.Contains(pt) ) return wxScrollArrows::Arrow_First; - else if ( rectArrow2.Inside(pt) ) + else if ( rectArrow2.Contains(pt) ) return wxScrollArrows::Arrow_Second; else return wxScrollArrows::Arrow_None; diff --git a/src/univ/themes/win32.cpp b/src/univ/themes/win32.cpp index 5adb68e392..6608ee824a 100644 --- a/src/univ/themes/win32.cpp +++ b/src/univ/themes/win32.cpp @@ -3707,7 +3707,7 @@ int wxWin32Renderer::HitTestFrame(const wxRect& rect, const wxPoint& pt, int fla { wxRect client = GetFrameClientArea(rect, flags); - if ( client.Inside(pt) ) + if ( client.Contains(pt) ) return wxHT_TOPLEVEL_CLIENT_AREA; if ( flags & wxTOPLEVEL_TITLEBAR ) @@ -3716,7 +3716,7 @@ int wxWin32Renderer::HitTestFrame(const wxRect& rect, const wxPoint& pt, int fla if ( flags & wxTOPLEVEL_ICON ) { - if ( wxRect(client.GetPosition(), GetFrameIconSize()).Inside(pt) ) + if ( wxRect(client.GetPosition(), GetFrameIconSize()).Contains(pt) ) return wxHT_TOPLEVEL_ICON; } @@ -3726,31 +3726,31 @@ int wxWin32Renderer::HitTestFrame(const wxRect& rect, const wxPoint& pt, int fla if ( flags & wxTOPLEVEL_BUTTON_CLOSE ) { - if ( btnRect.Inside(pt) ) + if ( btnRect.Contains(pt) ) return wxHT_TOPLEVEL_BUTTON_CLOSE; btnRect.x -= FRAME_BUTTON_WIDTH + 2; } if ( flags & wxTOPLEVEL_BUTTON_MAXIMIZE ) { - if ( btnRect.Inside(pt) ) + if ( btnRect.Contains(pt) ) return wxHT_TOPLEVEL_BUTTON_MAXIMIZE; btnRect.x -= FRAME_BUTTON_WIDTH; } if ( flags & wxTOPLEVEL_BUTTON_RESTORE ) { - if ( btnRect.Inside(pt) ) + if ( btnRect.Contains(pt) ) return wxHT_TOPLEVEL_BUTTON_RESTORE; btnRect.x -= FRAME_BUTTON_WIDTH; } if ( flags & wxTOPLEVEL_BUTTON_ICONIZE ) { - if ( btnRect.Inside(pt) ) + if ( btnRect.Contains(pt) ) return wxHT_TOPLEVEL_BUTTON_ICONIZE; btnRect.x -= FRAME_BUTTON_WIDTH; } if ( flags & wxTOPLEVEL_BUTTON_HELP ) { - if ( btnRect.Inside(pt) ) + if ( btnRect.Contains(pt) ) return wxHT_TOPLEVEL_BUTTON_HELP; btnRect.x -= FRAME_BUTTON_WIDTH; } -- 2.45.2