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

Member Function Documentation

◆ DrawOnClip()

Definition at line 86 of file ClipOverflowButtonHandle.cpp.

88{
89 auto& dc = args.dc;
90 const auto& rect = args.rect;
91 constexpr auto penWidth = 0;
92 wxDCPenChanger pen { args.dc, { wxPenInfo { theTheme.Colour(clrClipNameText), penWidth } } };
93 wxDCBrushChanger brush { dc, theTheme.Colour(clrClipNameText) };
94 constexpr auto numDots = 3;
95 constexpr auto radius = 1;
96 constexpr auto spacing = 4;
97 constexpr auto totalWidth = numDots * 2 * radius + 2 * spacing;
98 const auto dotY = rect.y + (rect.height + 1 - radius) / 2;
99 for (auto i = 0; i < numDots; ++i)
100 {
101 const auto dotX = rect.x + (rect.width + 1 - totalWidth) / 2 +
102 i * (2 * radius + spacing);
103 dc.DrawCircle(dotX, dotY, radius);
104 }
105}
THEME_API Theme theTheme
Definition: Theme.cpp:82
wxColour & Colour(int iIndex)

References ThemeBase::Colour(), ClipButtonDrawingArgs::dc, ClipButtonDrawingArgs::rect, and theTheme.

Here is the call graph for this function:

◆ GetWidth()

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

Definition at line 74 of file ClipOverflowButtonHandle.cpp.

76{
77 return 30;
78}

◆ NeedsDrawing()

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

Definition at line 80 of file ClipOverflowButtonHandle.cpp.

82{
83 return true;
84}

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