1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: wx/custombgwin.h
3 // Purpose: Class adding support for custom window backgrounds.
4 // Author: Vadim Zeitlin
6 // RCS-ID: $Id: wxhead.h,v 1.12 2010-04-22 12:44:51 zeitlin Exp $
7 // Copyright: (c) 2011 Vadim Zeitlin <vadim@wxwidgets.org>
8 // Licence: wxWindows licence
9 ///////////////////////////////////////////////////////////////////////////////
11 #ifndef _WX_CUSTOMBGWIN_H_
12 #define _WX_CUSTOMBGWIN_H_
14 // ----------------------------------------------------------------------------
15 // wxCustomBackgroundWindow: Adds support for custom backgrounds to any
16 // wxWindow-derived class.
17 // ----------------------------------------------------------------------------
19 class wxCustomBackgroundWindowBase
22 // Trivial default ctor.
23 wxCustomBackgroundWindowBase() { }
25 // Also a trivial but virtual -- to suppress g++ warnings -- dtor.
26 virtual ~wxCustomBackgroundWindowBase() { }
28 // Use the given bitmap to tile the background of this window. This bitmap
29 // will show through any transparent children.
31 // Notice that you must not prevent the base class EVT_ERASE_BACKGROUND
32 // handler from running (i.e. not to handle this event yourself) for this
34 void SetBackgroundBitmap(const wxBitmap
& bmp
)
36 DoSetBackgroundBitmap(bmp
);
40 virtual void DoSetBackgroundBitmap(const wxBitmap
& bmp
) = 0;
42 wxDECLARE_NO_COPY_CLASS(wxCustomBackgroundWindowBase
);
45 #if defined(__WXUNIVERSAL__)
46 #include "wx/univ/custombgwin.h"
47 #elif defined(__WXMSW__)
48 #include "wx/msw/custombgwin.h"
50 #include "wx/generic/custombgwin.h"
53 #endif // _WX_CUSTOMBGWIN_H_