picture Class Reference

#include <picture.h>

Inheritance diagram for picture:

Inheritance graph
[legend]
Collaboration diagram for picture:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 picture (const c_point &origin)
virtual ~picture ()
void add (drawable *to_add)
bool remove (drawable *to_remove)
bool remove (int index)
virtual c_rectangle dimensions () const
virtual void draw ()
virtual void erase ()
void draw_intersecting (const c_rectangle &region)
void erase_intersecting (const c_rectangle &region)
const drawableget (int index) const
 Returns a constant pointer to the information at the index "field".
drawableacquire (int index)
 Retrieves a "field" from the amorph, taking responsibility for it back.
virtual void set_origin (const c_point &new_origin)
void update ()

Detailed Description

Definition at line 30 of file picture.h.


Constructor & Destructor Documentation

picture::picture ( const c_point &  origin  ) 

Definition at line 24 of file picture.cpp.

picture::~picture (  )  [virtual]

Definition at line 27 of file picture.cpp.


Member Function Documentation

void picture::add ( drawable to_add  ) 

Definition at line 39 of file picture.cpp.

References amorph< picture_part >::elements(), get(), amorph< picture_part >::insert(), drawable::layer(), drawable::origin(), amorph< picture_part >::put(), drawable::set_origin(), and picture_part::stored.

Referenced by canvas::add().

bool picture::remove ( drawable to_remove  ) 

Definition at line 68 of file picture.cpp.

References amorph< picture_part >::elements(), and get().

Referenced by acquire(), and canvas::remove().

bool picture::remove ( int  index  ) 

Definition at line 110 of file picture.cpp.

References bounds_return, amorph< picture_part >::elements(), and amorph< picture_part >::zap().

c_rectangle picture::dimensions (  )  const [virtual]

Implements drawable.

Definition at line 58 of file picture.cpp.

References c_point, c_rectangle, drawable::dimensions(), amorph< picture_part >::elements(), and get().

Referenced by draw_intersecting(), and erase_intersecting().

void picture::draw (  )  [virtual]

Implements drawable.

Definition at line 76 of file picture.cpp.

References amorph< picture_part >::elements().

Referenced by set_origin().

void picture::erase (  )  [virtual]

Implements drawable.

Definition at line 84 of file picture.cpp.

References amorph< picture_part >::elements().

Referenced by set_origin().

void picture::draw_intersecting ( const c_rectangle &  region  ) 

Definition at line 92 of file picture.cpp.

References dimensions(), amorph< picture_part >::elements(), and get().

Referenced by manager::redraw_part(), and canvas::redraw_part().

void picture::erase_intersecting ( const c_rectangle &  region  ) 

Definition at line 101 of file picture.cpp.

References dimensions(), amorph< picture_part >::elements(), and get().

const drawable * picture::get ( int  index  )  const

Returns a constant pointer to the information at the index "field".

If no information is stored or the field is out range, then NIL is returned.

Reimplemented from amorph< picture_part >.

Definition at line 29 of file picture.cpp.

References amorph< contents >::get().

Referenced by add(), dimensions(), draw_intersecting(), erase_intersecting(), and remove().

drawable * picture::acquire ( int  index  ) 

Retrieves a "field" from the amorph, taking responsibility for it back.

This function is similar to get, except that the contents are pulled out of the amorph. The contents will no longer be destroyed when the amorph is destroyed. To store the modified contents again, use put, and then the amorph will take over management of the contents again. Note that the index is not zapped with this function; the acquired "field" will simply hold a null pointer.

Reimplemented from amorph< picture_part >.

Definition at line 32 of file picture.cpp.

References amorph< contents >::acquire(), and remove().

void picture::set_origin ( const c_point &  new_origin  )  [virtual]

Reimplemented from drawable.

Definition at line 117 of file picture.cpp.

References c_point, draw(), amorph< picture_part >::elements(), erase(), drawable::set_origin(), and drawable::visible().

void picture::update (  ) 

Definition at line 131 of file picture.cpp.

References amorph< contents >::acquire(), amorph< contents >::elements(), amorph< picture_part >::elements(), amorph< contents >::get(), drawable::layer(), amorph< picture_part >::put(), amorph< contents >::put(), and picture_part::stored.

Referenced by canvas::update().


The documentation for this class was generated from the following files:
Generated on Fri Nov 28 04:30:55 2008 for HOOPLE Libraries by  doxygen 1.5.1