// this is used to make the event table entry type safe, so that for an event
// handler only a function with proper parameter list can be given.
-#define wxStaticCastEvent(type, val) wx_static_cast(type, val)
+#define wxStaticCastEvent(type, val) static_cast<type>(val)
#define DECLARE_EVENT_TABLE_ENTRY(type, winid, idLast, fn, obj) \
wxEventTableEntry(type, winid, idLast, fn, obj)
// example)
wxKeyEvent& operator=(const wxKeyEvent& evt)
{
- if (&evt != this)
+ if ( &evt != this )
{
wxEvent::operator=(evt);
- wxKeyboardState::operator=(evt);
+
+ // Borland C++ 5.82 doesn't compile an explicit call to an
+ // implicitly defined operator=() so need to do it this way:
+ *static_cast<wxKeyboardState *>(this) = evt;
m_x = evt.m_x;
m_y = evt.m_y;
// winid and event type
void Connect(int winid,
int lastId,
- int eventType,
+ wxEventType eventType,
wxObjectEventFunction func,
wxObject *userData = (wxObject *) NULL,
wxEvtHandler *eventSink = (wxEvtHandler *) NULL);
// Convenience function: take just one id
void Connect(int winid,
- int eventType,
+ wxEventType eventType,
wxObjectEventFunction func,
wxObject *userData = (wxObject *) NULL,
wxEvtHandler *eventSink = (wxEvtHandler *) NULL)
{ Connect(winid, wxID_ANY, eventType, func, userData, eventSink); }
// Even more convenient: without id (same as using id of wxID_ANY)
- void Connect(int eventType,
+ void Connect(wxEventType eventType,
wxObjectEventFunction func,
wxObject *userData = (wxObject *) NULL,
wxEvtHandler *eventSink = (wxEvtHandler *) NULL)