\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.
// find the display where the given window lies, return wxNOT_FOUND if it
// 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 the display for the given window or wxNOT_FOUND
//
// the window pointer must not be NULL (i.e. caller should check it)
- virtual int GetFromWindow(wxWindow *window);
+ virtual int GetFromWindow(const wxWindow *window);
};
// ----------------------------------------------------------------------------
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") );
// wxDisplayFactory implementation
// ============================================================================
-int wxDisplayFactory::GetFromWindow(wxWindow *window)
+int wxDisplayFactory::GetFromWindow(const wxWindow *window)
{
// consider that the window belongs to the display containing its centre
const wxRect r(window->GetRect());
virtual unsigned GetCount() { return unsigned(m_displays.size()); }
virtual int GetFromPoint(const wxPoint& pt);
- virtual int GetFromWindow(wxWindow *window);
+ virtual int GetFromWindow(const wxWindow *window);
protected:
// ctor checks if the current system supports multimon API and dynamically
MONITOR_DEFAULTTONULL));
}
-int wxDisplayFactoryWin32Base::GetFromWindow(wxWindow *window)
+int wxDisplayFactoryWin32Base::GetFromWindow(const wxWindow *window)
{
return FindDisplayFromHMONITOR(gs_MonitorFromWindow(GetHwndOf(window),
MONITOR_DEFAULTTONULL));