Audacity 3.2.0
Public Member Functions | List of all members
WindowActions::Handler Struct Reference
Inheritance diagram for WindowActions::Handler:
[legend]
Collaboration diagram for WindowActions::Handler:
[legend]

Public Member Functions

void OnMacMinimize (const CommandContext &context)
 
void OnMacZoom (const CommandContext &context)
 
void OnMacBringAllToFront (const CommandContext &)
 
void OnMacMinimizeAll (const CommandContext &)
 

Detailed Description

Definition at line 122 of file WindowMenus.cpp.

Member Function Documentation

◆ OnMacBringAllToFront()

void WindowActions::Handler::OnMacBringAllToFront ( const CommandContext )
inline

Definition at line 149 of file WindowMenus.cpp.

150{
151 // Really this de-miniaturizes all, which is not exactly the standard
152 // behavior.
153 for (const auto project : AllProjects{})
154 GetProjectFrame( *project ).Raise();
155}
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 ...

References GetProjectFrame().

Here is the call graph for this function:

◆ OnMacMinimize()

void WindowActions::Handler::OnMacMinimize ( const CommandContext context)
inline

Definition at line 124 of file WindowMenus.cpp.

125{
126 DoMacMinimize(&context.project);
127}
AudacityProject & project
void DoMacMinimize(AudacityProject *project)
Definition: WindowMenus.cpp:34

References anonymous_namespace{WindowMenus.cpp}::DoMacMinimize(), and CommandContext::project.

Here is the call graph for this function:

◆ OnMacMinimizeAll()

void WindowActions::Handler::OnMacMinimizeAll ( const CommandContext )
inline

Definition at line 157 of file WindowMenus.cpp.

158{
159 for (const auto project : AllProjects{}) {
160 DoMacMinimize(project.get());
161 }
162}

References anonymous_namespace{WindowMenus.cpp}::DoMacMinimize().

Here is the call graph for this function:

◆ OnMacZoom()

void WindowActions::Handler::OnMacZoom ( const CommandContext context)
inline

Definition at line 129 of file WindowMenus.cpp.

130{
131 auto window = &GetProjectFrame( context.project );
132 auto topWindow = static_cast<wxTopLevelWindow*>(window);
133 auto maximized = topWindow->IsMaximized();
134 if (window) {
135#ifdef USE_COCOA
136 // Adapted from mbarman.mm in wxWidgets 3.0.2
137 auto peer = window->GetPeer();
138 peer->GetWXPeer();
139 auto widget = static_cast<wxWidgetCocoaImpl*>(peer)->GetWXWidget();
140 auto nsWindow = [widget window];
141 if (nsWindow)
142 [nsWindow performZoom:widget];
143#else
144 topWindow->Maximize(!maximized);
145#endif
146 }
147}

References GetProjectFrame(), and CommandContext::project.

Here is the call graph for this function:

The documentation for this struct was generated from the following file: