Audacity 3.2.0
Public Types | Public Member Functions | Public Attributes | List of all members
TrackListEvent Struct Reference

Notification of changes in individual tracks of TrackList, or of TrackList's composition. More...

#include <Track.h>

Collaboration diagram for TrackListEvent:
[legend]

Public Types

enum  Type {
  SELECTION_CHANGE , TRACK_DATA_CHANGE , PERMUTED , RESIZING ,
  ADDITION , DELETION
}
 

Public Member Functions

 TrackListEvent (Type type, const std::weak_ptr< Track > &pTrack={}, int extra=-1)
 
 TrackListEvent (const TrackListEvent &)=default
 

Public Attributes

const Type mType
 
const std::weak_ptr< TrackmpTrack
 
const int mExtra
 

Detailed Description

Notification of changes in individual tracks of TrackList, or of TrackList's composition.

Definition at line 802 of file Track.h.

Member Enumeration Documentation

◆ Type

Enumerator
SELECTION_CHANGE 

Posted when the set of selected tracks changes.

TRACK_DATA_CHANGE 

Posted when certain fields of a track change.

PERMUTED 

Posted when tracks are reordered but otherwise unchanged.

mpTrack points to the moved track that is earliest in the New ordering.

RESIZING 

Posted when some track changed its height.

ADDITION 

Posted when a track has been added to a tracklist. Also posted when one track replaces another.

DELETION 

Posted when a track has been deleted from a tracklist. Also posted when one track replaces another.

mpTrack points to the removed track. It is expected, that track is valid during the event. ! mExtra is 1 if the track is being replaced by another track, 0 otherwise.

Definition at line 804 of file Track.h.

804 {
807
810
812
813 PERMUTED,
814
816 RESIZING,
817
819 ADDITION,
820
822
825 DELETION,
826 };
@ RESIZING
Posted when some track changed its height.
Definition: Track.h:816
@ SELECTION_CHANGE
Posted when the set of selected tracks changes.
Definition: Track.h:806
@ DELETION
Posted when a track has been deleted from a tracklist. Also posted when one track replaces another.
Definition: Track.h:825
@ ADDITION
Posted when a track has been added to a tracklist. Also posted when one track replaces another.
Definition: Track.h:819
@ PERMUTED
Posted when tracks are reordered but otherwise unchanged.
Definition: Track.h:813
@ TRACK_DATA_CHANGE
Posted when certain fields of a track change.
Definition: Track.h:809

Constructor & Destructor Documentation

◆ TrackListEvent() [1/2]

TrackListEvent::TrackListEvent ( Type  type,
const std::weak_ptr< Track > &  pTrack = {},
int  extra = -1 
)
inline

Definition at line 828 of file Track.h.

829 {}, int extra = -1)
830 : mType{ type }
831 , mpTrack{ pTrack }
832 , mExtra{ extra }
833 {}
const int mExtra
Definition: Track.h:839
const std::weak_ptr< Track > mpTrack
Definition: Track.h:838
const Type mType
Definition: Track.h:837

◆ TrackListEvent() [2/2]

TrackListEvent::TrackListEvent ( const TrackListEvent )
default

Member Data Documentation

◆ mExtra

const int TrackListEvent::mExtra

Definition at line 839 of file Track.h.

Referenced by RealtimeEffectPanel::RealtimeEffectPanel().

◆ mpTrack

const std::weak_ptr<Track> TrackListEvent::mpTrack

◆ mType

const Type TrackListEvent::mType

The documentation for this struct was generated from the following file: