]>
Commit | Line | Data |
---|---|---|
5b87bd6c VZ |
1 | /////////////////////////////////////////////////////////////////////////////// |
2 | // Name: wx/msw/panel.h | |
3 | // Purpose: wxMSW-specific wxPanel class. | |
4 | // Author: Vadim Zeitlin | |
5 | // Created: 2011-03-18 | |
906c935a | 6 | // RCS-ID: $Id$ |
5b87bd6c VZ |
7 | // Copyright: (c) 2011 Vadim Zeitlin <vadim@wxwidgets.org> |
8 | // Licence: wxWindows licence | |
9 | /////////////////////////////////////////////////////////////////////////////// | |
10 | ||
11 | #ifndef _WX_MSW_PANEL_H_ | |
12 | #define _WX_MSW_PANEL_H_ | |
13 | ||
cd95f7e6 VZ |
14 | class WXDLLIMPEXP_FWD_CORE wxBrush; |
15 | ||
5b87bd6c VZ |
16 | // ---------------------------------------------------------------------------- |
17 | // wxPanel | |
18 | // ---------------------------------------------------------------------------- | |
19 | ||
20 | class WXDLLIMPEXP_CORE wxPanel : public wxPanelBase | |
21 | { | |
22 | public: | |
cd95f7e6 | 23 | wxPanel() { Init(); } |
5b87bd6c | 24 | |
5b87bd6c VZ |
25 | wxPanel(wxWindow *parent, |
26 | wxWindowID winid = wxID_ANY, | |
27 | const wxPoint& pos = wxDefaultPosition, | |
28 | const wxSize& size = wxDefaultSize, | |
29 | long style = wxTAB_TRAVERSAL | wxNO_BORDER, | |
30 | const wxString& name = wxPanelNameStr) | |
31 | { | |
cd95f7e6 VZ |
32 | Init(); |
33 | ||
5b87bd6c VZ |
34 | Create(parent, winid, pos, size, style, name); |
35 | } | |
36 | ||
05d65177 VZ |
37 | virtual ~wxPanel(); |
38 | ||
5b87bd6c VZ |
39 | // This is overridden for MSW to return true for all panels that are child |
40 | // of a window with themed background (such as wxNotebook) which should | |
41 | // show through the child panels. | |
42 | virtual bool HasTransparentBackground(); | |
43 | ||
cf858bab VZ |
44 | |
45 | #ifdef WXWIN_COMPATIBILITY_2_8 | |
46 | wxDEPRECATED_CONSTRUCTOR( | |
47 | wxPanel(wxWindow *parent, | |
48 | int x, int y, int width, int height, | |
49 | long style = wxTAB_TRAVERSAL | wxNO_BORDER, | |
50 | const wxString& name = wxPanelNameStr) | |
51 | { | |
52 | Create(parent, wxID_ANY, wxPoint(x, y), wxSize(width, height), style, name); | |
53 | } | |
54 | ) | |
55 | #endif // WXWIN_COMPATIBILITY_2_8 | |
56 | ||
cd95f7e6 VZ |
57 | protected: |
58 | void Init() | |
59 | { | |
60 | m_backgroundBrush = NULL; | |
61 | } | |
62 | ||
63 | virtual void DoSetBackgroundBitmap(const wxBitmap& bmp); | |
64 | virtual WXHBRUSH MSWGetCustomBgBrush(); | |
65 | ||
5b87bd6c | 66 | private: |
cd95f7e6 VZ |
67 | wxBrush *m_backgroundBrush; |
68 | ||
5b87bd6c VZ |
69 | wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxPanel); |
70 | }; | |
71 | ||
72 | #endif // _WX_MSW_PANEL_H_ |