Dillo v3.1.1-46-g8a360e32
Loading...
Searching...
No Matches
dw::ImageMapsList Class Reference

Represents a list of client-side image maps. More...

#include <image.hh>

Classes

class  ImageMap
 

Public Member Functions

 ImageMapsList ()
 
 ~ImageMapsList ()
 
void startNewMap (lout::object::Object *key)
 Start a new map and make it the current one.
 
void addShapeToCurrentMap (core::Shape *shape, int link)
 Add a shape to the current map-.
 
void setCurrentMapDefaultLink (int link)
 Set default link for current map-.
 
void drawMap (lout::object::Object *key, core::View *view, core::style::Style *style, int x, int y)
 
int link (lout::object::Object *key, int x, int y)
 

Private Attributes

lout::container::typed::HashTable< lout::object::Object, ImageMap > * imageMaps
 
ImageMapcurrentMap
 

Detailed Description

Represents a list of client-side image maps.

All image maps of a HTML page (in the future, also image maps from different HTML pages) are stored in a list, which is passed to the image, so that it is possible to deal with maps, which are defined after the image within the HTML page.

Maps are referred by instances of object::Object. These keys are typically URLs, so the type representing URLS should be derived from object::Object.

Todo:
Some methods within the key class have to be implemented, this is not clear at this time.

Definition at line 23 of file image.hh.

Constructor & Destructor Documentation

◆ ImageMapsList()

dw::ImageMapsList::ImageMapsList ( )

Definition at line 78 of file image.cc.

References currentMap, and imageMaps.

◆ ~ImageMapsList()

dw::ImageMapsList::~ImageMapsList ( )

Definition at line 85 of file image.cc.

References imageMaps.

Member Function Documentation

◆ addShapeToCurrentMap()

void dw::ImageMapsList::addShapeToCurrentMap ( core::Shape shape,
int  link 
)

Add a shape to the current map-.

"shape" is owned by the image map list, so a copy should be passed, when necessary.

Definition at line 109 of file image.cc.

References dw::ImageMapsList::ImageMap::add(), currentMap, and link().

Referenced by Html_tag_content_area().

◆ drawMap()

void dw::ImageMapsList::drawMap ( lout::object::Object key,
core::View view,
core::style::Style style,
int  x,
int  y 
)

Definition at line 122 of file image.cc.

References dw::ImageMapsList::ImageMap::draw(), and imageMaps.

◆ link()

int dw::ImageMapsList::link ( lout::object::Object key,
int  x,
int  y 
)

◆ setCurrentMapDefaultLink()

void dw::ImageMapsList::setCurrentMapDefaultLink ( int  link)

Set default link for current map-.

Definition at line 117 of file image.cc.

References currentMap, link(), and dw::ImageMapsList::ImageMap::setDefaultLink().

Referenced by Html_tag_content_area().

◆ startNewMap()

void dw::ImageMapsList::startNewMap ( lout::object::Object key)

Start a new map and make it the current one.

This has to be called before dw::ImageMapsList::addShapeToCurrentMap. "key" is owned by the image map list, so a copy should be passed, when necessary.

Definition at line 97 of file image.cc.

References currentMap, and imageMaps.

Referenced by Html_tag_content_map().

Member Data Documentation

◆ currentMap

ImageMap* dw::ImageMapsList::currentMap
private

◆ imageMaps

lout::container::typed::HashTable<lout::object::Object, ImageMap>* dw::ImageMapsList::imageMaps
private

Definition at line 49 of file image.hh.

Referenced by drawMap(), ImageMapsList(), link(), startNewMap(), and ~ImageMapsList().


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