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

ufo::UAbstractContext Class Reference

Implements some platform independent methods of UContext. Provided for convenience. More...

#include <uabstractcontext.hpp>

Inheritance diagram for ufo::UAbstractContext:

ufo::UContext ufo::UObject ufo::UCollectable ufo::UXContext List of all members.

Public Member Functions

 UAbstractContext (UAbstractContext *parent)
virtual UContextGroupgetContextGroup () const
virtual UContextgetParent () const
virtual UUIManager * getUIManager () const
virtual UGraphicsgetGraphics () const
virtual URepaintManagergetRepaintManager () const
virtual bool getSystemInfo (USystemInfo *info) const
virtual URootPanegetRootPane () const
virtual void setRootPane (URootPane *paneA)
virtual UImagecreateImage (UImageIO *imageIO)
virtual UImagecreateImage (const std::string &fileName)
virtual void dispatchEvent (UEvent *e)
virtual void setEventGrabber (const USlot1< UEvent * > &slot)
virtual void releaseEventGrabber ()
virtual USlot1< UEvent * > * getEventGrabber () const
virtual void connectListener (const USlot1< UEvent * > &slot)
virtual void disconnectListener (const USlot1< UEvent * > &slot)
virtual std::list< USlot1<
UEvent * > > 
getListeners () const
virtual UInputMapgetInputMap ()
virtual void setInputMap (UInputMap *newMap)
virtual void setDeviceBounds (const URectangle &rect)
virtual URectangle getDeviceBounds () const
virtual void setContextBounds (const URectangle &rect)
virtual URectangle getContextBounds () const
virtual void init ()
virtual void refresh ()
virtual void dispose ()

Protected Member Functions

virtual UGraphicscreateGraphics ()
virtual URepaintManagercreateRepaintManager ()
virtual void fireMouseEvent (UMouseEvent *e)
virtual void fireMouseMotionEvent (UMouseEvent *e)
virtual void fireMouseWheelEvent (UMouseWheelEvent *e)
virtual void fireKeyEvent (UKeyEvent *e)

Protected Attributes

UContextGroupm_contextGroup
UUIManager * m_uiManager
URootPanem_rootPane

Detailed Description

Implements some platform independent methods of UContext. Provided for convenience.

This class is not part of the official UFO API and may be changed without warning.

Author:
Johannes Schmidt


Constructor & Destructor Documentation

ufo::UAbstractContext::UAbstractContext UAbstractContext parent  ) 
 

Creates a new abstract context with parent as its logical parent, i.e. both contexts share their data.


Member Function Documentation

virtual void ufo::UAbstractContext::connectListener const USlot1< UEvent * > &  slot  )  [virtual]
 

Adds an event listener which receives all events. Events are not retargeted to this listener widget.

Implements ufo::UContext.

virtual UGraphics* ufo::UAbstractContext::createGraphics  )  [protected, virtual]
 

Creates the graphics object for this GL context.

virtual UImage* ufo::UAbstractContext::createImage const std::string &  fileName  )  [virtual]
 

Creates an image for this context group using the given file name. All context from this context group may access and use that image.

Implements ufo::UContext.

virtual UImage* ufo::UAbstractContext::createImage UImageIO imageIO  )  [virtual]
 

Creates an image for this context group using the given image data. All context from this context group may access and use that image.

Implements ufo::UContext.

virtual URepaintManager* ufo::UAbstractContext::createRepaintManager  )  [protected, virtual]
 

Creates the repaint manager object for this GL context.

virtual void ufo::UAbstractContext::dispatchEvent UEvent e  )  [virtual]
 

This functions dispatches events to child widgets of the root pane. It should be used by an backend to deliver events to the widgets. It is virtual so that you can implement your own event dispatcher.

Implements ufo::UContext.

virtual void ufo::UAbstractContext::dispose  )  [virtual]
 

Disposes all system resources which were created by init()

See also:
init

Implements ufo::UContext.

virtual void ufo::UAbstractContext::fireKeyEvent UKeyEvent e  )  [protected, virtual]
 

Constructs a key mouse event from the given event and modifies it according to the context properties. Sends it to an appropriate widget using send.

virtual void ufo::UAbstractContext::fireMouseEvent UMouseEvent e  )  [protected, virtual]
 

Constructs a new mouse event from the given event and modifies it according to the context properties. Sends it to an appropriate widget using send.

virtual void ufo::UAbstractContext::fireMouseMotionEvent UMouseEvent e  )  [protected, virtual]
 

Constructs a new mouse event from the given event and modifies it according to the context properties. Sends it to an appropriate widget using send.

virtual void ufo::UAbstractContext::fireMouseWheelEvent UMouseWheelEvent e  )  [protected, virtual]
 

Constructs a new mouse wheel event from the given event and modifies it according to the context properties. Sends it to an appropriate widget using send.

virtual UContextGroup* ufo::UAbstractContext::getContextGroup  )  const [virtual]
 

Returns the context group this context belongs to.

See also:
UContextGroup

Implements ufo::UContext.

virtual UGraphics* ufo::UAbstractContext::getGraphics  )  const [virtual]
 

Returns the graphics object for this context.

Implements ufo::UContext.

virtual UContext* ufo::UAbstractContext::getParent  )  const [virtual]
 

Returns the (logical) parent Context. A context can share its data with a parent context, i.e. the Look And Feel and (if the contexts belong to different OpenGL Contexts) OpenGL data like Texture Objects, Display Lists, .. May return NULL, if no parent was set.

Implements ufo::UContext.

virtual URepaintManager* ufo::UAbstractContext::getRepaintManager  )  const [virtual]
 

Returns the repaint manager for this context.

Implements ufo::UContext.

virtual URootPane* ufo::UAbstractContext::getRootPane  )  const [virtual]
 

every context is the owner of a root pane, the top level container.

See also:
setRootPane

Implements ufo::UContext.

virtual bool ufo::UAbstractContext::getSystemInfo USystemInfo *  info  )  const [virtual]
 

Returns false as default. Should be overriden by backends which support system info.

Implements ufo::UContext.

virtual UUIManager* ufo::UAbstractContext::getUIManager  )  const [virtual]
 

Returns the UIManager, which controls the Look And Feel of this context.

See also:
UUIManager

Implements ufo::UContext.

virtual void ufo::UAbstractContext::init  )  [virtual]
 

Initialize system dependent resources, creates the look and feel and the root pane.

Implements ufo::UContext.

virtual void ufo::UAbstractContext::refresh  )  [virtual]
 

Refreshes system dependent resources and emits a refresh signal.

Implements ufo::UContext.

virtual void ufo::UAbstractContext::setContextBounds const URectangle rect  )  [virtual]
 

Sets the context bounds within the device. The corrdinates are in the UFO coordinate space.

Implements ufo::UContext.

virtual void ufo::UAbstractContext::setEventGrabber const USlot1< UEvent * > &  slot  )  [virtual]
 

Sets an event grabber which receives all events and prevents that any other widget gets those events. The source widget is always the root pane of this context. MouseEntered and MouseExited events are not generated for grabbed events.

Implements ufo::UContext.

virtual void ufo::UAbstractContext::setRootPane URootPane paneA  )  [virtual]
 

See also:
getRootPane

Implements ufo::UContext.


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