changeset 3:6387bbc0c2d5

Changed guichan references in event manager to widgets. This is to keep eventmanager code more independent of guichan.
author jasoka@33b003aa-7bff-0310-803a-e67f0ece8222
date Wed, 02 Jul 2008 10:57:23 +0000
parents e84dccee1bb7
children 75d6b257af83
files doc/dependencies/moduledeps.png engine/core/eventchannel/base/ec_inputevent.h engine/core/eventchannel/eventchannel.i engine/core/eventchannel/key/ec_keyevent.h engine/core/eventchannel/mouse/ec_mouseevent.h engine/core/gui/guimanager.cpp engine/core/gui/widgets/widgets.i
diffstat 7 files changed, 14 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
Binary file doc/dependencies/moduledeps.png has changed
--- a/engine/core/eventchannel/base/ec_inputevent.h	Tue Jul 01 17:43:35 2008 +0000
+++ b/engine/core/eventchannel/base/ec_inputevent.h	Wed Jul 02 10:57:23 2008 +0000
@@ -45,7 +45,7 @@
 		*/
 		InputEvent(): 
 			Event(), 
-			m_consumedbyguichan(false), 
+			m_consumedbywidgets(false), 
 			m_isshiftpressed(false), 
 			m_iscontrolpressed(false), 
 			m_isaltpressed(false), 
@@ -75,10 +75,10 @@
 		virtual bool isShiftPressed() const { return m_isshiftpressed; }
 		virtual void setShiftPressed(bool pressed) { m_isshiftpressed = pressed; }
 		
-		/** Marks events as consumed by guichan. 
+		/** Marks events as consumed by widget library. 
 		 */
-		virtual void consumedByGuichan() { m_consumedbyguichan = true; }
-		virtual bool isConsumedByGuichan() const { return m_consumedbyguichan; }
+		virtual void consumedByWidgets() { m_consumedbywidgets = true; }
+		virtual bool isConsumedByWidgets() const { return m_consumedbywidgets; }
 
 		virtual void consume() { Event::consume(); }
 		virtual bool isConsumed() const { return Event::isConsumed(); }
@@ -107,7 +107,7 @@
 
 
 	private:
-		bool m_consumedbyguichan;
+		bool m_consumedbywidgets;
 		bool m_isshiftpressed;
 		bool m_iscontrolpressed;
 		bool m_isaltpressed;
--- a/engine/core/eventchannel/eventchannel.i	Tue Jul 01 17:43:35 2008 +0000
+++ b/engine/core/eventchannel/eventchannel.i	Wed Jul 02 10:57:23 2008 +0000
@@ -66,7 +66,7 @@
 
 	class InputEvent: public Event {
 	public:
-		virtual bool isConsumedByGuichan() const;
+		virtual bool isConsumedByWidgets() const;
 		virtual bool isAltPressed() const;
 		virtual bool isControlPressed() const;
 		virtual bool isMetaPressed() const;
--- a/engine/core/eventchannel/key/ec_keyevent.h	Tue Jul 01 17:43:35 2008 +0000
+++ b/engine/core/eventchannel/key/ec_keyevent.h	Wed Jul 02 10:57:23 2008 +0000
@@ -82,8 +82,8 @@
 
 		virtual void consume() { InputEvent::consume(); }
 		virtual bool isConsumed() const { return InputEvent::isConsumed(); }
-		virtual void consumedByGuichan() { InputEvent::consumedByGuichan(); }
-		virtual bool isConsumedByGuichan() const { return InputEvent::isConsumedByGuichan(); }
+		virtual void consumedByWidgets() { InputEvent::consumedByWidgets(); }
+		virtual bool isConsumedByWidgets() const { return InputEvent::isConsumedByWidgets(); }
 		virtual IEventSource* getSource() { return InputEvent::getSource(); }
 		virtual void setSource(IEventSource* source) { InputEvent::setSource(source); }
 		virtual gcn::Widget* getSourceWidget() { return InputEvent::getSourceWidget(); }
--- a/engine/core/eventchannel/mouse/ec_mouseevent.h	Tue Jul 01 17:43:35 2008 +0000
+++ b/engine/core/eventchannel/mouse/ec_mouseevent.h	Wed Jul 02 10:57:23 2008 +0000
@@ -125,8 +125,8 @@
 
 		virtual void consume() { InputEvent::consume(); }
 		virtual bool isConsumed() const { return InputEvent::isConsumed(); }
-		virtual void consumedByGuichan() { InputEvent::consumedByGuichan(); }
-		virtual bool isConsumedByGuichan() const { return InputEvent::isConsumedByGuichan(); }
+		virtual void consumedByWidgets() { InputEvent::consumedByWidgets(); }
+		virtual bool isConsumedByWidgets() const { return InputEvent::isConsumedByWidgets(); }
 		virtual IEventSource* getSource() { return InputEvent::getSource(); }
 		virtual void setSource(IEventSource* source) { InputEvent::setSource(source); }
 		virtual gcn::Widget* getSourceWidget() { return InputEvent::getSourceWidget(); }
--- a/engine/core/gui/guimanager.cpp	Tue Jul 01 17:43:35 2008 +0000
+++ b/engine/core/gui/guimanager.cpp	Wed Jul 02 10:57:23 2008 +0000
@@ -201,20 +201,20 @@
 	void GUIManager::evaluateKeyEventConsumption(KeyEvent& evt) {
 		gcn::Widget* w = m_focushandler->getFocused();
 		if (w) {
-			evt.consumedByGuichan();
+			evt.consumedByWidgets();
 		}
 	}
 
 	void GUIManager::evaluateMouseEventConsumption(MouseEvent& evt) {
 		gcn::Widget* w = m_gcn_topcontainer->getWidgetAt(evt.getX(), evt.getY());
 		if (w && w->isVisible()) {
-			evt.consumedByGuichan();
+			evt.consumedByWidgets();
 		}
 	}
 
 	void GUIManager::mousePressed(MouseEvent& evt) {
  		evaluateMouseEventConsumption(evt);
-		if (!evt.isConsumedByGuichan()) {
+		if (!evt.isConsumedByWidgets()) {
 			m_focushandler->focusNone();
 		}
 	}
--- a/engine/core/gui/widgets/widgets.i	Tue Jul 01 17:43:35 2008 +0000
+++ b/engine/core/gui/widgets/widgets.i	Wed Jul 02 10:57:23 2008 +0000
@@ -35,7 +35,7 @@
 	%nodefaultctor;
 	class Graphics {
 	public:
-		enum Alignmnet {
+		enum Alignment {
 			LEFT = 0,
 			CENTER,
 			RIGHT