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;
void CopyObject(wxObject& object_dest) const;
public:
int m_commandInt; // Additional information
- long m_extraLong;
+ long m_extraLong;
};
// Mouse event class
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(long *xpos, long *ypos) const
{
if (xpos)
- *xpos = (long)m_x;
+ *xpos = (long)m_x;
if (ypos)
*ypos = (long)m_y;
}
// 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;
}
// 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;
}
#ifndef __WIN16__
void GetPosition(long *xpos, long *ypos) const
{
- if (xpos) *xpos = (long)m_x;
+ if (xpos) *xpos = (long)m_x;
if (ypos) *ypos = (long)m_y;
}
#endif
// process all pending events
void ProcessPendingEvents();
- // add a
+ // add a
#if wxUSE_THREADS
bool ProcessThreadEvent(wxEvent& event);
#endif
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
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
#define EVT_TOOL_RCLICKED_RANGE(id1, id2, fn) { wxEVT_COMMAND_TOOL_RCLICKED, id1, id2, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL },
#define EVT_TOOL_ENTER(id, fn) { wxEVT_COMMAND_TOOL_ENTER, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL },
#define EVT_CHECKLISTBOX(id, fn) { wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL },
+#define EVT_SPINCTRL(id, fn) { wxEVT_COMMAND_SPINCTRL_UPDATED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL },
// Generic command events
#define EVT_COMMAND_LEFT_CLICK(id, fn) { wxEVT_COMMAND_LEFT_CLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL },