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

ufo::UViewport Class Reference

This class provides an generic viewport for widgets. More...

#include <uviewport.hpp>

Inheritance diagram for ufo::UViewport:

ufo::UWidget ufo::UObject ufo::UCollectable List of all members.

Public Member Functions

void setView (UWidget *w)
UWidgetgetView () const
UPoint getViewLocation () const
void setViewLocation (const UPoint &pos)
void setViewBounds (int x, int y, int w, int h)
void scrollRectToVisible (const URectangle &rect)

Protected Member Functions

virtual ULayoutManagercreateLayoutManager ()
virtual void addImpl (UWidget *w, UObject *constraints, int index)
virtual void paintChildren (UGraphics *g)

Detailed Description

This class provides an generic viewport for widgets.

Only the given visible rect is shown by child widgets of viewports.

Author:
Johannes Schmidt


Member Function Documentation

virtual void ufo::UViewport::addImpl UWidget w,
UObject constraints,
int  index
[protected, virtual]
 

Adds child widgets to this widget. This function should be overridden instead of other add functions

Parameters:
w The widget which should be added
index If index is -1, the widget will be added at the end of the container
constraints The constraints object is a Object which describes the layout options. Internally, it invokes put("layout", w); to set the property. Currently this is only used by UBorderlayout.
See also:
put

UBorderLayout

Reimplemented from ufo::UWidget.

virtual void ufo::UViewport::paintChildren UGraphics g  )  [protected, virtual]
 

Paints recursively the child widgets.

Reimplemented from ufo::UWidget.

void ufo::UViewport::scrollRectToVisible const URectangle rect  ) 
 

Scrolls the viewport so that the given rectangle becomes visible. The coordinates are in the coordinate space of the view widget.

void ufo::UViewport::setView UWidget w  ) 
 

Sets the widget this viewport creates an view on.


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