-/////////////////////////////////////////////////////////////////////////////\r
-// Name: wx/xtihandler.h\r
-// Purpose: XTI handlers\r
-// Author: Stefan Csomor\r
-// Modified by: Francesco Montorsi\r
-// Created: 27/07/03\r
-// RCS-ID: $Id: xti.h 47299 2007-07-10 15:58:27Z FM $\r
-// Copyright: (c) 1997 Julian Smart\r
-// (c) 2003 Stefan Csomor\r
-// Licence: wxWindows licence\r
-/////////////////////////////////////////////////////////////////////////////\r
-\r
-#ifndef _XTIHANDLER_H_\r
-#define _XTIHANDLER_H_\r
-\r
-#include "wx/defs.h"\r
-\r
-#if wxUSE_EXTENDED_RTTI\r
-\r
-#include "wx/string.h"\r
-\r
-class WXDLLIMPEXP_BASE wxObject;\r
-class WXDLLIMPEXP_BASE wxClassInfo;\r
-class WXDLLIMPEXP_BASE wxDynamicClassInfo;\r
-class WXDLLIMPEXP_BASE wxHashTable;\r
-class WXDLLIMPEXP_BASE wxHashTable_Node;\r
-class WXDLLIMPEXP_BASE wxObjectRefData;\r
-class WXDLLIMPEXP_BASE wxEvent;\r
-class WXDLLIMPEXP_BASE wxEvtHandler;\r
-\r
-typedef void (wxObject::*wxObjectEventFunction)(wxEvent&);\r
-\r
-// ----------------------------------------------------------------------------\r
-// Handler Info\r
-//\r
-// this describes an event sink\r
-// ----------------------------------------------------------------------------\r
-\r
-class WXDLLIMPEXP_BASE wxHandlerInfo\r
-{\r
- friend class WXDLLIMPEXP_BASE wxDynamicClassInfo;\r
-\r
-public:\r
- wxHandlerInfo(wxHandlerInfo* &iter,\r
- wxClassInfo* itsClass,\r
- const wxString& name,\r
- wxObjectEventFunction address,\r
- const wxClassInfo* eventClassInfo) :\r
- m_eventFunction(address),\r
- m_name(name),\r
- m_eventClassInfo(eventClassInfo),\r
- m_itsClass(itsClass)\r
- {\r
- Insert(iter);\r
- }\r
-\r
- ~wxHandlerInfo()\r
- { Remove(); }\r
-\r
- // return the name of this handler\r
- const wxString& GetName() const { return m_name; }\r
-\r
- // return the class info of the event\r
- const wxClassInfo *GetEventClassInfo() const { return m_eventClassInfo; }\r
-\r
- // get the handler function pointer\r
- wxObjectEventFunction GetEventFunction() const { return m_eventFunction; }\r
-\r
- // returns NULL if this is the last handler of this class\r
- wxHandlerInfo* GetNext() const { return m_next; }\r
-\r
- // return the class this property is declared in\r
- const wxClassInfo* GetDeclaringClass() const { return m_itsClass; }\r
-\r
-private:\r
-\r
- // inserts this handler at the end of the linked chain which begins\r
- // with "iter" handler.\r
- void Insert(wxHandlerInfo* &iter);\r
-\r
- // removes this handler from the linked chain of the m_itsClass handlers.\r
- void Remove();\r
-\r
- wxObjectEventFunction m_eventFunction;\r
- wxString m_name;\r
- const wxClassInfo* m_eventClassInfo;\r
- wxHandlerInfo* m_next;\r
- wxClassInfo* m_itsClass;\r
-};\r
-\r
-#define wxHANDLER(name,eventClassType) \\r
- static wxHandlerInfo _handlerInfo##name( first, class_t::GetClassInfoStatic(), \\r
- wxT(#name), (wxObjectEventFunction) (wxEventFunction) &name, \\r
- CLASSINFO( eventClassType ) );\r
-\r
-#define wxBEGIN_HANDLERS_TABLE(theClass) \\r
- wxHandlerInfo *theClass::GetHandlersStatic() \\r
- { \\r
- typedef theClass class_t; \\r
- static wxHandlerInfo* first = NULL;\r
-\r
-#define wxEND_HANDLERS_TABLE() \\r
- return first; }\r
-\r
-#define wxEMPTY_HANDLERS_TABLE(theClass) \\r
- wxBEGIN_HANDLERS_TABLE(theClass) \\r
- wxEND_HANDLERS_TABLE()\r
-\r
-#endif // wxUSE_EXTENDED_RTTI\r
-#endif // _XTIHANDLER_H_\r
+/////////////////////////////////////////////////////////////////////////////
+// Name: wx/xtihandler.h
+// Purpose: XTI handlers
+// Author: Stefan Csomor
+// Modified by: Francesco Montorsi
+// Created: 27/07/03
+// RCS-ID: $Id$
+// Copyright: (c) 1997 Julian Smart
+// (c) 2003 Stefan Csomor
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _XTIHANDLER_H_
+#define _XTIHANDLER_H_
+
+#include "wx/defs.h"
+
+#if wxUSE_EXTENDED_RTTI
+
+#include "wx/xti.h"
+
+// copied from event.h which cannot be included at this place
+
+class WXDLLIMPEXP_FWD_BASE wxEvent;
+
+#ifdef __VISUALC__
+#define wxMSVC_FWD_MULTIPLE_BASES __multiple_inheritance
+#else
+#define wxMSVC_FWD_MULTIPLE_BASES
+#endif
+
+class WXDLLIMPEXP_FWD_BASE wxMSVC_FWD_MULTIPLE_BASES wxEvtHandler;
+typedef void (wxEvtHandler::*wxEventFunction)(wxEvent&);
+typedef wxEventFunction wxObjectEventFunction;
+
+// ----------------------------------------------------------------------------
+// Handler Info
+//
+// this describes an event sink
+// ----------------------------------------------------------------------------
+
+class WXDLLIMPEXP_BASE wxHandlerInfo
+{
+ friend class WXDLLIMPEXP_BASE wxDynamicClassInfo;
+
+public:
+ wxHandlerInfo(wxHandlerInfo* &iter,
+ wxClassInfo* itsClass,
+ const wxString& name,
+ wxObjectEventFunction address,
+ const wxClassInfo* eventClassInfo) :
+ m_eventFunction(address),
+ m_name(name),
+ m_eventClassInfo(eventClassInfo),
+ m_itsClass(itsClass)
+ {
+ Insert(iter);
+ }
+
+ ~wxHandlerInfo()
+ { Remove(); }
+
+ // return the name of this handler
+ const wxString& GetName() const { return m_name; }
+
+ // return the class info of the event
+ const wxClassInfo *GetEventClassInfo() const { return m_eventClassInfo; }
+
+ // get the handler function pointer
+ wxObjectEventFunction GetEventFunction() const { return m_eventFunction; }
+
+ // returns NULL if this is the last handler of this class
+ wxHandlerInfo* GetNext() const { return m_next; }
+
+ // return the class this property is declared in
+ const wxClassInfo* GetDeclaringClass() const { return m_itsClass; }
+
+private:
+
+ // inserts this handler at the end of the linked chain which begins
+ // with "iter" handler.
+ void Insert(wxHandlerInfo* &iter);
+
+ // removes this handler from the linked chain of the m_itsClass handlers.
+ void Remove();
+
+ wxObjectEventFunction m_eventFunction;
+ wxString m_name;
+ const wxClassInfo* m_eventClassInfo;
+ wxHandlerInfo* m_next;
+ wxClassInfo* m_itsClass;
+};
+
+#define wxHANDLER(name,eventClassType) \
+ static wxHandlerInfo _handlerInfo##name( first, class_t::GetClassInfoStatic(), \
+ wxT(#name), (wxObjectEventFunction) (wxEventFunction) &name, \
+ wxCLASSINFO( eventClassType ) );
+
+#define wxBEGIN_HANDLERS_TABLE(theClass) \
+ wxHandlerInfo *theClass::GetHandlersStatic() \
+ { \
+ typedef theClass class_t; \
+ static wxHandlerInfo* first = NULL;
+
+#define wxEND_HANDLERS_TABLE() \
+ return first; }
+
+#define wxEMPTY_HANDLERS_TABLE(theClass) \
+ wxBEGIN_HANDLERS_TABLE(theClass) \
+ wxEND_HANDLERS_TABLE()
+
+#endif // wxUSE_EXTENDED_RTTI
+#endif // _XTIHANDLER_H_