Audacity 3.2.0
Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
MixerBoardFrame Class Referencefinal

#include <MixerBoard.h>

Inheritance diagram for MixerBoardFrame:
[legend]
Collaboration diagram for MixerBoardFrame:
[legend]

Public Member Functions

 MixerBoardFrame (AudacityProject *parent)
 
virtual ~MixerBoardFrame ()
 
void Recreate (AudacityProject *pProject)
 
- Public Member Functions inherited from TopLevelKeystrokeHandlingWindow
virtual ~TopLevelKeystrokeHandlingWindow ()
 
virtual bool HandleCommandKeystrokes ()
 

Public Attributes

MixerBoardmMixerBoard
 

Private Member Functions

void OnCloseWindow (wxCloseEvent &WXUNUSED(event))
 
void OnMaximize (wxMaximizeEvent &event)
 
void OnSize (wxSizeEvent &evt)
 
void OnKeyEvent (wxKeyEvent &evt)
 
void SetWindowTitle ()
 

Private Attributes

Observer::Subscription mTitleChangeSubscription
 
AudacityProjectmProject
 

Detailed Description

Definition at line 267 of file MixerBoard.h.

Constructor & Destructor Documentation

◆ MixerBoardFrame()

MixerBoardFrame::MixerBoardFrame ( AudacityProject parent)

Definition at line 1393 of file MixerBoard.cpp.

1394: wxFrame( &GetProjectFrame( *parent ), -1, wxString{},
1395 wxDefaultPosition, kDefaultSize,
1396 wxDEFAULT_FRAME_STYLE | wxFRAME_FLOAT_ON_PARENT)
1397 , mProject(parent)
1398{
1401 .Subscribe([this](ProjectFileIOMessage message){
1404 });
1405
1406 mMixerBoard = safenew MixerBoard(parent, this, wxDefaultPosition, kDefaultSize);
1407
1408 this->SetSizeHints(MIXER_BOARD_MIN_WIDTH, MIXER_BOARD_MIN_HEIGHT);
1409
1411
1412 // loads either the XPM or the windows resource, depending on the platform
1413#if !defined(__WXMAC__) && !defined(__WXX11__)
1414 {
1415#ifdef __WXMSW__
1416 wxIcon ic{ wxICON(AudacityLogo) };
1417#else
1418 wxIcon ic{wxICON(AudacityLogo48x48)};
1419#endif
1420 SetIcon(ic);
1421 }
1422#endif
1423 Center();
1424}
#define safenew
Definition: MemoryX.h:10
#define MIXER_BOARD_MIN_WIDTH
Definition: MixerBoard.cpp:846
#define MIXER_BOARD_MIN_HEIGHT
Definition: MixerBoard.cpp:843
const wxSize kDefaultSize
ProjectFileIOMessage
Subscribe to ProjectFileIO to receive messages; always in idle time.
Definition: ProjectFileIO.h:50
@ ProjectTitleChange
A normal occurrence.
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 ...
Observer::Subscription mTitleChangeSubscription
Definition: MixerBoard.h:286
AudacityProject * mProject
Definition: MixerBoard.h:287
MixerBoard * mMixerBoard
Definition: MixerBoard.h:289
void UpdateTrackClusters()
Definition: MixerBoard.cpp:970
Subscription Subscribe(Callback callback)
Connect a callback to the Publisher; later-connected are called earlier.
Definition: Observer.h:199
static ProjectFileIO & Get(AudacityProject &project)

◆ ~MixerBoardFrame()

MixerBoardFrame::~MixerBoardFrame ( )
virtual

Definition at line 1426 of file MixerBoard.cpp.

1427{
1428}

Member Function Documentation

◆ OnCloseWindow()

void MixerBoardFrame::OnCloseWindow ( wxCloseEvent &  WXUNUSEDevent)
private

Definition at line 1432 of file MixerBoard.cpp.

1433{
1434 // Fix for bug #2175.
1435 //
1436 // If the mixerboard enters fullscreen, the main project will be
1437 // "lowered", so ensure it's visible after the mixerboard closes.
1438#if defined(__WXMAC__)
1439 dynamic_cast<wxFrame*>(GetParent())->Raise();
1440#endif
1441
1442 this->Hide();
1443}

◆ OnKeyEvent()

void MixerBoardFrame::OnKeyEvent ( wxKeyEvent &  evt)
private

Definition at line 1457 of file MixerBoard.cpp.

1458{
1459 if (auto project = mMixerBoard->mProject)
1460 MenuCreator::FilterKeyEvent(*project, event, true);
1461}
const auto project
static bool FilterKeyEvent(AudacityProject &project, const wxKeyEvent &evt, bool permit=false)
AudacityProject * mProject
Definition: MixerBoard.h:256

References MenuCreator::FilterKeyEvent(), mMixerBoard, MixerBoard::mProject, and project.

Here is the call graph for this function:

◆ OnMaximize()

void MixerBoardFrame::OnMaximize ( wxMaximizeEvent &  event)
private

Definition at line 1445 of file MixerBoard.cpp.

1446{
1447 // Update the size hints to show all tracks before skipping to let default handling happen.
1449 event.Skip();
1450}
void UpdateWidth()

References mMixerBoard, and MixerBoard::UpdateWidth().

Here is the call graph for this function:

◆ OnSize()

void MixerBoardFrame::OnSize ( wxSizeEvent &  evt)
private

Definition at line 1452 of file MixerBoard.cpp.

1453{
1454 mMixerBoard->SetSize(this->GetClientSize());
1455}

References mMixerBoard.

◆ Recreate()

void MixerBoardFrame::Recreate ( AudacityProject pProject)

Definition at line 1463 of file MixerBoard.cpp.

1464{
1465 wxPoint pos = mMixerBoard->GetPosition();
1466 wxSize siz = mMixerBoard->GetSize();
1467 wxSize siz2 = this->GetSize();
1468
1469 //wxLogDebug("Got rid of board %p", mMixerBoard );
1470 mMixerBoard->Destroy();
1471 mMixerBoard = NULL;
1472 mMixerBoard = safenew MixerBoard(pProject, this, pos, siz);
1473 //wxLogDebug("Created NEW board %p", mMixerBoard );
1475 mMixerBoard->SetSize( siz );
1476
1477 this->SetSize( siz2 );
1479}

References mMixerBoard, safenew, SetWindowTitle(), and MixerBoard::UpdateTrackClusters().

Here is the call graph for this function:

◆ SetWindowTitle()

void MixerBoardFrame::SetWindowTitle ( )
private

Definition at line 1481 of file MixerBoard.cpp.

1482{
1483 wxString name = mProject->GetProjectName();
1484 if (!name.empty())
1485 {
1486 name.Prepend(wxT(" - "));
1487 }
1488
1489 SetTitle(AudacityMixerBoardTitle.Format(name).Translation());
1490}
wxT("CloseDown"))
#define AudacityMixerBoardTitle
Definition: MixerBoard.cpp:72
wxString name
Definition: TagsEditor.cpp:166
const wxString & GetProjectName() const
Definition: Project.cpp:100

References AudacityMixerBoardTitle, AudacityProject::GetProjectName(), mProject, name, and wxT().

Referenced by Recreate().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ mMixerBoard

MixerBoard* MixerBoardFrame::mMixerBoard

Definition at line 289 of file MixerBoard.h.

Referenced by OnKeyEvent(), OnMaximize(), OnSize(), and Recreate().

◆ mProject

AudacityProject* MixerBoardFrame::mProject
private

Definition at line 287 of file MixerBoard.h.

Referenced by SetWindowTitle().

◆ mTitleChangeSubscription

Observer::Subscription MixerBoardFrame::mTitleChangeSubscription
private

Definition at line 286 of file MixerBoard.h.


The documentation for this class was generated from the following files: