Audacity  3.0.3
Public Member Functions | Private Attributes | List of all members
anonymous_namespace{TrackPanel.cpp}::EmptyPanelRect Class Referencefinal
Inheritance diagram for anonymous_namespace{TrackPanel.cpp}::EmptyPanelRect:
[legend]
Collaboration diagram for anonymous_namespace{TrackPanel.cpp}::EmptyPanelRect:
[legend]

Public Member Functions

 EmptyPanelRect (const std::shared_ptr< Track > &track, int fillBrushName)
 
 ~EmptyPanelRect ()
 
void Draw (TrackPanelDrawingContext &context, const wxRect &rect, unsigned iPass) override
 
std::shared_ptr< TrackDoFindTrack () override
 
std::vector< UIHandlePtrHitTest (const TrackPanelMouseState &state, const AudacityProject *pProject) override
 
- Public Member Functions inherited from CommonTrackPanelCell
 CommonTrackPanelCell ()
 
virtual ~CommonTrackPanelCell ()=0
 
HitTestPreview DefaultPreview (const TrackPanelMouseState &, const AudacityProject *) override
 
std::shared_ptr< TrackFindTrack ()
 
std::shared_ptr< const TrackFindTrack () const
 
virtual std::vector< MenuItemGetMenuItems (const wxRect &rect, const wxPoint *pPosition, AudacityProject *pProject)
 Return a list of items for DoContextMenu() (empties for separators) More...
 
- Public Member Functions inherited from TrackPanelCell
 TrackPanelCell ()=default
 
 TrackPanelCell (const TrackPanelCell &) PROHIBITED
 
TrackPanelCelloperator= (const TrackPanelCell &) PROHIBITED
 
virtual ~TrackPanelCell ()=0
 
virtual std::shared_ptr< TrackPanelCellContextMenuDelegate ()
 
virtual unsigned CaptureKey (wxKeyEvent &event, ViewInfo &viewInfo, wxWindow *pParent, AudacityProject *project)
 
virtual unsigned KeyDown (wxKeyEvent &event, ViewInfo &viewInfo, wxWindow *pParent, AudacityProject *project)
 
virtual unsigned KeyUp (wxKeyEvent &event, ViewInfo &viewInfo, wxWindow *pParent, AudacityProject *project)
 
virtual unsigned Char (wxKeyEvent &event, ViewInfo &viewInfo, wxWindow *pParent, AudacityProject *project)
 
virtual unsigned LoseFocus (AudacityProject *project)
 
- Public Member Functions inherited from TrackPanelNode
 TrackPanelNode ()
 
virtual ~TrackPanelNode ()=0
 
- Public Member Functions inherited from TrackPanelDrawable
virtual ~TrackPanelDrawable ()=0
 
virtual wxRect DrawingArea (TrackPanelDrawingContext &context, const wxRect &rect, const wxRect &panelRect, unsigned iPass)
 

Private Attributes

std::shared_ptr< TrackmTrack
 
int mFillBrushName
 

Additional Inherited Members

- Public Types inherited from CommonTrackPanelCell
using Hook = std::function< unsigned(const TrackPanelMouseEvent &evt, AudacityProject *pProject) >
 
- Static Public Member Functions inherited from CommonTrackPanelCell
static Hook InstallMouseWheelHook (const Hook &hook)
 
- Static Public Member Functions inherited from TrackPanelDrawable
static wxRect MaximizeWidth (const wxRect &rect, const wxRect &panelRect)
 
static wxRect MaximizeHeight (const wxRect &rect, const wxRect &panelRect)
 
- Protected Member Functions inherited from CommonTrackPanelCell
unsigned DoContextMenu (const wxRect &rect, wxWindow *pParent, const wxPoint *pPosition, AudacityProject *pProject) override
 
unsigned HandleWheelRotation (const TrackPanelMouseEvent &event, AudacityProject *pProject) override
 

Detailed Description

Definition at line 1343 of file TrackPanel.cpp.

Constructor & Destructor Documentation

◆ EmptyPanelRect()

anonymous_namespace{TrackPanel.cpp}::EmptyPanelRect::EmptyPanelRect ( const std::shared_ptr< Track > &  track,
int  fillBrushName 
)
inlineexplicit

Definition at line 1349 of file TrackPanel.cpp.

1350  : mTrack(track), mFillBrushName(fillBrushName)
1351  {
1352  }

◆ ~EmptyPanelRect()

anonymous_namespace{TrackPanel.cpp}::EmptyPanelRect::~EmptyPanelRect ( )
inline

Definition at line 1354 of file TrackPanel.cpp.

1354 { }

Member Function Documentation

◆ DoFindTrack()

std::shared_ptr<Track> anonymous_namespace{TrackPanel.cpp}::EmptyPanelRect::DoFindTrack ( )
inlineoverridevirtual

Implements CommonTrackPanelCell.

Definition at line 1369 of file TrackPanel.cpp.

1370  {
1371  return mTrack;
1372  }

◆ Draw()

void anonymous_namespace{TrackPanel.cpp}::EmptyPanelRect::Draw ( TrackPanelDrawingContext context,
const wxRect &  rect,
unsigned  iPass 
)
inlineoverridevirtual

Reimplemented from TrackPanelDrawable.

Definition at line 1356 of file TrackPanel.cpp.

1358  {
1359  if (iPass == TrackArtist::PassBackground)
1360  {
1361  context.dc.SetPen(*wxTRANSPARENT_PEN);
1363  context.dc.DrawRectangle(rect);
1364  wxRect bevel(rect.x, rect.y, rect.width - 1, rect.height - 1);
1365  AColor::BevelTrackInfo(context.dc, true, bevel, false);
1366  }
1367  }

References AColor::BevelTrackInfo(), TrackPanelDrawingContext::dc, TrackArtist::PassBackground, and AColor::UseThemeColour().

Here is the call graph for this function:

◆ HitTest()

std::vector<UIHandlePtr> anonymous_namespace{TrackPanel.cpp}::EmptyPanelRect::HitTest ( const TrackPanelMouseState state,
const AudacityProject pProject 
)
inlineoverridevirtual

Implements TrackPanelCell.

Definition at line 1374 of file TrackPanel.cpp.

1376  {
1377  return {};
1378  }

Member Data Documentation

◆ mFillBrushName

int anonymous_namespace{TrackPanel.cpp}::EmptyPanelRect::mFillBrushName
private

Definition at line 1347 of file TrackPanel.cpp.

◆ mTrack

std::shared_ptr<Track> anonymous_namespace{TrackPanel.cpp}::EmptyPanelRect::mTrack
private

Definition at line 1346 of file TrackPanel.cpp.


The documentation for this class was generated from the following file:
AColor::UseThemeColour
static void UseThemeColour(wxDC *dc, int iBrush, int iPen=-1, int alpha=255)
Definition: AColor.cpp:280
TrackPanelDrawingContext::dc
wxDC & dc
Definition: TrackPanelDrawingContext.h:23
AColor::BevelTrackInfo
static void BevelTrackInfo(wxDC &dc, bool up, const wxRect &r, bool highlight=false)
Definition: AColor.cpp:248
anonymous_namespace{TrackPanel.cpp}::EmptyPanelRect::mFillBrushName
int mFillBrushName
Definition: TrackPanel.cpp:1347
anonymous_namespace{TrackPanel.cpp}::EmptyPanelRect::mTrack
std::shared_ptr< Track > mTrack
Definition: TrackPanel.cpp:1346
TrackArtist::PassBackground
@ PassBackground
Definition: TrackArtist.h:86