+ bool SetShape(const wxRegion& region)
+ {
+ // This style is in fact only needed by wxOSX/Carbon so once we don't
+ // use this port any more, we could get rid of this requirement, but
+ // for now you must specify wxFRAME_SHAPED for SetShape() to work on
+ // all platforms.
+ wxCHECK_MSG
+ (
+ HasFlag(wxFRAME_SHAPED), false,
+ wxS("Shaped windows must be created with the wxFRAME_SHAPED style.")
+ );
+
+ return region.IsEmpty() ? DoClearShape() : DoSetRegionShape(region);
+ }
+
+#if wxUSE_GRAPHICS_CONTEXT
+ // Set the shape using the specified path.
+ bool SetShape(const wxGraphicsPath& path)
+ {
+ wxCHECK_MSG
+ (
+ HasFlag(wxFRAME_SHAPED), false,
+ wxS("Shaped windows must be created with the wxFRAME_SHAPED style.")
+ );
+
+ return DoSetPathShape(path);
+ }
+#endif // wxUSE_GRAPHICS_CONTEXT
+
+
+ // Overridden base class methods.
+ // ------------------------------