X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b02da6b18713d069cc9f4077f9b43df7a11bc7fb..5c1bfc5da0e4a79803c87747371bcccb377899e0:/include/wx/event.h?ds=sidebyside diff --git a/include/wx/event.h b/include/wx/event.h index 10d5eb7970..83d7212b5f 100644 --- a/include/wx/event.h +++ b/include/wx/event.h @@ -66,6 +66,7 @@ const wxEventType wxEVT_COMMAND_VLBOX_SELECTED = wxEVT_FIRST + 14; const wxEventType wxEVT_COMMAND_COMBOBOX_SELECTED = wxEVT_FIRST + 15; const wxEventType wxEVT_COMMAND_TOOL_RCLICKED = wxEVT_FIRST + 16; const wxEventType wxEVT_COMMAND_TOOL_ENTER = wxEVT_FIRST + 17; +const wxEventType wxEVT_COMMAND_SPINCTRL_UPDATED = wxEVT_FIRST + 18; /* Sockets send events, too */ const wxEventType wxEVT_SOCKET = wxEVT_FIRST + 50; @@ -249,7 +250,15 @@ const wxEventType wxEVT_WIZARD_PAGE_CHANGED = wxEVT_FIRST + 900; const wxEventType wxEVT_WIZARD_PAGE_CHANGING = wxEVT_FIRST + 901; const wxEventType wxEVT_WIZARD_CANCEL = wxEVT_FIRST + 902; -const wxEventType wxEVT_USER_FIRST = wxEVT_FIRST + 2000; +/* Calendar events */ +const wxEventType wxEVT_CALENDAR_SEL_CHANGED = wxEVT_FIRST + 950; +const wxEventType wxEVT_CALENDAR_DAY_CHANGED = wxEVT_FIRST + 951; +const wxEventType wxEVT_CALENDAR_MONTH_CHANGED = wxEVT_FIRST + 952; +const wxEventType wxEVT_CALENDAR_YEAR_CHANGED = wxEVT_FIRST + 953; +const wxEventType wxEVT_CALENDAR_DOUBLECLICKED = wxEVT_FIRST + 954; +const wxEventType wxEVT_CALENDAR_WEEKDAY_CLICKED = wxEVT_FIRST + 955; + +const wxEventType wxEVT_USER_FIRST = wxEVT_FIRST + 2000; /* Compatibility */ @@ -435,6 +444,10 @@ public: // for implementation code only: is the operation allowed? bool IsAllowed() const { return m_bAllow; } + // probably useless: CopyObject() is used for deferred event + // handling but wxNotifyEvent must be processed immediately + void CopyObject(wxObject& obj) const; + private: bool m_bAllow; @@ -506,7 +519,7 @@ public: void CopyObject(wxObject& object_dest) const; public: int m_commandInt; // Additional information - long m_extraLong; + long m_extraLong; }; // Mouse event class @@ -605,21 +618,23 @@ public: bool Leaving() const { return (m_eventType == wxEVT_LEAVE_WINDOW); } // Find the position of the event - void GetPosition(wxCoord *xpos, wxCoord *ypos) const + void GetPosition(wxCoord *xpos, wxCoord *ypos) const { if (xpos) - *xpos = m_x; + *xpos = m_x; if (ypos) *ypos = m_y; } - void GetPosition(int *xpos, int *ypos) const +#ifndef __WIN16__ + void GetPosition(long *xpos, long *ypos) const { if (xpos) - *xpos = (int)m_x; + *xpos = (long)m_x; if (ypos) - *ypos = (int)m_y; + *ypos = (long)m_y; } +#endif // Find the position of the event wxPoint GetPosition() const { return wxPoint(m_x, m_y); } @@ -629,10 +644,10 @@ public: // Compatibility #if WXWIN_COMPATIBILITY - void Position(long *xpos, long *ypos) const + void Position(long *xpos, long *ypos) const { if (xpos) - *xpos = (long)m_x; + *xpos = (long)m_x; if (ypos) *ypos = (long)m_y; } @@ -690,15 +705,17 @@ public: // Find the position of the event void GetPosition(wxCoord *xpos, wxCoord *ypos) const { - if (xpos) *xpos = m_x; + if (xpos) *xpos = m_x; if (ypos) *ypos = m_y; } - void GetPosition(int *xpos, int *ypos) const +#ifndef __WIN16__ + void GetPosition(long *xpos, long *ypos) const { - if (xpos) *xpos = (int)m_x; - if (ypos) *ypos = (int)m_y; + if (xpos) *xpos = (long)m_x; + if (ypos) *ypos = (long)m_y; } +#endif wxPoint GetPosition() const { return wxPoint(m_x, m_y); } @@ -1359,7 +1376,7 @@ public: // process all pending events void ProcessPendingEvents(); - // add a + // add a #if wxUSE_THREADS bool ProcessThreadEvent(wxEvent& event); #endif @@ -1376,12 +1393,28 @@ public: wxObject *userData = (wxObject *) NULL ) { Connect(id, -1, eventType, func, userData); } + bool Disconnect( int id, int lastId = -1, wxEventType eventType = wxEVT_NULL, + wxObjectEventFunction func = NULL, + wxObject *userData = (wxObject *) NULL ); + + // Convenience function: take just one id + bool Disconnect( int id, wxEventType eventType = wxEVT_NULL, + wxObjectEventFunction func = NULL, + wxObject *userData = (wxObject *) NULL ) + { return Disconnect(id, -1, eventType, func, userData); } + // implementation from now on virtual bool SearchEventTable(wxEventTable& table, wxEvent& event); bool SearchDynamicEventTable( wxEvent& event ); #if wxUSE_THREADS - void ClearEventLocker() { delete m_eventsLocker; m_eventsLocker = NULL; }; + void ClearEventLocker() + { +# if !defined(__VISAGECPP__) + delete m_eventsLocker; + m_eventsLocker = NULL; +#endif + }; #endif // old stuff @@ -1416,7 +1449,11 @@ protected: wxList* m_dynamicEvents; wxList* m_pendingEvents; #if wxUSE_THREADS +#if defined (__VISAGECPP__) + wxCriticalSection m_eventsLocker; +# else wxCriticalSection* m_eventsLocker; +# endif #endif // optimization: instead of using costly IsKindOf() to decide whether we're