Audacity  2.2.2
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 160 of file MultiDialog.cpp.

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

163 {
164  wxWindow * pParent = wxTheApp->GetTopWindow();
165 
166  // We want a parent we can display over, so don't make it a parent if top
167  // window is a STAY_ON_TOP.
168  if (pParent) {
169  if ((pParent->GetWindowStyle() & wxSTAY_ON_TOP) == wxSTAY_ON_TOP)
170  pParent = NULL;
171  }
172  MultiDialog dlog(pParent,
173  message, title, buttons, boxMsg, log);
174  // If dialog does not have a parent, cannot be centred on it.
175  if (pParent != NULL)
176  dlog.CentreOnParent();
177  else {
178  dlog.CenterOnScreen();
179  // and after centring move the dialog left by the size of the dialog.
180  // Likely to help if we have the splash screen visible, or if
181  // we're spanning two equally sized monitors.
182  // Unlikely to make things worse.
183  wxSize Size = dlog.GetSize();
184  Size.SetHeight( 10 );
185  wxPoint Pos = dlog.GetPosition() -Size;
186  dlog.Move(Pos);
187  }
188  return dlog.ShowModal();
189 }
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:39