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

Go to the source code of this file.

Functions

int ShowMultiDialog (const TranslatableString &message, const TranslatableString &title, const TranslatableStrings &buttons, const ManualPageID &helpPage, const TranslatableString &boxMsg, bool log)
 

Function Documentation

◆ ShowMultiDialog()

int ShowMultiDialog ( const TranslatableString message,
const TranslatableString title,
const TranslatableStrings buttons,
const ManualPageID helpPage,
const TranslatableString boxMsg,
bool  log 
)

Definition at line 174 of file MultiDialog.cpp.

179{
180 wxWindow * pParent = wxTheApp->GetTopWindow();
181
182 // We want a parent we can display over, so don't make it a parent if top
183 // window is a STAY_ON_TOP.
184 if (pParent) {
185 if ((pParent->GetWindowStyle() & wxSTAY_ON_TOP) == wxSTAY_ON_TOP)
186 pParent = NULL;
187 }
188 MultiDialog dlog(pParent,
189 message, title, buttons, helpPage, boxMsg, log);
190 // If dialog does not have a parent, cannot be centred on it.
191 if (pParent != NULL)
192 dlog.CentreOnParent();
193 else {
194 dlog.CenterOnScreen();
195 // and after centring move the dialog left by the size of the dialog.
196 // Likely to help if we have the splash screen visible, or if
197 // we're spanning two equally sized monitors.
198 // Unlikely to make things worse.
199 wxSize Size = dlog.GetSize();
200 Size.SetHeight( 10 );
201 wxPoint Pos = dlog.GetPosition() -Size;
202 dlog.Move(Pos);
203 }
204 return dlog.ShowModal();
205}
static const auto title
A dialog presenting an exclusive, multiple choice, help button, and log info.
Definition: MultiDialog.cpp:40
SizeType< float > Size
Alias for SizeType<float>
Definition: Size.h:174

References title.