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

ufo::UEvent Class Reference

This is the base class for all UFO events. More...

#include <uevent.hpp>

Inheritance diagram for ufo::UEvent:

ufo::UObject ufo::UCollectable ufo::UActionEvent ufo::UPropertyChangeEvent ufo::UQuitEvent ufo::URunnableEvent ufo::UTimerEvent ufo::UWidgetEvent ufo::USlotEvent ufo::UFocusEvent ufo::UInputEvent ufo::UShortcutEvent ufo::UKeyEvent ufo::UMouseEvent ufo::UMouseWheelEvent List of all members.

Public Types

enum  Type {
  NoEvent = 0, Timer = 1, Action = 2, RunnableEvent = 3,
  QuitEvent = 4, Repaint = 5, Refresh = 6, MousePressed = 10,
  MouseReleased = 11, MouseClicked = 12, MouseMoved = 13, MouseDragged = 14,
  MouseEntered = 15, MouseExited = 16, MouseWheel = 19, KeyPressed = 20,
  KeyReleased = 21, KeyTyped = 22, Shortcut = 23, FocusGained = 25,
  FocusLost = 26, WidgetMoved = 30, WidgetResized = 31, WidgetShown = 32,
  WidgetHidden = 33, WidgetAdded = 34, WidgetRemoved = 35, WidgetZOrderChanged = 36,
  PropertyChanged = 40
}

Public Member Functions

 UEvent (UObject *sourceA, Type idA)
UObjectgetSource () const
void setSource (UObject *newSourceA)
Type getType () const
virtual void consume ()
virtual bool isConsumed () const

Protected Member Functions

virtual std::ostream & paramString (std::ostream &os) const

Protected Attributes

UObjectm_source
Type m_type
bool m_isConsumed

Detailed Description

This is the base class for all UFO events.

Author:
Johannes Schmidt


Member Enumeration Documentation

enum ufo::UEvent::Type
 

Enumeration values:
Timer  A timer event (for simple time outs).
Action  Generic action event.
RunnableEvent  An event whose run method is executed on processing.
QuitEvent  Request for application quit.
Repaint  Repaint event.
Refresh  Lost hardware surfaces, request for refresh.
MouseEntered  Widget got mouse focus.
MouseExited  Widget lost mouse focus.
KeyTyped  A unicode character was pressed.
FocusGained  Got input focus.
FocusLost  Lost input focus.
WidgetAdded  Widget added to a parent visible on screen.
WidgetRemoved  Widget about to be removed.
WidgetZOrderChanged  The z order of this widget has been changed.
PropertyChanged  A Property has been changed.


Member Function Documentation

virtual void ufo::UEvent::consume  )  [virtual]
 

consumes the event. If an event is consumed, no other event listener can process it.

UObject* ufo::UEvent::getSource  )  const
 

returns the emitting object

Type ufo::UEvent::getType  )  const
 

returns the id desribing the event

virtual bool ufo::UEvent::isConsumed  )  const [virtual]
 

returns whether an event is consumed.

See also:
consume
Returns:
True if this event is consumed

virtual std::ostream& ufo::UEvent::paramString std::ostream &  os  )  const [protected, virtual]
 

Prints some useful internal data to the ostream os. This method is meant only for debugging purposes.

Reimplemented from ufo::UObject.

Reimplemented in ufo::UActionEvent, ufo::UFocusEvent, ufo::UInputEvent, ufo::UKeyEvent, ufo::UMouseEvent, ufo::UMouseWheelEvent, and ufo::UPropertyChangeEvent.

void ufo::UEvent::setSource UObject newSourceA  ) 
 

retargets this event


Member Data Documentation

bool ufo::UEvent::m_isConsumed [protected]
 

The consume property

See also:
consume

UObject* ufo::UEvent::m_source [protected]
 

the object that emitted the event

Type ufo::UEvent::m_type [protected]
 

an int describing the event


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