From 7447bdd7b7bc864b948e7a8db61a1ea6b962c66b Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 13 Feb 2006 00:49:24 +0000 Subject: [PATCH] fix client to screen (and vice versa) conversion git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37546 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/generic/listctrl.h | 5 +++++ src/generic/listctrl.cpp | 10 ++++++++++ 2 files changed, 15 insertions(+) diff --git a/include/wx/generic/listctrl.h b/include/wx/generic/listctrl.h index 5eaaeb0fda..ef2091f269 100644 --- a/include/wx/generic/listctrl.h +++ b/include/wx/generic/listctrl.h @@ -229,6 +229,11 @@ public: protected: virtual bool DoPopupMenu( wxMenu *menu, int x, int y ); + // take into account the coordinates difference between the container + // window and the list control window itself here + virtual void DoClientToScreen( int *x, int *y ) const; + virtual void DoScreenToClient( int *x, int *y ) const; + virtual wxSize DoGetBestSize() const; // return the text for the given column of the given item diff --git a/src/generic/listctrl.cpp b/src/generic/listctrl.cpp index c7821beb30..7fd895104b 100644 --- a/src/generic/listctrl.cpp +++ b/src/generic/listctrl.cpp @@ -5432,6 +5432,16 @@ bool wxGenericListCtrl::DoPopupMenu( wxMenu *menu, int x, int y ) #endif } +void wxGenericListCtrl::DoClientToScreen( int *x, int *y ) const +{ + return m_mainWin->DoClientToScreen(x, y); +} + +void wxGenericListCtrl::DoScreenToClient( int *x, int *y ) const +{ + return m_mainWin->DoScreenToClient(x, y); +} + void wxGenericListCtrl::SetFocus() { // The test in window.cpp fails as we are a composite -- 2.45.2