]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/event.h
Added script to help make wxMotif via configure; nativdlg sample works again;
[wxWidgets.git] / include / wx / event.h
index e9eb695cd2889ac2c15a6e1224aff1ee0dae9336..576e2711568961a86c282d7ee8f046da7702e0f3 100644 (file)
@@ -179,6 +179,8 @@ const wxEventType wxEVT_COMMAND_LIST_ITEM_DESELECTED =      wxEVT_FIRST + 709;
 const wxEventType wxEVT_COMMAND_LIST_KEY_DOWN =             wxEVT_FIRST + 710;
 const wxEventType wxEVT_COMMAND_LIST_INSERT_ITEM =          wxEVT_FIRST + 711;
 const wxEventType wxEVT_COMMAND_LIST_COL_CLICK =            wxEVT_FIRST + 712;
+const wxEventType wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK =     wxEVT_FIRST + 713;
+const wxEventType wxEVT_COMMAND_LIST_ITEM_MIDDLE_CLICK =    wxEVT_FIRST + 714;
 
  /* Tab and notebook control event types */
 const wxEventType wxEVT_COMMAND_TAB_SEL_CHANGED =           wxEVT_FIRST + 800;
@@ -345,6 +347,26 @@ class WXDLLEXPORT wxCommandEvent: public wxEvent
   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(wxNotifyEvent)
+};
+
 // Scroll event class
 /*
  wxEVT_SCROLL_TOP
@@ -456,7 +478,7 @@ class WXDLLEXPORT wxMouseEvent: public wxEvent
   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); }
@@ -1115,7 +1137,7 @@ const wxEventTable theClass::sm_eventTable =\
 const wxEventTableEntry theClass::sm_eventTableEntries[] = { \
 
 #define END_EVENT_TABLE() \
- { 0, 0, 0, 0 } };
+ { 0, 0, 0, 0, 0 } };
  
 /*
  * Event table macros