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