Audacity 3.2.0
Static Public Member Functions | List of all members
ClipButtonSpecializations< ClipButtonId::Pitch > 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 51 of file LowlitClipButton.h.

Member Function Documentation

◆ DrawOnClip()

Definition at line 213 of file ClipPitchAndSpeedButtonHandle.cpp.

215{
216 const auto& clip = args.clip;
217 const auto& rect = args.rect;
218 auto& dc = args.dc;
219 const auto clipCentShift = clip.GetCentShift();
220 if (clipCentShift == 0)
221 return;
222 const auto pitchText = GetPitchShiftText(clipCentShift);
224 dc, rect,
226 clipCentShift > 0 ? pitchUpIndicator : pitchDownIndicator),
227 pitchText);
228}
THEME_API Theme theTheme
Definition: Theme.cpp:82
wxBitmap & Bitmap(int iIndex)
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}::GetPitchShiftText(), ClipButtonDrawingArgs::rect, and theTheme.

Here is the call graph for this function:

◆ GetWidth()

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

Definition at line 188 of file ClipPitchAndSpeedButtonHandle.cpp.

190{
191 // If we are to show some decimals, reserve a bit more space.
192 return clip.GetCentShift() % 100 == 0 ? 32 : 55;
193}
virtual int GetCentShift() const =0

References ClipInterface::GetCentShift().

Here is the call graph for this function:

◆ NeedsDrawing()

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

Definition at line 201 of file ClipPitchAndSpeedButtonHandle.cpp.

203{
204 return clip.GetCentShift() != 0;
205}

References ClipInterface::GetCentShift().

Here is the call graph for this function:

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