Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

Teddy::PhysicalComponents::Layer Class Reference

Base class for display layers. More...

#include <Layer.h>

Inheritance diagram for Teddy::PhysicalComponents::Layer:

Inheritance graph
[legend]
Collaboration diagram for Teddy::PhysicalComponents::Layer:

Collaboration graph
[legend]
List of all members.

Public Methods

 Layer (std::string name, View *view)
 Constructor. More...

void update (View *view)
 Set View. More...

virtual AreagetHit (const Vector2 &pos)
 Area Input Interface - Get Hit Area, NULL if none. More...

virtual void drawLayer ()
 Draw area recursively - draw all areas in layer. More...

virtual void drawSelf ()
 Draw Layer Self; draw Projection component. More...

virtual void place ()
 Area Layout Interface. More...

void addProjection (Projection *p)
 Set Projection. More...


Protected Attributes

list< Projection * > projs

Detailed Description

Base class for display layers.

Layer is link between View and Area. To add Area to View, there must be Layer between.

Views display Layers. Each Layer may contain a number of Areas.

Definition at line 53 of file Layer.h.


Constructor & Destructor Documentation

Teddy::PhysicalComponents::Layer::Layer std::string    name,
View *    view
 

Constructor.

Definition at line 38 of file Layer.cpp.

References Teddy::SysSupport::dmsg, Teddy::PhysicalComponents::Area::drawing_ordering, IntVector2, Teddy::SysSupport::M_WM, Teddy::PhysicalComponents::Area::parent, Teddy::PhysicalComponents::Area::post_self, Rect, Teddy::PhysicalComponents::Area::rect, Teddy::PhysicalComponents::Area::size, and Teddy::Graphics::ViewClient::view.


Member Function Documentation

void Teddy::PhysicalComponents::Layer::addProjection Projection   p
 

Set Projection.

Definition at line 134 of file Layer.cpp.

References Teddy::PhysicalComponents::Area::insert, and projs.

void Teddy::PhysicalComponents::Layer::drawLayer   [virtual]
 

Draw area recursively - draw all areas in layer.

Definition at line 167 of file Layer.cpp.

References Teddy::PhysicalComponents::Area::Area, Teddy::PhysicalComponents::Area::areas, Teddy::SysSupport::dmsg, drawSelf, Teddy::MixIn::Named::getName, Teddy::SysSupport::M_WM, Teddy::MixIn::Named::name, Teddy::PhysicalComponents::Area::size, and Teddy::Graphics::ViewClient::view.

void Teddy::PhysicalComponents::Layer::drawSelf   [virtual]
 

Draw Layer Self; draw Projection component.

Reimplemented from Teddy::PhysicalComponents::Area.

Definition at line 125 of file Layer.cpp.

References projs.

Referenced by drawLayer.

Area * Teddy::PhysicalComponents::Layer::getHit const Vector2 &    pos [virtual]
 

Area Input Interface - Get Hit Area, NULL if none.

Reimplemented from Teddy::PhysicalComponents::Area.

Definition at line 52 of file Layer.cpp.

References Teddy::PhysicalComponents::Area::Area, Teddy::PhysicalComponents::Area::areas, Teddy::SysSupport::dmsg, Teddy::PhysicalComponents::Area::event_ordering, Teddy::MixIn::Named::getName, Teddy::SysSupport::M_WME, Teddy::MixIn::Named::name, Teddy::PhysicalComponents::Area::post_self, Teddy::PhysicalComponents::Area::pre_self, projs, and Teddy::PhysicalComponents::Area::rect.

void Teddy::PhysicalComponents::Layer::place   [virtual]
 

Area Layout Interface.

Definition at line 144 of file Layer.cpp.

References Teddy::PhysicalComponents::Area::areas, projs, and Teddy::PhysicalComponents::Area::rect.

Referenced by update.

void Teddy::PhysicalComponents::Layer::update View *    view
 

Set View.

Definition at line 112 of file Layer.cpp.

References Teddy::SysSupport::dmsg, IntVector2, Teddy::SysSupport::M_WML, place, Rect, Teddy::PhysicalComponents::Area::rect, Teddy::PhysicalComponents::Area::size, and Teddy::Graphics::ViewClient::view.


Member Data Documentation

list<Projection*> Teddy::PhysicalComponents::Layer::projs [protected]
 

Definition at line 70 of file Layer.h.

Referenced by addProjection, drawSelf, getHit, and place.


The documentation for this class was generated from the following files: