openscenegraph
|
#include <EventQueue>
Public Types | |
typedef std::list< osg::ref_ptr< Event > > | Events |
Protected Member Functions | |
virtual | ~EventQueue () |
EventQueue & | operator= (const EventQueue &) |
![]() | |
virtual | ~Referenced () |
void | signalObserversAndDelete (bool signalDelete, bool doDelete) const |
void | deleteUsingDeleteHandler () const |
Protected Attributes | |
osg::ref_ptr< GUIEventAdapter > | _accumulateEventState |
bool | _useFixedMouseInputRange |
osg::Timer_t | _startTick |
OpenThreads::Mutex | _eventQueueMutex |
Events | _eventQueue |
bool | _firstTouchEmulatesMouse |
![]() | |
OpenThreads::AtomicPtr | _observerSet |
OpenThreads::Atomic | _refCount |
Additional Inherited Members | |
![]() | |
static OpenThreads::Mutex * | getGlobalReferencedMutex () |
static void | setDeleteHandler (DeleteHandler *handler) |
static DeleteHandler * | getDeleteHandler () |
EventQueue implementation for collecting and adapting windowing events
typedef std::list< osg::ref_ptr<Event> > osgGA::EventQueue::Events |
osgGA::EventQueue::EventQueue | ( | GUIEventAdapter::MouseYOrientation | mouseYOrientation = GUIEventAdapter::Y_INCREASING_DOWNWARDS | ) |
|
protectedvirtual |
void osgGA::EventQueue::addEvent | ( | Event * | event | ) |
Add an event to the end of the event queue.
void osgGA::EventQueue::appendEvents | ( | Events & | events | ) |
Add events to end of event queue.
void osgGA::EventQueue::clear | ( | ) |
clear all events from queue.
|
inline |
Method for adapting close window events.
osgGA::GUIEventAdapter * osgGA::EventQueue::closeWindow | ( | double | time | ) |
Method for adapting close window event with specified event time.
bool osgGA::EventQueue::copyEvents | ( | Events & | events | ) | const |
Take a copy the entire event queue leaving the EventQueue' event queue intact.
GUIEventAdapter * osgGA::EventQueue::createEvent | ( | ) |
convenience method for create an event ready to fill in. Clones the getCurrentEventState() to produce a up to date event state.
|
inline |
osgGA::GUIEventAdapter * osgGA::EventQueue::frame | ( | double | time | ) |
Method for adapting frame events.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Get whether the mouse coordinates should be transformed into a pre defined input range.
osgGA::GUIEventAdapter * osgGA::EventQueue::keyPress | ( | int | key, |
double | time, | ||
int | unmodifiedKey = 0 |
||
) |
Method for adapting keyboard press events. Note, special keys such as Ctrl/Function keys should be adapted to GUIEventAdapter::KeySymbol mappings, with specified time.
|
inline |
Method for adapting keyboard press events. Note, special keys such as Ctrl/Function keys should be adapted to GUIEventAdapter::KeySymbol mappings.
osgGA::GUIEventAdapter * osgGA::EventQueue::keyRelease | ( | int | key, |
double | time, | ||
int | unmodifiedKey = 0 |
||
) |
Method for adapting keyboard press events. Note, special keys such as Ctrl/Function keys should be adapted to GUIEventAdapter::KeySymbol mappings, with specified time.
|
inline |
Method for adapting keyboard press events. Note, special keys such as Ctrl/Function keys should be adapted to GUIEventAdapter::KeySymbol mappings.
|
inline |
Method for adapting mouse button pressed events, placing this event on the back of the event queue. Button numbering is 1 for left mouse button, 2 for middle, 3 for right.
osgGA::GUIEventAdapter * osgGA::EventQueue::mouseButtonPress | ( | float | x, |
float | y, | ||
unsigned int | button, | ||
double | time | ||
) |
Method for adapting mouse button pressed events, placing this event on the back of the event queue, with specified time. Button numbering is 1 for left mouse button, 2 for middle, 3 for right.
|
inline |
Method for adapting mouse button release events, placing this event on the back of the event queue. Button numbering is 1 for left mouse button, 2 for middle, 3 for right.
osgGA::GUIEventAdapter * osgGA::EventQueue::mouseButtonRelease | ( | float | x, |
float | y, | ||
unsigned int | button, | ||
double | time | ||
) |
Method for adapting mouse button release events, placing this event on the back of the event queue, with specified time. Button numbering is 1 for left mouse button, 2 for middle, 3 for right.
|
inline |
Method for adapting mouse button pressed events, placing this event on the back of the event queue. Button numbering is 1 for left mouse button, 2 for middle, 3 for right.
osgGA::GUIEventAdapter * osgGA::EventQueue::mouseDoubleButtonPress | ( | float | x, |
float | y, | ||
unsigned int | button, | ||
double | time | ||
) |
Method for adapting mouse button pressed events, placing this event on the back of the event queue, with specified time. Button numbering is 1 for left mouse button, 2 for middle, 3 for right.
|
inline |
Method for adapting mouse motion events, placing this event on the back of the event queue.
osgGA::GUIEventAdapter * osgGA::EventQueue::mouseMotion | ( | float | x, |
float | y, | ||
double | time | ||
) |
Method for adapting mouse motion events, placing this event on the back of the event queue, with specified time.
|
inline |
Method for adapting mouse scroll wheel events, placing this event on the back of the event queue.
osgGA::GUIEventAdapter * osgGA::EventQueue::mouseScroll | ( | GUIEventAdapter::ScrollingMotion | sm, |
double | time | ||
) |
Method for adapting mouse scroll wheel events, placing this event on the back of the event queue, with specified time.
|
inline |
Method for adapting mouse scroll wheel events, placing this event on the back of the event queue.
osgGA::GUIEventAdapter * osgGA::EventQueue::mouseScroll2D | ( | float | x, |
float | y, | ||
double | time | ||
) |
Method for adapting mouse scroll wheel events, placing this event on the back of the event queue.
void osgGA::EventQueue::mouseWarped | ( | float | x, |
float | y | ||
) |
Method for updating in response to a mouse warp. Note, just moves the mouse position without creating a new event for it.
|
inlineprotected |
Prevent unwanted copy operator.
|
inline |
Method for adapting pen orientation events, placing this event on the back of the event queue.
osgGA::GUIEventAdapter * osgGA::EventQueue::penOrientation | ( | float | tiltX, |
float | tiltY, | ||
float | rotation, | ||
double | time | ||
) |
Method for adapting pen orientation events, placing this event on the back of the event queue, with specified time.
|
inline |
Method for adapting pen pressure events, placing this event on the back of the event queue.
osgGA::GUIEventAdapter * osgGA::EventQueue::penPressure | ( | float | pressure, |
double | time | ||
) |
Method for adapting pen pressure events, placing this event on the back of the event queue, with specified time.
|
inline |
Method for adapting pen proximity events, placing this event on the back of the event queue.
osgGA::GUIEventAdapter * osgGA::EventQueue::penProximity | ( | GUIEventAdapter::TabletPointerType | pt, |
bool | isEntering, | ||
double | time | ||
) |
Method for adapting pen proximity events, placing this event on the back of the event queue, with specified time.
|
inline |
Method for adapting application quit events.
osgGA::GUIEventAdapter * osgGA::EventQueue::quitApplication | ( | double | time | ) |
Method for adapting application quit events with specified event time.
|
inline |
void osgGA::EventQueue::setEvents | ( | Events & | events | ) |
Set events.
|
inline |
|
inline |
Set the graphics context associated with this event queue.
|
inline |
Set the mouse input range.
|
inline |
|
inline |
Specify if mouse coordinates should be transformed into a pre defined input range, or whether they should be simply based on as local coordinates to the window that generated the mouse events.
void osgGA::EventQueue::syncWindowRectangleWithGraphicsContext | ( | ) |
Read the window record dimensions from the graphics context.
bool osgGA::EventQueue::takeEvents | ( | Events & | events | ) |
Take the entire event queue leaving the EventQueue' event queue empty.
bool osgGA::EventQueue::takeEvents | ( | Events & | events, |
double | cutOffTime | ||
) |
Take the events that were recorded before with specified time queue.
|
inline |
GUIEventAdapter * osgGA::EventQueue::touchBegan | ( | unsigned int | id, |
GUIEventAdapter::TouchPhase | phase, | ||
float | x, | ||
float | y, | ||
double | time | ||
) |
|
inline |
GUIEventAdapter * osgGA::EventQueue::touchEnded | ( | unsigned int | id, |
GUIEventAdapter::TouchPhase | phase, | ||
float | x, | ||
float | y, | ||
unsigned int | tap_count, | ||
double | time | ||
) |
|
inline |
GUIEventAdapter * osgGA::EventQueue::touchMoved | ( | unsigned int | id, |
GUIEventAdapter::TouchPhase | phase, | ||
float | x, | ||
float | y, | ||
double | time | ||
) |
|
inline |
Method for adapting user defined events
GUIEventAdapter * osgGA::EventQueue::userEvent | ( | osg::Referenced * | userEventData, |
double | time | ||
) |
Method for adapting user defined events with specified event time
|
inline |
Method for adapting window resize event, placing this event on the back of the event queue.
osgGA::GUIEventAdapter * osgGA::EventQueue::windowResize | ( | int | x, |
int | y, | ||
int | width, | ||
int | height, | ||
double | time | ||
) |
Method for adapting window resize event, placing this event on the back of the event queue, with specified time.
|
protected |
|
protected |
|
mutableprotected |
|
protected |
|
protected |
|
protected |