![]() |
Audacity 3.2.0
|
#include <ViewInfo.h>
Public Member Functions | |
| PlayRegion ()=default | |
| PlayRegion (const PlayRegion &)=delete | |
| PlayRegion & | operator= (const PlayRegion &that) |
| bool | Active () const |
| void | SetActive (bool active) |
| bool | Empty () const |
| double | GetStart () const |
| double | GetEnd () const |
| double | GetLastActiveStart () const |
| double | GetLastActiveEnd () const |
| void | SetStart (double start) |
| void | SetEnd (double end) |
| void | SetTimes (double start, double end) |
| void | SetAllTimes (double start, double end) |
| void | Clear () |
| Set to an invalid state. More... | |
| bool | IsClear () const |
| Test whether in invalid state. More... | |
| bool | IsLastActiveRegionClear () const |
| Test whether last active region is in invalid state. More... | |
| void | Order () |
Public Member Functions inherited from Observer::Publisher< PlayRegionMessage > | |
| Publisher (ExceptionPolicy *pPolicy=nullptr, Alloc a={}) | |
| Constructor supporting type-erased custom allocation/deletion. More... | |
| Publisher (Publisher &&)=default | |
| Publisher & | operator= (Publisher &&)=default |
| Subscription | Subscribe (Callback callback) |
| Connect a callback to the Publisher; later-connected are called earlier. More... | |
| Subscription | Subscribe (Object &obj, Return(Object::*callback)(Args...)) |
| Overload of Subscribe takes an object and pointer-to-member-function. More... | |
Private Member Functions | |
| void | Notify () |
Private Attributes | |
| double | mStart { invalidValue } |
| double | mEnd { invalidValue } |
| double | mLastActiveStart { invalidValue } |
| double | mLastActiveEnd { invalidValue } |
| bool | mActive { false } |
Static Private Attributes | |
| static constexpr auto | invalidValue = -std::numeric_limits<double>::infinity() |
Additional Inherited Members | |
Public Types inherited from Observer::Publisher< PlayRegionMessage > | |
| using | message_type = PlayRegionMessage |
| using | CallbackReturn = std::conditional_t< true, void, bool > |
| using | Callback = std::function< CallbackReturn(const PlayRegionMessage &) > |
| Type of functions that can be connected to the Publisher. More... | |
Static Public Attributes inherited from Observer::Publisher< PlayRegionMessage > | |
| static constexpr bool | notifies_all |
Protected Member Functions inherited from Observer::Publisher< PlayRegionMessage > | |
| CallbackReturn | Publish (const PlayRegionMessage &message) |
| Send a message to connected callbacks. More... | |
Definition at line 107 of file ViewInfo.h.
|
default |
|
delete |
|
inline |
Definition at line 125 of file ViewInfo.h.
Referenced by AdornedRulerPanel::DoSelectionChange(), and anonymous_namespace{TransportMenus.cpp}::IsLoopingEnabled().
| void PlayRegion::Clear | ( | ) |
Set to an invalid state.
Definition at line 197 of file ViewInfo.cpp.
References invalidValue, and SetAllTimes().
|
inline |
Definition at line 128 of file ViewInfo.h.
Referenced by ProjectTempoListener::OnProjectTempoChange().
|
inline |
Definition at line 136 of file ViewInfo.h.
Referenced by IsClear(), ProjectTempoListener::OnProjectTempoChange(), and operator=().
|
inline |
Definition at line 150 of file ViewInfo.h.
Referenced by IsLastActiveRegionClear(), and operator=().
|
inline |
Definition at line 143 of file ViewInfo.h.
References min().
Referenced by IsLastActiveRegionClear(), and operator=().
|
inline |
Definition at line 129 of file ViewInfo.h.
References min().
Referenced by IsClear(), TimeToolBar::OnIdle(), ProjectTempoListener::OnProjectTempoChange(), operator=(), and TransportUtilities::PlayCurrentRegionAndWait().
| bool PlayRegion::IsClear | ( | ) | const |
Test whether in invalid state.
Definition at line 202 of file ViewInfo.cpp.
References GetEnd(), GetStart(), and invalidValue.
| bool PlayRegion::IsLastActiveRegionClear | ( | ) | const |
Test whether last active region is in invalid state.
Definition at line 207 of file ViewInfo.cpp.
References GetLastActiveEnd(), GetLastActiveStart(), and invalidValue.
|
private |
Definition at line 222 of file ViewInfo.cpp.
References Observer::Publisher< PlayRegionMessage >::Publish().
Referenced by Order(), SetActive(), SetEnd(), SetStart(), and SetTimes().
|
inline |
Definition at line 114 of file ViewInfo.h.
References GetEnd(), GetLastActiveEnd(), GetLastActiveStart(), GetStart(), and mActive.
| void PlayRegion::Order | ( | ) |
Definition at line 212 of file ViewInfo.cpp.
References mActive, mEnd, mLastActiveEnd, mLastActiveStart, mStart, Notify(), and anonymous_namespace{NoteTrack.cpp}::swap().
| void PlayRegion::SetActive | ( | bool | active | ) |
Definition at line 146 of file ViewInfo.cpp.
References mActive, mEnd, mLastActiveEnd, mLastActiveStart, mStart, and Notify().
| void PlayRegion::SetAllTimes | ( | double | start, |
| double | end | ||
| ) |
Definition at line 191 of file ViewInfo.cpp.
References details::end(), mLastActiveEnd, mLastActiveStart, and SetTimes().
Referenced by Clear().
| void PlayRegion::SetEnd | ( | double | end | ) |
Definition at line 171 of file ViewInfo.cpp.
References details::end(), mActive, mEnd, mLastActiveEnd, and Notify().
Referenced by AdornedRulerPanel::NewPlayRegionHandle::DoAdjust().
| void PlayRegion::SetStart | ( | double | start | ) |
Definition at line 161 of file ViewInfo.cpp.
References mActive, mLastActiveStart, mStart, and Notify().
Referenced by AdornedRulerPanel::ResizePlayRegionHandle::DoAdjust().
| void PlayRegion::SetTimes | ( | double | start, |
| double | end | ||
| ) |
Definition at line 181 of file ViewInfo.cpp.
References details::end(), mActive, mEnd, mLastActiveEnd, mLastActiveStart, mStart, and Notify().
Referenced by AdornedRulerPanel::MovePlayRegionHandle::DoAdjust(), AdornedRulerPanel::NewPlayRegionHandle::DoStartAdjust(), ProjectTempoListener::OnProjectTempoChange(), and SetAllTimes().
|
staticconstexprprivate |
Definition at line 177 of file ViewInfo.h.
Referenced by Clear(), IsClear(), and IsLastActiveRegionClear().
|
private |
Definition at line 184 of file ViewInfo.h.
Referenced by operator=(), Order(), SetActive(), SetEnd(), SetStart(), and SetTimes().
|
private |
Definition at line 180 of file ViewInfo.h.
Referenced by Order(), SetActive(), SetEnd(), and SetTimes().
|
private |
Definition at line 182 of file ViewInfo.h.
Referenced by Order(), SetActive(), SetAllTimes(), SetEnd(), and SetTimes().
|
private |
Definition at line 181 of file ViewInfo.h.
Referenced by Order(), SetActive(), SetAllTimes(), SetStart(), and SetTimes().
|
private |
Definition at line 179 of file ViewInfo.h.
Referenced by Order(), SetActive(), SetStart(), and SetTimes().