Audacity 3.2.0
Functions
anonymous_namespace{LabelTrackView.cpp} Namespace Reference

Functions

void getXPos (const LabelStruct &ls, wxDC &dc, int *xPos1, int cursorPos)
 
LabelTrackHitfindHit (TrackPanel *pPanel)
 

Function Documentation

◆ findHit()

LabelTrackHit * anonymous_namespace{LabelTrackView.cpp}::findHit ( TrackPanel pPanel)

Definition at line 761 of file LabelTrackView.cpp.

762 {
763 if (! pPanel )
764 return nullptr;
765
766 // Fetch the highlighting state
767 auto target = pPanel->Target();
768 if (target) {
769 auto handle = dynamic_cast<LabelGlyphHandle*>( target.get() );
770 if (handle)
771 return &*handle->mpHit;
772 }
773 return nullptr;
774 }
UIHandlePtr Target()
std::shared_ptr< LabelTrackHit > mpHit

References LabelGlyphHandle::mpHit, and CellularPanel::Target().

Referenced by LabelTrackView::Draw().

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

◆ getXPos()

void anonymous_namespace{LabelTrackView.cpp}::getXPos ( const LabelStruct ls,
wxDC &  dc,
int *  xPos1,
int  cursorPos 
)

Definition at line 704 of file LabelTrackView.cpp.

705{
706 *xPos1 = ls.xText;
707 if( cursorPos > 0)
708 {
709 int partWidth;
710 // Calculate the width of the substring and add it to Xpos
711 dc.GetTextExtent(ls.title.Left(cursorPos), &partWidth, NULL);
712 *xPos1 += partWidth;
713 }
714}
wxString title
Definition: LabelTrack.h:78
int xText
Pixel position of right hand glyph.
Definition: LabelTrack.h:84

References LabelStruct::title, and LabelStruct::xText.

Referenced by LabelTrackView::CalcCursorX(), and LabelTrackView::CalcHighlightXs().

Here is the caller graph for this function: