11#ifndef __AUDACITY_VIEWPORT__
12#define __AUDACITY_VIEWPORT__
41 int range,
int pageSize,
bool refresh) = 0;
49 int range,
int pageSize,
bool refresh) = 0;
64 ,
public std::enable_shared_from_this<Viewport>
71 void SetCallbacks(std::unique_ptr<ViewportCallbacks> pCallbacks);
73 double ScrollingLowerBoundTime()
const;
86 void ScrollToStart(
bool extend);
96 void ScrollToEnd(
bool extend);
99 void ScrollToBottom();
102 void ScrollIntoView(
double pos);
106 void ScrollIntoView(
int x);
114 void OnScrollRight();
118 void OnScrollLeftButton();
122 void OnScrollRightButton();
128 bool ScrollUpDown(
int delta);
130 void SetHorizontalThumb(
double scrollto,
bool doScroll =
true);
133 void Zoom(
double pixelsPerSecond);
136 void ZoomBy(
double multiplier);
140 void ZoomAboutSelection(
double multiplier);
143 void ZoomAboutCenter(
double multiplier);
148 void ZoomFitHorizontallyAndShowTrack(
Track *pTrack);
150 void ShowTrack(
const Track &track);
153 double GetZoomOfToFit()
const;
157 void ZoomFitHorizontally();
161 void ZoomFitVertically();
163 void ExpandAllTracks();
164 void CollapseAllTracks();
168 void UpdateScrollbarsForTracks();
177 void SetToDefaultSize();
182 double PixelWidthBeforeTime(
double scrollto)
const;
184 void FinishAutoScroll();
186 void OnUndoPushedModified();
191 std::unique_ptr<ViewportCallbacks> mpCallbacks{};
202 wxInt64 sbarScreen{ 1 };
203 wxInt64 sbarTotal{ 1 };
209 double sbarScale{ 1.0 };
212 int scrollStep{ 16 };
214 bool mAutoScrolling{
false };
215 bool mbInitializingScrollbar{
false };
Utility ClientData::Site to register hooks into a host class that attach client data.
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
An object that sends messages to an open-ended list of subscribed callbacks.
A move-only handle representing a connection to a Publisher.
Abstract base class for an object holding data associated with points on a time axis.
A flat linked list of tracks supporting Add, Remove, Clear, and Contains, serialization of the list o...
A callback facade hiding GUI toolkit details.
virtual int GetVerticalRange() const =0
virtual int GetHorizontalThumbSize() const =0
virtual int GetHorizontalThumbPosition() const =0
virtual int GetVerticalThumbSize() const =0
virtual void SetVerticalScrollbar(int position, int thumbSize, int range, int pageSize, bool refresh)=0
virtual ~ViewportCallbacks()
virtual int GetHorizontalRange() const =0
virtual void SetHorizontalThumbPosition(int viewStart)=0
virtual bool IsTrackMinimized(const Track &track)=0
virtual void SetVerticalThumbPosition(int viewStart)=0
virtual int GetTrackHeight(const Track &track)=0
virtual void SetToDefaultSize()=0
virtual void SetChannelHeights(Track &track, unsigned height)=0
virtual void ShowHorizontalScrollbar(bool shown)=0
virtual void ShowVerticalScrollbar(bool shown)=0
virtual void SetMinimized(Track &track, bool minimized)=0
virtual int GetVerticalThumbPosition() const =0
virtual unsigned MinimumTrackHeight()=0
virtual int GetTotalHeight(const TrackList &trackList)=0
virtual std::pair< int, int > ViewportSize() const =0
Width and height in pixels of proper viewport area (excluding scrollbars)
virtual void SetHorizontalScrollbar(int position, int thumbSize, int range, int pageSize, bool refresh)=0
AudacityProject & mProject
const Observer::Subscription mUndoSubscription
const Observer::Subscription mSnappingChangedSubscription
Services * Get()
Fetch the global instance, or nullptr if none is yet installed.
A convenient default parameter for class template Site.
const bool scrollbarVisibilityChanged