Audacity 3.2.0
|
#include <SelectionState.h>
Public Member Functions | |
SelectionState ()=default | |
SelectionState (const SelectionState &)=delete | |
SelectionState & | operator= (const SelectionState &)=delete |
void | SelectTrack (Track &track, bool selected, bool updateLastPicked) |
void | SelectRangeOfTracks (TrackList &tracks, Track &sTrack, Track &eTrack) |
void | SelectNone (TrackList &tracks) |
void | ChangeSelectionOnShiftClick (TrackList &tracks, Track &track) |
void | HandleListSelection (TrackList &tracks, ViewInfo &viewInfo, Track &track, bool shift, bool ctrl, bool syncLocked) |
Public Member Functions inherited from ClientData::Base | |
virtual | ~Base () |
Static Public Member Functions | |
static SelectionState & | Get (AudacityProject &project) |
static const SelectionState & | Get (const AudacityProject &project) |
static void | SelectTrackLength (ViewInfo &viewInfo, Track &track, bool syncLocked) |
Private Attributes | |
std::weak_ptr< Track > | mLastPickedTrack |
Friends | |
class | SelectionStateChanger |
Definition at line 21 of file SelectionState.h.
|
default |
|
delete |
Definition at line 102 of file SelectionState.cpp.
References details::begin(), mLastPickedTrack, SelectNone(), SelectRangeOfTracks(), SelectTrack(), Track::SharedPointer(), and tracks.
Referenced by HandleListSelection().
|
static |
Definition at line 22 of file SelectionState.cpp.
Referenced by LabelGlyphHandle::Click(), SelectHandle::Click(), BackgroundHandle::Click(), ExportAudioDialog::DoExportSplitByTracks(), SelectUtilities::DoListSelection(), anonymous_namespace{NavigationMenus.cpp}::DoNextTrack(), anonymous_namespace{NavigationMenus.cpp}::DoPrevTrack(), SelectHandle::Drag(), Get(), LabelGlyphHandle::HandleGlyphDragRelease(), NavigationActions::Handler::OnToggle(), HighlitClipButtonHandle::UpdateTrackSelection(), and AffordanceHandle::UpdateTrackSelection().
|
static |
Definition at line 27 of file SelectionState.cpp.
References Get(), and project.
void SelectionState::HandleListSelection | ( | TrackList & | tracks, |
ViewInfo & | viewInfo, | ||
Track & | track, | ||
bool | shift, | ||
bool | ctrl, | ||
bool | syncLocked | ||
) |
Definition at line 136 of file SelectionState.cpp.
References ChangeSelectionOnShiftClick(), Track::GetSelected(), mLastPickedTrack, SelectNone(), SelectTrack(), SelectTrackLength(), and tracks.
|
delete |
void SelectionState::SelectNone | ( | TrackList & | tracks | ) |
Definition at line 96 of file SelectionState.cpp.
References SelectTrack(), and tracks.
Referenced by ChangeSelectionOnShiftClick(), BackgroundHandle::Click(), and HandleListSelection().
Definition at line 78 of file SelectionState.cpp.
References details::begin(), SelectTrack(), anonymous_namespace{NoteTrack.cpp}::swap(), and tracks.
Referenced by ChangeSelectionOnShiftClick().
void SelectionState::SelectTrack | ( | Track & | track, |
bool | selected, | ||
bool | updateLastPicked | ||
) |
Definition at line 51 of file SelectionState.cpp.
References mLastPickedTrack, Track::SetSelected(), and Track::SharedPointer().
Referenced by ChangeSelectionOnShiftClick(), HandleListSelection(), SelectNone(), and SelectRangeOfTracks().
|
static |
Set selection length to the length of a track – but if sync-lock is turned on, use the largest possible selection in the sync-lock group. If it's a stereo track, do the same for the stereo channels.
Definition at line 32 of file SelectionState.cpp.
References ChannelGroup::GetEndTime(), ChannelGroup::GetStartTime(), SyncLock::Group(), ViewInfo::selectedRegion, NotifyingSelectedRegion::setTimes(), and TrackList::SingletonRange().
Referenced by SelectHandle::Click(), HandleListSelection(), and NoteTrackAffordanceHandle::SelectAt().
|
friend |
Definition at line 52 of file SelectionState.h.
|
private |
Definition at line 53 of file SelectionState.h.
Referenced by ChangeSelectionOnShiftClick(), HandleListSelection(), SelectTrack(), and SelectionStateChanger::~SelectionStateChanger().