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

@@ -49,6 +49,10 @@ public:
// primary display and the only one which is always supported
wxDisplay(unsigned n = 0);
// create display object corresponding to the display of the given window
// or the default one if the window display couldn't be found
explicit wxDisplay(const wxWindow* window);
// dtor is not virtual as this is a concrete class not meant to be derived
// from