Implement SetShape() for wxPopupWindow in wxGTK.
Move SetShape() implementation from wxTopLevelWindow to wxNonOwnedWindow so that wxPopupWindow, which also inherits from the latter, could use it as well. This makes it possible to have popup windows with irregular shapes in wxGTK as well as in wxMSW and wxOSX. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69408 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
35
include/wx/gtk/nonownedwnd.h
Normal file
35
include/wx/gtk/nonownedwnd.h
Normal file
@@ -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_
|
@@ -57,8 +57,6 @@ public:
|
||||
virtual bool ShowFullScreen(bool show, long style = wxFULLSCREEN_ALL);
|
||||
virtual bool IsFullScreen() const { return m_fsIsShowing; };
|
||||
|
||||
virtual bool SetShape(const wxRegion& region);
|
||||
|
||||
virtual void RequestUserAttention(int flags = wxUSER_ATTENTION_INFO);
|
||||
|
||||
virtual void SetWindowStyleFlag( long style );
|
||||
@@ -113,9 +111,6 @@ public:
|
||||
// size of WM decorations
|
||||
wxSize m_decorSize;
|
||||
|
||||
// shape of the frame
|
||||
wxRegion m_shape;
|
||||
|
||||
// private gtk_timeout_add result for mimicing wxUSER_ATTENTION_INFO and
|
||||
// wxUSER_ATTENTION_ERROR difference, -2 for no hint, -1 for ERROR hint, rest for GtkTimeout handle.
|
||||
int m_urgency_hint;
|
||||
|
Reference in New Issue
Block a user