]> git.saurik.com Git - wxWidgets.git/blob - include/wx/msw/panel.h
Add basic history api and implement it under gtk.
[wxWidgets.git] / include / wx / msw / panel.h
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: wx/msw/panel.h
3 // Purpose: wxMSW-specific wxPanel class.
4 // Author: Vadim Zeitlin
5 // Created: 2011-03-18
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 ///////////////////////////////////////////////////////////////////////////////
10
11 #ifndef _WX_MSW_PANEL_H_
12 #define _WX_MSW_PANEL_H_
13
14 class WXDLLIMPEXP_FWD_CORE wxBrush;
15
16 // ----------------------------------------------------------------------------
17 // wxPanel
18 // ----------------------------------------------------------------------------
19
20 class WXDLLIMPEXP_CORE wxPanel : public wxPanelBase
21 {
22 public:
23 wxPanel() { Init(); }
24
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 {
32 Init();
33
34 Create(parent, winid, pos, size, style, name);
35 }
36
37 // This is overridden for MSW to return true for all panels that are child
38 // of a window with themed background (such as wxNotebook) which should
39 // show through the child panels.
40 virtual bool HasTransparentBackground();
41
42
43 #ifdef WXWIN_COMPATIBILITY_2_8
44 wxDEPRECATED_CONSTRUCTOR(
45 wxPanel(wxWindow *parent,
46 int x, int y, int width, int height,
47 long style = wxTAB_TRAVERSAL | wxNO_BORDER,
48 const wxString& name = wxPanelNameStr)
49 {
50 Create(parent, wxID_ANY, wxPoint(x, y), wxSize(width, height), style, name);
51 }
52 )
53 #endif // WXWIN_COMPATIBILITY_2_8
54
55 protected:
56 void Init()
57 {
58 m_backgroundBrush = NULL;
59 }
60
61 virtual void DoSetBackgroundBitmap(const wxBitmap& bmp);
62 virtual WXHBRUSH MSWGetCustomBgBrush();
63
64 private:
65 wxBrush *m_backgroundBrush;
66
67 wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxPanel);
68 };
69
70 #endif // _WX_MSW_PANEL_H_