VirtualScrollableSurface Class Reference
[C++ Wrapper for SDL]

Scrollable kind of VirtualSurface. More...

#include <VirtualScrollableSurface.hh>

Inheritance diagram for VirtualScrollableSurface:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 VirtualScrollableSurface (const std::string &name, Input &input, const Point &real_size, const Point &virtual_size)
 VirtualScrollableSurface (const std::string &name, Input &input, SDL_Surface *surf, const Point &virtual_size)
void setAutomaticAdjust (bool enable)
virtual Rect getScreenRect () const
 Get the absolute surface from the point (0, 0) on the screen.
virtual void setPos (const Point &to)
virtual void update ()
 Method called each frame, to perfom user custom code.
virtual void blit (Surface &to)
virtual void blit (Surface &to, const Rect &to_rect, const Rect &from_rect)

Detailed Description

Scrollable kind of VirtualSurface.


Member Function Documentation

Rect VirtualScrollableSurface::getScreenRect (  )  const [virtual]

Get the absolute surface from the point (0, 0) on the screen.

This is where the surface is render and visible by the user on the screen. This should only be used for events, ie. to compare mouse position (which has absolute position) with this surface position.

Returns:
Absolute surface Rect.

Reimplemented from Surface.

void VirtualScrollableSurface::setAutomaticAdjust ( bool  enable  ) 

Parameters:
enable Switch on/off.
Note:
Default disabled.

void VirtualScrollableSurface::update (  )  [virtual]

Method called each frame, to perfom user custom code.

You should override it.

Since a parent is assigned to the surface (and this parent is itself attached by other means to the root screen), this method is called at each frame. It is not called if this surface or one of its parent is disabled. In this method you can do what you want with your object, like processing input, updating other programs attributes, changing surface property, ...

Note:
Don't forget to call update for the base class at the end of your function , otherwise strange things will happen.

Reimplemented from VirtualSurface.

Reimplemented in sdlvisu::VisuField.


The documentation for this class was generated from the following files:
Generated on Sat Jun 23 16:14:26 2007 for Stechec/TBT by  doxygen 1.4.7