Vegastrike 0.5.1 rc1  1.0
Original sources for Vegastrike Evolved
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
EventResponder Class Reference

#include <eventresponder.h>

Inheritance diagram for EventResponder:
Control Window GroupControl NewButton Picker Slider StaticDisplay StaticImageDisplay Scroller ScrollerButton SimplePicker TextInputDisplay

Public Member Functions

virtual bool processCommand (const EventCommandId &command, Control *control)
 
virtual bool processKeyDown (const InputEvent &event)
 
virtual bool processKeyUp (const InputEvent &event)
 
virtual bool processMouseDown (const InputEvent &event)
 
virtual void processUnfocus (const InputEvent &event)
 
virtual bool processMouseUp (const InputEvent &event)
 
virtual bool processMouseMove (const InputEvent &event)
 
virtual bool processMouseDrag (const InputEvent &event)
 
virtual void sendCommand (const EventCommandId &command, Control *control)
 
virtual void setCommandTarget (EventResponder *responder)
 
virtual void setModal (bool modal)
 
 EventResponder (void)
 
virtual ~EventResponder (void)
 

Protected Attributes

bool m_modal
 
EventResponderm_commandTarget
 

Detailed Description

Definition at line 40 of file eventresponder.h.

Constructor & Destructor Documentation

EventResponder::EventResponder ( void  )

Definition at line 118 of file eventresponder.cpp.

118  :
119  m_modal( false )
120  , m_commandTarget( NULL )
121 {}
EventResponder::~EventResponder ( void  )
virtual

Definition at line 123 of file eventresponder.cpp.

References globalEventManager(), hasGlobalEventManager(), and EventManager::removeResponder().

124 {
125  //Make sure this responder is not in the event chain.
126  if ( hasGlobalEventManager() )
128 }

Member Function Documentation

bool EventResponder::processCommand ( const EventCommandId command,
Control control 
)
virtual

Reimplemented in Picker, Window, StaticDisplay, and Scroller.

Definition at line 49 of file eventresponder.cpp.

References m_modal.

Referenced by Scroller::processCommand(), StaticDisplay::processCommand(), Window::processCommand(), Picker::processCommand(), and sendCommand().

50 {
51  return m_modal;
52 }
bool EventResponder::processKeyDown ( const InputEvent event)
virtual

Definition at line 55 of file eventresponder.cpp.

References m_modal.

56 {
57  return m_modal;
58 }
bool EventResponder::processKeyUp ( const InputEvent event)
virtual

Definition at line 61 of file eventresponder.cpp.

References m_modal.

62 {
63  return m_modal;
64 }
bool EventResponder::processMouseDown ( const InputEvent event)
virtual
bool EventResponder::processMouseDrag ( const InputEvent event)
virtual

Reimplemented in Window, GroupControl, and Slider.

Definition at line 88 of file eventresponder.cpp.

References m_modal.

Referenced by Slider::processMouseDrag(), GroupControl::processMouseDrag(), and Window::processMouseDrag().

89 {
90  return m_modal;
91 }
bool EventResponder::processMouseMove ( const InputEvent event)
virtual

Reimplemented in Picker, Window, and GroupControl.

Definition at line 82 of file eventresponder.cpp.

References m_modal.

Referenced by GroupControl::processMouseMove(), and Window::processMouseMove().

83 {
84  return m_modal;
85 }
bool EventResponder::processMouseUp ( const InputEvent event)
virtual
void EventResponder::processUnfocus ( const InputEvent event)
virtual

Reimplemented in TextInputDisplay.

Definition at line 73 of file eventresponder.cpp.

Referenced by GroupControl::processMouseDown(), and TextInputDisplay::processUnfocus().

73 {}
void EventResponder::sendCommand ( const EventCommandId command,
Control control 
)
virtual
void EventResponder::setCommandTarget ( EventResponder responder)
virtual

Definition at line 106 of file eventresponder.cpp.

References m_commandTarget.

Referenced by Scroller::createControls(), StaticDisplay::setScroller(), and Picker::setScroller().

107 {
108  m_commandTarget = responder;
109 }

Member Data Documentation

EventResponder* EventResponder::m_commandTarget
protected

Definition at line 91 of file eventresponder.h.

Referenced by sendCommand(), and setCommandTarget().

bool EventResponder::m_modal
protected

The documentation for this class was generated from the following files: