Audacity  3.0.3
Classes | Macros | Functions
MultiDialog.cpp File Reference
#include "MultiDialog.h"
#include "../ShuttleGui.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 <wx/bmpbuttn.h>
#include "wxPanelWrapper.h"
#include "../LogWindow.h"
#include "Theme.h"
#include "AllThemeResources.h"
#include "../widgets/HelpSystem.h"
Include dependency graph for MultiDialog.cpp:

Go to the source code of this file.


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...


#define ID_SHOW_LOG_BUTTON   3333


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

Macro Definition Documentation


#define ID_SHOW_LOG_BUTTON   3333

Definition at line 67 of file MultiDialog.cpp.

Function Documentation

◆ DefaultMultiDialogMessage()

const TranslatableString& DefaultMultiDialogMessage ( )

Definition at line 213 of file MultiDialog.cpp.

214 {
215  static auto result = XO("Please select an action");
216  return result;
217 }

References XO.

◆ ShowMultiDialog()

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

Definition at line 180 of file MultiDialog.cpp.

185 {
186  wxWindow * pParent = wxTheApp->GetTopWindow();
188  // We want a parent we can display over, so don't make it a parent if top
189  // window is a STAY_ON_TOP.
190  if (pParent) {
191  if ((pParent->GetWindowStyle() & wxSTAY_ON_TOP) == wxSTAY_ON_TOP)
192  pParent = NULL;
193  }
194  MultiDialog dlog(pParent,
195  message, title, buttons, helpPage, boxMsg, log);
196  // If dialog does not have a parent, cannot be centred on it.
197  if (pParent != NULL)
198  dlog.CentreOnParent();
199  else {
200  dlog.CenterOnScreen();
201  // and after centring move the dialog left by the size of the dialog.
202  // Likely to help if we have the splash screen visible, or if
203  // we're spanning two equally sized monitors.
204  // Unlikely to make things worse.
205  wxSize Size = dlog.GetSize();
206  Size.SetHeight( 10 );
207  wxPoint Pos = dlog.GetPosition() -Size;
208  dlog.Move(Pos);
209  }
210  return dlog.ShowModal();
211 }

References title.

Referenced by ProjectFSCK(), and ModuleManager::TryLoadModules().

Here is the caller graph for this function:
#define XO(s)
Definition: Internat.h:31
A multi purpose dialog, mainly used to show lists of orphaned or damaged block files....
Definition: MultiDialog.cpp:46
static const auto title
Definition: NoUpdatesAvailableDialog.cpp:22