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

CPanel Class Reference

#include <ccomponent.h>

Inheritance diagram for CPanel:

Inheritance graph
[legend]
Collaboration diagram for CPanel:

Collaboration graph
[legend]
List of all members.

Public Member Functions

virtual ~CPanel ()
virtual void draw (CSurface &surface, CRect &rect)
virtual int handle_event (CEvent &event)
void add (CComponent &c)
virtual void set_pos (const CPoint &pos)
virtual void set_absolute_pos (const CPoint &pos)

Detailed Description

This is a composite CComponent (i.e., a component that holds other components). Visually, the CPanel itself is actually behind all its children. The drawing order of the children is directly related to their order in the CPanel's children list: a forward iterator can be used to iterate through the children from front to back, and a backwards iterator can be used to go through them from back to front.

Definition at line 214 of file ccomponent.h.


Constructor & Destructor Documentation

virtual CPanel::~CPanel  )  [inline, virtual]
 

Todo:
Currently, this destructor does nothing. Should we destroy our children here?

Definition at line 222 of file ccomponent.h.


Member Function Documentation

void CPanel::add CComponent c  )  [inline]
 

Add the given component to the panel and set its parent to this panel. Then update the absolute position of the child to reflect its position relative to this parent.

Definition at line 233 of file ccomponent.h.

References CComponent::redraw(), and CComponent::set_parent().

Here is the call graph for this function:

void CPanel::draw CSurface surface,
CRect rect
[virtual]
 

Draw the panel and its children, from back to front.

Reimplemented from CComponent.

Definition at line 5 of file ccomponent.cpp.

References CDequeBackwardIterator< T >::current_item(), CComponent::draw(), CDequeBackwardIterator< T >::is_done(), CDequeBackwardIterator< T >::next(), and CComponent::visible().

Here is the call graph for this function:

int CPanel::handle_event CEvent event  )  [virtual]
 

Attempt to handle the given event, from front children to back children.

Reimplemented from CComponent.

Definition at line 24 of file ccomponent.cpp.

References CDequeForwardIterator< T >::current_item(), CComponent::do_handle_event(), CDequeForwardIterator< T >::is_done(), and CDequeForwardIterator< T >::next().

Here is the call graph for this function:

void CPanel::set_absolute_pos const CPoint pos  )  [virtual]
 

Overridden method to set the absolute position of the component (and thus its children).

Reimplemented from CComponent.

Definition at line 39 of file ccomponent.cpp.

References CDequeForwardIterator< T >::current_item(), CDequeForwardIterator< T >::is_done(), CDequeForwardIterator< T >::next(), and CComponent::set_absolute_pos().

Here is the call graph for this function:

void CPanel::set_pos const CPoint pos  )  [virtual]
 

Overridden method to set the position of the component (and thus its children).

Reimplemented from CComponent.

Definition at line 53 of file ccomponent.cpp.

References CDequeForwardIterator< T >::current_item(), CDequeForwardIterator< T >::is_done(), CDequeForwardIterator< T >::next(), and CComponent::set_pos().

Here is the call graph for this function:


The documentation for this class was generated from the following files:
Generated on Wed Aug 27 11:58:58 2003 for GFW by doxygen 1.3.3