]> git.saurik.com Git - wxWidgets.git/blame - interface/wx/nonownedwnd.h
Use /bin/echo for creation of Mac OS X PkgInfo files.
[wxWidgets.git] / interface / wx / nonownedwnd.h
CommitLineData
5bd0ee99
VZ
1///////////////////////////////////////////////////////////////////////////////
2// Name: interface/wx/nonownedwnd.h
3// Purpose: wxNonOwnedWindow class documentation
4// Author: Vadim Zeitlin
5// Created: 2011-10-09
6// RCS-ID: $Id$
7// Copyright: (c) 2011 Vadim Zeitlin <vadim@wxwidgets.org>
8// Licence: wxWindows licence
9///////////////////////////////////////////////////////////////////////////////
10
11/**
12 Common base class for all non-child windows.
13
14 This is the common base class of wxTopLevelWindow and wxPopupWindow and is
15 not used directly.
16
17 Currently the only additional functionality it provides, compared to base
18 wxWindow class, is the ability to set the window shape.
19
20 @since 2.9.3
21 */
22class wxNonOwnedWindow : public wxWindow
23{
24public:
25 /**
26 If the platform supports it, sets the shape of the window to that
27 depicted by @a region. The system will not display or respond to any
28 mouse event for the pixels that lie outside of the region. To reset the
29 window to the normal rectangular shape simply call SetShape() again with
30 an empty wxRegion. Returns @true if the operation is successful.
31
32 This method is available in this class only since wxWidgets 2.9.3,
33 previous versions only provided it in wxTopLevelWindow.
34 */
e520c3f7
VZ
35 bool SetShape(const wxRegion& region);
36
37 /**
38 Set the window shape to the given path.
39
40 Set the window shape to the interior of the given path and also draw
41 the window border along the specified path.
42
43 For example, to make a clock-like circular window you could use
44 @code
45 wxSize size = GetSize();
46 wxGraphicsPath
47 path = wxGraphicsRenderer::GetDefaultRenderer()->CreatePath();
48 path.AddCircle(size.x/2, size.y/2, 30);
49 SetShape(path);
50 @endcode
51
52 As the overload above, this method is not guaranteed to work on all
53 platforms but currently does work in wxMSW, wxOSX/Cocoa and wxGTK (with
54 the appropriate but almost always present X11 extensions) ports.
55
56 @since 2.9.3
57 */
58 bool SetShape(const wxGraphicsPath& path);
5bd0ee99 59};