changed GetFromWindow() to take const pointer

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44442 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2007-02-11 00:13:22 +00:00
parent 2ee322d90c
commit 1e93d59553
5 changed files with 7 additions and 7 deletions

View File

@ -106,7 +106,7 @@ Returns the index of the display on which the given point lies. Returns
\membersection{wxDisplay::GetFromWindow}\label{wxdisplaygetfromwindow} \membersection{wxDisplay::GetFromWindow}\label{wxdisplaygetfromwindow}
\func{static int}{GetFromWindow}{\param{wxWindow* }{win}} \func{static int}{GetFromWindow}{\param{const wxWindow* }{win}}
Returns the index of the display on which the given window lies. Returns the index of the display on which the given window lies.

View File

@ -62,7 +62,7 @@ public:
// find the display where the given window lies, return wxNOT_FOUND if it // find the display where the given window lies, return wxNOT_FOUND if it
// is not shown at all // is not shown at all
static int GetFromWindow(wxWindow *window); static int GetFromWindow(const wxWindow *window);
// return true if the object was initialized successfully // return true if the object was initialized successfully

View File

@ -37,7 +37,7 @@ public:
// return the display for the given window or wxNOT_FOUND // return the display for the given window or wxNOT_FOUND
// //
// the window pointer must not be NULL (i.e. caller should check it) // the window pointer must not be NULL (i.e. caller should check it)
virtual int GetFromWindow(wxWindow *window); virtual int GetFromWindow(const wxWindow *window);
}; };
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------

View File

@ -145,7 +145,7 @@ wxDisplay::~wxDisplay()
return Factory().GetFromPoint(pt); return Factory().GetFromPoint(pt);
} }
/* static */ int wxDisplay::GetFromWindow(wxWindow *window) /* static */ int wxDisplay::GetFromWindow(const wxWindow *window)
{ {
wxCHECK_MSG( window, wxNOT_FOUND, _T("invalid window") ); wxCHECK_MSG( window, wxNOT_FOUND, _T("invalid window") );
@ -235,7 +235,7 @@ bool wxDisplay::ChangeMode(const wxVideoMode& mode)
// wxDisplayFactory implementation // wxDisplayFactory implementation
// ============================================================================ // ============================================================================
int wxDisplayFactory::GetFromWindow(wxWindow *window) int wxDisplayFactory::GetFromWindow(const wxWindow *window)
{ {
// consider that the window belongs to the display containing its centre // consider that the window belongs to the display containing its centre
const wxRect r(window->GetRect()); const wxRect r(window->GetRect());

View File

@ -223,7 +223,7 @@ public:
virtual unsigned GetCount() { return unsigned(m_displays.size()); } virtual unsigned GetCount() { return unsigned(m_displays.size()); }
virtual int GetFromPoint(const wxPoint& pt); virtual int GetFromPoint(const wxPoint& pt);
virtual int GetFromWindow(wxWindow *window); virtual int GetFromWindow(const wxWindow *window);
protected: protected:
// ctor checks if the current system supports multimon API and dynamically // ctor checks if the current system supports multimon API and dynamically
@ -573,7 +573,7 @@ int wxDisplayFactoryWin32Base::GetFromPoint(const wxPoint& pt)
MONITOR_DEFAULTTONULL)); MONITOR_DEFAULTTONULL));
} }
int wxDisplayFactoryWin32Base::GetFromWindow(wxWindow *window) int wxDisplayFactoryWin32Base::GetFromWindow(const wxWindow *window)
{ {
return FindDisplayFromHMONITOR(gs_MonitorFromWindow(GetHwndOf(window), return FindDisplayFromHMONITOR(gs_MonitorFromWindow(GetHwndOf(window),
MONITOR_DEFAULTTONULL)); MONITOR_DEFAULTTONULL));