Add wxGraphicsContext::GetWindow()

This method allows to retrieve the window this context is associated
with, if any.

Add "wxWindow*" argument to wxGraphicsContext ctor and provide the
window pointer to it when available, i.e. when creating the context from
a wxWindow directly or from wxWindowDC, which is also associated with a
window, in platform-specific code.

No real changes yet.
This commit is contained in:
Vadim Zeitlin
2018-11-06 03:17:49 +01:00
parent 81c67c3686
commit 5e53b22bd4
8 changed files with 96 additions and 45 deletions

View File

@@ -1095,6 +1095,19 @@ public:
*/
virtual void GetDPI( wxDouble* dpiX, wxDouble* dpiY);
/**
Returns the associated window if any.
If this context was created using Create() overload taking wxWindow or
wxWindowDC, this method returns the corresponding window. Otherwise
returns @NULL.
@return A possibly @NULL window pointer.
@since 3.1.2
*/
wxWindow* GetWindow() const;
/** @}
*/