Audacity 3.2.0
Namespaces | Macros | Typedefs | Functions
NoteTrackView.cpp File Reference
#include "NoteTrackView.h"
#include "NoteTrackDisplayData.h"
#include "WrapAllegro.h"
#include "NoteTrackVRulerControls.h"
#include "NoteTrack.h"
#include "AColor.h"
#include "AllThemeResources.h"
#include "../../../../HitTestResult.h"
#include "Theme.h"
#include "../../../../TrackArt.h"
#include "../../../../TrackArtist.h"
#include "../../../../TrackPanelDrawingContext.h"
#include "../../../../TrackPanelMouseEvent.h"
#include "ViewInfo.h"
#include "../../../ui/SelectHandle.h"
#include "StretchHandle.h"
#include "NoteTrackAffordanceControls.h"
#include <wx/dc.h>
#include "SyncLock.h"
Include dependency graph for NoteTrackView.cpp:

Go to the source code of this file.

Namespaces

namespace  anonymous_namespace{NoteTrackView.cpp}
 

Macros

#define TIME_TO_X(t)   (zoomInfo.TimeToPosition((t), rect.x))
 
#define X_TO_TIME(xx)   (zoomInfo.PositionToTime((xx), rect.x))
 
#define CLIP_MAX   16000
 
#define CLIP(xx)
 
#define RED(i)   ( unsigned char )( (((i) >> 16) & 0xff) )
 
#define GREEN(i)   ( unsigned char )( (((i) >> 8) & 0xff) )
 
#define BLUE(i)   ( unsigned char )( ((i) & 0xff) )
 

Typedefs

using DoGetNoteTrackView = DoGetView::Override< NoteTrack >
 
using GetNoteTrackSyncLockPolicy = GetSyncLockPolicy::Override< const NoteTrack >
 

Functions

 DEFINE_ATTACHED_VIRTUAL_OVERRIDE (DoGetNoteTrackView)
 
const char * anonymous_namespace{NoteTrackView.cpp}::IsShape (Alg_note_ptr note)
 
double anonymous_namespace{NoteTrackView.cpp}::LookupRealAttribute (Alg_note_ptr note, Alg_attribute attr, double def)
 
long anonymous_namespace{NoteTrackView.cpp}::LookupIntAttribute (Alg_note_ptr note, Alg_attribute attr, long def)
 
bool anonymous_namespace{NoteTrackView.cpp}::LookupLogicalAttribute (Alg_note_ptr note, Alg_attribute attr, bool def)
 
const char * anonymous_namespace{NoteTrackView.cpp}::LookupStringAttribute (Alg_note_ptr note, Alg_attribute attr, const char *def)
 
const char * anonymous_namespace{NoteTrackView.cpp}::LookupAtomAttribute (Alg_note_ptr note, Alg_attribute attr, char *def)
 
void anonymous_namespace{NoteTrackView.cpp}::DrawNoteBackground (TrackPanelDrawingContext &context, const NoteTrack *track, const wxRect &rect, const wxRect &sel, const wxBrush &wb, const wxPen &wp, const wxBrush &bb, const wxPen &bp, const wxPen &mp)
 
void anonymous_namespace{NoteTrackView.cpp}::DrawNoteTrack (TrackPanelDrawingContext &context, const NoteTrack *track, const wxRect &rect, bool muted, bool selected)
 
 DEFINE_ATTACHED_VIRTUAL_OVERRIDE (GetNoteTrackSyncLockPolicy)
 

Macro Definition Documentation

◆ BLUE

#define BLUE (   i)    ( unsigned char )( ((i) & 0xff) )

Definition at line 238 of file NoteTrackView.cpp.

◆ CLIP

#define CLIP (   xx)
Value:
{ long c = (xx); if (c < -CLIP_MAX) c = -CLIP_MAX; \
if (c > CLIP_MAX) c = CLIP_MAX; (xx) = c; }
#define CLIP_MAX

Definition at line 233 of file NoteTrackView.cpp.

◆ CLIP_MAX

#define CLIP_MAX   16000

Definition at line 232 of file NoteTrackView.cpp.

◆ GREEN

#define GREEN (   i)    ( unsigned char )( (((i) >> 8) & 0xff) )

Definition at line 237 of file NoteTrackView.cpp.

◆ RED

#define RED (   i)    ( unsigned char )( (((i) >> 16) & 0xff) )

Definition at line 236 of file NoteTrackView.cpp.

◆ TIME_TO_X

#define TIME_TO_X (   t)    (zoomInfo.TimeToPosition((t), rect.x))

Definition at line 76 of file NoteTrackView.cpp.

◆ X_TO_TIME

#define X_TO_TIME (   xx)    (zoomInfo.PositionToTime((xx), rect.x))

Definition at line 77 of file NoteTrackView.cpp.

Typedef Documentation

◆ DoGetNoteTrackView

Definition at line 63 of file NoteTrackView.cpp.

◆ GetNoteTrackSyncLockPolicy

Definition at line 757 of file NoteTrackView.cpp.

Function Documentation

◆ DEFINE_ATTACHED_VIRTUAL_OVERRIDE() [1/2]

DEFINE_ATTACHED_VIRTUAL_OVERRIDE ( DoGetNoteTrackView  )

Definition at line 64 of file NoteTrackView.cpp.

64 {
65 return [](NoteTrack &track, size_t) {
66 return std::make_shared<NoteTrackView>( track.SharedPointer() );
67 };
68}
A Track that is used for Midi notes. (Somewhat old code).
Definition: NoteTrack.h:86
std::shared_ptr< Subclass > SharedPointer()
Definition: Track.h:160

References Track::SharedPointer().

Here is the call graph for this function:

◆ DEFINE_ATTACHED_VIRTUAL_OVERRIDE() [2/2]

DEFINE_ATTACHED_VIRTUAL_OVERRIDE ( GetNoteTrackSyncLockPolicy  )

Definition at line 759 of file NoteTrackView.cpp.

759 {
760 return [](auto &) { return SyncLockPolicy::Grouped; };
761}
@ Grouped
Can be part of a group.

References Grouped.