]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/gtk/nonownedwnd.h
Implement SetShape() for wxPopupWindow in wxGTK.
[wxWidgets.git] / include / wx / gtk / nonownedwnd.h
diff --git a/include/wx/gtk/nonownedwnd.h b/include/wx/gtk/nonownedwnd.h
new file mode 100644 (file)
index 0000000..a722e27
--- /dev/null
@@ -0,0 +1,35 @@
+///////////////////////////////////////////////////////////////////////////////
+// Name:        wx/gtk/nonownedwnd.h
+// Purpose:     wxGTK-specific wxNonOwnedWindow declaration.
+// Author:      Vadim Zeitlin
+// Created:     2011-10-12
+// RCS-ID:      $Id: wxhead.h,v 1.12 2010-04-22 12:44:51 zeitlin Exp $
+// Copyright:   (c) 2011 Vadim Zeitlin <vadim@wxwidgets.org>
+// Licence:     wxWindows licence
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_GTK_NONOWNEDWND_H_
+#define _WX_GTK_NONOWNEDWND_H_
+
+// ----------------------------------------------------------------------------
+// wxNonOwnedWindow contains code common to wx{Popup,TopLevel}Window in wxGTK.
+// ----------------------------------------------------------------------------
+
+class WXDLLIMPEXP_CORE wxNonOwnedWindow : public wxNonOwnedWindowBase
+{
+public:
+    wxNonOwnedWindow() { }
+
+    virtual bool SetShape(const wxRegion& region);
+
+    // Overridden to actually set the shape when the window becomes realized.
+    virtual void GTKHandleRealized();
+
+private:
+    // If valid, defines the custom shape of the window.
+    wxRegion m_shape;
+
+    wxDECLARE_NO_COPY_CLASS(wxNonOwnedWindow);
+};
+
+#endif // _WX_GTK_NONOWNEDWND_H_