2011-03-25 05:06:49 +00:00
|
|
|
/* PCSX2 - PS2 Emulator for PCs
|
|
|
|
* Copyright (C) 2002-2010 PCSX2 Dev Team
|
|
|
|
*
|
|
|
|
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
|
|
|
|
* of the GNU Lesser General Public License as published by the Free Software Found-
|
|
|
|
* ation, either version 3 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
|
|
|
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
|
|
|
* PURPOSE. See the GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License along with PCSX2.
|
|
|
|
* If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2016-06-14 22:17:37 +00:00
|
|
|
wxDECLARE_EVENT(pxEvt_StartIdleEventTimer, wxCommandEvent);
|
|
|
|
wxDECLARE_EVENT(pxEvt_DeleteObject, wxCommandEvent);
|
|
|
|
wxDECLARE_EVENT(pxEvt_DeleteThread, wxCommandEvent);
|
2011-03-25 05:06:49 +00:00
|
|
|
|
|
|
|
typedef void FnType_Void();
|
|
|
|
|
|
|
|
// --------------------------------------------------------------------------------------
|
|
|
|
// SynchronousActionState
|
|
|
|
// --------------------------------------------------------------------------------------
|
|
|
|
class SynchronousActionState
|
|
|
|
{
|
2016-11-12 15:28:37 +00:00
|
|
|
DeclareNoncopyableObject(SynchronousActionState);
|
2011-03-25 05:06:49 +00:00
|
|
|
|
|
|
|
protected:
|
2016-11-12 15:28:37 +00:00
|
|
|
bool m_posted;
|
|
|
|
Threading::Semaphore m_sema;
|
|
|
|
ScopedExcept m_exception;
|
2011-03-25 05:06:49 +00:00
|
|
|
|
|
|
|
public:
|
2016-11-12 15:28:37 +00:00
|
|
|
sptr return_value;
|
2011-03-25 05:06:49 +00:00
|
|
|
|
2016-11-12 15:28:37 +00:00
|
|
|
SynchronousActionState()
|
|
|
|
{
|
|
|
|
m_posted = false;
|
|
|
|
return_value = 0;
|
|
|
|
}
|
2011-03-25 05:06:49 +00:00
|
|
|
|
2017-05-06 12:53:02 +00:00
|
|
|
virtual ~SynchronousActionState() = default;
|
2011-03-25 05:06:49 +00:00
|
|
|
|
2016-11-12 15:28:37 +00:00
|
|
|
void SetException(const BaseException &ex);
|
|
|
|
void SetException(BaseException *ex);
|
2011-03-25 05:06:49 +00:00
|
|
|
|
2016-11-12 15:28:37 +00:00
|
|
|
Threading::Semaphore &GetSemaphore() { return m_sema; }
|
|
|
|
const Threading::Semaphore &GetSemaphore() const { return m_sema; }
|
2011-03-25 05:06:49 +00:00
|
|
|
|
2016-11-12 15:28:37 +00:00
|
|
|
void RethrowException() const;
|
|
|
|
int WaitForResult();
|
|
|
|
int WaitForResult_NoExceptions();
|
|
|
|
void PostResult(int res);
|
|
|
|
void ClearResult();
|
|
|
|
void PostResult();
|
2011-03-25 05:06:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// --------------------------------------------------------------------------------------
|
|
|
|
// pxSimpleEvent - non-abstract implementation of wxEvent
|
|
|
|
// --------------------------------------------------------------------------------------
|
|
|
|
// Why? I mean, why is wxEvent abstract? Over-designed OO is such a bad habit. And while
|
|
|
|
// I'm on my high horse (and it's so very high!), why use 'private'? Ever? Seriously, it
|
|
|
|
// sucks. Stop using it, people.
|
|
|
|
//
|
|
|
|
class pxSimpleEvent : public wxEvent
|
|
|
|
{
|
2019-05-12 03:43:47 +00:00
|
|
|
wxDECLARE_DYNAMIC_CLASS_NO_ASSIGN(pxSimpleEvent);
|
2011-03-25 05:06:49 +00:00
|
|
|
|
|
|
|
public:
|
2016-11-12 15:28:37 +00:00
|
|
|
explicit pxSimpleEvent(int evtid = 0)
|
|
|
|
: wxEvent(0, evtid)
|
|
|
|
{
|
|
|
|
}
|
2011-03-25 05:06:49 +00:00
|
|
|
|
2016-11-12 15:28:37 +00:00
|
|
|
pxSimpleEvent(wxWindowID winId, int evtid)
|
|
|
|
: wxEvent(winId, evtid)
|
|
|
|
{
|
|
|
|
}
|
2011-03-25 05:06:49 +00:00
|
|
|
|
2019-05-12 02:18:18 +00:00
|
|
|
pxSimpleEvent(const pxSimpleEvent&) = default;
|
2016-11-12 15:28:37 +00:00
|
|
|
virtual wxEvent *Clone() const { return new pxSimpleEvent(*this); }
|
2011-03-25 05:06:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
// --------------------------------------------------------------------------------------
|
|
|
|
// pxActionEvent
|
|
|
|
// --------------------------------------------------------------------------------------
|
2016-06-14 22:17:37 +00:00
|
|
|
class pxActionEvent;
|
|
|
|
|
|
|
|
wxDECLARE_EVENT(pxEvt_InvokeAction, pxActionEvent);
|
|
|
|
|
2011-03-25 05:06:49 +00:00
|
|
|
class pxActionEvent : public wxEvent
|
|
|
|
{
|
2019-05-12 03:43:47 +00:00
|
|
|
wxDECLARE_DYNAMIC_CLASS_NO_ASSIGN(pxActionEvent);
|
2011-03-25 05:06:49 +00:00
|
|
|
|
|
|
|
protected:
|
2016-11-12 15:28:37 +00:00
|
|
|
SynchronousActionState *m_state;
|
2011-03-25 05:06:49 +00:00
|
|
|
|
|
|
|
public:
|
2017-05-06 12:53:02 +00:00
|
|
|
virtual ~pxActionEvent() = default;
|
2016-11-12 15:28:37 +00:00
|
|
|
virtual pxActionEvent *Clone() const { return new pxActionEvent(*this); }
|
2011-03-25 05:06:49 +00:00
|
|
|
|
2016-11-12 15:28:37 +00:00
|
|
|
explicit pxActionEvent(SynchronousActionState *sema = NULL, int msgtype = pxEvt_InvokeAction);
|
|
|
|
explicit pxActionEvent(SynchronousActionState &sema, int msgtype = pxEvt_InvokeAction);
|
|
|
|
pxActionEvent(const pxActionEvent &src);
|
2011-03-25 05:06:49 +00:00
|
|
|
|
2016-11-12 15:28:37 +00:00
|
|
|
Threading::Semaphore *GetSemaphore() const { return m_state ? &m_state->GetSemaphore() : NULL; }
|
2011-03-25 05:06:49 +00:00
|
|
|
|
2016-11-12 15:28:37 +00:00
|
|
|
const SynchronousActionState *GetSyncState() const { return m_state; }
|
|
|
|
SynchronousActionState *GetSyncState() { return m_state; }
|
2011-03-25 05:06:49 +00:00
|
|
|
|
2016-11-12 15:28:37 +00:00
|
|
|
void SetSyncState(SynchronousActionState *obj) { m_state = obj; }
|
|
|
|
void SetSyncState(SynchronousActionState &obj) { m_state = &obj; }
|
2011-03-25 05:06:49 +00:00
|
|
|
|
2016-11-12 15:28:37 +00:00
|
|
|
virtual void SetException(BaseException *ex);
|
|
|
|
void SetException(const BaseException &ex);
|
|
|
|
|
|
|
|
virtual void _DoInvokeEvent();
|
2011-03-25 05:06:49 +00:00
|
|
|
|
|
|
|
protected:
|
2019-05-12 03:43:47 +00:00
|
|
|
// Extending classes should implement this method to perform whatever action it is
|
|
|
|
// the event is supposed to do. :) Thread affinity is guaranteed to be the Main/UI
|
2016-11-12 15:28:37 +00:00
|
|
|
// thread, and exceptions will be handled automatically.
|
|
|
|
//
|
|
|
|
// Exception note: exceptions are passed back to the thread that posted the event
|
|
|
|
// to the queue, when possible. If the calling thread is not blocking for a result
|
|
|
|
// from this event, then the exception will be posted to the Main/UI thread instead.
|
|
|
|
virtual void InvokeEvent() {}
|
2011-03-25 05:06:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// --------------------------------------------------------------------------------------
|
|
|
|
// pxExceptionEvent
|
|
|
|
// --------------------------------------------------------------------------------------
|
|
|
|
class pxExceptionEvent : public pxActionEvent
|
|
|
|
{
|
2016-11-12 15:28:37 +00:00
|
|
|
typedef pxActionEvent _parent;
|
2011-03-25 05:06:49 +00:00
|
|
|
|
|
|
|
protected:
|
2016-11-12 15:28:37 +00:00
|
|
|
BaseException *m_except;
|
2011-03-25 05:06:49 +00:00
|
|
|
|
|
|
|
public:
|
2016-11-12 15:28:37 +00:00
|
|
|
pxExceptionEvent(BaseException *ex = NULL)
|
|
|
|
{
|
|
|
|
m_except = ex;
|
|
|
|
}
|
2011-03-25 05:06:49 +00:00
|
|
|
|
2016-11-12 15:28:37 +00:00
|
|
|
pxExceptionEvent(const BaseException &ex);
|
2011-03-25 05:06:49 +00:00
|
|
|
|
2017-05-06 12:22:00 +00:00
|
|
|
virtual ~pxExceptionEvent()
|
2016-11-12 15:28:37 +00:00
|
|
|
{
|
|
|
|
}
|
2011-03-25 05:06:49 +00:00
|
|
|
|
2016-11-12 15:28:37 +00:00
|
|
|
virtual pxExceptionEvent *Clone() const { return new pxExceptionEvent(*this); }
|
2011-03-25 05:06:49 +00:00
|
|
|
|
|
|
|
protected:
|
2016-11-12 15:28:37 +00:00
|
|
|
void InvokeEvent();
|
2011-03-25 05:06:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
// --------------------------------------------------------------------------------------
|
|
|
|
// pxSynchronousCommandEvent
|
|
|
|
// --------------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
class pxSynchronousCommandEvent : public wxCommandEvent
|
|
|
|
{
|
2019-05-12 03:43:47 +00:00
|
|
|
wxDECLARE_DYNAMIC_CLASS_NO_ASSIGN(pxSynchronousCommandEvent);
|
2011-03-25 05:06:49 +00:00
|
|
|
|
|
|
|
protected:
|
2016-11-12 15:28:37 +00:00
|
|
|
SynchronousActionState *m_sync;
|
|
|
|
wxEventType m_realEvent;
|
2011-03-25 05:06:49 +00:00
|
|
|
|
|
|
|
public:
|
2017-05-06 12:53:02 +00:00
|
|
|
virtual ~pxSynchronousCommandEvent() = default;
|
2016-11-12 15:28:37 +00:00
|
|
|
virtual pxSynchronousCommandEvent *Clone() const { return new pxSynchronousCommandEvent(*this); }
|
2011-03-25 05:06:49 +00:00
|
|
|
|
2016-11-12 15:28:37 +00:00
|
|
|
pxSynchronousCommandEvent(SynchronousActionState *sema = NULL, wxEventType commandType = wxEVT_NULL, int winid = 0);
|
|
|
|
pxSynchronousCommandEvent(SynchronousActionState &sema, wxEventType commandType = wxEVT_NULL, int winid = 0);
|
2011-03-25 05:06:49 +00:00
|
|
|
|
2016-11-12 15:28:37 +00:00
|
|
|
pxSynchronousCommandEvent(SynchronousActionState *sema, const wxCommandEvent &evt);
|
|
|
|
pxSynchronousCommandEvent(SynchronousActionState &sema, const wxCommandEvent &evt);
|
2011-03-25 05:06:49 +00:00
|
|
|
|
2016-11-12 15:28:37 +00:00
|
|
|
pxSynchronousCommandEvent(const pxSynchronousCommandEvent &src);
|
2011-03-25 05:06:49 +00:00
|
|
|
|
2016-11-12 15:28:37 +00:00
|
|
|
Threading::Semaphore *GetSemaphore() { return m_sync ? &m_sync->GetSemaphore() : NULL; }
|
|
|
|
wxEventType GetRealEventType() const { return m_realEvent; }
|
2011-03-25 05:06:49 +00:00
|
|
|
|
2016-11-12 15:28:37 +00:00
|
|
|
void SetException(BaseException *ex);
|
|
|
|
void SetException(const BaseException &ex);
|
2011-03-25 05:06:49 +00:00
|
|
|
};
|
|
|
|
|
2016-06-14 22:17:37 +00:00
|
|
|
wxDECLARE_EVENT(pxEvt_SynchronousCommand, pxSynchronousCommandEvent);
|
|
|
|
|
2011-03-25 05:06:49 +00:00
|
|
|
// --------------------------------------------------------------------------------------
|
|
|
|
// BaseMessageBoxEvent
|
|
|
|
// --------------------------------------------------------------------------------------
|
|
|
|
class BaseMessageBoxEvent : public pxActionEvent
|
|
|
|
{
|
2016-11-12 15:28:37 +00:00
|
|
|
typedef pxActionEvent _parent;
|
2019-05-12 03:43:47 +00:00
|
|
|
wxDECLARE_DYNAMIC_CLASS_NO_ASSIGN(BaseMessageBoxEvent);
|
2011-03-25 05:06:49 +00:00
|
|
|
|
|
|
|
protected:
|
2016-11-12 15:28:37 +00:00
|
|
|
wxString m_Content;
|
2011-03-25 05:06:49 +00:00
|
|
|
|
|
|
|
public:
|
2017-05-06 12:53:02 +00:00
|
|
|
virtual ~BaseMessageBoxEvent() = default;
|
2016-11-12 15:28:37 +00:00
|
|
|
virtual BaseMessageBoxEvent *Clone() const { return new BaseMessageBoxEvent(*this); }
|
2011-03-25 05:06:49 +00:00
|
|
|
|
2016-11-12 15:28:37 +00:00
|
|
|
explicit BaseMessageBoxEvent(const wxString &content = wxEmptyString, SynchronousActionState *instdata = NULL);
|
|
|
|
BaseMessageBoxEvent(const wxString &content, SynchronousActionState &instdata);
|
|
|
|
BaseMessageBoxEvent(const BaseMessageBoxEvent &event);
|
2011-03-25 05:06:49 +00:00
|
|
|
|
|
|
|
protected:
|
2016-11-12 15:28:37 +00:00
|
|
|
virtual void InvokeEvent();
|
|
|
|
virtual int _DoDialog() const;
|
2011-03-25 05:06:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
// --------------------------------------------------------------------------------------
|
|
|
|
// MsgButtons
|
|
|
|
// --------------------------------------------------------------------------------------
|
|
|
|
class MsgButtons
|
|
|
|
{
|
|
|
|
protected:
|
2016-11-12 15:28:37 +00:00
|
|
|
BITFIELD32()
|
|
|
|
bool
|
|
|
|
m_OK : 1,
|
|
|
|
m_Cancel : 1,
|
|
|
|
m_Yes : 1,
|
|
|
|
m_No : 1,
|
|
|
|
m_AllowToAll : 1,
|
|
|
|
m_Apply : 1,
|
|
|
|
m_Abort : 1,
|
|
|
|
m_Retry : 1,
|
|
|
|
m_Ignore : 1,
|
|
|
|
m_Reset : 1,
|
|
|
|
m_Close : 1;
|
|
|
|
BITFIELD_END
|
|
|
|
|
|
|
|
wxString m_CustomLabel;
|
|
|
|
wxString m_CustomLabelId;
|
2011-03-25 05:06:49 +00:00
|
|
|
|
|
|
|
public:
|
2016-11-12 15:28:37 +00:00
|
|
|
MsgButtons() { bitset = 0; }
|
|
|
|
|
|
|
|
MsgButtons &OK()
|
|
|
|
{
|
|
|
|
m_OK = true;
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
MsgButtons &Cancel()
|
|
|
|
{
|
|
|
|
m_Cancel = true;
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
MsgButtons &Apply()
|
|
|
|
{
|
|
|
|
m_Apply = true;
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
MsgButtons &Yes()
|
|
|
|
{
|
|
|
|
m_Yes = true;
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
MsgButtons &No()
|
|
|
|
{
|
|
|
|
m_No = true;
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
MsgButtons &ToAll()
|
|
|
|
{
|
|
|
|
m_AllowToAll = true;
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
|
|
|
MsgButtons &Abort()
|
|
|
|
{
|
|
|
|
m_Abort = true;
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
MsgButtons &Retry()
|
|
|
|
{
|
|
|
|
m_Retry = true;
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
MsgButtons &Ignore()
|
|
|
|
{
|
|
|
|
m_Ignore = true;
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
MsgButtons &Reset()
|
|
|
|
{
|
|
|
|
m_Reset = true;
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
MsgButtons &Close()
|
|
|
|
{
|
|
|
|
m_Close = true;
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
|
|
|
// label - native language label displayed to user
|
|
|
|
// id - raw ASCII identifier used in the config file (do not translate, hence char*)
|
|
|
|
MsgButtons &Custom(const wxString &label, const char *id)
|
|
|
|
{
|
|
|
|
m_CustomLabel = label;
|
|
|
|
m_CustomLabelId = fromUTF8(id);
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
|
|
|
MsgButtons &OKCancel()
|
|
|
|
{
|
|
|
|
m_OK = m_Cancel = true;
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
MsgButtons &YesNo()
|
|
|
|
{
|
|
|
|
m_Yes = m_No = true;
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool HasOK() const { return m_OK; }
|
|
|
|
bool HasCancel() const { return m_Cancel; }
|
|
|
|
bool HasApply() const { return m_Apply; }
|
|
|
|
bool HasYes() const { return m_Yes; }
|
|
|
|
bool HasNo() const { return m_No; }
|
|
|
|
bool AllowsToAll() const { return m_AllowToAll; }
|
|
|
|
|
|
|
|
bool HasAbort() const { return m_Abort; }
|
|
|
|
bool HasRetry() const { return m_Retry; }
|
|
|
|
bool HasIgnore() const { return m_Ignore; }
|
|
|
|
bool HasReset() const { return m_Reset; }
|
|
|
|
bool HasClose() const { return m_Close; }
|
|
|
|
|
|
|
|
bool HasCustom() const { return !m_CustomLabel.IsEmpty(); }
|
|
|
|
const wxString &GetCustomLabel() const { return m_CustomLabel; }
|
|
|
|
const wxString &GetCustomLabelId() const { return m_CustomLabelId; }
|
|
|
|
|
|
|
|
bool Allows(wxWindowID id) const;
|
|
|
|
void SetBestFocus(wxWindow *dialog) const;
|
|
|
|
void SetBestFocus(wxWindow &dialog) const;
|
|
|
|
|
|
|
|
bool operator==(const MsgButtons &right) const
|
|
|
|
{
|
|
|
|
return OpEqu(bitset);
|
|
|
|
}
|
|
|
|
|
|
|
|
bool operator!=(const MsgButtons &right) const
|
|
|
|
{
|
|
|
|
return !OpEqu(bitset);
|
|
|
|
}
|
2011-03-25 05:06:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
// --------------------------------------------------------------------------------------
|
|
|
|
// pxMessageBoxEvent
|
|
|
|
// --------------------------------------------------------------------------------------
|
|
|
|
// This event type is used to transfer message boxes to the main UI thread, and return the
|
|
|
|
// result of the box. It's the only way a message box can be issued from non-main threads
|
|
|
|
// with complete safety in wx2.8.
|
|
|
|
//
|
|
|
|
// For simplicity sake this message box only supports two basic designs. The main design
|
|
|
|
// is a generic message box with confirmation buttons of your choosing. Additionally you
|
|
|
|
// can specify a "scrollableContent" text string, which is added into a read-only richtext
|
|
|
|
// control similar to the console logs and such.
|
|
|
|
//
|
|
|
|
// Future consideration: If wxWidgets 3.0 has improved thread safety, then it should probably
|
|
|
|
// be reasonable for it to work with a more flexable model where the dialog can be created
|
|
|
|
// on a child thread, passed to the main thread, where ShowModal() is run (keeping the nested
|
|
|
|
// message pumps on the main thread where they belong). But so far this is not possible,
|
|
|
|
// because of various subtle issues in wx2.8 design.
|
|
|
|
//
|
|
|
|
class pxMessageBoxEvent : public BaseMessageBoxEvent
|
|
|
|
{
|
2016-11-12 15:28:37 +00:00
|
|
|
typedef BaseMessageBoxEvent _parent;
|
2019-05-12 03:43:47 +00:00
|
|
|
wxDECLARE_DYNAMIC_CLASS_NO_ASSIGN(pxMessageBoxEvent);
|
2011-03-25 05:06:49 +00:00
|
|
|
|
|
|
|
protected:
|
2016-11-12 15:28:37 +00:00
|
|
|
wxString m_Title;
|
|
|
|
MsgButtons m_Buttons;
|
|
|
|
|
2011-03-25 05:06:49 +00:00
|
|
|
public:
|
2017-05-06 11:00:55 +00:00
|
|
|
virtual ~pxMessageBoxEvent() = default;
|
2016-11-12 15:28:37 +00:00
|
|
|
virtual pxMessageBoxEvent *Clone() const { return new pxMessageBoxEvent(*this); }
|
2011-03-25 05:06:49 +00:00
|
|
|
|
2016-11-12 15:28:37 +00:00
|
|
|
pxMessageBoxEvent() {}
|
|
|
|
pxMessageBoxEvent(const wxString &title, const wxString &content, const MsgButtons &buttons, SynchronousActionState &instdata);
|
|
|
|
pxMessageBoxEvent(const wxString &title, const wxString &content, const MsgButtons &buttons, SynchronousActionState *instdata = NULL);
|
2017-05-06 11:06:08 +00:00
|
|
|
pxMessageBoxEvent(const pxMessageBoxEvent &event) = default;
|
2011-03-25 05:06:49 +00:00
|
|
|
|
|
|
|
protected:
|
2016-11-12 15:28:37 +00:00
|
|
|
int _DoDialog() const;
|
2011-03-25 05:06:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
// --------------------------------------------------------------------------------------
|
|
|
|
// pxAssertionEvent
|
|
|
|
// --------------------------------------------------------------------------------------
|
|
|
|
class pxAssertionEvent : public BaseMessageBoxEvent
|
|
|
|
{
|
2016-11-12 15:28:37 +00:00
|
|
|
typedef BaseMessageBoxEvent _parent;
|
2019-05-12 03:43:47 +00:00
|
|
|
wxDECLARE_DYNAMIC_CLASS_NO_ASSIGN(pxAssertionEvent);
|
2011-03-25 05:06:49 +00:00
|
|
|
|
|
|
|
protected:
|
2016-11-12 15:28:37 +00:00
|
|
|
wxString m_Stacktrace;
|
2011-03-25 05:06:49 +00:00
|
|
|
|
|
|
|
public:
|
2017-05-06 11:00:55 +00:00
|
|
|
virtual ~pxAssertionEvent() = default;
|
2016-11-12 15:28:37 +00:00
|
|
|
virtual pxAssertionEvent *Clone() const { return new pxAssertionEvent(*this); }
|
2011-03-25 05:06:49 +00:00
|
|
|
|
2016-11-12 15:28:37 +00:00
|
|
|
pxAssertionEvent(const wxString &content = wxEmptyString, const wxString &trace = wxEmptyString, SynchronousActionState *instdata = NULL);
|
|
|
|
pxAssertionEvent(const wxString &content, const wxString &trace, SynchronousActionState &instdata);
|
2017-05-06 11:06:08 +00:00
|
|
|
pxAssertionEvent(const pxAssertionEvent &event) = default;
|
2011-03-25 05:06:49 +00:00
|
|
|
|
2016-11-12 15:28:37 +00:00
|
|
|
pxAssertionEvent &SetStacktrace(const wxString &trace);
|
2011-03-25 05:06:49 +00:00
|
|
|
|
|
|
|
protected:
|
2016-11-12 15:28:37 +00:00
|
|
|
int _DoDialog() const;
|
2011-03-25 05:06:49 +00:00
|
|
|
};
|