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 , TRACK_REQUEST_VISIBLE , 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 1287 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.

TRACK_REQUEST_VISIBLE 

Posted when a track needs to be scrolled into view.

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 1289 of file Track.h.

1289 {
1292
1295
1298
1300
1301 PERMUTED,
1302
1304 RESIZING,
1305
1307 ADDITION,
1308
1310
1313 DELETION,
1314 };
@ RESIZING
Posted when some track changed its height.
Definition: Track.h:1304
@ SELECTION_CHANGE
Posted when the set of selected tracks changes.
Definition: Track.h:1291
@ DELETION
Posted when a track has been deleted from a tracklist. Also posted when one track replaces another.
Definition: Track.h:1313
@ ADDITION
Posted when a track has been added to a tracklist. Also posted when one track replaces another.
Definition: Track.h:1307
@ PERMUTED
Posted when tracks are reordered but otherwise unchanged.
Definition: Track.h:1301
@ TRACK_REQUEST_VISIBLE
Posted when a track needs to be scrolled into view.
Definition: Track.h:1297
@ TRACK_DATA_CHANGE
Posted when certain fields of a track change.
Definition: Track.h:1294

Constructor & Destructor Documentation

◆ TrackListEvent() [1/2]

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

Definition at line 1316 of file Track.h.

1317 {}, int extra = -1)
1318 : mType{ type }
1319 , mpTrack{ pTrack }
1320 , mExtra{ extra }
1321 {}
const int mExtra
Definition: Track.h:1327
const std::weak_ptr< Track > mpTrack
Definition: Track.h:1326
const Type mType
Definition: Track.h:1325

◆ TrackListEvent() [2/2]

TrackListEvent::TrackListEvent ( const TrackListEvent )
default

Member Data Documentation

◆ mExtra

const int TrackListEvent::mExtra

◆ mpTrack

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

◆ mType

const Type TrackListEvent::mType

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