- Your Widget Set For OpenGL
Main Page | Namespace List | Class Hierarchy | Class List | File List | Class Members | Related Pages

ufo::UDisplay Class Reference

The display represents the connection to the underlying system and contains the UFO event queue. More...

#include <udisplay.hpp>

Inheritance diagram for ufo::UDisplay:

ufo::UObject ufo::UCollectable ufo::UAbstractDisplay ufo::UXDisplay List of all members.

Public Member Functions

virtual std::vector< UContext * > getContexts () const =0
virtual UImagecreateImage (const std::string fileName)=0
virtual UImagecreateImage (UImageIO *io)=0
virtual void addVolatileData (UVolatileData *vdata)=0
virtual void removeVolatileData (UVolatileData *vdata)=0
virtual void pumpEvents ()=0
virtual void pushEvent (UEvent *e)=0
virtual bool dispatchEvent (UEvent *e)=0
virtual bool dispatchEvents (unsigned int nevents)=0
virtual bool dispatchEvents ()=0
virtual UEventgetCurrentEvent () const =0
virtual int getEventCount () const =0
virtual UEventpeekEvent () const =0
virtual UEventpeekEvent (UEvent::Type type) const =0
virtual UEventpollEvent ()=0
virtual UMod_t getModState () const =0
virtual UMod_t getMouseState (int *x, int *y) const =0

Static Public Member Functions

UDisplaygetDefault ()

Static Protected Member Functions

void setDefault (UDisplay *defaultDisplay)

Detailed Description

The display represents the connection to the underlying system and contains the UFO event queue.

The display object is responsible for creating the video driver (depending on the arguments given to the constructor) and to handle the system events send to the created video devices.

Usually there exists only one implementation of a Display.

All native ressources are loaded by the display object. For example OpenGL textures and video devices.

See also:
UVideoDriver

UVideoDevice

UImage

Author:
Johannes Schmidt


Member Function Documentation

virtual bool ufo::UDisplay::dispatchEvent UEvent e  )  [pure virtual]
 

Dispatches immediately the given event without pushing it to the event queue. Updates the internal mouse and key states.

Parameters:
e The event which should be dispatched.
Returns:
True if a quit event was processed, otherwise false.

Implemented in ufo::UAbstractDisplay.

virtual bool ufo::UDisplay::dispatchEvents  )  [pure virtual]
 

Dispatches all pending events of the event queues.

Returns:
True if a quit event was processed, otherwise false.

Implemented in ufo::UAbstractDisplay.

virtual bool ufo::UDisplay::dispatchEvents unsigned int  nevents  )  [pure virtual]
 

Dispatches nevents events to the receiver contexts. If the current event is a quit event, it returns immediately true without dispatching more events.

Returns:
True if a quit event was processed, otherwise false.

Implemented in ufo::UAbstractDisplay.

virtual std::vector<UContext*> ufo::UDisplay::getContexts  )  const [pure virtual]
 

Returns a vector with all contextes which were registered at this display object.

Implemented in ufo::UXDisplay.

virtual UEvent* ufo::UDisplay::getCurrentEvent  )  const [pure virtual]
 

Returns the event which is currently dispatched by this display object. Returns NULL if no event is currently dispatched.

Implemented in ufo::UAbstractDisplay.

UDisplay * ufo::UDisplay::getDefault  )  [inline, static]
 

Returns the default display.

virtual int ufo::UDisplay::getEventCount  )  const [pure virtual]
 

Returns the number of pending events.

Implemented in ufo::UAbstractDisplay.

virtual UMod_t ufo::UDisplay::getModState  )  const [pure virtual]
 

Returns the current state of the modifier keys (like CRTL, ALT, ..). Please note that the current mod state may differ from the current event you are processing. The current mod state is determinded by the last pushed event.

See also:
UInputEvent

Implemented in ufo::UAbstractDisplay.

virtual UMod_t ufo::UDisplay::getMouseState int *  x,
int *  y
const [pure virtual]
 

Returns the current button state as modifier mask. x and y are set to the current mouse position. Both may be NULL. The current mouse state is determinded by the last pushed event.

Parameters:
x filled with the x position of the mouse
y filled with the y position of the mouse
See also:
UInputEvent

Implemented in ufo::UAbstractDisplay.

virtual UEvent* ufo::UDisplay::peekEvent UEvent::Type  type  )  const [pure virtual]
 

Returns the first event on the event queue of the given type without removeing it.

Implemented in ufo::UAbstractDisplay.

virtual UEvent* ufo::UDisplay::peekEvent  )  const [pure virtual]
 

Returns the first event on the event queue without removeing it.

Implemented in ufo::UAbstractDisplay.

virtual UEvent* ufo::UDisplay::pollEvent  )  [pure virtual]
 

Returns the first event on the event queue and removes it from the event queue. The user takes control over this event and is responsible for unreferencing and deallocating.

Implemented in ufo::UAbstractDisplay.

virtual void ufo::UDisplay::pumpEvents  )  [pure virtual]
 

Pumps system events to the event queue. May be a no-op on some systems.

Implemented in ufo::UXDisplay.

virtual void ufo::UDisplay::pushEvent UEvent e  )  [pure virtual]
 

Adds e to the event queue. Updates the internal mouse and key states.

Implemented in ufo::UAbstractDisplay.

void ufo::UDisplay::setDefault UDisplay defaultDisplay  )  [inline, static, protected]
 

Should be used by backend implementation to set a default display.


The documentation for this class was generated from the following file:
The libUFO Project - written by Johannes Schmidt