2014-05-02 08:30:32 +02:00
|
|
|
#include "stdafx.h"
|
2014-09-07 09:49:25 +02:00
|
|
|
#include "restore_new.h"
|
2015-04-23 18:58:37 +02:00
|
|
|
#pragma warning(push)
|
|
|
|
#pragma message("TODO: remove wx dependency: <wx/msgdlg.h>")
|
2015-01-25 17:23:24 +01:00
|
|
|
#pragma warning(disable : 4996)
|
2014-08-29 00:49:26 +02:00
|
|
|
#include <wx/msgdlg.h>
|
2015-04-23 18:58:37 +02:00
|
|
|
#pragma warning(pop)
|
2014-09-07 09:49:25 +02:00
|
|
|
#include "define_new_memleakdetect.h"
|
2014-08-22 16:21:55 +02:00
|
|
|
#include "rMsgBox.h"
|
2014-05-02 08:30:32 +02:00
|
|
|
|
2014-07-11 19:06:59 +02:00
|
|
|
#ifndef QT_UI
|
2014-05-02 08:30:32 +02:00
|
|
|
rMessageDialog::rMessageDialog(void *parent, const std::string& msg, const std::string& title , long style )
|
|
|
|
{
|
|
|
|
handle = reinterpret_cast<void*>(new wxMessageDialog(
|
|
|
|
reinterpret_cast<wxWindow*>(parent)
|
|
|
|
, fmt::FromUTF8(msg)
|
|
|
|
, fmt::FromUTF8(title)
|
|
|
|
, style
|
|
|
|
));
|
|
|
|
}
|
|
|
|
|
|
|
|
rMessageDialog::~rMessageDialog()
|
|
|
|
{
|
|
|
|
delete reinterpret_cast<wxMessageDialog*>(handle);
|
|
|
|
}
|
|
|
|
|
|
|
|
long rMessageDialog::ShowModal()
|
|
|
|
{
|
|
|
|
return reinterpret_cast<wxMessageDialog*>(handle)->ShowModal();
|
|
|
|
}
|
|
|
|
|
|
|
|
long rMessageBox(const std::string& message, const std::string& title, long style)
|
|
|
|
{
|
|
|
|
return wxMessageBox(fmt::FromUTF8(message), fmt::FromUTF8(title),style);
|
|
|
|
}
|
|
|
|
|
2014-07-11 19:06:59 +02:00
|
|
|
#endif
|
2014-05-02 08:30:32 +02:00
|
|
|
|