wxClientData* m_clientObject; // Arbitrary client object
};
+// this class adds a possibility to react (from the user) code to a control
+// notification: allow or veto the operation being reported.
+class WXDLLEXPORT wxNotifyEvent : public wxCommandEvent
+{
+public:
+ wxNotifyEvent(wxEventType commandType = wxEVT_NULL, int id = 0)
+ : wxCommandEvent(commandType, id) { m_bAllow = TRUE; }
+
+ // veto the operation (by default it's allowed)
+ void Veto() { m_bAllow = FALSE; }
+
+ // for implementation code only: is the operation allowed?
+ bool IsAllowed() const { return m_bAllow; }
+
+private:
+ bool m_bAllow;
+
+ DECLARE_DYNAMIC_CLASS(wxCommandEvent)
+};
+
// Scroll event class
/*
wxEVT_SCROLL_TOP
inline bool RightIsDown(void) const { return m_rightDown; }
// True if a button is down and the mouse is moving
- inline bool Dragging(void) const { return ((m_eventType == wxEVENT_TYPE_MOTION) && (LeftIsDown() || MiddleIsDown() || RightIsDown())); }
+ inline bool Dragging(void) const { return ((m_eventType == wxEVT_MOTION) && (LeftIsDown() || MiddleIsDown() || RightIsDown())); }
// True if the mouse is moving, and no button is down
inline bool Moving(void) const { return (m_eventType == wxEVT_MOTION); }
const wxEventTableEntry theClass::sm_eventTableEntries[] = { \
#define END_EVENT_TABLE() \
- { 0, 0, 0, 0 } };
+ { 0, 0, 0, 0, 0 } };
/*
* Event table macros