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 271 of file MixerBoard.h.

Constructor & Destructor Documentation

◆ MixerBoardFrame()

MixerBoardFrame::MixerBoardFrame ( AudacityProject parent)

Definition at line 1404 of file MixerBoard.cpp.

1405: wxFrame( &GetProjectFrame( *parent ), -1, wxString{},
1406 wxDefaultPosition, kDefaultSize,
1407 wxDEFAULT_FRAME_STYLE | wxFRAME_FLOAT_ON_PARENT)
1408 , mProject(parent)
1409{
1412 .Subscribe([this](ProjectFileIOMessage message){
1415 });
1416
1417 mMixerBoard = safenew MixerBoard(parent, this, wxDefaultPosition, kDefaultSize);
1418
1419 this->SetSizeHints(MIXER_BOARD_MIN_WIDTH, MIXER_BOARD_MIN_HEIGHT);
1420
1422
1423 // loads either the XPM or the windows resource, depending on the platform
1424#if !defined(__WXMAC__) && !defined(__WXX11__)
1425 {
1426#ifdef __WXMSW__
1427 wxIcon ic{ wxICON(AudacityLogo) };
1428#else
1429 wxIcon ic{wxICON(AudacityLogo48x48)};
1430#endif
1431 SetIcon(ic);
1432 }
1433#endif
1434 Center();
1435}
#define safenew
Definition: MemoryX.h:10
#define MIXER_BOARD_MIN_WIDTH
Definition: MixerBoard.cpp:857
#define MIXER_BOARD_MIN_HEIGHT
Definition: MixerBoard.cpp:854
const wxSize kDefaultSize
ProjectFileIOMessage
Subscribe to ProjectFileIO to receive messages; always in idle time.
Definition: ProjectFileIO.h:49
@ 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:290
AudacityProject * mProject
Definition: MixerBoard.h:291
MixerBoard * mMixerBoard
Definition: MixerBoard.h:293
void UpdateTrackClusters()
Definition: MixerBoard.cpp:985
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 1437 of file MixerBoard.cpp.

1438{
1439}

Member Function Documentation

◆ OnCloseWindow()

void MixerBoardFrame::OnCloseWindow ( wxCloseEvent &  WXUNUSEDevent)
private

Definition at line 1443 of file MixerBoard.cpp.

1444{
1445 // Fix for bug #2175.
1446 //
1447 // If the mixerboard enters fullscreen, the main project will be
1448 // "lowered", so ensure it's visible after the mixerboard closes.
1449#if defined(__WXMAC__)
1450 dynamic_cast<wxFrame*>(GetParent())->Raise();
1451#endif
1452
1453 this->Hide();
1454}

◆ OnKeyEvent()

void MixerBoardFrame::OnKeyEvent ( wxKeyEvent &  evt)
private

Definition at line 1468 of file MixerBoard.cpp.

1469{
1471 auto &commandManager = CommandManager::Get( *project );
1472 commandManager.FilterKeyEvent(project, event, true);
1473}
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
Definition: Project.h:90
static CommandManager & Get(AudacityProject &project)
AudacityProject * mProject
Definition: MixerBoard.h:260

References CommandManager::Get(), mMixerBoard, and MixerBoard::mProject.

Here is the call graph for this function:

◆ OnMaximize()

void MixerBoardFrame::OnMaximize ( wxMaximizeEvent &  event)
private

Definition at line 1456 of file MixerBoard.cpp.

1457{
1458 // Update the size hints to show all tracks before skipping to let default handling happen.
1460 event.Skip();
1461}
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 1463 of file MixerBoard.cpp.

1464{
1465 mMixerBoard->SetSize(this->GetClientSize());
1466}

References mMixerBoard.

◆ Recreate()

void MixerBoardFrame::Recreate ( AudacityProject pProject)

Definition at line 1475 of file MixerBoard.cpp.

1476{
1477 wxPoint pos = mMixerBoard->GetPosition();
1478 wxSize siz = mMixerBoard->GetSize();
1479 wxSize siz2 = this->GetSize();
1480
1481 //wxLogDebug("Got rid of board %p", mMixerBoard );
1482 mMixerBoard->Destroy();
1483 mMixerBoard = NULL;
1484 mMixerBoard = safenew MixerBoard(pProject, this, pos, siz);
1485 //wxLogDebug("Created NEW board %p", mMixerBoard );
1487 mMixerBoard->SetSize( siz );
1488
1489 this->SetSize( siz2 );
1491}

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

Here is the call graph for this function:

◆ SetWindowTitle()

void MixerBoardFrame::SetWindowTitle ( )
private

Definition at line 1493 of file MixerBoard.cpp.

1494{
1495 wxString name = mProject->GetProjectName();
1496 if (!name.empty())
1497 {
1498 name.Prepend(wxT(" - "));
1499 }
1500
1501 SetTitle(AudacityMixerBoardTitle.Format(name).Translation());
1502}
wxT("CloseDown"))
const TranslatableString name
Definition: Distortion.cpp:74
#define AudacityMixerBoardTitle
Definition: MixerBoard.cpp:68
const wxString & GetProjectName() const
Definition: Project.cpp:100

References AudacityMixerBoardTitle, TranslatableString::empty(), 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 293 of file MixerBoard.h.

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

◆ mProject

AudacityProject* MixerBoardFrame::mProject
private

Definition at line 291 of file MixerBoard.h.

Referenced by SetWindowTitle().

◆ mTitleChangeSubscription

Observer::Subscription MixerBoardFrame::mTitleChangeSubscription
private

Definition at line 290 of file MixerBoard.h.


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