Audacity 3.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 <wx/dcmemory.h> // member variable
13#include "wxPanelWrapper.h" // to inherit
14
15
19class AUDACITY_DLL_API BackedPanel /* not final */ : public wxPanelWrapper {
20public:
21 BackedPanel(wxWindow * parent, wxWindowID id,
22 const wxPoint & pos,
23 const wxSize & size,
24 long style);
25
27
28 wxDC &GetBackingDC();
29 wxDC &GetBackingDCForRepaint();
30 void ResizeBacking();
31 void RepairBitmap(wxDC &dc, wxCoord x, wxCoord y, wxCoord width, wxCoord height);
32 void DisplayBitmap(wxDC &dc);
33 void OnSize(wxSizeEvent & event);
34
35private:
36 std::unique_ptr<wxBitmap> mBacking;
37 wxMemoryDC mBackingDC;
38 bool mResizeBacking {};
39
40 DECLARE_EVENT_TABLE()
41};
42
43
44#endif
static void OnSize(wxSizeEvent &evt)
Definition: VSTEditor.cpp:224
BackedPanel is for a panel that consists of a bitmap with something drawn over it....
Definition: BackedPanel.h:19
wxMemoryDC mBackingDC
Definition: BackedPanel.h:37
std::unique_ptr< wxBitmap > mBacking
Definition: BackedPanel.h:36