Audacity  2.2.0
BackedPanel.h
Go to the documentation of this file.
1 //
2 // BackedPanel.h
3 // Audacity
4 //
5 // Created by Paul Licameli on 5/7/16.
6 //
7 //
8 
9 #ifndef __AUDACITY_BACKED_PANEL__
10 #define __AUDACITY_BACKED_PANEL__
11 
12 #include "../MemoryX.h"
13 #include <wx/dcmemory.h>
14 #include "wxPanelWrapper.h"
15 
16 class AUDACITY_DLL_API BackedPanel /* not final */ : public wxPanelWrapper {
17 public:
18  BackedPanel(wxWindow * parent, wxWindowID id,
19  const wxPoint & pos,
20  const wxSize & size,
21  long style);
22 
23  ~BackedPanel();
24 
25  wxDC &GetBackingDC();
26 
27  wxDC &GetBackingDCForRepaint();
28 
29  void ResizeBacking();
30 
31  void RepairBitmap(wxDC &dc, wxCoord x, wxCoord y, wxCoord width, wxCoord height);
32 
33  void DisplayBitmap(wxDC &dc);
34 
35  void OnSize(wxSizeEvent & event);
36 
37 private:
38  std::unique_ptr<wxBitmap> mBacking;
39  wxMemoryDC mBackingDC;
40  bool mResizeBacking {};
41 
42  DECLARE_EVENT_TABLE()
43 };
44 
45 
46 #endif
Definition: wxPanelWrapper.h:19
wxMemoryDC mBackingDC
Definition: BackedPanel.h:39
Definition: BackedPanel.h:16
std::unique_ptr< wxBitmap > mBacking
Definition: BackedPanel.h:38