Audacity  3.0.3
ViewMenus.cpp
Go to the documentation of this file.
1 #include "../CommonCommandFlags.h"
2 #include "../Menus.h"
3 #include "Prefs.h"
4 #include "Project.h"
5 #include "../ProjectHistory.h"
6 #include "../ProjectSettings.h"
7 #include "../ProjectWindow.h"
8 #include "../Track.h"
9 #include "../TrackInfo.h"
10 #include "../TrackPanel.h"
11 #include "../UndoManager.h"
12 #include "ViewInfo.h"
13 #include "../commands/CommandContext.h"
14 #include "../commands/CommandManager.h"
15 #include "../prefs/GUIPrefs.h"
16 #include "../prefs/TracksPrefs.h"
17 #include "../tracks/ui/TrackView.h"
18 
19 #ifdef EXPERIMENTAL_EFFECTS_RACK
20 #include "../effects/EffectUI.h"
21 #endif
22 
23 #include <wx/app.h>
24 #include <wx/scrolbar.h>
25 
26 // private helper classes and functions
27 namespace {
28 
29 double GetZoomOfSelection( const AudacityProject &project )
30 {
31  auto &viewInfo = ViewInfo::Get( project );
32  auto &window = ProjectWindow::Get( project );
33 
34  const double lowerBound =
35  std::max(viewInfo.selectedRegion.t0(),
36  window.ScrollingLowerBoundTime());
37  const double denom =
38  viewInfo.selectedRegion.t1() - lowerBound;
39  if (denom <= 0.0)
40  return viewInfo.GetZoom();
41 
42  // LL: The "-1" is just a hack to get around an issue where zooming to
43  // selection doesn't actually get the entire selected region within the
44  // visible area. This causes a problem with scrolling at end of playback
45  // where the selected region may be scrolled off the left of the screen.
46  // I know this isn't right, but until the real rounding or 1-off issue is
47  // found, this will have to work.
48  // PRL: Did I fix this? I am not sure, so I leave the hack in place.
49  // Fixes might have resulted from commits
50  // 1b8f44d0537d987c59653b11ed75a842b48896ea and
51  // e7c7bb84a966c3b3cc4b3a9717d5f247f25e7296
52  auto width = viewInfo.GetTracksUsableWidth();
53  return (width - 1) / denom;
54 }
55 
56 double GetZoomOfPreset( const AudacityProject &project, int preset )
57 {
58 
59  // Sets a limit on how far we will zoom out as a factor over zoom to fit.
60  const double maxZoomOutFactor = 4.0;
61  // Sets how many pixels we allow for one uint, such as seconds.
62  const double pixelsPerUnit = 5.0;
63 
64  double result = 1.0;
65  auto &window = ProjectWindow::Get( project );
66  double zoomToFit = window.GetZoomOfToFit();
67  using namespace WaveTrackViewConstants;
68  switch( preset ){
69  default:
70  case kZoomDefault:
71  result = ZoomInfo::GetDefaultZoom();
72  break;
73  case kZoomToFit:
74  result = zoomToFit;
75  break;
76  case kZoomToSelection:
77  result = GetZoomOfSelection( project );
78  break;
79  case kZoomMinutes:
80  result = pixelsPerUnit * 1.0/60;
81  break;
82  case kZoomSeconds:
83  result = pixelsPerUnit * 1.0;
84  break;
85  case kZoom5ths:
86  result = pixelsPerUnit * 5.0;
87  break;
88  case kZoom10ths:
89  result = pixelsPerUnit * 10.0;
90  break;
91  case kZoom20ths:
92  result = pixelsPerUnit * 20.0;
93  break;
94  case kZoom50ths:
95  result = pixelsPerUnit * 50.0;
96  break;
97  case kZoom100ths:
98  result = pixelsPerUnit * 100.0;
99  break;
100  case kZoom500ths:
101  result = pixelsPerUnit * 500.0;
102  break;
103  case kZoomMilliSeconds:
104  result = pixelsPerUnit * 1000.0;
105  break;
106  case kZoomSamples:
107  result = 44100.0;
108  break;
109  case kZoom4To1:
110  result = 44100.0 * 4;
111  break;
112  case kMaxZoom:
113  result = ZoomInfo::GetMaxZoom();
114  break;
115  };
116  if( result < (zoomToFit/maxZoomOutFactor) )
117  result = zoomToFit / maxZoomOutFactor;
118  return result;
119 }
120 
121 }
122 
123 namespace {
125 {
126  auto &viewInfo = ViewInfo::Get( project );
127  auto &tracks = TrackList::Get( project );
128 
129  // Only nonminimized audio tracks will be resized
130  auto range = tracks.Any<AudioTrack>()
131  - [](const Track *pTrack){
132  return TrackView::Get( *pTrack ).GetMinimized(); };
133  auto count = range.size();
134  if (count == 0)
135  return;
136 
137  // Find total height to apportion
138  auto height = viewInfo.GetHeight();
139  height -= 28;
140 
141  // The height of minimized and non-audio tracks cannot be apportioned
142  height -=
143  tracks.Any().sum( TrackView::GetTrackHeight )
144  - range.sum( TrackView::GetTrackHeight );
145 
146  // Give each resized track the average of the remaining height
147  // Bug 2803: Cast count to int, because otherwise the result of
148  // division will be unsigned too, and will be a very large number
149  // if height was negative!
150  height = height / (int)count;
151  // Use max() so that we don't set a negative height when there is
152  // not enough room.
153  height = std::max( (int)TrackInfo::MinimumTrackHeight(), height );
154 
155  for (auto t : range)
156  TrackView::Get( *t ).SetExpandedHeight(height);
157 }
158 }
159 
160 namespace ViewActions {
161 
162 // Menu handler functions
163 
164 struct Handler final
165  : CommandHandlerObject // MUST be the first base class!
167 {
168 
169 void OnZoomIn(const CommandContext &context)
170 {
171  auto &project = context.project;
172  auto &trackPanel = TrackPanel::Get( project );
173  auto &window = ProjectWindow::Get( project );
174  window.ZoomInByFactor( 2.0 );
175  trackPanel.Refresh(false);
176 }
177 
178 void OnZoomNormal(const CommandContext &context)
179 {
180  auto &project = context.project;
181  auto &trackPanel = TrackPanel::Get( project );
182  auto &window = ProjectWindow::Get( project );
183 
184  window.Zoom(ZoomInfo::GetDefaultZoom());
185  trackPanel.Refresh(false);
186 }
187 
188 void OnZoomOut(const CommandContext &context)
189 {
190  auto &project = context.project;
191  auto &window = ProjectWindow::Get( project );
192  window.ZoomOutByFactor( 1 /2.0 );
193 }
194 
195 void OnZoomSel(const CommandContext &context)
196 {
197  auto &project = context.project;
198  auto &selectedRegion = ViewInfo::Get( project ).selectedRegion;
199  auto &window = ProjectWindow::Get( project );
200 
201  window.Zoom( GetZoomOfSelection( project ) );
202  window.TP_ScrollWindow(selectedRegion.t0());
203 }
204 
205 void OnZoomToggle(const CommandContext &context)
206 {
207  auto &project = context.project;
208  auto &viewInfo = ViewInfo::Get( project );
209  auto &trackPanel = TrackPanel::Get( project );
210  auto &window = ProjectWindow::Get( project );
211 
212 // const double origLeft = viewInfo.h;
213 // const double origWidth = viewInfo.GetScreenEndTime() - origLeft;
214 
215  // Choose the zoom that is most different to the current zoom.
216  double Zoom1 = GetZoomOfPreset( project, TracksPrefs::Zoom1Choice() );
217  double Zoom2 = GetZoomOfPreset( project, TracksPrefs::Zoom2Choice() );
218  double Z = viewInfo.GetZoom();// Current Zoom.
219  double ChosenZoom =
220  fabs(log(Zoom1 / Z)) > fabs(log( Z / Zoom2)) ? Zoom1:Zoom2;
221 
222  window.Zoom(ChosenZoom);
223  trackPanel.Refresh(false);
224 // const double newWidth = GetScreenEndTime() - viewInfo.h;
225 // const double newh = origLeft + (origWidth - newWidth) / 2;
226 // TP_ScrollWindow(newh);
227 }
228 
229 void OnZoomFit(const CommandContext &context)
230 {
231  auto &project = context.project;
232  auto &window = ProjectWindow::Get( project );
233  window.DoZoomFit();
234 }
235 
236 void OnZoomFitV(const CommandContext &context)
237 {
238  auto &project = context.project;
239  auto &window = ProjectWindow::Get( project );
240 
241  DoZoomFitV(project);
242 
243  window.GetVerticalScrollBar().SetThumbPosition(0);
244  ProjectHistory::Get( project ).ModifyState(true);
245 }
246 
247 void OnAdvancedVZoom(const CommandContext &context)
248 {
249  auto &project = context.project;
250  auto &commandManager = CommandManager::Get( project );
251 
252  bool checked = !gPrefs->Read(wxT("/GUI/VerticalZooming"), 0L);
253  gPrefs->Write(wxT("/GUI/VerticalZooming"), checked);
254  gPrefs->Flush();
255  commandManager.Check(wxT("AdvancedVZoom"), checked);
257 }
258 
260 {
261  auto &project = context.project;
262  auto &tracks = TrackList::Get( project );
263  auto &window = ProjectWindow::Get( project );
264 
265  for (auto t : tracks.Any())
266  TrackView::Get( *t ).SetMinimized(true);
267 
268  ProjectHistory::Get( project ).ModifyState(true);
269 }
270 
271 void OnExpandAllTracks(const CommandContext &context)
272 {
273  auto &project = context.project;
274  auto &tracks = TrackList::Get( project );
275  auto &window = ProjectWindow::Get( project );
276 
277  for (auto t : tracks.Any())
278  TrackView::Get( *t ).SetMinimized(false);
279 
280  ProjectHistory::Get( project ).ModifyState(true);
281 }
282 
283 void OnGoSelStart(const CommandContext &context)
284 {
285  auto &project = context.project;
286  auto &viewInfo = ViewInfo::Get( project );
287  auto &selectedRegion = viewInfo.selectedRegion;
288  auto &window = ProjectWindow::Get( project );
289 
290  if (selectedRegion.isPoint())
291  return;
292 
293  window.TP_ScrollWindow(
294  selectedRegion.t0() - ((viewInfo.GetScreenEndTime() - viewInfo.h) / 2));
295 }
296 
297 void OnGoSelEnd(const CommandContext &context)
298 {
299  auto &project = context.project;
300  auto &viewInfo = ViewInfo::Get( project );
301  auto &selectedRegion = viewInfo.selectedRegion;
302  auto &window = ProjectWindow::Get( project );
303 
304  if (selectedRegion.isPoint())
305  return;
306 
307  window.TP_ScrollWindow(
308  selectedRegion.t1() - ((viewInfo.GetScreenEndTime() - viewInfo.h) / 2));
309 }
310 
311 void OnShowExtraMenus(const CommandContext &context)
312 {
313  auto &project = context.project;
314  auto &commandManager = CommandManager::Get( project );
315 
316  bool checked = !gPrefs->Read(wxT("/GUI/ShowExtraMenus"), 0L);
317  gPrefs->Write(wxT("/GUI/ShowExtraMenus"), checked);
318  gPrefs->Flush();
319  commandManager.Check(wxT("ShowExtraMenus"), checked);
321 }
322 
323 void OnShowClipping(const CommandContext &context)
324 {
325  auto &project = context.project;
326  auto &commandManager = CommandManager::Get( project );
327  auto &trackPanel = TrackPanel::Get( project );
328 
329  bool checked = !gPrefs->Read(wxT("/GUI/ShowClipping"), 0L);
330  gPrefs->Write(wxT("/GUI/ShowClipping"), checked);
331  gPrefs->Flush();
332  commandManager.Check(wxT("ShowClipping"), checked);
333 
335 
336  trackPanel.Refresh(false);
337 }
338 
339 void OnShowNameOverlay(const CommandContext &context)
340 {
341  auto &project = context.project;
342  auto &commandManager = CommandManager::Get( project );
343  auto &trackPanel = TrackPanel::Get( project );
344 
345  bool checked = !gPrefs->Read(wxT("/GUI/ShowTrackNameInWaveform"), 0L);
346  gPrefs->Write(wxT("/GUI/ShowTrackNameInWaveform"), checked);
347  gPrefs->Flush();
348  commandManager.Check(wxT("ShowTrackNameInWaveform"), checked);
349 
351 
352  trackPanel.Refresh(false);
353 }
354 
355 #if defined(EXPERIMENTAL_EFFECTS_RACK)
356 void OnShowEffectsRack(const CommandContext &context )
357 {
358  auto &rack = EffectRack::Get( context.project );
359  rack.Show( !rack.IsShown() );
360 }
361 #endif
362 
363 // Not a menu item, but a listener for events
364 void OnUndoPushed( wxCommandEvent &evt )
365 {
366  evt.Skip();
367  const auto &settings = ProjectSettings::Get( mProject );
368  if (settings.GetTracksFitVerticallyZoomed())
369  DoZoomFitV( mProject );
370 }
371 
373  : mProject{ project }
374 {
375  mProject.Bind( EVT_UNDO_PUSHED, &Handler::OnUndoPushed, this );
376 }
377 
379 {
380  mProject.Unbind( EVT_UNDO_PUSHED, &Handler::OnUndoPushed, this );
381 }
382 Handler( const Handler & ) PROHIBITED;
383 Handler &operator=( const Handler & ) PROHIBITED;
384 
386 
387 }; // struct Handler
388 
389 } // namespace
390 
391 // Handler needs a back-reference to the project, so needs a factory registered
392 // with AudacityProject.
394  []( AudacityProject &project ) {
395  return std::make_unique< ViewActions::Handler >( project ); } };
396 
398  return project.AttachedObjects::Get< ViewActions::Handler >( key );
399 };
400 
401 // Menu definitions
402 
403 #define FN(X) (& ViewActions::Handler :: X)
404 
405 // Under /MenuBar
406 namespace {
407 using namespace MenuTable;
409 {
411 
412  static BaseItemSharedPtr menu{
414  Menu( wxT("View"), XXO("&View"),
415  Section( "Basic",
416  Menu( wxT("Zoom"), XXO("&Zoom"),
417  Section( "",
418  Command( wxT("ZoomIn"), XXO("Zoom &In"), FN(OnZoomIn),
419  ZoomInAvailableFlag(), wxT("Ctrl+1") ),
420  Command( wxT("ZoomNormal"), XXO("Zoom &Normal"), FN(OnZoomNormal),
421  TracksExistFlag(), wxT("Ctrl+2") ),
422  Command( wxT("ZoomOut"), XXO("Zoom &Out"), FN(OnZoomOut),
423  ZoomOutAvailableFlag(), wxT("Ctrl+3") ),
424  Command( wxT("ZoomSel"), XXO("&Zoom to Selection"), FN(OnZoomSel),
425  TimeSelectedFlag(), wxT("Ctrl+E") ),
426  Command( wxT("ZoomToggle"), XXO("Zoom &Toggle"), FN(OnZoomToggle),
427  TracksExistFlag(), wxT("Shift+Z") )
428  ),
429  Section( "",
430  Command( wxT("AdvancedVZoom"), XXO("Advanced &Vertical Zooming"),
431  FN(OnAdvancedVZoom), AlwaysEnabledFlag,
432  Options{}.CheckTest( wxT("/GUI/VerticalZooming"), false ) )
433  )
434  ),
435 
436  Menu( wxT("TrackSize"), XXO("T&rack Size"),
437  Command( wxT("FitInWindow"), XXO("&Fit to Width"), FN(OnZoomFit),
438  TracksExistFlag(), wxT("Ctrl+F") ),
439  Command( wxT("FitV"), XXO("Fit to &Height"), FN(OnZoomFitV),
440  TracksExistFlag(), wxT("Ctrl+Shift+F") ),
441  Command( wxT("CollapseAllTracks"), XXO("&Collapse All Tracks"),
442  FN(OnCollapseAllTracks), TracksExistFlag(), wxT("Ctrl+Shift+C") ),
443  Command( wxT("ExpandAllTracks"), XXO("E&xpand Collapsed Tracks"),
444  FN(OnExpandAllTracks), TracksExistFlag(), wxT("Ctrl+Shift+X") )
445  ),
446 
447  Menu( wxT("SkipTo"), XXO("Sk&ip to"),
448  Command( wxT("SkipSelStart"), XXO("Selection Sta&rt"),
449  FN(OnGoSelStart), TimeSelectedFlag(),
450  Options{ wxT("Ctrl+["), XO("Skip to Selection Start") } ),
451  Command( wxT("SkipSelEnd"), XXO("Selection En&d"), FN(OnGoSelEnd),
453  Options{ wxT("Ctrl+]"), XO("Skip to Selection End") } )
454  )
455  ),
456 
457  Section( "Windows" ),
458 
459  Section( "Other",
460  Command( wxT("ShowExtraMenus"), XXO("&Extra Menus (on/off)"),
461  FN(OnShowExtraMenus), AlwaysEnabledFlag,
462  Options{}.CheckTest( wxT("/GUI/ShowExtraMenus"), false ) ),
463  Command( wxT("ShowTrackNameInWaveform"), XXO("Track &Name (on/off)"),
464  FN(OnShowNameOverlay), AlwaysEnabledFlag,
465  Options{}.CheckTest( wxT("/GUI/ShowTrackNameInWaveform"), false ) ),
466  Command( wxT("ShowClipping"), XXO("&Show Clipping (on/off)"),
467  FN(OnShowClipping), AlwaysEnabledFlag,
468  Options{}.CheckTest( wxT("/GUI/ShowClipping"), false ) )
469  #if defined(EXPERIMENTAL_EFFECTS_RACK)
470  ,
471  Command( wxT("ShowEffectsRack"), XXO("Show Effects Rack"),
472  FN(OnShowEffectsRack), AlwaysEnabledFlag,
473  Options{}.CheckTest( [](AudacityProject &project){
474  auto &rack = EffectRack::Get( project );
475  return rack.IsShown(); } ) )
476  #endif
477  )
478  ) ) };
479  return menu;
480 
481 }
482 
484  wxT(""),
485  Shared( ViewMenu() )
486 };
487 }
488 
489 #undef FN
TracksPrefs::Zoom1Choice
static WaveTrackViewConstants::ZoomPresets Zoom1Choice()
Definition: TracksPrefs.cpp:257
ShowClippingPrefsID
int ShowClippingPrefsID()
Definition: GUIPrefs.cpp:274
ProjectHistory::ModifyState
void ModifyState(bool bWantsAutoSave)
Definition: ProjectHistory.cpp:124
ViewInfo::Get
static ViewInfo & Get(AudacityProject &project)
Definition: ViewInfo.cpp:241
ViewActions::Handler::OnCollapseAllTracks
void OnCollapseAllTracks(const CommandContext &context)
Definition: ViewMenus.cpp:259
WaveTrackViewConstants::kZoomToSelection
@ kZoomToSelection
Definition: WaveTrackViewConstants.h:53
ViewActions::Handler::mProject
AudacityProject & mProject
Definition: ViewMenus.cpp:385
ViewActions::Handler::OnUndoPushed
void OnUndoPushed(wxCommandEvent &evt)
Definition: ViewMenus.cpp:364
MenuTable::FinderScope
Definition: CommandManager.h:485
TrackView::Get
static TrackView & Get(Track &)
Definition: TrackView.cpp:63
TrackView::SetMinimized
void SetMinimized(bool minimized)
Definition: TrackView.cpp:77
gPrefs
FileConfig * gPrefs
Definition: Prefs.cpp:70
ViewActions::Handler::OnShowClipping
void OnShowClipping(const CommandContext &context)
Definition: ViewMenus.cpp:323
TrackView::GetMinimized
bool GetMinimized() const
Definition: TrackView.h:49
ZoomInfo::GetDefaultZoom
static double GetDefaultZoom()
Definition: ZoomInfo.h:123
Project.h
TrackInfo::MinimumTrackHeight
AUDACITY_DLL_API unsigned MinimumTrackHeight()
Definition: TrackInfo.cpp:195
FN
#define FN(X)
Definition: ViewMenus.cpp:403
anonymous_namespace{ViewMenus.cpp}::GetZoomOfSelection
double GetZoomOfSelection(const AudacityProject &project)
Definition: ViewMenus.cpp:29
ViewActions::Handler::OnShowExtraMenus
void OnShowExtraMenus(const CommandContext &context)
Definition: ViewMenus.cpp:311
WaveTrackViewConstants
Definition: WaveTrackView.h:17
ViewActions::Handler::OnZoomOut
void OnZoomOut(const CommandContext &context)
Definition: ViewMenus.cpp:188
TrackView::SetExpandedHeight
void SetExpandedHeight(int height)
Definition: TrackView.cpp:157
WaveTrackViewConstants::kZoomSeconds
@ kZoomSeconds
Definition: WaveTrackViewConstants.h:56
WaveTrackViewConstants::kZoomDefault
@ kZoomDefault
Definition: WaveTrackViewConstants.h:54
Registry::Shared
std::unique_ptr< SharedItem > Shared(const BaseItemSharedPtr &ptr)
Definition: Registry.h:93
TrackPanel::Get
static TrackPanel & Get(AudacityProject &project)
Definition: TrackPanel.cpp:227
TrackView::GetTrackHeight
static int GetTrackHeight(const Track *pTrack)
Definition: TrackView.cpp:29
XO
#define XO(s)
Definition: Internat.h:31
ProjectSettings::Get
static ProjectSettings & Get(AudacityProject &project)
Definition: ProjectSettings.cpp:44
ViewActions::Handler::OnZoomToggle
void OnZoomToggle(const CommandContext &context)
Definition: ViewMenus.cpp:205
ClientData::Base
A convenient default parameter for class template Site.
Definition: ClientData.h:28
ProjectWindow::Get
static ProjectWindow & Get(AudacityProject &project)
Definition: ProjectWindow.cpp:535
AlwaysEnabledFlag
constexpr CommandFlag AlwaysEnabledFlag
Definition: CommandFlag.h:35
MenuTable::AttachedItem
Definition: CommandManager.h:708
ShowTrackNameInWaveformPrefsID
int ShowTrackNameInWaveformPrefsID()
Definition: GUIPrefs.cpp:280
ViewActions::Handler::OnZoomFitV
void OnZoomFitV(const CommandContext &context)
Definition: ViewMenus.cpp:236
ViewActions::Handler::OnZoomNormal
void OnZoomNormal(const CommandContext &context)
Definition: ViewMenus.cpp:178
ViewActions::Handler::Handler
Handler(AudacityProject &project)
Definition: ViewMenus.cpp:372
PrefsListener::Broadcast
static void Broadcast(int id=0)
Call this static function to notify all PrefsListener objects.
Definition: Prefs.cpp:100
ClientData::Site::RegisteredFactory
Client code makes static instance from a factory of attachments; passes it to Get or Find as a retrie...
Definition: ClientData.h:266
ViewActions::Handler::OnZoomFit
void OnZoomFit(const CommandContext &context)
Definition: ViewMenus.cpp:229
MenuCreator::RebuildAllMenuBars
static void RebuildAllMenuBars()
Definition: Menus.cpp:679
ViewActions::Handler::Handler
Handler(const Handler &) PROHIBITED
ZoomInfo::GetMaxZoom
static double GetMaxZoom()
Definition: ZoomInfo.cpp:81
anonymous_namespace{ViewMenus.cpp}::GetZoomOfPreset
double GetZoomOfPreset(const AudacityProject &project, int preset)
Definition: ViewMenus.cpp:56
ViewActions
Definition: ViewMenus.cpp:160
ViewInfo::selectedRegion
NotifyingSelectedRegion selectedRegion
Definition: ViewInfo.h:229
XXO
#define XXO(s)
Definition: Internat.h:44
WaveTrackViewConstants::kZoom500ths
@ kZoom500ths
Definition: WaveTrackViewConstants.h:62
CommandContext
CommandContext provides additional information to an 'Apply()' command. It provides the project,...
Definition: CommandContext.h:34
BasicUI::Get
Services * Get()
Fetch the global instance, or nullptr if none is yet installed.
Definition: BasicUI.cpp:26
Registry::BaseItemSharedPtr
std::shared_ptr< BaseItem > BaseItemSharedPtr
Definition: Registry.h:72
WaveTrackViewConstants::kZoom5ths
@ kZoom5ths
Definition: WaveTrackViewConstants.h:57
WaveTrackViewConstants::kZoomSamples
@ kZoomSamples
Definition: WaveTrackViewConstants.h:64
ViewActions::Handler::operator=
Handler & operator=(const Handler &) PROHIBITED
ViewActions::Handler::OnShowNameOverlay
void OnShowNameOverlay(const CommandContext &context)
Definition: ViewMenus.cpp:339
AudioTrack
Track subclass holding data representing sound (as notes, or samples, or ...)
Definition: Track.h:838
WaveTrackViewConstants::kZoom100ths
@ kZoom100ths
Definition: WaveTrackViewConstants.h:61
WaveTrackViewConstants::kZoomMinutes
@ kZoomMinutes
Definition: WaveTrackViewConstants.h:55
anonymous_namespace{ViewMenus.cpp}::sAttachment1
AttachedItem sAttachment1
Definition: ViewMenus.cpp:483
WaveTrackViewConstants::kZoomMilliSeconds
@ kZoomMilliSeconds
Definition: WaveTrackViewConstants.h:63
TracksExistFlag
const ReservedCommandFlag & TracksExistFlag()
Definition: CommonCommandFlags.cpp:173
WaveTrackViewConstants::kZoom10ths
@ kZoom10ths
Definition: WaveTrackViewConstants.h:58
ViewInfo.h
ViewActions::Handler::OnExpandAllTracks
void OnExpandAllTracks(const CommandContext &context)
Definition: ViewMenus.cpp:271
ZoomOutAvailableFlag
const ReservedCommandFlag & ZoomOutAvailableFlag()
Definition: CommonCommandFlags.cpp:263
ViewActions::Handler::OnGoSelEnd
void OnGoSelEnd(const CommandContext &context)
Definition: ViewMenus.cpp:297
WaveTrackViewConstants::kZoom20ths
@ kZoom20ths
Definition: WaveTrackViewConstants.h:59
ZoomInAvailableFlag
const ReservedCommandFlag & ZoomInAvailableFlag()
Definition: CommonCommandFlags.cpp:253
FileConfig::Flush
virtual bool Flush(bool bCurrentOnly=false) wxOVERRIDE
Definition: FileConfig.cpp:143
TrackList::Get
static TrackList & Get(AudacityProject &project)
Definition: Track.cpp:506
Track
Abstract base class for an object holding data associated with points on a time axis.
Definition: Track.h:239
MenuTable::Command
std::unique_ptr< CommandItem > Command(const CommandID &name, const TranslatableString &label_in, void(Handler::*pmf)(const CommandContext &), CommandFlag flags, const CommandManager::Options &options={}, CommandHandlerFinder finder=FinderScope::DefaultFinder())
Definition: CommandManager.h:675
AudacityProject
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
Definition: Project.h:92
key
static const AudacityProject::AttachedObjects::RegisteredFactory key
Definition: ViewMenus.cpp:393
TimeSelectedFlag
const ReservedCommandFlag & TimeSelectedFlag()
Definition: CommonCommandFlags.cpp:159
WaveTrackViewConstants::kMaxZoom
@ kMaxZoom
Definition: WaveTrackViewConstants.h:66
findCommandHandler
static CommandHandlerObject & findCommandHandler(AudacityProject &project)
Definition: ViewMenus.cpp:397
CommandHandlerObject
wxEvtHandler CommandHandlerObject
Definition: CommandFunctors.h:28
MenuTable::Menu
std::unique_ptr< MenuItem > Menu(const Identifier &internalName, const TranslatableString &title, Args &&... args)
Definition: CommandManager.h:623
ViewActions::Handler::OnGoSelStart
void OnGoSelStart(const CommandContext &context)
Definition: ViewMenus.cpp:283
MenuTable::Section
std::unique_ptr< MenuPart > Section(const Identifier &internalName, Args &&... args)
Definition: CommandManager.h:611
WaveTrackViewConstants::kZoom50ths
@ kZoom50ths
Definition: WaveTrackViewConstants.h:60
ViewActions::Handler
Definition: ViewMenus.cpp:167
Prefs.h
ViewActions::Handler::OnZoomSel
void OnZoomSel(const CommandContext &context)
Definition: ViewMenus.cpp:195
ViewActions::Handler::OnZoomIn
void OnZoomIn(const CommandContext &context)
Definition: ViewMenus.cpp:169
MenuTable
Definition: CommandManager.h:416
CommandManager::Get
static CommandManager & Get(AudacityProject &project)
Definition: CommandManager.cpp:207
anonymous_namespace{ViewMenus.cpp}::ViewMenu
BaseItemSharedPtr ViewMenu()
Definition: ViewMenus.cpp:408
WaveTrackViewConstants::kZoom4To1
@ kZoom4To1
Definition: WaveTrackViewConstants.h:65
settings
static Settings & settings()
Definition: TrackInfo.cpp:86
ViewActions::Handler::OnAdvancedVZoom
void OnAdvancedVZoom(const CommandContext &context)
Definition: ViewMenus.cpp:247
CommandContext::project
AudacityProject & project
Definition: CommandContext.h:64
anonymous_namespace{Menus.cpp}::Options
std::vector< CommandFlagOptions > & Options()
Definition: Menus.cpp:527
ProjectHistory::Get
static ProjectHistory & Get(AudacityProject &project)
Definition: ProjectHistory.cpp:26
anonymous_namespace{ViewMenus.cpp}::DoZoomFitV
void DoZoomFitV(AudacityProject &project)
Definition: ViewMenus.cpp:124
WaveTrackViewConstants::kZoomToFit
@ kZoomToFit
Definition: WaveTrackViewConstants.h:52
ViewActions::Handler::~Handler
~Handler()
Definition: ViewMenus.cpp:378
TracksPrefs::Zoom2Choice
static WaveTrackViewConstants::ZoomPresets Zoom2Choice()
Definition: TracksPrefs.cpp:262