mirror of
https://github.com/cookiengineer/audacity
synced 2025-08-09 00:21:16 +02:00
When it is enabled, the project can scroll up to one-half of a screenful beyond time zero or the maximum track time. I was careful to disable selection of negative times. This is motivated by the smooth scrolling scrub. It behaves more sensibly at the extremes. It can still keep the play indicator centered. Also removed an unused member of ViewInfo.
61 lines
1.5 KiB
C++
61 lines
1.5 KiB
C++
/**********************************************************************
|
|
|
|
Audacity: A Digital Audio Editor
|
|
|
|
ViewInfo.h
|
|
|
|
Dominic Mazzoni
|
|
|
|
**********************************************************************/
|
|
|
|
#ifndef __AUDACITY_VIEWINFO__
|
|
#define __AUDACITY_VIEWINFO__
|
|
|
|
#include "SelectedRegion.h"
|
|
|
|
const double gMaxZoom = 6000000,
|
|
gMinZoom = 0.001;
|
|
|
|
class Track;
|
|
|
|
struct ViewInfo {
|
|
|
|
// Current selection
|
|
|
|
SelectedRegion selectedRegion;
|
|
|
|
// Scroll info
|
|
|
|
Track *track; // first visible track
|
|
int vpos; // vertical scroll pos
|
|
|
|
double h; // h pos in secs
|
|
double screen; // screen width in secs
|
|
double total; // total width in secs
|
|
double zoom; // pixels per second
|
|
|
|
// Current horizontal scroll bar positions, in pixels
|
|
wxInt64 sbarH;
|
|
wxInt64 sbarScreen;
|
|
wxInt64 sbarTotal;
|
|
|
|
// Internal wxScrollbar positions are only int in range, so multiply
|
|
// the above values with the following member to get the actual
|
|
// scroll bar positions as reported by the horizontal wxScrollbar's members
|
|
// i.e. units are scroll increments per pixel
|
|
double sbarScale;
|
|
|
|
// Vertical scroll step
|
|
int scrollStep;
|
|
|
|
// Other stuff, mainly states (true or false) related to autoscroll and
|
|
// drawing the waveform. Maybe this should be put somewhere else?
|
|
|
|
bool bRedrawWaveform;
|
|
bool bUpdateTrackIndicator;
|
|
|
|
bool bIsPlaying;
|
|
};
|
|
|
|
#endif
|