Mercurial > fife-parpg
comparison engine/core/eventchannel/base/ec_inputevent.h @ 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 | 90005975cdbb |
comparison
equal
deleted
inserted
replaced
2:e84dccee1bb7 | 3:6387bbc0c2d5 |
---|---|
43 public: | 43 public: |
44 /** Constructor. | 44 /** Constructor. |
45 */ | 45 */ |
46 InputEvent(): | 46 InputEvent(): |
47 Event(), | 47 Event(), |
48 m_consumedbyguichan(false), | 48 m_consumedbywidgets(false), |
49 m_isshiftpressed(false), | 49 m_isshiftpressed(false), |
50 m_iscontrolpressed(false), | 50 m_iscontrolpressed(false), |
51 m_isaltpressed(false), | 51 m_isaltpressed(false), |
52 m_ismetapressed(false) {}; | 52 m_ismetapressed(false) {}; |
53 | 53 |
73 /** Checks whether shift is pressed. | 73 /** Checks whether shift is pressed. |
74 */ | 74 */ |
75 virtual bool isShiftPressed() const { return m_isshiftpressed; } | 75 virtual bool isShiftPressed() const { return m_isshiftpressed; } |
76 virtual void setShiftPressed(bool pressed) { m_isshiftpressed = pressed; } | 76 virtual void setShiftPressed(bool pressed) { m_isshiftpressed = pressed; } |
77 | 77 |
78 /** Marks events as consumed by guichan. | 78 /** Marks events as consumed by widget library. |
79 */ | 79 */ |
80 virtual void consumedByGuichan() { m_consumedbyguichan = true; } | 80 virtual void consumedByWidgets() { m_consumedbywidgets = true; } |
81 virtual bool isConsumedByGuichan() const { return m_consumedbyguichan; } | 81 virtual bool isConsumedByWidgets() const { return m_consumedbywidgets; } |
82 | 82 |
83 virtual void consume() { Event::consume(); } | 83 virtual void consume() { Event::consume(); } |
84 virtual bool isConsumed() const { return Event::isConsumed(); } | 84 virtual bool isConsumed() const { return Event::isConsumed(); } |
85 virtual IEventSource* getSource() { return Event::getSource(); } | 85 virtual IEventSource* getSource() { return Event::getSource(); } |
86 virtual void setSource(IEventSource* source) { Event::setSource(source); } | 86 virtual void setSource(IEventSource* source) { Event::setSource(source); } |
105 return ss.str(); | 105 return ss.str(); |
106 } | 106 } |
107 | 107 |
108 | 108 |
109 private: | 109 private: |
110 bool m_consumedbyguichan; | 110 bool m_consumedbywidgets; |
111 bool m_isshiftpressed; | 111 bool m_isshiftpressed; |
112 bool m_iscontrolpressed; | 112 bool m_iscontrolpressed; |
113 bool m_isaltpressed; | 113 bool m_isaltpressed; |
114 bool m_ismetapressed; | 114 bool m_ismetapressed; |
115 }; | 115 }; |