DECLARE_EVENT_TYPE(wxEVT_UPDATE_UI, 440)
DECLARE_EVENT_TYPE(wxEVT_SIZING, 441)
DECLARE_EVENT_TYPE(wxEVT_MOVING, 442)
+ DECLARE_EVENT_TYPE(wxEVT_HIBERNATE, 443)
// Generic command events
// Note: a click is a higher-level event than button down/up
/*
wxEVT_ACTIVATE
wxEVT_ACTIVATE_APP
+ wxEVT_HIBERNATE
*/
class WXDLLIMPEXP_CORE wxActivateEvent : public wxEvent
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)
{
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)
-
};
/*
wxEvtHandler *eventSink = (wxEvtHandler *) NULL)
{ return Disconnect(winid, wxID_ANY, eventType, func, userData, eventSink); }
+ bool Disconnect(wxEventType eventType,
+ wxObjectEventFunction func,
+ wxObject *userData = (wxObject *) NULL,
+ wxEvtHandler *eventSink = (wxEvtHandler *) NULL)
+ { return Disconnect(wxID_ANY, eventType, func, userData, eventSink); }
wxList* GetDynamicEventTable() const { return m_dynamicEvents ; }
#define EVT_CHILD_FOCUS(func) wx__DECLARE_EVT0(wxEVT_CHILD_FOCUS, wxChildFocusEventHandler(func))
#define EVT_ACTIVATE(func) wx__DECLARE_EVT0(wxEVT_ACTIVATE, wxActivateEventHandler(func))
#define EVT_ACTIVATE_APP(func) wx__DECLARE_EVT0(wxEVT_ACTIVATE_APP, wxActivateEventHandler(func))
+#define EVT_HIBERNATE(func) wx__DECLARE_EVT0(wxEVT_HIBERNATE, wxActivateEventHandler(func))
#define EVT_END_SESSION(func) wx__DECLARE_EVT0(wxEVT_END_SESSION, wxCloseEventHandler(func))
#define EVT_QUERY_END_SESSION(func) wx__DECLARE_EVT0(wxEVT_QUERY_END_SESSION, wxCloseEventHandler(func))
#define EVT_DROP_FILES(func) wx__DECLARE_EVT0(wxEVT_DROP_FILES, wxDropFilesEventHandler(func))