Audacity 3.2.0
Classes | Macros | Functions
MultiDialog.cpp File Reference
#include "MultiDialog.h"
#include "IteratorX.h"
#include "ShuttleGui.h"
#include <wx/app.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 "HelpSystem.h"
Include dependency graph for MultiDialog.cpp:

Go to the source code of this file.

Classes

class  MultiDialog
 A dialog presenting an exclusive, multiple choice, help button, and log info. More...
 

Macros

#define ID_SHOW_LOG_BUTTON   3333
 

Functions

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

Macro Definition Documentation

◆ ID_SHOW_LOG_BUTTON

#define ID_SHOW_LOG_BUTTON   3333

Definition at line 61 of file MultiDialog.cpp.

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.