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

ufo::UContext Class Reference

An UFO context is the abstract container for UFO widgets (think of it as an OpenGL context). More...

#include <ucontext.hpp>

Inheritance diagram for ufo::UContext:

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

Public Types

enum  { ShareNothing = 0, ShareGL = 1, ShareLAF = 3, ShareAll = ShareLAF }

Public Member Functions

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

Detailed Description

An UFO context is the abstract container for UFO widgets (think of it as an OpenGL context).

The UFO context provides the top level container for UFO widgets (URootPane) and is responsible for event dispatching.

An UFO context does not have to have the size of the OpenGL context.

See also:
UXContext
Author:
Johannes Schmidt


Member Function Documentation

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

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

Implemented in ufo::UAbstractContext.

virtual UImage* ufo::UContext::createImage const std::string &  fileName  )  [pure 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.

Implemented in ufo::UAbstractContext.

virtual UImage* ufo::UContext::createImage UImageIO imageIO  )  [pure 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.

Implemented in ufo::UAbstractContext.

virtual void ufo::UContext::dispatchEvent UEvent e  )  [pure 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.

Implemented in ufo::UAbstractContext.

virtual void ufo::UContext::dispose  )  [pure virtual]
 

Disposes all system resources which were created by init()

See also:
init

Implemented in ufo::UAbstractContext.

virtual UContextGroup* ufo::UContext::getContextGroup  )  const [pure virtual]
 

Returns the context group this context belongs to.

See also:
UContextGroup

Implemented in ufo::UAbstractContext.

virtual UGraphics* ufo::UContext::getGraphics  )  const [pure virtual]
 

Returns the graphics object for this context.

Implemented in ufo::UAbstractContext.

virtual UContext* ufo::UContext::getParent  )  const [pure 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.

Implemented in ufo::UAbstractContext.

virtual URepaintManager* ufo::UContext::getRepaintManager  )  const [pure virtual]
 

Returns the repaint manager for this context.

Implemented in ufo::UAbstractContext.

virtual URootPane* ufo::UContext::getRootPane  )  const [pure virtual]
 

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

See also:
setRootPane

Implemented in ufo::UAbstractContext.

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

Stores system specific information on the underlaying platform in the given struct. The system info struct is defined in the ufo/ufo_systeminfo.hpp header and may be overwritten in a binary compatible way by backends.

Returns:
false if this method is not supported by the backend

Implemented in ufo::UAbstractContext.

virtual UUIManager* ufo::UContext::getUIManager  )  const [pure virtual]
 

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

See also:
UUIManager

Implemented in ufo::UAbstractContext.

virtual void ufo::UContext::init  )  [pure virtual]
 

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

Implemented in ufo::UAbstractContext.

virtual void ufo::UContext::lock  )  [pure virtual]
 

locks this context for drawing or Widget operations

Implemented in ufo::UXContext.

virtual void ufo::UContext::refresh  )  [pure virtual]
 

Refreshes system dependent resources and emits a refresh signal.

Implemented in ufo::UAbstractContext.

virtual void ufo::UContext::setContextBounds const URectangle rect  )  [pure virtual]
 

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

Implemented in ufo::UAbstractContext.

virtual void ufo::UContext::setEventGrabber const USlot1< UEvent * > &  slot  )  [pure 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.

Implemented in ufo::UAbstractContext.

virtual void ufo::UContext::setRootPane URootPane paneA  )  [pure virtual]
 

See also:
getRootPane

Implemented in ufo::UAbstractContext.

USignal0 & ufo::UContext::sigRefresh  )  [inline]
 

This signal should be emitted by backend implementation whenever The OpenGL resources (textures, display lists, ..) should be refreshed

virtual void ufo::UContext::unlock  )  [pure virtual]
 

unlocks this context

See also:
lock

Implemented in ufo::UXContext.


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