X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5bd0ee99664dbfdfa6b95db24eac0cab93583d46..7344108e8a129a3f9b4df5ab0f98a1713db03b89:/interface/wx/nonownedwnd.h diff --git a/interface/wx/nonownedwnd.h b/interface/wx/nonownedwnd.h index 7db6d66037..4e1a6a7381 100644 --- a/interface/wx/nonownedwnd.h +++ b/interface/wx/nonownedwnd.h @@ -32,5 +32,28 @@ public: This method is available in this class only since wxWidgets 2.9.3, previous versions only provided it in wxTopLevelWindow. */ - virtual bool SetShape(const wxRegion& region); + bool SetShape(const wxRegion& region); + + /** + Set the window shape to the given path. + + Set the window shape to the interior of the given path and also draw + the window border along the specified path. + + For example, to make a clock-like circular window you could use + @code + wxSize size = GetSize(); + wxGraphicsPath + path = wxGraphicsRenderer::GetDefaultRenderer()->CreatePath(); + path.AddCircle(size.x/2, size.y/2, 30); + SetShape(path); + @endcode + + As the overload above, this method is not guaranteed to work on all + platforms but currently does work in wxMSW, wxOSX/Cocoa and wxGTK (with + the appropriate but almost always present X11 extensions) ports. + + @since 2.9.3 + */ + bool SetShape(const wxGraphicsPath& path); };