Audacity 3.2.0
Functions
Printing.h File Reference
#include <wx/defs.h>
Include dependency graph for Printing.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void HandlePageSetup (wxWindow *parent)
 
void HandlePrint (wxWindow *parent, const wxString &name, TrackList *tracks, TrackPanel &panel)
 

Function Documentation

◆ HandlePageSetup()

void HandlePageSetup ( wxWindow *  parent)

Definition at line 161 of file Printing.cpp.

162{
163 wxPageSetupData pageSetupData;
164
165 wxPageSetupDialog pageSetupDialog(parent, &pageSetupData);
166 pageSetupDialog.ShowModal();
167
168 gPrintData() = pageSetupDialog.GetPageSetupData().GetPrintData();
169}
wxPrintData & gPrintData()
Definition: Printing.cpp:39

References gPrintData().

Referenced by anonymous_namespace{FileMenus.cpp}::OnPageSetup().

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

◆ HandlePrint()

void HandlePrint ( wxWindow *  parent,
const wxString &  name,
TrackList tracks,
TrackPanel panel 
)

Definition at line 171 of file Printing.cpp.

174{
175 wxPrintDialogData printDialogData(gPrintData());
176
177 wxPrinter printer(&printDialogData);
178 AudacityPrintout printout(name, tracks, panel);
179 if (!printer.Print(parent, &printout, true)) {
180 if (wxPrinter::GetLastError() == wxPRINTER_ERROR) {
182 XO("There was a problem printing."),
183 XO("Print"),
184 wxOK);
185 }
186 else {
187 // Do nothing, the user cancelled...
188 }
189 }
190 else {
191 gPrintData() = printer.GetPrintDialogData().GetPrintData();
192 }
193}
int AudacityMessageBox(const TranslatableString &message, const TranslatableString &caption, long style, wxWindow *parent, int x, int y)
const TranslatableString name
Definition: Distortion.cpp:75
XO("Cut/Copy/Paste")
Derived from wxPrintout, this class helps with printing.
Definition: Printing.cpp:46

References AudacityMessageBox(), gPrintData(), name, and XO().

Referenced by anonymous_namespace{FileMenus.cpp}::OnPrint().

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