Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

EntryRect Class Reference

A Rectangle that represents a region of a map and has a directory entry. More...

#include <imgmap.h>

Inheritance diagram for EntryRect:

Inheritance graph
Collaboration diagram for EntryRect:

Collaboration graph
List of all members.

Public Methods

 EntryRect (float left, float top, float width, float height, EnTree const &arg_EnTree, RegionWatcher< EntryRect > &arg_watcher)
 EntryRect (EntryRect const &arg)
 Copy constructor.

EnTree const & get_EnTree () const
 Returns the EnTree for this rectangle.

void setColor (Gdk_Color &curcolor) const
 Sets a Gdk_Color to the rectangle's color.

bool contains (float x, float y) const
 Determines whether the Rectangle contains the given point.

bool hover ()

Public Attributes

RegionWatcher< EntryRect > * my_watcher

Static Public Attributes

EntryRect seek_failed

Detailed Description

A Rectangle that represents a region of a map and has a directory entry.

Constructor & Destructor Documentation

EntryRect::EntryRect float    left,
float    top,
float    width,
float    height,
EnTree const &    arg_EnTree,
RegionWatcher< EntryRect > &    arg_watcher

00108       :
00109       Rectangle(left, top, width, height), my_EnTree(&arg_EnTree), 
00110       my_watcher(&arg_watcher)
00111    {
00112       ;
00113    }
   EntryRect(EntryRect const &arg);

EntryRect::EntryRect EntryRect const &    arg

Copy constructor.

00049                                         :
00050    Rectangle(arg), my_EnTree(arg.my_EnTree), my_watcher(arg.my_watcher)
00051 {
00052 }

Member Function Documentation

EnTree const& EntryRect::get_EnTree   const [inline]

Returns the EnTree for this rectangle.

00119    {
00120       if (my_EnTree==NULL)
00121       {
00122     Exception err;
00123     throw err;
00124       }
00125       return *my_EnTree;
00126    }

void EntryRect::setColor Gdk_Color &    curcolor const

Sets a Gdk_Color to the rectangle's color.

curcolor  The color to set to the rectangle's color

00073 {
00074    curcolor.set_red(my_EnTree->r);
00075    curcolor.set_green(my_EnTree->g);
00076    curcolor.set_blue(my_EnTree->b);
00077 }

bool EntryRect::contains float    x,
float    y
const [inline]

Determines whether the Rectangle contains the given point.

x  The x coordinate
y  The y coordinate

Reimplemented from Rectangle.

00129    {
00130       return Rectangle::contains(x,y);
00131    }

bool EntryRect::hover   [virtual]

Reimplemented from MapRegion.

00055 {
00056    if (my_watcher!=NULL) return my_watcher->region_hover(*this);
00057    return false;
00058 }

Member Data Documentation

RegionWatcher<EntryRect>* EntryRect::my_watcher

EntryRect EntryRect::seek_failed [static]

The documentation for this class was generated from the following files:
Generated on Mon Apr 7 19:43:11 2003 for DuTree by doxygen1.2.18