Audacity  2.3.1
Functions
MultiDialog.h File Reference
#include <wx/defs.h>
#include <wx/window.h>

Go to the source code of this file.

Functions

int ShowMultiDialog (const wxString &message, const wxString &title, const wxChar **buttons, const wxString &boxMsg=_("Please select an action"), bool log=true)
 

Function Documentation

int ShowMultiDialog ( const wxString &  message,
const wxString &  title,
const wxChar **  buttons,
const wxString &  boxMsg = _("Please select an action"),
bool  log = true 
)

Definition at line 161 of file MultiDialog.cpp.

Referenced by ModuleManager::Initialize(), and DirManager::ProjectFSCK().

164 {
165  wxWindow * pParent = wxTheApp->GetTopWindow();
166 
167  // We want a parent we can display over, so don't make it a parent if top
168  // window is a STAY_ON_TOP.
169  if (pParent) {
170  if ((pParent->GetWindowStyle() & wxSTAY_ON_TOP) == wxSTAY_ON_TOP)
171  pParent = NULL;
172  }
173  MultiDialog dlog(pParent,
174  message, title, buttons, boxMsg, log);
175  // If dialog does not have a parent, cannot be centred on it.
176  if (pParent != NULL)
177  dlog.CentreOnParent();
178  else {
179  dlog.CenterOnScreen();
180  // and after centring move the dialog left by the size of the dialog.
181  // Likely to help if we have the splash screen visible, or if
182  // we're spanning two equally sized monitors.
183  // Unlikely to make things worse.
184  wxSize Size = dlog.GetSize();
185  Size.SetHeight( 10 );
186  wxPoint Pos = dlog.GetPosition() -Size;
187  dlog.Move(Pos);
188  }
189  return dlog.ShowModal();
190 }
A multi purpose dialog, mainly used to show lists of orphaned or damaged block files. It is a good alternative to having a dialog pop up for each problem encountered, since there can be many orphans.
Definition: MultiDialog.cpp:40