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:
@@ -1830,7 +1830,7 @@ wxCairoContext::wxCairoContext( wxGraphicsRenderer* renderer, const wxPrinterDC&
|
||||
#endif
|
||||
|
||||
wxCairoContext::wxCairoContext( wxGraphicsRenderer* renderer, const wxWindowDC& dc )
|
||||
: wxGraphicsContext(renderer)
|
||||
: wxGraphicsContext(renderer, dc.GetWindow())
|
||||
{
|
||||
int width, height;
|
||||
dc.GetSize( &width, &height );
|
||||
@@ -2244,7 +2244,7 @@ wxCairoContext::wxCairoContext( wxGraphicsRenderer* renderer, cairo_t *context )
|
||||
}
|
||||
|
||||
wxCairoContext::wxCairoContext( wxGraphicsRenderer* renderer, wxWindow *window)
|
||||
: wxGraphicsContext(renderer)
|
||||
: wxGraphicsContext(renderer, window)
|
||||
#ifdef __WXMSW__
|
||||
, m_mswWindowHDC(GetHwndOf(window))
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user