Move wxTopLevelWindow::SetShape() down to wxNonOwnedWindow.
Also add wxNonOwnedWindow for wxMSW (which previously simply typedef'd it to wxWindow) and document this class now that it provides some user-visible functionality. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69364 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -29,7 +29,7 @@ class wxDFBEventsHandler;
|
||||
// wxFrame is non-owned, because even though it can have a parent, it's
|
||||
// location is independent of it. This class is for internal use only, it's
|
||||
// the base class for wxTopLevelWindow and wxPopupWindow.
|
||||
class WXDLLIMPEXP_CORE wxNonOwnedWindow : public wxWindow
|
||||
class WXDLLIMPEXP_CORE wxNonOwnedWindow : public wxNonOwnedWindowBase
|
||||
{
|
||||
public:
|
||||
// construction
|
||||
|
26
include/wx/msw/nonownedwnd.h
Normal file
26
include/wx/msw/nonownedwnd.h
Normal file
@@ -0,0 +1,26 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/msw/nonownedwnd.h
|
||||
// Purpose: wxNonOwnedWindow declaration for wxMSW.
|
||||
// Author: Vadim Zeitlin
|
||||
// Created: 2011-10-09
|
||||
// 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_MSW_NONOWNEDWND_H_
|
||||
#define _WX_MSW_NONOWNEDWND_H_
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxNonOwnedWindow
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxNonOwnedWindow : public wxNonOwnedWindowBase
|
||||
{
|
||||
public:
|
||||
#ifndef __WXWINCE__
|
||||
virtual bool SetShape(const wxRegion& region);
|
||||
#endif // !__WXWINCE__
|
||||
};
|
||||
|
||||
#endif // _WX_MSW_NONOWNEDWND_H_
|
@@ -57,9 +57,6 @@ public:
|
||||
|
||||
virtual void SetLayoutDirection(wxLayoutDirection dir);
|
||||
|
||||
#ifndef __WXWINCE__
|
||||
virtual bool SetShape(const wxRegion& region);
|
||||
#endif // __WXWINCE__
|
||||
virtual void RequestUserAttention(int flags = wxUSER_ATTENTION_INFO);
|
||||
|
||||
virtual bool Show(bool show = true);
|
||||
|
@@ -12,15 +12,35 @@
|
||||
#ifndef _WX_NONOWNEDWND_H_
|
||||
#define _WX_NONOWNEDWND_H_
|
||||
|
||||
#include "wx/window.h"
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxNonOwnedWindow: a window that is not a child window of another one.
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class wxNonOwnedWindowBase : public wxWindow
|
||||
{
|
||||
public:
|
||||
// Set the shape of the window to the given region.
|
||||
// Returns true if the platform supports this feature (and the
|
||||
// operation is successful.)
|
||||
virtual bool SetShape(const wxRegion& WXUNUSED(region)) { return false; }
|
||||
|
||||
};
|
||||
|
||||
#if defined(__WXDFB__)
|
||||
#include "wx/dfb/nonownedwnd.h"
|
||||
#elif defined(__WXMAC__)
|
||||
#include "wx/osx/nonownedwnd.h"
|
||||
#elif defined(__WXMSW__)
|
||||
#include "wx/msw/nonownedwnd.h"
|
||||
#else
|
||||
// other ports can derive both wxTLW and wxPopupWindow directly
|
||||
// from wxWindow:
|
||||
#include "wx/window.h"
|
||||
typedef wxWindow wxNonOwnedWindow;
|
||||
// No special class needed in other ports, they can derive both wxTLW and
|
||||
// wxPopupWindow directly from wxWindow and don't implement SetShape() (at
|
||||
// least at this level, wxGTK does do it in wxTLW).
|
||||
class wxNonOwnedWindow : public wxNonOwnedWindowBase
|
||||
{
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif // _WX_NONOWNEDWND_H_
|
||||
|
@@ -30,7 +30,7 @@
|
||||
|
||||
class wxNonOwnedWindowImpl;
|
||||
|
||||
class WXDLLIMPEXP_CORE wxNonOwnedWindow : public wxWindow
|
||||
class WXDLLIMPEXP_CORE wxNonOwnedWindow : public wxNonOwnedWindowBase
|
||||
{
|
||||
public:
|
||||
// constructors and such
|
||||
@@ -79,7 +79,7 @@ public:
|
||||
// implementation from now on
|
||||
// --------------------------
|
||||
|
||||
virtual bool DoSetShape(const wxRegion& region);
|
||||
virtual bool SetShape(const wxRegion& region);
|
||||
const wxRegion& GetShape() const { return m_shape; }
|
||||
|
||||
// activation hooks only necessary for MDI Implementation
|
||||
|
@@ -51,9 +51,6 @@ public:
|
||||
|
||||
virtual wxPoint GetClientAreaOrigin() const;
|
||||
|
||||
virtual bool SetShape(const wxRegion& region)
|
||||
{ return DoSetShape(region); }
|
||||
|
||||
// Attracts the users attention to this window if the application is
|
||||
// inactive (should be called when a background event occurs)
|
||||
virtual void RequestUserAttention(int flags = wxUSER_ATTENTION_INFO);
|
||||
|
@@ -219,11 +219,6 @@ public:
|
||||
// enable/disable close button [x]
|
||||
virtual bool EnableCloseButton(bool WXUNUSED(enable) ) { return false; }
|
||||
|
||||
// Set the shape of the window to the given region.
|
||||
// Returns true if the platform supports this feature (and the
|
||||
// operation is successful.)
|
||||
virtual bool SetShape(const wxRegion& WXUNUSED(region)) { return false; }
|
||||
|
||||
// Attracts the users attention to this window if the application is
|
||||
// inactive (should be called when a background event occurs)
|
||||
virtual void RequestUserAttention(int flags = wxUSER_ATTENTION_INFO);
|
||||
|
Reference in New Issue
Block a user