Visualization Library 2.1.0
A 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. More... | |
virtual void | initEvent ()=0 |
Event generated when the bound OpenGLContext bocomes initialized or when the event listener is bound to an initialized OpenGLContext. More... | |
virtual void | destroyEvent ()=0 |
Event generated right before the bound OpenGLContext is destroyed. More... | |
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(). More... | |
virtual void | enableEvent (bool enabled)=0 |
Event generated whenever setEnabled() is called. More... | |
virtual void | addedListenerEvent (OpenGLContext *)=0 |
Event generated whenever a listener is bound to an OpenGLContext context. More... | |
virtual void | removedListenerEvent (OpenGLContext *)=0 |
Event generated whenever a listener is unbound from an OpenGLContext context. More... | |
virtual void | mouseMoveEvent (int x, int y)=0 |
Event generated when the mouse moves. More... | |
virtual void | mouseUpEvent (EMouseButton button, int x, int y)=0 |
Event generated when one of the mouse buttons is released. More... | |
virtual void | mouseDownEvent (EMouseButton button, int x, int y)=0 |
Event generated when one of the mouse buttons is pressed. More... | |
virtual void | mouseWheelEvent (int n)=0 |
Event generated when the mouse wheel rotated. More... | |
virtual void | keyPressEvent (unsigned short unicode_ch, EKey key)=0 |
Event generated when a key is pressed. More... | |
virtual void | keyReleaseEvent (unsigned short unicode_ch, EKey key)=0 |
Event generated when a key is released. More... | |
virtual void | resizeEvent (int x, int y)=0 |
Event generated when the bound OpenGLContext is resized. More... | |
virtual void | fileDroppedEvent (const std::vector< String > &files)=0 |
Event generated when one or more files are dropped on the bound OpenGLContext's area. More... | |
virtual void | visibilityEvent (bool visible)=0 |
Event generated when the bound OpenGLContext is shown or hidden. More... | |
virtual void | setEnabled (bool enabled) |
Enables or disables a UIEventListener. More... | |
bool | isEnabled () const |
Returns whether the UIEventListener is currently enabled or not. More... | |
OpenGLContext * | openglContext () |
Returns the OpenGLContext to which this UIEventListener is bound or NULL if no context is bound. More... | |
const OpenGLContext * | openglContext () const |
Returns the OpenGLContext to which this UIEventListener is bound or NULL if no context is bound. More... | |
Public Member Functions inherited from vl::Object | |
Object () | |
Constructor. More... | |
Object (const Object &other) | |
Copy constructor: copies the name, ref count mutex and user data. More... | |
Object & | operator= (const Object &other) |
Copy operator: copies the object's name, ref count mutex and user data. More... | |
const std::string & | objectName () const |
The name of the object, by default set to the object's class name. More... | |
void | setObjectName (const char *name) |
The name of the object, by default set to the object's class name in debug builds. More... | |
void | setObjectName (const std::string &name) |
The name of the object, by default set to the object's class name in debug builds. More... | |
void | setRefCountMutex (IMutex *mutex) |
The mutex used to protect the reference counting of an Object across multiple threads. More... | |
IMutex * | refCountMutex () |
The mutex used to protect the reference counting of an Object across multiple threads. More... | |
const IMutex * | refCountMutex () const |
The mutex used to protect the reference counting of an Object across multiple threads. More... | |
int | referenceCount () const |
Returns the number of references of an object. More... | |
void | incReference () const |
Increments the reference count of an object. More... | |
void | decReference () |
Decrements the reference count of an object and deletes it if both automaticDelete() is true the count reaches 0. More... | |
void | setAutomaticDelete (bool autodel_on) |
If set to true the Object is deleted when its reference count reaches 0. More... | |
bool | automaticDelete () const |
If set to true the Object is deleted when its reference count reaches 0. More... | |
template<class T > | |
T * | as () |
Casts an Object to the specified class. More... | |
template<class T > | |
const T * | as () const |
Casts an Object to the specified class. More... | |
Friends | |
class | OpenGLContext |
Additional Inherited Members | |
Protected Member Functions inherited from vl::Object | |
virtual | ~Object () |
Protected Attributes inherited from vl::Object | |
std::string | mObjectName |
IMutex * | mRefCountMutex |
int | mReferenceCount |
bool | mAutomaticDelete |
The UIEventListener class listens to the events emitted by an OpenGLContext.
Definition at line 55 of file UIEventListener.hpp.
|
inline |
Constructor.
Definition at line 63 of file UIEventListener.hpp.
|
pure virtual |
Event generated whenever a listener is bound to an OpenGLContext context.
Implemented in vl::TrackballManipulator, vl::FlatManipulator, vl::Applet, and vl::GhostCameraManipulator.
Referenced by vl::OpenGLContext::addEventListener().
|
pure virtual |
Event generated right before the bound OpenGLContext is destroyed.
Implemented in vl::TrackballManipulator, vl::Applet, vl::FlatManipulator, and vl::GhostCameraManipulator.
|
pure virtual |
Event generated whenever setEnabled() is called.
Implemented in vl::Applet, vl::TrackballManipulator, vl::FlatManipulator, and vl::GhostCameraManipulator.
|
pure virtual |
Event generated when one or more files are dropped on the bound OpenGLContext's area.
Implemented in vl::TrackballManipulator, vl::Applet, vl::FlatManipulator, and vl::GhostCameraManipulator.
|
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::TrackballManipulator, vl::FlatManipulator, and vl::GhostCameraManipulator.
Referenced by vl::OpenGLContext::addEventListener().
|
inline |
Returns whether the UIEventListener is currently enabled or not.
Definition at line 119 of file UIEventListener.hpp.
|
pure virtual |
Event generated when a key is pressed.
Implemented in vl::Applet, vl::TrackballManipulator, vl::FlatManipulator, and vl::GhostCameraManipulator.
|
pure virtual |
Event generated when a key is released.
Implemented in vl::TrackballManipulator, vl::FlatManipulator, vl::GhostCameraManipulator, and vl::Applet.
|
pure virtual |
Event generated when one of the mouse buttons is pressed.
Implemented in vl::Applet, vl::GhostCameraManipulator, vl::TrackballManipulator, and vl::FlatManipulator.
|
pure virtual |
Event generated when the mouse moves.
Implemented in vl::Applet, vl::TrackballManipulator, vl::FlatManipulator, and vl::GhostCameraManipulator.
|
pure virtual |
Event generated when one of the mouse buttons is released.
Implemented in vl::Applet, vl::TrackballManipulator, vl::GhostCameraManipulator, and vl::FlatManipulator.
|
pure virtual |
Event generated when the mouse wheel rotated.
Implemented in vl::Applet, vl::TrackballManipulator, vl::FlatManipulator, and vl::GhostCameraManipulator.
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::Applet::destroyEvent(), vl::GhostCameraManipulator::enableEvent(), vl::FlatManipulator::enableEvent(), vl::TrackballManipulator::enableEvent(), vl::Applet::keyReleaseEvent(), vl::FlatManipulator::mouseDownEvent(), vl::TrackballManipulator::mouseDownEvent(), vl::FlatManipulator::mouseInViewport(), vl::GhostCameraManipulator::mouseMoveEvent(), vl::FlatManipulator::mouseMoveEvent(), vl::TrackballManipulator::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.
|
pure virtual |
Event generated whenever a listener is unbound from an OpenGLContext context.
Implemented in vl::TrackballManipulator, vl::FlatManipulator, vl::Applet, and vl::GhostCameraManipulator.
Referenced by vl::OpenGLContext::removeEventListener().
|
pure virtual |
Event generated when the bound OpenGLContext is resized.
Implemented in vl::TrackballManipulator, vl::FlatManipulator, vl::GhostCameraManipulator, and vl::Applet.
|
inlinevirtual |
Enables or disables a UIEventListener.
Definition at line 116 of file UIEventListener.hpp.
Referenced by vl::OpenGLContext::applyRenderStates().
|
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::TrackballManipulator, vl::Applet, vl::FlatManipulator, and vl::GhostCameraManipulator.
|
pure virtual |
Event generated when the bound OpenGLContext is shown or hidden.
Implemented in vl::TrackballManipulator, vl::Applet, vl::FlatManipulator, and vl::GhostCameraManipulator.
|
friend |
Definition at line 59 of file UIEventListener.hpp.
Visualization Library 2.1.0 Reference Documentation
Updated on Wed Mar 10 2021 16:02:55.
© Copyright Michele Bosi. All rights reserved.