support masked or partially transparent windows in wxqt

This commit is contained in:
Sean D'Epagnier
2016-08-26 03:56:44 -04:00
committed by Vadim Zeitlin
parent 35bc8f449b
commit 1cb7120ac9
6 changed files with 152 additions and 3 deletions

View File

@@ -102,6 +102,8 @@ protected:
#include "wx/osx/nonownedwnd.h"
#elif defined(__WXMSW__)
#include "wx/msw/nonownedwnd.h"
#elif defined(__WXQT__)
#include "wx/qt/nonownedwnd.h"
#else
// No special class needed in other ports, they can derive both wxTLW and
// wxPopupWindow directly from wxWindow and don't implement SetShape().

View File

@@ -0,0 +1,30 @@
/////////////////////////////////////////////////////////////////////////////
// Name: wx/qt/nonownedwnd.h
// Author: Sean D'Epagnier
// Copyright: (c) 2016 wxWidgets dev team
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_QT_NONOWNEDWND_H_
#define _WX_QT_NONOWNEDWND_H_
// ----------------------------------------------------------------------------
// wxNonOwnedWindow contains code common to wx{Popup,TopLevel}Window in wxQT.
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxNonOwnedWindow : public wxNonOwnedWindowBase
{
public:
wxNonOwnedWindow();
protected:
virtual bool DoClearShape() wxOVERRIDE;
virtual bool DoSetRegionShape(const wxRegion& region) wxOVERRIDE;
#if wxUSE_GRAPHICS_CONTEXT
virtual bool DoSetPathShape(const wxGraphicsPath& path) wxOVERRIDE;
#endif // wxUSE_GRAPHICS_CONTEXT
wxDECLARE_NO_COPY_CLASS(wxNonOwnedWindow);
};
#endif // _WX_QT_NONOWNEDWND_H_