Audacity 3.2.0
|
BackedPanel is for a panel that consists of a bitmap with something drawn over it. It supports efficient repainting when the overlays change and recreation of the bitmap when the panel size is changed. More...
#include <BackedPanel.h>
Public Member Functions | |
BackedPanel (wxWindow *parent, wxWindowID id, const wxPoint &pos, const wxSize &size, long style) | |
~BackedPanel () | |
wxDC & | GetBackingDC () |
wxDC & | GetBackingDCForRepaint () |
void | ResizeBacking () |
void | RepairBitmap (wxDC &dc, wxCoord x, wxCoord y, wxCoord width, wxCoord height) |
void | DisplayBitmap (wxDC &dc) |
void | OnSize (wxSizeEvent &event) |
Public Member Functions inherited from wxPanelWrapper | |
wxPanelWrapper () | |
wxPanelWrapper (wxWindow *parent, wxWindowID winid=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL|wxNO_BORDER, const TranslatableString &name=XO("Panel")) | |
bool | Create (wxWindow *parent, wxWindowID winid=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL|wxNO_BORDER, const TranslatableString &name=XO("Panel")) |
void | SetLabel (const TranslatableString &label) |
void | SetName (const TranslatableString &name) |
void | SetToolTip (const TranslatableString &toolTip) |
void | SetName () |
Public Member Functions inherited from wxTabTraversalWrapper< wxPanel > | |
wxTabTraversalWrapper (Args &&... args) | |
wxTabTraversalWrapper (const wxTabTraversalWrapper &)=delete | |
wxTabTraversalWrapper (wxTabTraversalWrapper &&)=delete | |
wxTabTraversalWrapper & | operator= (const wxTabTraversalWrapper &)=delete |
wxTabTraversalWrapper & | operator= (wxTabTraversalWrapper &&)=delete |
Private Attributes | |
std::unique_ptr< wxBitmap > | mBacking |
wxMemoryDC | mBackingDC |
bool | mResizeBacking {} |
BackedPanel is for a panel that consists of a bitmap with something drawn over it. It supports efficient repainting when the overlays change and recreation of the bitmap when the panel size is changed.
Definition at line 19 of file BackedPanel.h.
BackedPanel::BackedPanel | ( | wxWindow * | parent, |
wxWindowID | id, | ||
const wxPoint & | pos, | ||
const wxSize & | size, | ||
long | style | ||
) |
Definition at line 12 of file BackedPanel.cpp.
References mBacking, and mBackingDC.
BackedPanel::~BackedPanel | ( | ) |
Definition at line 24 of file BackedPanel.cpp.
References mBacking, and mBackingDC.
void BackedPanel::DisplayBitmap | ( | wxDC & | dc | ) |
Definition at line 65 of file BackedPanel.cpp.
References mBacking, and RepairBitmap().
Referenced by TrackPanel::OnPaint(), and AdornedRulerPanel::OnPaint().
wxDC & BackedPanel::GetBackingDC | ( | ) |
Definition at line 30 of file BackedPanel.cpp.
References mBackingDC.
Referenced by OverlayPanel::DrawOverlays().
wxDC & BackedPanel::GetBackingDCForRepaint | ( | ) |
Definition at line 35 of file BackedPanel.cpp.
References mBackingDC, mResizeBacking, and ResizeBacking().
Referenced by TrackPanel::OnPaint(), and AdornedRulerPanel::OnPaint().
void BackedPanel::OnSize | ( | wxSizeEvent & | event | ) |
Definition at line 71 of file BackedPanel.cpp.
References mResizeBacking.
Referenced by AdornedRulerPanel::OnSize().
void BackedPanel::RepairBitmap | ( | wxDC & | dc, |
wxCoord | x, | ||
wxCoord | y, | ||
wxCoord | width, | ||
wxCoord | height | ||
) |
Definition at line 60 of file BackedPanel.cpp.
References mBackingDC.
Referenced by DisplayBitmap(), and TrackPanel::OnPaint().
void BackedPanel::ResizeBacking | ( | ) |
Definition at line 48 of file BackedPanel.cpp.
References mBacking, and mBackingDC.
Referenced by GetBackingDCForRepaint().
|
private |
Definition at line 36 of file BackedPanel.h.
Referenced by BackedPanel(), DisplayBitmap(), ResizeBacking(), and ~BackedPanel().
|
private |
Definition at line 37 of file BackedPanel.h.
Referenced by BackedPanel(), GetBackingDC(), GetBackingDCForRepaint(), RepairBitmap(), ResizeBacking(), and ~BackedPanel().
|
private |
Definition at line 38 of file BackedPanel.h.
Referenced by GetBackingDCForRepaint(), and OnSize().