Visualization Library v1.0.3A lightweight C++ OpenGL middleware for 2D/3D graphics |
[Download] [Tutorials] [All Classes] [Grouped Classes] |
The UIEventListener class listens to the events emitted by an OpenGLContext. More...
#include <UIEventListener.hpp>
Public Member Functions | |
UIEventListener () | |
Constructor. | |
virtual void | initEvent ()=0 |
Event generated when the bound OpenGLContext bocomes initialized or when the event listener is bound to an initialized OpenGLContext. | |
virtual void | destroyEvent ()=0 |
Event generated right before the bound OpenGLContext is destroyed. | |
virtual void | updateEvent ()=0 |
Event generated when the bound OpenGLContext does not have any other message to process and OpenGLContext::continuousUpdate() is set to true or somebody calls OpenGLContext::update(). | |
virtual void | enableEvent (bool enabled)=0 |
Event generated whenever setEnabled() is called. | |
virtual void | addedListenerEvent (OpenGLContext *)=0 |
Event generated whenever a listener is bound to an OpenGLContext context. | |
virtual void | removedListenerEvent (OpenGLContext *)=0 |
Event generated whenever a listener is unbound from an OpenGLContext context. | |
virtual void | mouseMoveEvent (int x, int y)=0 |
Event generated when the mouse moves. | |
virtual void | mouseUpEvent (EMouseButton button, int x, int y)=0 |
Event generated when one of the mouse buttons is released. | |
virtual void | mouseDownEvent (EMouseButton button, int x, int y)=0 |
Event generated when one of the mouse buttons is pressed. | |
virtual void | mouseWheelEvent (int n)=0 |
Event generated when the mouse wheel rotated. | |
virtual void | keyPressEvent (unsigned short unicode_ch, EKey key)=0 |
Event generated when a key is pressed. | |
virtual void | keyReleaseEvent (unsigned short unicode_ch, EKey key)=0 |
Event generated when a key is released. | |
virtual void | resizeEvent (int x, int y)=0 |
Event generated when the bound OpenGLContext is resized. | |
virtual void | fileDroppedEvent (const std::vector< String > &files)=0 |
Event generated when one or more files are dropped on the bound OpenGLContext's area. | |
virtual void | visibilityEvent (bool visible)=0 |
Event generated when the bound OpenGLContext is shown or hidden. | |
virtual void | setEnabled (bool enabled) |
Enables or disables a UIEventListener. | |
bool | isEnabled () const |
Returns whether the UIEventListener is currently enabled or not. | |
OpenGLContext * | openglContext () |
Returns the OpenGLContext to which this UIEventListener is bound or NULL if no context is bound. | |
const OpenGLContext * | openglContext () const |
Returns the OpenGLContext to which this UIEventListener is bound or NULL if no context is bound. | |
Friends | |
class | OpenGLContext |
The UIEventListener class listens to the events emitted by an OpenGLContext.
Definition at line 55 of file UIEventListener.hpp.
vl::UIEventListener::UIEventListener | ( | ) | [inline] |
Constructor.
Definition at line 63 of file UIEventListener.hpp.
References VL_DEBUG_SET_OBJECT_NAME.
virtual void vl::UIEventListener::initEvent | ( | ) | [pure virtual] |
Event generated when the bound OpenGLContext bocomes initialized or when the event listener is bound to an initialized OpenGLContext.
Implemented in vl::Applet, vl::FlatManipulator, vl::GhostCameraManipulator, and vl::TrackballManipulator.
Referenced by vl::OpenGLContext::addEventListener().
virtual void vl::UIEventListener::destroyEvent | ( | ) | [pure virtual] |
Event generated right before the bound OpenGLContext is destroyed.
Implemented in vl::Applet, vl::FlatManipulator, vl::GhostCameraManipulator, and vl::TrackballManipulator.
virtual void vl::UIEventListener::updateEvent | ( | ) | [pure virtual] |
Event generated when the bound OpenGLContext does not have any other message to process and OpenGLContext::continuousUpdate() is set to true
or somebody calls OpenGLContext::update().
Implemented in vl::Applet, vl::FlatManipulator, vl::GhostCameraManipulator, and vl::TrackballManipulator.
virtual void vl::UIEventListener::enableEvent | ( | bool | enabled ) | [pure virtual] |
Event generated whenever setEnabled() is called.
Implemented in vl::Applet, vl::FlatManipulator, vl::GhostCameraManipulator, and vl::TrackballManipulator.
virtual void vl::UIEventListener::addedListenerEvent | ( | OpenGLContext * | ) | [pure virtual] |
Event generated whenever a listener is bound to an OpenGLContext context.
Implemented in vl::Applet, vl::FlatManipulator, vl::GhostCameraManipulator, and vl::TrackballManipulator.
Referenced by vl::OpenGLContext::addEventListener().
virtual void vl::UIEventListener::removedListenerEvent | ( | OpenGLContext * | ) | [pure virtual] |
Event generated whenever a listener is unbound from an OpenGLContext context.
Implemented in vl::Applet, vl::FlatManipulator, vl::GhostCameraManipulator, and vl::TrackballManipulator.
Referenced by vl::OpenGLContext::removeEventListener().
virtual void vl::UIEventListener::mouseMoveEvent | ( | int | x, |
int | y | ||
) | [pure virtual] |
Event generated when the mouse moves.
Implemented in vl::Applet, vl::FlatManipulator, vl::GhostCameraManipulator, and vl::TrackballManipulator.
virtual void vl::UIEventListener::mouseUpEvent | ( | EMouseButton | button, |
int | x, | ||
int | y | ||
) | [pure virtual] |
Event generated when one of the mouse buttons is released.
Implemented in vl::Applet, vl::FlatManipulator, vl::GhostCameraManipulator, and vl::TrackballManipulator.
virtual void vl::UIEventListener::mouseDownEvent | ( | EMouseButton | button, |
int | x, | ||
int | y | ||
) | [pure virtual] |
Event generated when one of the mouse buttons is pressed.
Implemented in vl::Applet, vl::FlatManipulator, vl::GhostCameraManipulator, and vl::TrackballManipulator.
virtual void vl::UIEventListener::mouseWheelEvent | ( | int | n ) | [pure virtual] |
Event generated when the mouse wheel rotated.
Implemented in vl::Applet, vl::FlatManipulator, vl::GhostCameraManipulator, and vl::TrackballManipulator.
virtual void vl::UIEventListener::keyPressEvent | ( | unsigned short | unicode_ch, |
EKey | key | ||
) | [pure virtual] |
Event generated when a key is pressed.
Implemented in vl::Applet, vl::FlatManipulator, vl::GhostCameraManipulator, and vl::TrackballManipulator.
virtual void vl::UIEventListener::keyReleaseEvent | ( | unsigned short | unicode_ch, |
EKey | key | ||
) | [pure virtual] |
Event generated when a key is released.
Implemented in vl::Applet, vl::FlatManipulator, vl::GhostCameraManipulator, and vl::TrackballManipulator.
virtual void vl::UIEventListener::resizeEvent | ( | int | x, |
int | y | ||
) | [pure virtual] |
Event generated when the bound OpenGLContext is resized.
Implemented in vl::Applet, vl::FlatManipulator, vl::GhostCameraManipulator, and vl::TrackballManipulator.
virtual void vl::UIEventListener::fileDroppedEvent | ( | const std::vector< String > & | files ) | [pure virtual] |
Event generated when one or more files are dropped on the bound OpenGLContext's area.
Implemented in vl::Applet, vl::FlatManipulator, vl::GhostCameraManipulator, and vl::TrackballManipulator.
virtual void vl::UIEventListener::visibilityEvent | ( | bool | visible ) | [pure virtual] |
Event generated when the bound OpenGLContext is shown or hidden.
Implemented in vl::Applet, vl::FlatManipulator, vl::GhostCameraManipulator, and vl::TrackballManipulator.
virtual void vl::UIEventListener::setEnabled | ( | bool | enabled ) | [inline, virtual] |
Enables or disables a UIEventListener.
Definition at line 116 of file UIEventListener.hpp.
bool vl::UIEventListener::isEnabled | ( | ) | const [inline] |
Returns whether the UIEventListener is currently enabled or not.
Definition at line 119 of file UIEventListener.hpp.
OpenGLContext * UIEventListener::openglContext | ( | ) |
Returns the OpenGLContext to which this UIEventListener is bound or NULL if no context is bound.
Definition at line 51 of file OpenGLContext.cpp.
Referenced by vl::TrackballManipulator::enableEvent(), vl::GhostCameraManipulator::enableEvent(), vl::FlatManipulator::enableEvent(), vl::Applet::keyReleaseEvent(), vl::TrackballManipulator::mouseDownEvent(), vl::FlatManipulator::mouseDownEvent(), vl::FlatManipulator::mouseInViewport(), vl::TrackballManipulator::mouseMoveEvent(), vl::GhostCameraManipulator::mouseMoveEvent(), vl::FlatManipulator::mouseMoveEvent(), vl::GhostCameraManipulator::updateEvent(), and vl::Applet::updateEvent().
const OpenGLContext* vl::UIEventListener::openglContext | ( | ) | const |
Returns the OpenGLContext to which this UIEventListener is bound or NULL if no context is bound.
friend class OpenGLContext [friend] |
Definition at line 59 of file UIEventListener.hpp.