Add wxDisplay(wxWindow*) ctor with fall back on primary display

This is more convenient than calling GetFromWindow() and then checking
its return value.
This commit is contained in:
Vadim Zeitlin
2018-11-01 00:02:47 +01:00
parent e13df3140f
commit f57cb6c1d9
3 changed files with 30 additions and 0 deletions

View File

@@ -26,6 +26,23 @@ public:
*/
wxDisplay(unsigned int index = 0);
/**
Constructor creating the display object associated with the given
window.
This is the most convenient way of finding the display on which the
given window is shown while falling back to the default display if it
is not shown at all or positioned outside of any display.
@param window
A valid, i.e. non-null, window.
@see GetFromWindow()
@since 3.1.2
*/
explicit wxDisplay(const wxWindow* window);
/**
Destructor.
*/