]> git.saurik.com Git - wxWidgets.git/blame - include/wx/custombgwin.h
Don't define __STRICT_ANSI__, we should build both with and without it.
[wxWidgets.git] / include / wx / custombgwin.h
CommitLineData
bbcf2821
VZ
1///////////////////////////////////////////////////////////////////////////////
2// Name: wx/custombgwin.h
3// Purpose: Class adding support for custom window backgrounds.
4// Author: Vadim Zeitlin
5// Created: 2011-10-10
bbcf2821
VZ
6// Copyright: (c) 2011 Vadim Zeitlin <vadim@wxwidgets.org>
7// Licence: wxWindows licence
8///////////////////////////////////////////////////////////////////////////////
9
10#ifndef _WX_CUSTOMBGWIN_H_
11#define _WX_CUSTOMBGWIN_H_
12
13// ----------------------------------------------------------------------------
14// wxCustomBackgroundWindow: Adds support for custom backgrounds to any
15// wxWindow-derived class.
16// ----------------------------------------------------------------------------
17
18class wxCustomBackgroundWindowBase
19{
20public:
21 // Trivial default ctor.
22 wxCustomBackgroundWindowBase() { }
23
ecb35373
VZ
24 // Also a trivial but virtual -- to suppress g++ warnings -- dtor.
25 virtual ~wxCustomBackgroundWindowBase() { }
26
bbcf2821
VZ
27 // Use the given bitmap to tile the background of this window. This bitmap
28 // will show through any transparent children.
29 //
30 // Notice that you must not prevent the base class EVT_ERASE_BACKGROUND
31 // handler from running (i.e. not to handle this event yourself) for this
32 // to work.
33 void SetBackgroundBitmap(const wxBitmap& bmp)
34 {
35 DoSetBackgroundBitmap(bmp);
36 }
37
38protected:
39 virtual void DoSetBackgroundBitmap(const wxBitmap& bmp) = 0;
40
41 wxDECLARE_NO_COPY_CLASS(wxCustomBackgroundWindowBase);
42};
43
44#if defined(__WXUNIVERSAL__)
45 #include "wx/univ/custombgwin.h"
46#elif defined(__WXMSW__)
47 #include "wx/msw/custombgwin.h"
48#else
49 #include "wx/generic/custombgwin.h"
50#endif
51
52#endif // _WX_CUSTOMBGWIN_H_