Audacity  2.2.2
Classes | Macros | Functions
MultiDialog.cpp File Reference
#include "../Audacity.h"
#include "../Project.h"
#include "MultiDialog.h"
#include <wx/app.h>
#include <wx/button.h>
#include <wx/dialog.h>
#include <wx/intl.h>
#include <wx/icon.h>
#include <wx/sizer.h>
#include <wx/stattext.h>
#include <wx/statbmp.h>
#include <wx/artprov.h>
#include <wx/radiobox.h>
#include "../commands/CommandContext.h"

Go to the source code of this file.

Classes

class  MultiDialog
 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. More...
 

Macros

#define ID_SHOW_LOG_BUTTON   3333
 

Functions

int ShowMultiDialog (const wxString &message, const wxString &title, const wxChar **buttons, const wxString &boxMsg, bool log)
 

Macro Definition Documentation

#define ID_SHOW_LOG_BUTTON   3333

Definition at line 57 of file MultiDialog.cpp.

Function Documentation

int ShowMultiDialog ( const wxString &  message,
const wxString &  title,
const wxChar **  buttons,
const wxString &  boxMsg,
bool  log 
)

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