Audacity 3.2.0
|
Public Member Functions | |
WaveTrackMenuTable () | |
void | InitUserData (void *pUserData) override |
Called before the menu items are appended. More... | |
DECLARE_POPUP_MENU (WaveTrackMenuTable) | |
void | OnMultiView (wxCommandEvent &event) |
void | OnSetDisplay (wxCommandEvent &event) |
Set the Display mode based on the menu choice in the Track Menu. More... | |
void | OnMergeStereo (wxCommandEvent &event) |
Merge two tracks into one stereo track ?? More... | |
void | SplitStereo (bool stereo) |
Splits stereo track into two mono tracks, preserving panning if stereo is set. More... | |
void | OnSwapChannels (wxCommandEvent &event) |
Swap the left and right channels of a stero track... More... | |
void | OnSplitStereo (wxCommandEvent &event) |
Split a stereo track into two tracks... More... | |
void | OnSplitStereoMono (wxCommandEvent &event) |
Split a stereo track into two mono tracks... More... | |
Public Member Functions inherited from WaveTrackPopupMenuTable | |
WaveTrack & | FindWaveTrack () const |
int | ReserveId () |
PopupMenuTable (const Identifier &id, const TranslatableString &caption={}) | |
Public Member Functions inherited from PopupMenuTable | |
PopupMenuTable (const Identifier &id, const TranslatableString &caption={}) | |
const Identifier & | Id () const |
const TranslatableString & | Caption () const |
const auto * | GetRegistry () const |
const auto & | Get (void *pUserData) |
void | Clear () |
Public Member Functions inherited from PopupMenuHandler | |
PopupMenuHandler ()=default | |
PopupMenuHandler (const PopupMenuHandler &)=delete | |
PopupMenuHandler & | operator= (const PopupMenuHandler &)=delete |
virtual void | InitUserData (void *pUserData)=0 |
Called before the menu items are appended. More... | |
Static Public Member Functions | |
static WaveTrackMenuTable & | Instance () |
Static Public Member Functions inherited from PopupMenuTable | |
static std::unique_ptr< PopupMenu > | BuildMenu (PopupMenuTable *pTable, void *pUserData=NULL) |
static void | ExtendMenu (PopupMenu &menu, PopupMenuTable &otherTable) |
template<typename Table , typename Factory > | |
static auto | Adapt (const Factory &factory) |
Additional Inherited Members | |
Public Types inherited from PopupMenuTable | |
using | Entry = PopupMenuTableEntry |
Public Attributes inherited from WaveTrackPopupMenuTable | |
PlayableTrackControls::InitMenuData * | mpData {} |
Protected Member Functions inherited from PopupMenuTable | |
virtual void | Populate ()=0 |
template<typename Ptr > | |
void | Append (Ptr pItem) |
void | Append (const Identifier &stringId, PopupMenuTableEntry::Type type, int id, const TranslatableString &string, wxCommandEventFunction memFn, const PopupMenuTableEntry::InitFunction &init) |
void | AppendItem (const Identifier &stringId, int id, const TranslatableString &string, wxCommandEventFunction memFn, const PopupMenuTableEntry::InitFunction &init={}) |
void | AppendRadioItem (const Identifier &stringId, int id, const TranslatableString &string, wxCommandEventFunction memFn, const PopupMenuTableEntry::InitFunction &init={}) |
void | AppendCheckItem (const Identifier &stringId, int id, const TranslatableString &string, wxCommandEventFunction memFn, const PopupMenuTableEntry::InitFunction &init={}) |
void | BeginSection (const Identifier &name) |
void | EndSection () |
Static Protected Member Functions inherited from PopupMenuTable | |
static TranslatableString | MakeLabel (const TranslatableString &label, bool useExtra, const TranslatableString &extra) |
Protected Attributes inherited from WaveTrackPopupMenuTable | |
int | mNextId = 0 |
Protected Attributes inherited from PopupMenuTable | |
std::shared_ptr< PopupSubMenu > | mTop |
std::vector< PopupMenuGroupItem * > | mStack |
Identifier | mId |
TranslatableString | mCaption |
std::unique_ptr< PopupMenuGroupItem > | mRegistry |
Definition at line 499 of file WaveTrackControls.cpp.
|
inline |
Definition at line 503 of file WaveTrackControls.cpp.
References FirstAttachedItemId, and WaveTrackPopupMenuTable::mNextId.
WaveTrackMenuTable::DECLARE_POPUP_MENU | ( | WaveTrackMenuTable | ) |
|
overridevirtual |
Called before the menu items are appended.
Store context data, if needed. May be called more than once before the menu opens. Pointer remains valid for the duration of any callback, if PopupMenuTable::BuildMenu() is called and the result's Popup() is called before any other menus are built.
Implements PopupMenuHandler.
Definition at line 535 of file WaveTrackControls.cpp.
References WaveTrackPopupMenuTable::mpData.
|
static |
Definition at line 529 of file WaveTrackControls.cpp.
Referenced by WaveTrackControls::GetMenuExtension(), and GetWaveTrackMenuTable().
void WaveTrackMenuTable::OnMergeStereo | ( | wxCommandEvent & | event | ) |
Merge two tracks into one stereo track ??
Definition at line 746 of file WaveTrackControls.cpp.
References BasicUI::MessageBoxOptions::ButtonStyle(), PopupMenuTable::Caption(), RefreshCode::FixScrollbars, ProjectHistory::Get(), RealtimeEffectList::Get(), TrackList::Get(), WaveTrackFactory::Get(), ChannelView::Get(), WaveTrack::GetChannel(), WaveChannelView::GetFirst(), ChannelView::GetHeight(), ChannelView::GetMinimized(), WaveTrack::GetRate(), WaveTrack::GetSampleFormat(), RealtimeEffectList::GetStatesCount(), WaveTrack::Intervals(), MixAndRender(), WaveTrackPopupMenuTable::mpData, project, CommonTrackControls::InitMenuData::project, ProjectHistory::PushState(), RefreshCode::RefreshAll, CommonTrackControls::InitMenuData::result, WaveTrack::SetPan(), BasicUI::ShowMessageBox(), CommonTrackControls::InitMenuData::track, tracks, XO(), BasicUI::Yes, and BasicUI::YesNo.
void WaveTrackMenuTable::OnMultiView | ( | wxCommandEvent & | event | ) |
Definition at line 692 of file WaveTrackControls.cpp.
References WaveChannelView::GetFirst(), and WaveChannelViewConstants::Waveform.
void WaveTrackMenuTable::OnSetDisplay | ( | wxCommandEvent & | event | ) |
Set the Display mode based on the menu choice in the Track Menu.
Definition at line 709 of file WaveTrackControls.cpp.
References AllTypes(), ProjectHistory::Get(), WaveChannelView::GetFirst(), id, lastDisplayId, ProjectHistory::ModifyState(), WaveTrackPopupMenuTable::mpData, OnSetDisplayId, project, CommonTrackControls::InitMenuData::project, RefreshCode::RefreshAll, CommonTrackControls::InitMenuData::result, WaveChannelView::SetDisplay(), CommonTrackControls::InitMenuData::track, and RefreshCode::UpdateVRuler.
void WaveTrackMenuTable::OnSplitStereo | ( | wxCommandEvent & | event | ) |
Split a stereo track into two tracks...
Definition at line 896 of file WaveTrackControls.cpp.
References RefreshCode::FixScrollbars, ProjectHistory::Get(), Track::GetName(), WaveTrackPopupMenuTable::mpData, project, CommonTrackControls::InitMenuData::project, ProjectHistory::PushState(), RefreshCode::RefreshAll, CommonTrackControls::InitMenuData::result, SplitStereo(), CommonTrackControls::InitMenuData::track, and XO().
void WaveTrackMenuTable::OnSplitStereoMono | ( | wxCommandEvent & | event | ) |
Split a stereo track into two mono tracks...
Definition at line 911 of file WaveTrackControls.cpp.
References RefreshCode::FixScrollbars, ProjectHistory::Get(), Track::GetName(), WaveTrackPopupMenuTable::mpData, project, CommonTrackControls::InitMenuData::project, ProjectHistory::PushState(), RefreshCode::RefreshAll, CommonTrackControls::InitMenuData::result, SplitStereo(), CommonTrackControls::InitMenuData::track, and XO().
void WaveTrackMenuTable::OnSwapChannels | ( | wxCommandEvent & | event | ) |
Swap the left and right channels of a stero track...
Definition at line 880 of file WaveTrackControls.cpp.
References TrackFocus::Get(), ProjectHistory::Get(), Track::GetName(), WaveTrackPopupMenuTable::mpData, project, CommonTrackControls::InitMenuData::project, ProjectHistory::PushState(), RefreshCode::RefreshAll, CommonTrackControls::InitMenuData::result, WaveTrack::SwapChannels(), CommonTrackControls::InitMenuData::track, and XO().
void WaveTrackMenuTable::SplitStereo | ( | bool | stereo | ) |
Splits stereo track into two mono tracks, preserving panning if stereo
is set.
Split a stereo track (or more-than-stereo?) into two (or more) tracks...
Definition at line 848 of file WaveTrackControls.cpp.
References ChannelView::Get(), WaveTrack::GetChannel(), WaveTrackPopupMenuTable::mpData, project, CommonTrackControls::InitMenuData::project, ChannelView::SetExpandedHeight(), WaveTrack::SplitChannels(), and CommonTrackControls::InitMenuData::track.
Referenced by OnSplitStereo(), and OnSplitStereoMono().