MCPcopy Create free account
hub / github.com/audacity/audacity / Visit

Method Visit

libraries/lib-menus/MenuRegistry.cpp:193–242  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

191}
192
193void MenuRegistry::Visit(Visitor<Traits> &visitor, AudacityProject &project)
194{
195 // Once only, cause initial population of preferences for the ordering
196 // of some menu items that used to be given in tables but are now separately
197 // registered in several .cpp files; the sequence of registration depends
198 // on unspecified accidents of static initialization order across
199 // compilation units, so we need something specific here to preserve old
200 // default appearance of menus.
201 // But this needs only to mention some strings -- there is no compilation or
202 // link dependency of this source file on those other implementation files.
203
204 static Registry::OrderingPreferenceInitializer init{
205 MenuPathStart,
206 {
207 {wxT(""), wxT(
208"File,Edit,Select,View,Transport,Tracks,Generate,Effect,Analyze,Tools,Window,Optional,Help"
209 )},
210 {wxT("/Optional/Extra/Part1"), wxT(
211"Transport,Tools,Mixer,Edit,PlayAtSpeed,Seek,Device,Select"
212 )},
213 {wxT("/Optional/Extra/Part2"), wxT(
214"Navigation,Focus,Cursor,Track,Scriptables1,Scriptables2"
215 )},
216 {wxT("/View/Windows"), wxT("UndoHistory,MixerBoard")},
217 {wxT("/Analyze/Analyzers/Windows"), wxT("ContrastAnalyser,PlotSpectrum")},
218 {wxT("/Transport/Basic"), wxT("Play,Record,Scrubbing,Cursor")},
219 {wxT("/View/Other/Toolbars/Toolbars/Other"), wxT(
220"ShowTransportTB,ShowToolsTB,ShowRecordMeterTB,ShowPlayMeterTB,"
221//"ShowMeterTB,"
222"ShowMixerTB,"
223"ShowEditTB,ShowTranscriptionTB,ShowScrubbingTB,ShowDeviceTB,ShowSelectionTB,"
224"ShowSpectralSelectionTB") },
225 {wxT("/Tracks/Add/Add"), wxT(
226"NewMonoTrack,NewStereoTrack,NewLabelTrack,NewTimeTrack")},
227 {wxT("/Optional/Extra/Part2/Scriptables1"), wxT(
228"SelectTime,SelectFrequencies,SelectTracks,SetTrackStatus,SetTrackAudio,"
229"SetTrackVisuals,GetPreference,SetPreference,SetClip,SetEnvelope,SetLabel"
230"SetProject") },
231 {wxT("/Optional/Extra/Part2/Scriptables2"), wxT(
232"Select,SetTrack,GetInfo,Message,Help,Import2,Export2,OpenProject2,"
233"SaveProject2,Drag,CompareAudio") },
234 }
235 };
236
237 static const auto menuTree = MenuRegistry::Items( MenuPathStart );
238
239 wxLogNull nolog;
240 Registry::VisitWithFunctions(visitor, menuTree.get(),
241 &MenuRegistry::ItemRegistry::Registry(), project);
242}

Callers 1

VisitorMethod · 0.45

Calls 3

VisitWithFunctionsFunction · 0.85
RegistryClass · 0.85
getMethod · 0.45

Tested by

no test coverage detected