Audacity 3.2.0
Typedefs | Enumerations | Functions | Variables
TimeTrackControls.cpp File Reference
#include "TimeTrackControls.h"
#include "../../../HitTestResult.h"
#include "Project.h"
#include "ProjectHistory.h"
#include "../../../RefreshCode.h"
#include "../../../TimeTrack.h"
#include "../../../widgets/PopupMenuTable.h"
#include <wx/numdlg.h>
#include "../../ui/TrackView.h"
Include dependency graph for TimeTrackControls.cpp:

Go to the source code of this file.

Typedefs

using DoGetTimeTrackControls = DoGetControls::Override< TimeTrack >
 
using GetDefaultTimeTrackHeight = GetDefaultTrackHeight::Override< TimeTrack >
 

Enumerations

enum  { OnTimeTrackLinID = 30000 , OnTimeTrackLogID , OnTimeTrackLogIntID , OnSetTimeTrackRangeID }
 

Functions

 BeginSection ("Scales")
 
 AppendRadioItem ("Linear", OnTimeTrackLinID, XXO("&Linear scale"), POPUP_MENU_FN(OnTimeTrackLin), [](PopupMenuHandler &handler, wxMenu &menu, int id){ menu.Check(id, !findTrack(handler) ->GetDisplayLog());})
 
 AppendRadioItem ("Log", OnTimeTrackLogID, XXO("L&ogarithmic scale"), POPUP_MENU_FN(OnTimeTrackLog), [](PopupMenuHandler &handler, wxMenu &menu, int id){ menu.Check(id, findTrack(handler) ->GetDisplayLog());})
 
 EndSection ()
 
 BeginSection ("Other")
 
 AppendItem ("Range", OnSetTimeTrackRangeID, XXO("&Range..."), POPUP_MENU_FN(OnSetTimeTrackRange))
 
 AppendCheckItem ("LogInterp", OnTimeTrackLogIntID, XXO("Logarithmic &Interpolation"), POPUP_MENU_FN(OnTimeTrackLogInt), [](PopupMenuHandler &handler, wxMenu &menu, int id){ menu.Check(id, findTrack(handler) ->GetInterpolateLog());})
 
 DEFINE_ATTACHED_VIRTUAL_OVERRIDE (DoGetTimeTrackControls)
 

Variables

static const auto findTrack
 

Typedef Documentation

◆ DoGetTimeTrackControls

Definition at line 167 of file TimeTrackControls.cpp.

◆ GetDefaultTimeTrackHeight

Definition at line 176 of file TimeTrackControls.cpp.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
OnTimeTrackLinID 
OnTimeTrackLogID 
OnTimeTrackLogIntID 
OnSetTimeTrackRangeID 

Definition at line 33 of file TimeTrackControls.cpp.

34{
35 OnTimeTrackLinID = 30000,
39};
@ OnTimeTrackLogIntID
@ OnTimeTrackLinID
@ OnTimeTrackLogID
@ OnSetTimeTrackRangeID

Function Documentation

◆ AppendCheckItem()

AppendCheckItem ( "LogInterp"  ,
OnTimeTrackLogIntID  ,
XXO("Logarithmic &Interpolation")  ,
POPUP_MENU_FN(OnTimeTrackLogInt)  ,
[] (PopupMenuHandler &handler, wxMenu &menu, int id){ menu.Check(id, findTrack(handler) ->GetInterpolateLog());}   
)

References findTrack.

◆ AppendItem()

AppendItem ( "Range"  ,
OnSetTimeTrackRangeID  ,
XXO("&Range...")  ,
POPUP_MENU_FN(OnSetTimeTrackRange)   
)

◆ AppendRadioItem() [1/2]

AppendRadioItem ( "Linear"  ,
OnTimeTrackLinID  ,
XXO("&Linear scale")  ,
POPUP_MENU_FN(OnTimeTrackLin)  ,
[] (PopupMenuHandler &handler, wxMenu &menu, int id){ menu.Check(id, !findTrack(handler) ->GetDisplayLog());}   
)

References findTrack.

◆ AppendRadioItem() [2/2]

AppendRadioItem ( "Log"  ,
OnTimeTrackLogID  ,
XXO("L&ogarithmic scale")  ,
POPUP_MENU_FN(OnTimeTrackLog)  ,
[] (PopupMenuHandler &handler, wxMenu &menu, int id){ menu.Check(id, findTrack(handler) ->GetDisplayLog());}   
)

References findTrack.

◆ BeginSection() [1/2]

BeginSection ( "Other"  )

◆ BeginSection() [2/2]

BeginSection ( "Scales"  )

◆ DEFINE_ATTACHED_VIRTUAL_OVERRIDE()

DEFINE_ATTACHED_VIRTUAL_OVERRIDE ( DoGetTimeTrackControls  )

Definition at line 168 of file TimeTrackControls.cpp.

168 {
169 return [](TimeTrack &track) {
170 return std::make_shared<TimeTrackControls>( track.SharedPointer() );
171 };
172}
A kind of Track used to 'warp time'.
Definition: TimeTrack.h:24

◆ EndSection()

EndSection ( )

Variable Documentation

◆ findTrack

const auto findTrack
static
Initial value:
= []( PopupMenuHandler &handler ){
return static_cast<TimeTrack*>(
static_cast<TimeTrackMenuTable&>( handler ).mpData->pTrack );
}

Definition at line 132 of file TimeTrackControls.cpp.

Referenced by AppendCheckItem(), and AppendRadioItem().