Audacity 3.2.0
Namespaces | Classes | Functions
LowlitClipButton Namespace Reference

Namespaces

namespace  Detail
 

Classes

struct  RectangleArgs
 

Functions

template<ClipButtonId id>
bool HitTest (const RectangleArgs &args, const wxPoint &mousePos)
 
template<ClipButtonId id>
std::optional< wxRect > DrawOnClip (const RectangleArgs &args, wxDC &dc)
 

Function Documentation

◆ DrawOnClip()

template<ClipButtonId id>
std::optional< wxRect > LowlitClipButton::DrawOnClip ( const RectangleArgs args,
wxDC &  dc 
)

Definition at line 96 of file LowlitClipButton.h.

97{
99 return {};
100 const auto rect = Detail::GetButtonInnerRectangle(id, args);
101 if (!rect)
102 return {};
103 ClipButtonDrawingArgs drawingArgs { *rect, args.clip, dc };
105 return rect;
106}
std::optional< wxRect > GetButtonInnerRectangle(ClipButtonId buttonId, const RectangleArgs &args)
static void DrawOnClip(ClipButtonDrawingArgs &)

References LowlitClipButton::RectangleArgs::clip, ClipButtonSpecializations< id >::DrawOnClip(), and LowlitClipButton::Detail::GetButtonInnerRectangle().

Here is the call graph for this function:

◆ HitTest()

template<ClipButtonId id>
bool LowlitClipButton::HitTest ( const RectangleArgs args,
const wxPoint &  mousePos 
)

Definition at line 87 of file LowlitClipButton.h.

88{
90 return false;
91 const auto buttonRect = Detail::GetButtonRectangle(id, args);
92 return buttonRect.has_value() && buttonRect->Contains(mousePos);
93}
std::optional< wxRect > GetButtonRectangle(ClipButtonId buttonId, const RectangleArgs &args)

References LowlitClipButton::RectangleArgs::clip, and LowlitClipButton::Detail::GetButtonRectangle().

Referenced by AdornedRulerPanel::QPCell::HitTest().

Here is the call graph for this function:
Here is the caller graph for this function: