wxCloseEvent::GetLoggingOff() is for [query] end session events only

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34239 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2005-05-22 11:21:21 +00:00
parent 7c4a4505c1
commit 4bcfcdef85
2 changed files with 23 additions and 6 deletions

View File

@@ -1389,7 +1389,15 @@ public:
m_canVeto(event.m_canVeto) {}
void SetLoggingOff(bool logOff) { m_loggingOff = logOff; }
bool GetLoggingOff() const { return m_loggingOff; }
bool GetLoggingOff() const
{
// m_loggingOff flag is only used by wxEVT_[QUERY_]END_SESSION, it
// doesn't make sense for wxEVT_CLOSE_WINDOW
wxASSERT_MSG( m_eventType != wxEVT_CLOSE_WINDOW,
_T("this flag is for end session events only") );
return m_loggingOff;
}
void Veto(bool veto = true)
{
@@ -1400,19 +1408,18 @@ public:
m_veto = veto;
}
void SetCanVeto(bool canVeto) { m_canVeto = canVeto; }
// No more asserts here please, the one you put here was wrong.
bool CanVeto() const { return m_canVeto; }
bool GetVeto() const { return m_canVeto && m_veto; }
virtual wxEvent *Clone() const { return new wxCloseEvent(*this); }
protected:
bool m_loggingOff;
bool m_veto, m_canVeto;
bool m_loggingOff,
m_veto,
m_canVeto;
private:
DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxCloseEvent)
};
/*