Audacity  2.2.0
SnapManager Class Reference

#include <Snap.h>

Public Member Functions

 SnapManager (const TrackList *tracks, const ZoomInfo *zoomInfo, const TrackClipArray *clipExclusions=NULL, const TrackArray *trackExclusions=NULL, bool noTimeSnap=false, int pixelTolerance=kPixelTolerance)
 
 ~SnapManager ()
 
SnapResults Snap (Track *currentTrack, double t, bool rightEdge)
 

Static Public Member Functions

static wxArrayString GetSnapLabels ()
 
static wxArrayString GetSnapValues ()
 
static const wxString & GetSnapValue (int index)
 
static int GetSnapIndex (const wxString &value)
 
static void Draw (wxDC *dc, wxInt64 snap0, wxInt64 snap1)
 

Private Member Functions

void Reinit ()
 
void CondListAdd (double t, const Track *track)
 
double Get (size_t index)
 
wxInt64 PixelDiff (double t, size_t index)
 
size_t Find (double t, size_t i0, size_t i1)
 
size_t Find (double t)
 
bool SnapToPoints (Track *currentTrack, double t, bool rightEdge, double *outT)
 

Private Attributes

const AudacityProjectmProject
 
const TrackListmTracks
 
const TrackClipArraymClipExclusions
 
const TrackArray * mTrackExclusions
 
const ZoomInfomZoomInfo
 
int mPixelTolerance
 
bool mNoTimeSnap
 
double mEpsilon
 
SnapPointArray mSnapPoints
 
NumericConverter mConverter
 
bool mSnapToTime
 
int mSnapTo
 
double mRate
 
wxString mFormat
 

Constructor & Destructor Documentation

SnapManager::SnapManager ( const TrackList tracks,
const ZoomInfo zoomInfo,
const TrackClipArray clipExclusions = NULL,
const TrackArray *  trackExclusions = NULL,
bool  noTimeSnap = false,
int  pixelTolerance = kPixelTolerance 
)
SnapManager::~SnapManager ( )

Member Function Documentation

void SnapManager::CondListAdd ( double  t,
const Track track 
)
private
void SnapManager::Draw ( wxDC *  dc,
wxInt64  snap0,
wxInt64  snap1 
)
static
size_t SnapManager::Find ( double  t,
size_t  i0,
size_t  i1 
)
private

References Get().

Referenced by Find(), and SnapToPoints().

size_t SnapManager::Find ( double  t)
private

References Find(), Get(), mSnapPoints, and PixelDiff().

double SnapManager::Get ( size_t  index)
private

References mSnapPoints.

Referenced by Find(), PixelDiff(), and SnapToPoints().

int SnapManager::GetSnapIndex ( const wxString &  value)
static

References GetSnapValues(), and SNAP_OFF.

wxArrayString SnapManager::GetSnapLabels ( )
static

References _().

Referenced by SelectionBar::Populate().

const wxString & SnapManager::GetSnapValue ( int  index)
static

References GetSnapValues(), and SNAP_OFF.

wxArrayString SnapManager::GetSnapValues ( )
static

Referenced by GetSnapIndex(), and GetSnapValue().

wxInt64 SnapManager::PixelDiff ( double  t,
size_t  index 
)
private

References Get(), mZoomInfo, and ZoomInfo::TimeToPosition().

Referenced by Find(), and SnapToPoints().

bool SnapManager::SnapToPoints ( Track currentTrack,
double  t,
bool  rightEdge,
double *  outT 
)
private

Member Data Documentation

const TrackClipArray* SnapManager::mClipExclusions
private

Referenced by Reinit(), and SnapManager().

NumericConverter SnapManager::mConverter
private

Referenced by CondListAdd(), and Reinit().

double SnapManager::mEpsilon
private

Referenced by SnapManager(), and SnapToPoints().

wxString SnapManager::mFormat
private

Referenced by Reinit(), and SnapManager().

bool SnapManager::mNoTimeSnap
private

Referenced by Reinit(), and SnapManager().

int SnapManager::mPixelTolerance
private

Referenced by SnapManager(), and SnapToPoints().

const AudacityProject* SnapManager::mProject
private

Referenced by Reinit(), and SnapManager().

double SnapManager::mRate
private

Referenced by Reinit(), and SnapManager().

SnapPointArray SnapManager::mSnapPoints
private
int SnapManager::mSnapTo
private

Referenced by Reinit(), and SnapManager().

bool SnapManager::mSnapToTime
private

Referenced by CondListAdd(), and Reinit().

const TrackArray* SnapManager::mTrackExclusions
private

Referenced by Reinit(), and SnapManager().

const TrackList* SnapManager::mTracks
private

Referenced by Reinit(), and SnapManager().

const ZoomInfo* SnapManager::mZoomInfo
private

Referenced by PixelDiff(), and SnapManager().


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