Просмотр исходного кода

Removed deprecated secondary handler from EventHandler

Ivan Safrin 12 лет назад
Родитель
Сommit
3d1475dcb7

+ 6 - 14
Core/Contents/Include/PolyEventHandler.h

@@ -35,20 +35,12 @@ namespace Polycode {
 			* Default constructor
 			* Default constructor
 			*/
 			*/
 			EventHandler();
 			EventHandler();
-			virtual ~EventHandler();
-
-		void secondaryHandler(Event *event);		
-		
-		/** 
-		* This method gets called by an EventDispatcher that the handler is listening to if the dispatching event's code matches the code that handler is listening for. Typically, you subclass EventHandler and implement the handleEvent method to handle specific events.
-		* @see EventDispatcher
-		*/
-		virtual void handleEvent(Event *event){}
-			
-		void *secondaryHandlerData;
+			virtual ~EventHandler();	
 		
 		
-		
-		protected:
-	
+			/** 
+			* This method gets called by an EventDispatcher that the handler is listening to if the dispatching event's code matches the code that handler is listening for. Typically, you subclass EventHandler and implement the handleEvent method to handle specific events.
+			* @see EventDispatcher
+			*/
+			virtual void handleEvent(Event *event){}
 	};
 	};
 }
 }

+ 1 - 6
Core/Contents/Source/PolyEventDispatcher.cpp

@@ -69,14 +69,9 @@ namespace Polycode {
 		event->setEventCode(eventCode);
 		event->setEventCode(eventCode);
 		for(int i=0;i<handlerEntries.size();i++) {
 		for(int i=0;i<handlerEntries.size();i++) {
 			if(handlerEntries[i].eventCode == eventCode) {
 			if(handlerEntries[i].eventCode == eventCode) {
-				//				if(handlerEntries[i].handler->onEvent != NULL) {
-				//					handlerEntries[i].handler->onEvent(event);
-				//				}
 				handlerEntries[i].handler->handleEvent(event);
 				handlerEntries[i].handler->handleEvent(event);
-				handlerEntries[i].handler->secondaryHandler(event);
 			}
 			}
-		}
-		
+		}	
 	}
 	}
 	
 	
 	void EventDispatcher::dispatchEventNoDelete(Event *event, int eventCode) {
 	void EventDispatcher::dispatchEventNoDelete(Event *event, int eventCode) {

+ 0 - 3
Core/Contents/Source/PolyEventHandler.cpp

@@ -28,9 +28,6 @@ namespace Polycode {
 	EventHandler::EventHandler() {
 	EventHandler::EventHandler() {
 	}
 	}
 	
 	
-	void EventHandler::secondaryHandler(Event *event) {
-	}	
-	
 	EventHandler::~EventHandler() {
 	EventHandler::~EventHandler() {
 		
 		
 	}
 	}