X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5bd0ee99664dbfdfa6b95db24eac0cab93583d46..9e9574fe45b176ee74bba8fad7574cf9906145d1:/interface/wx/nonownedwnd.h diff --git a/interface/wx/nonownedwnd.h b/interface/wx/nonownedwnd.h index 7db6d66037..3fb3ad009e 100644 --- a/interface/wx/nonownedwnd.h +++ b/interface/wx/nonownedwnd.h @@ -3,11 +3,17 @@ // Purpose: wxNonOwnedWindow class documentation // Author: Vadim Zeitlin // Created: 2011-10-09 -// RCS-ID: $Id$ // Copyright: (c) 2011 Vadim Zeitlin // 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 +38,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); };