Audacity 3.2.0
Static Public Member Functions | List of all members
ClipButtonSpecializations< ClipButtonId::Speed > Struct Reference

#include <LowlitClipButton.h>

Static Public Member Functions

static bool NeedsDrawing (const ClipInterface &clip)
 
static void DrawOnClip (ClipButtonDrawingArgs &)
 
static int GetWidth (const ClipInterface &clip)
 

Detailed Description

Definition at line 59 of file LowlitClipButton.h.

Member Function Documentation

◆ DrawOnClip()

Definition at line 230 of file ClipPitchAndSpeedButtonHandle.cpp.

232{
233 const auto& clip = args.clip;
234 const auto& rect = args.rect;
235 auto& dc = args.dc;
236 const auto clipStretchRatio = clip.GetStretchRatio();
237 if (TimeAndPitchInterface::IsPassThroughMode(clipStretchRatio))
238 return;
239 const auto speedText = GetPlaybackSpeedText(clipStretchRatio);
241 dc, rect, theTheme.Bitmap(speedIndicator), speedText);
242}
THEME_API Theme theTheme
Definition: Theme.cpp:82
wxBitmap & Bitmap(int iIndex)
static bool IsPassThroughMode(double stretchRatio)
void DrawPitchOrSpeedIconIfItFits(wxDC &dc, const wxRect &rect, const wxBitmap &icon, const wxString &text)
const ClipInterface & clip

References ThemeBase::Bitmap(), ClipButtonDrawingArgs::clip, ClipButtonDrawingArgs::dc, anonymous_namespace{ClipPitchAndSpeedButtonHandle.cpp}::DrawPitchOrSpeedIconIfItFits(), anonymous_namespace{ClipPitchAndSpeedButtonHandle.cpp}::GetPlaybackSpeedText(), TimeAndPitchInterface::IsPassThroughMode(), ClipButtonDrawingArgs::rect, and theTheme.

Here is the call graph for this function:

◆ GetWidth()

int ClipButtonSpecializations< ClipButtonId::Speed >::GetWidth ( const ClipInterface clip)
static

Definition at line 195 of file ClipPitchAndSpeedButtonHandle.cpp.

197{
198 return 60;
199}

◆ NeedsDrawing()

bool ClipButtonSpecializations< ClipButtonId::Speed >::NeedsDrawing ( const ClipInterface clip)
static

Definition at line 207 of file ClipPitchAndSpeedButtonHandle.cpp.

209{
211}
virtual double GetStretchRatio() const =0

References ClipTimes::GetStretchRatio(), and TimeAndPitchInterface::IsPassThroughMode().

Here is the call graph for this function:

The documentation for this struct was generated from the following files: