40#include <wx/display.h>
41#include <wx/scrolbar.h>
43#include <wx/splitter.h>
63 unsigned int n = wxDisplay::GetCount();
64 for(
unsigned int i = 0;i<n;i++){
66 wxRect scr = d.GetClientArea();
67 if( scr.Contains( r ) )
78 if( wxDisplay::GetFromPoint( r.GetTopLeft() ) == wxNOT_FOUND)
return false;
79 if( wxDisplay::GetFromPoint( r.GetBottomRight() ) == wxNOT_FOUND)
return false;
87 wxRect targetTitleRect(requestedRect->GetLeftTop(), requestedRect->GetBottomRight());
90 targetTitleRect.x += 15;
91 targetTitleRect.width -= 100;
92 if (targetTitleRect.width < 165) targetTitleRect.width = 165;
93 targetTitleRect.height = 15;
94 int targetBottom = targetTitleRect.GetBottom();
95 int targetRight = targetTitleRect.GetRight();
98 for (
int i = targetTitleRect.GetLeft(); i < targetRight; i++) {
99 for (
int j = targetTitleRect.GetTop(); j < targetBottom; j++) {
100 int monitor = display.GetFromPoint(wxPoint(i, j));
112 *defRect = wxGetClientDisplayRect();
133 if (width < defRect->width)
135 defRect->x = (defRect->width - width)/2;
136 defRect->width = width;
139 if (height < defRect->height)
141 defRect->y = (defRect->height - height)/2;
146 const int pixelsFormenu = 60;
147 if( defRect->y < pixelsFormenu )
149 defRect->height = height;
181 if (normalRect.width == 0 || normalRect.height == 0) {
182 normalRect = defaultRect;
184 if (windowRect.width == 0 || windowRect.height == 0) {
185 windowRect = defaultRect;
189 wxRect screenRect( wxGetClientDisplayRect());
190#if defined(__WXMAC__)
194 if (normalRect.y < screenRect.y) {
195 normalRect = defaultRect;
197 if (windowRect.y < screenRect.y) {
198 windowRect = defaultRect;
205 if (*pMaximized || *pIconized) {
206 *nextRect = normalRect;
209 *nextRect = windowRect;
213 *nextRect = defaultRect;
216 *nextRect = defaultRect;
234 normalRect = defaultRect;
237 windowRect = defaultRect;
240 bool validWindowSize =
false;
245 auto pProject = *iter;
247 validWindowSize =
true;
252 if (validWindowSize) {
253 *nextRect = validProject->GetRect();
254 *pMaximized = validProject->IsMaximized();
258 *nextRect = defaultRect;
262 *nextRect = normalRect;
279 const int edgeSlop = 10;
283 wxPoint p = nextRect->GetLeftTop();
284 int scr = std::max( 0, wxDisplay::GetFromPoint( p ));
286 screenRect = d.GetClientArea();
290 wxPoint bottomRight = nextRect->GetBottomRight();
291 if (bottomRight.x > (screenRect.GetRight()+edgeSlop)) {
292 int newWidth = screenRect.GetWidth() - nextRect->GetLeft();
293 if (newWidth < defaultRect.GetWidth()) {
294 nextRect->x = windowRect.x;
295 nextRect->y = windowRect.y;
296 nextRect->width = windowRect.width;
299 nextRect->width = newWidth;
304 bottomRight = nextRect->GetBottomRight();
305 if (bottomRight.y > (screenRect.GetBottom()+edgeSlop)) {
307 bottomRight = nextRect->GetBottomRight();
308 if (bottomRight.y > (screenRect.GetBottom()+edgeSlop)) {
309 nextRect->SetBottom(screenRect.GetBottom());
317 *nextRect = defaultRect;
330 : wxScrollBar(parent,
id, wxDefaultPosition, wxDefaultSize, style)
336 wxWindow *w = e.GetWindow();
342 void SetScrollbar(
int position,
int thumbSize,
343 int range,
int pageSize,
344 bool refresh =
true)
override;
347 DECLARE_EVENT_TABLE()
350void ScrollBar::SetScrollbar(
int position,
int thumbSize,
351 int range,
int pageSize,
360 position != GetThumbPosition() ||
361 thumbSize != GetThumbSize() ||
362 range != GetRange() ||
363 pageSize != GetPageSize();
367 wxScrollBar::SetScrollbar(position, thumbSize, range, pageSize, refresh);
371 EVT_SET_FOCUS(ScrollBar::OnSetFocus)
379[mVertScrollRemainder = 0.0](
391 const wxMouseEvent &
event = evt.event;
395 const auto steps = evt.steps;
397 if (event.ShiftDown()
404 window.TP_ScrollWindow(
405 viewInfo.OffsetTimeByPixels(
406 viewInfo.PositionToTime(0), 50.0 * -steps));
408 else if (event.CmdDown())
415 double ZoomFactor = pow(2.0, steps);
420 p->ZoomInByFactor( ZoomFactor );
422 p->ZoomOutByFactor( ZoomFactor );
427 int trackLeftEdge = viewInfo.GetLeftOffset();
432 double mouse_h = viewInfo.PositionToTime(event.m_x, trackLeftEdge);
436 center_h = viewInfo.h +
437 (viewInfo.GetScreenEndTime() - viewInfo.h) / 2.0;
439 else if( steps <= 0 )
442 else if((viewInfo.selectedRegion.t1() - viewInfo.selectedRegion.t0() ) < 0.00001 )
445 else if( mouse_h < viewInfo.selectedRegion.t0() )
446 center_h = viewInfo.selectedRegion.t0();
448 else if( mouse_h > viewInfo.selectedRegion.t1() )
449 center_h = viewInfo.selectedRegion.t1();
454 xx = viewInfo.TimeToPosition(center_h, trackLeftEdge);
467 if (center_h > audioEndTime)
469 center_h = audioEndTime;
473 wxCoord xTrackEnd = viewInfo.TimeToPosition( audioEndTime );
474 viewInfo.ZoomBy(pow(2.0, steps));
476 double new_center_h = viewInfo.PositionToTime(xx, trackLeftEdge);
477 viewInfo.h += (center_h - new_center_h);
481 if( viewInfo.h > audioEndTime )
482 viewInfo.h += audioEndTime - viewInfo.PositionToTime( xTrackEnd );
489#ifdef EXPERIMENTAL_SCRUBBING_SCROLL_WHEEL
492 evt.event.Skip(
false);
498 double lines = steps * 4 + mVertScrollRemainder;
499 mVertScrollRemainder = lines - floor(lines);
500 lines = floor(lines);
501 auto didSomething = window.TP_ScrollUpDown((
int)-lines);
513 bool bMaximized =
false;
514 bool bIconized =
false;
520 wxSize(wndRect.width, wndRect.height),
524 auto &window = *pWindow;
527 window.SetPosition(wndRect.GetPosition());
530 window.Maximize(
true);
532 else if (bIconized) {
567 auto& project = context.
project;
607 this, wxID_ANY, wxDefaultPosition,
608 wxSize{ this->GetSize().GetWidth(), -1 }
611 mTopPanel->SetLayoutDirection(wxLayout_LeftToRight);
613#ifdef EXPERIMENTAL_DA2
617 auto container =
safenew wxSplitterWindow(
this, wxID_ANY,
620 wxNO_BORDER | wxSP_LIVE_UPDATE);
621 container->Bind(wxEVT_SPLITTER_DOUBLECLICKED, [](wxSplitterEvent& event){
639#ifdef EXPERIMENTAL_DA2
656#if wxUSE_ACCESSIBILITY
661 mHsbar->SetLayoutDirection(wxLayout_LeftToRight);
662 mHsbar->SetName(
_(
"Horizontal Scrollbar"));
663 mVsbar->SetName(
_(
"Vertical Scrollbar"));
667 switch (message.
type) {
668 case UndoRedoMessage::Pushed:
669 case UndoRedoMessage::Modified:
670 return OnUndoPushedModified();
671 case UndoRedoMessage::UndoOrRedo:
673 case UndoRedoMessage::Reset:
674 return OnUndoReset();
711 auto &project = mProject;
718 auto pThis = wxWeakRef<ProjectWindow>(
this);
723 if (pThis->IsBeingDeleted())
726 auto &project = pThis->mProject ;
729 pThis->FixScrollbars();
730 if (bForceWaveTracks)
732 for (
auto pWaveTrack : tracks.Any<
WaveTrack >() )
733 for (
const auto &clip: pWaveTrack->GetClips())
736 trackPanel.Refresh(
false);
749 ToolBar *pToolBar = toolManager.GetToolBar(ii);
773#if defined(__WXMAC__)
778#elif defined(__WXMSW__)
779const int sbarSpaceWidth = 16;
780const int sbarControlWidth = 16;
781const int sbarExtraLen = 0;
784const int sbarSpaceWidth = 15;
785const int sbarControlWidth = 15;
786const int sbarExtraLen = 0;
796 auto w = viewInfo.GetTracksUsableWidth();
798 int pixel = viewInfo.TimeToPosition(pos);
799 if (pixel < 0 || pixel >= w)
802 (viewInfo.OffsetTimeByPixels(pos, -(w / 2)));
803 trackPanel.Refresh(
false);
810 ScrollIntoView(viewInfo.PositionToTime(x, viewInfo.GetLeftOffset()));
821 wxInt64 pos =
mHsbar->GetThumbPosition();
823 pos -= wxMax((wxInt64)(
sbarHjump * viewInfo.sbarScale), 1);
826 viewInfo.sbarH = std::max(viewInfo.sbarH,
830 if (pos !=
mHsbar->GetThumbPosition()) {
831 mHsbar->SetThumbPosition((
int)pos);
844 wxInt64 pos =
mHsbar->GetThumbPosition();
847 pos += wxMax((wxInt64)(
sbarHjump * viewInfo.sbarScale), 1);
848 wxInt64 max =
mHsbar->GetRange() -
mHsbar->GetThumbSize();
849 pos = wxMin(pos, max);
851 viewInfo.sbarH =
std::min(viewInfo.sbarH,
855 if (pos !=
mHsbar->GetThumbPosition()) {
856 mHsbar->SetThumbPosition((
int)pos);
869 wxInt64 pos =
mHsbar->GetThumbPosition();
871 pos -= wxMax((wxInt64)(
sbarHjump * viewInfo.sbarScale), 1);
874 viewInfo.sbarH = std::max(viewInfo.sbarH,
877 if (pos !=
mHsbar->GetThumbPosition()) {
878 mHsbar->SetThumbPosition((
int)pos);
890 wxInt64 pos =
mHsbar->GetThumbPosition();
893 pos += wxMax((wxInt64)(
sbarHjump * viewInfo.sbarScale), 1);
894 wxInt64 max =
mHsbar->GetRange() -
mHsbar->GetThumbSize();
895 pos = wxMin(pos, max);
897 viewInfo.sbarH =
std::min(viewInfo.sbarH,
901 if (pos !=
mHsbar->GetThumbPosition()) {
902 mHsbar->SetThumbPosition((
int)pos);
913 if (viewInfo.bScrollBeyondZero)
916 if (scrubber.HasMark() ||
936 const double screen = viewInfo.GetScreenEndTime() - viewInfo.h;
937 return std::min(tracks.GetStartTime(), -screen);
949 viewInfo.TimeRangeToPixelWidth(scrollto - lowerBound);
957 const int max =
mHsbar->GetRange() -
mHsbar->GetThumbSize();
961 (
int)(floor(0.5 + unscaled * viewInfo.sbarScale))));
962 mHsbar->SetThumbPosition(pos);
964 viewInfo.sbarH = std::max(viewInfo.sbarH,
966 viewInfo.sbarH =
std::min(viewInfo.sbarH,
991 int oldPos =
mVsbar->GetThumbPosition();
992 int pos = oldPos + delta;
1006 mVsbar->SetThumbPosition(pos);
1022 bool refresh =
false;
1023 bool rescroll =
false;
1027 auto panelWidth = viewInfo.GetTracksUsableWidth();
1028 auto panelHeight = viewInfo.GetHeight();
1037 if (panelWidth < 0) {
1040 if (panelHeight < 0) {
1044 auto LastTime = std::numeric_limits<double>::lowest();
1045 for (
const Track *track : tracks) {
1047 track = track->SubstitutePendingChangedTrack().get();
1048 LastTime = std::max( LastTime, track->GetEndTime() );
1051 std::max(LastTime, viewInfo.selectedRegion.t1());
1053 const double screen =
1054 viewInfo.GetScreenEndTime() - viewInfo.h;
1055 const double halfScreen = screen / 2.0;
1065 ? -lowerBound + std::max(halfScreen, screen - LastTime)
1068 viewInfo.total = LastTime + additional;
1071 viewInfo.total = std::max(viewInfo.total, viewInfo.h + screen);
1073 if (viewInfo.h < lowerBound) {
1074 viewInfo.h = lowerBound;
1078 viewInfo.sbarTotal = (wxInt64) (viewInfo.GetTotalWidth());
1079 viewInfo.sbarScreen = (wxInt64)(panelWidth);
1080 viewInfo.sbarH = (wxInt64) (viewInfo.GetBeforeScreenWidth());
1089 viewInfo.vpos =
mVsbar->GetThumbPosition() * viewInfo.scrollStep;
1093 if (viewInfo.vpos >= totalHeight)
1094 viewInfo.vpos = totalHeight - 1;
1095 if (viewInfo.vpos < 0)
1101 (viewInfo.GetScreenEndTime() - viewInfo.h) < viewInfo.total;
1102 bool newvstate = panelHeight < totalHeight;
1105 oldhstate =
mHsbar->IsShown();
1106 oldvstate =
mVsbar->IsShown();
1108 mVsbar->Show(panelHeight < totalHeight);
1110 oldhstate =
mHsbar->IsEnabled();
1111 oldvstate =
mVsbar->IsEnabled();
1112 mHsbar->Enable(newhstate);
1113 mVsbar->Enable(panelHeight < totalHeight);
1116 if (panelHeight >= totalHeight && viewInfo.vpos != 0) {
1122 if (!newhstate && viewInfo.sbarH != 0) {
1136 wxInt64 maxScrollbarRange = (wxInt64)(2147483647 * 0.999);
1137 if (viewInfo.sbarTotal > maxScrollbarRange)
1138 viewInfo.sbarScale = ((double)maxScrollbarRange) / viewInfo.sbarTotal;
1140 viewInfo.sbarScale = 1.0;
1143 int scaledSbarH = (int)(viewInfo.sbarH * viewInfo.sbarScale);
1144 int scaledSbarScreen = (int)(viewInfo.sbarScreen * viewInfo.sbarScale);
1145 int scaledSbarTotal = (int)(viewInfo.sbarTotal * viewInfo.sbarScale);
1149 mHsbar->SetScrollbar(scaledSbarH + offset, scaledSbarScreen, scaledSbarTotal,
1150 scaledSbarScreen, TRUE);
1154 mVsbar->SetScrollbar(viewInfo.vpos / viewInfo.scrollStep,
1155 panelHeight / viewInfo.scrollStep,
1156 totalHeight / viewInfo.scrollStep,
1157 panelHeight / viewInfo.scrollStep, TRUE);
1159 if (refresh || (rescroll &&
1160 (viewInfo.GetScreenEndTime() - viewInfo.h) < viewInfo.total)) {
1161 trackPanel.Refresh(
false);
1166 if (oldhstate != newhstate || oldvstate != newvstate) {
1181 toolManager.LayoutToolBars();
1195 wxSize mainsz = GetSize();
1199 wxPoint tppos = ClientToScreen(trackPanel.GetParent()->GetPosition());
1203 wxPoint sbpos = ClientToScreen(toolManager.GetBotDock()->GetPosition());
1206 SetMinSize( wxSize(250, (mainsz.y - sbpos.y) + tppos.y + 50));
1208 SetMinSize( wxSize(250, 250));
1209 SetMaxSize( wxSize(20000, 20000));
1262 SetSize(defaultRect.width, defaultRect.height);
1268 int widths[ nWidths ]{ 0 };
1270 const auto statusBar = GetStatusBar();
1276 int &width = widths[ ii ];
1277 for (
const auto &function : functions ) {
1280 for (
const auto &
string : results.first ) {
1282 statusBar->GetTextExtent(
string.Translation(), &w,
nullptr);
1283 width = std::max<int>( width, w + results.second );
1289 statusBar->SetStatusWidths( nWidths, widths );
1301 wxWindow *focused = FindFocus();
1304 const auto &children = GetChildren();
1305 for(
const auto &child : children) {
1306 if (
auto frame =
dynamic_cast<ToolFrame*
>(child)) {
1310 else if (frame->GetBar() &&
1311 frame->GetBar()->IsVisible() ) {
1319 focused->SetFocus();
1332#if defined(__WXMAC__)
1344 auto VisibleProjectCount = std::count_if(
1365 if (!this->IsMaximized() && !this->
IsIconized())
1382 if (!this->IsMaximized() && !this->
IsIconized())
1419 GetEventHandler()->QueueEvent(
safenew wxSizeEvent(GetSize()));
1458 (wxInt64)(
mHsbar->GetThumbPosition() / viewInfo.sbarScale) - offset;
1466 wxTheApp->ProcessIdle();
1477 auto width = viewInfo.GetTracksUsableWidth();
1478 viewInfo.SetBeforeScreenWidth(viewInfo.sbarH, width, lowerBound);
1482 enum { SCROLL_PIXEL_TOLERANCE = 10 };
1483 if (std::abs(viewInfo.TimeToPosition(0.0, 0
1484 )) < SCROLL_PIXEL_TOLERANCE) {
1491 viewInfo.vpos =
mVsbar->GetThumbPosition() * viewInfo.scrollStep;
1499 trackPanel.Refresh(
false);
1513 if( event.GetId() < 17000){
1520 bool handled = commandManager.HandleMenuID(
GetProject(),
1527 event.ResumePropagation( 999 );
1564 if ( ! toolManager.RestoreFocus() )
1578 if (event.ButtonDown())
1590 trackPanel.SetFocus();
1592 pTrack = *tracks.Selected().begin();
1594 pTrack = *tracks.
Any().begin();
1606 viewInfo.SetZoom(level);
1610 float t0 = viewInfo.selectedRegion.t0();
1611 float t1 = viewInfo.selectedRegion.t1();
1612 float tAvailable = viewInfo.GetScreenEndTime() - viewInfo.h;
1613 float tOnLeft = (tAvailable - t0 + t1)/2.0;
1625 viewInfo.ZoomBy(multiplier);
1641 viewInfo.selectedRegion.setT0(0,
false);
1643 viewInfo.selectedRegion.setT1(0);
1662 double len = tracks.GetEndTime();
1664 viewInfo.selectedRegion.setT1(len,
false);
1666 viewInfo.selectedRegion.setT0(len);
1703 mRecentStreamTime = gAudioIO->GetStreamTime();
1705 auto cleanup =
finally([&]{
1712 else if (mMode == Mode::Refresh) {
1719 trackPanel.Refresh(
false);
1721 else if (mMode != Mode::Off) {
1727 const int posX = viewInfo.TimeToPosition(mRecentStreamTime);
1728 auto width = viewInfo.GetTracksUsableWidth();
1740 deltaX = posX - width;
break;
1743 viewInfo.OffsetTimeByPixels(viewInfo.h, deltaX,
true);
1746 viewInfo.h = std::max(0.0, viewInfo.h);
1747 trackPanel.Refresh(
false);
1759 if (gAudioIO->IsStreamActive(
1761 !gAudioIO->IsPaused()){
1771 const double endTime = viewInfo.GetScreenEndTime();
1772 const double duration = endTime - viewInfo.h;
1774 bool selectionIsOnscreen =
1775 (viewInfo.selectedRegion.t0() < endTime) &&
1776 (viewInfo.selectedRegion.t1() >= viewInfo.h);
1778 bool selectionFillsScreen =
1779 (viewInfo.selectedRegion.t0() < viewInfo.h) &&
1780 (viewInfo.selectedRegion.t1() > endTime);
1782 if (selectionIsOnscreen && !selectionFillsScreen) {
1784 double selCenter = (viewInfo.selectedRegion.t0() +
1785 viewInfo.selectedRegion.t1()) / 2;
1789 if (selCenter < viewInfo.h)
1790 selCenter = viewInfo.h +
1791 (viewInfo.selectedRegion.t1() - viewInfo.h) / 2;
1792 if (selCenter > endTime)
1793 selCenter = endTime -
1794 (endTime - viewInfo.selectedRegion.t0()) / 2;
1798 const double newDuration =
1799 viewInfo.GetScreenEndTime() - viewInfo.h;
1807 double origLeft = viewInfo.h;
1808 double origWidth = duration;
1811 const double newDuration =
1812 viewInfo.GetScreenEndTime() - viewInfo.h;
1813 double newh = origLeft + (origWidth - newDuration) / 2;
1837 const double origLeft = viewInfo.h;
1838 const double origWidth = viewInfo.GetScreenEndTime() - origLeft;
1841 const double newWidth = viewInfo.GetScreenEndTime() - viewInfo.h;
1843 const double newh = origLeft + (origWidth - newWidth) / 2;
1854 const double end = tracks.GetEndTime();
1855 const double start = viewInfo.bScrollBeyondZero
1856 ?
std::min( tracks.GetStartTime(), 0.0)
1858 const double len =
end - start;
1861 return viewInfo.GetZoom();
1863 auto w = viewInfo.GetTracksUsableWidth();
1873 auto &window = *
this;
1875 const double start = viewInfo.bScrollBeyondZero
1876 ?
std::min(tracks.GetStartTime(), 0.0)
1879 window.Zoom( window.GetZoomOfToFit() );
1880 window.TP_ScrollWindow(start);
1885 if(track ==
nullptr)
1904static ToolManager::TopPanelHook::Scope
scope {
1905[]( wxWindow &window ){
1906 auto pProjectWindow =
dynamic_cast< ProjectWindow*
>( &window );
1907 return pProjectWindow ? pProjectWindow->
GetTopPanel() :
nullptr;
void SetActiveProject(AudacityProject *project)
Handle changing of active project and keep global project pointer.
EVT_MENU(OnSetPlayRegionToSelectionID, AdornedRulerPanel::OnSetPlayRegionToSelection) EVT_COMMAND(OnTogglePinnedStateID
EVT_COMMAND(wxID_ANY, EVT_FREQUENCYTEXTCTRL_UPDATED, LabelDialog::OnFreqUpdate) LabelDialog
IntSetting ProjectWindowY
bool CornersOnScreen(wxRect &r)
IntSetting ProjectWindowX
void GetDefaultWindowRect(wxRect *defRect)
IntSetting ProjectWindowWidth
BoolSetting ProjectWindowIconized
bool IsWindowAccessible(wxRect *requestedRect)
BoolSetting ProjectWindowMaximized
IntSetting ProjectWindowNormalHeight
IntSetting ProjectWindowHeight
IntSetting ProjectWindowNormalX
void GetNextWindowPlacement(wxRect *nextRect, bool *pMaximized, bool *pIconized)
static ToolManager::TopPanelHook::Scope scope
int ScreenContaining(wxRect &r)
IntSetting ProjectWindowNormalWidth
IntSetting ProjectWindowNormalY
AUDACITY_DLL_API wxWindow & GetProjectPanel(AudacityProject &project)
Get the main sub-window of the project frame that displays track data.
AUDACITY_DLL_API wxFrame & GetProjectFrame(AudacityProject &project)
Get the top-level window associated with the project (as a wxFrame only, when you do not need to use ...
AUDACITY_DLL_API AttachedWindows & GetAttachedWindows(AudacityProject &project)
accessors for certain important windows associated with each project
for(int ii=0, nn=names.size();ii< nn;++ii)
const_reverse_iterator rend() const
const_iterator end() const
Container::value_type value_type
const_iterator begin() const
const_reverse_iterator rbegin() const
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
This specialization of Setting for bool adds a Toggle method to negate the saved value.
Subclass * Find(const RegisteredFactory &key)
Get a (bare) pointer to an attachment, or null, down-cast it to Subclass *; will not create on demand...
Subclass & Get(const RegisteredFactory &key)
Get reference to an attachment, creating on demand if not present, down-cast it to Subclass.
CommandContext provides additional information to an 'Apply()' command. It provides the project,...
AudacityProject & project
static CommandManager & Get(AudacityProject &project)
Specialization of Setting for int.
Subscription Subscribe(Callback callback)
Connect a callback to the Publisher; later-connected are called earlier.
bool IsAudioActive() const
int GetAudioIOToken() const
static ProjectAudioIO & Get(AudacityProject &project)
static const StatusWidthFunctions & GetStatusWidthFunctions()
A top-level window associated with a project.
AudacityProject & mProject
AudacityProject & GetProject()
A top-level window associated with a project, and handling scrollbars and zooming.
void OnToolBarUpdate(wxCommandEvent &event)
void ZoomAfterImport(Track *pTrack)
void ZoomOutByFactor(double ZoomFactor)
wxSplitterWindow * mContainerWindow
void ShowEffectsPanel(Track *track=nullptr)
void ZoomBy(double multiplier)
static ProjectWindow & Get(AudacityProject &project)
void SetHorizontalThumb(double scrollto)
void TP_ScrollLeft() override
void OnThemeChange(wxCommandEvent &evt)
void UpdatePrefs() override
void OnActivate(wxActivateEvent &event)
wxWindow * mEffectsWindow
double GetZoomOfToFit() const
void OnScrollLeftButton(wxScrollEvent &event)
void TP_HandleResize() override
void OnUpdateUI(wxUpdateUIEvent &event)
wxWindow * GetContainerWindow() noexcept
Container is a parent window for both effects panel and track list windows.
wxPanel * GetTopPanel() noexcept
Top panel contains project-related controls and tools.
void RedrawProject(const bool bForceWaveTracks=false)
static ProjectWindow * Find(AudacityProject *pProject)
wxWindow * GetTrackListWindow() noexcept
Track list window is the parent container for TrackPanel.
double ScrollingLowerBoundTime() const
void OnMove(wxMoveEvent &event)
double PixelWidthBeforeTime(double scrollto) const
void SetNormalizedWindowState(wxRect pSizeAndLocation)
bool MayScrollBeyondZero() const
void OnMouseEvent(wxMouseEvent &event)
wxWindow * GetEffectsWindow() noexcept
Effect window contains list off effects assigned to a selected track.
bool mbInitializingScrollbar
void ScrollIntoView(double pos)
~ProjectWindow() override
bool IsBeingDeleted() const
void OnScrollRightButton(wxScrollEvent &event)
void OnScroll(wxScrollEvent &event)
void OnUndoPushedModified()
std::unique_ptr< PlaybackScroller > mPlaybackScroller
void OnSize(wxSizeEvent &event)
void UpdateStatusWidths()
static void OnResetWindow(const CommandContext &context)
bool TP_ScrollUpDown(int delta) override
Observer::Subscription mUndoSubscription
void ZoomInByFactor(double ZoomFactor)
void TP_ScrollRight() override
void TP_ScrollWindow(double scrollto) override
void OnMenu(wxCommandEvent &event)
void TP_RedrawScrollbars() override
bool IsIconized() const override
void OnShow(wxShowEvent &event)
wxWindow * mTrackListWindow
ProjectWindow(wxWindow *parent, wxWindowID id, const wxPoint &pos, const wxSize &size, AudacityProject &project)
void OnIconize(wxIconizeEvent &event)
void MacShowUndockedToolbars(bool show)
void HandleScrollWheel(int steps)
bool IsScrollScrubbing() const
static Scrubber & Get(AudacityProject &project)
bool ReadWithDefault(T *pVar, const T &defaultValue) const
overload of ReadWithDefault returning a boolean that is true if the value was previously defined */
bool Read(T *pVar) const
overload of Read returning a boolean that is true if the value was previously defined */
wxColour & Colour(int iIndex)
Abstract base class for an object holding data associated with points on a time axis.
void EnsureVisible(bool modifyState=false)
double GetEndTime() const
static TrackList & Get(AudacityProject &project)
static int GetTotalHeight(const TrackList &list)
static double GetPinnedHeadPositionPreference()
static UndoManager & Get(AudacityProject &project)
static ViewInfo & Get(AudacityProject &project)
A Track that contains audio waveform data.
An alternative to using wxWindowAccessible, which in wxWidgets 3.1.1 contained GetParent() which was ...
void CallAfter(Action action)
Schedule an action to be done later, and in the main thread.
auto end(const Ptr< Type, BaseDeleter > &p)
Enables range-for, if Traits<Type>::iterated_type is defined.
Namespace containing an enum 'what to do on a refresh?'.
void OnCloseWindow(wxCloseEvent &e)
constexpr int DEFAULT_WINDOW_HEIGHT
AttachedWindows::RegisteredFactory sProjectWindowKey
constexpr int DEFAULT_WINDOW_WIDTH
Type of message published by UndoManager.
enum UndoRedoMessage::Type type