X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5bd0ee99664dbfdfa6b95db24eac0cab93583d46..b09857ae000a60704207d63290be937584805fb0:/interface/wx/nonownedwnd.h diff --git a/interface/wx/nonownedwnd.h b/interface/wx/nonownedwnd.h index 7db6d66037..474c40b2d4 100644 --- a/interface/wx/nonownedwnd.h +++ b/interface/wx/nonownedwnd.h @@ -8,6 +8,13 @@ // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// + +/** + Styles that can be used with any wxNonOwnedWindow: +*/ +#define wxFRAME_SHAPED 0x0010 // Create a window that is able to be shaped + + /** Common base class for all non-child windows. @@ -32,5 +39,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); };