#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 |
| ImageMap * | currentMap |
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.
| dw::ImageMapsList::ImageMapsList | ( | ) |
References currentMap, and imageMaps.
| dw::ImageMapsList::~ImageMapsList | ( | ) |
References imageMaps.
| 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.
References dw::ImageMapsList::ImageMap::add(), and currentMap.
| void dw::ImageMapsList::drawMap | ( | lout::object::Object * | key, | |
| core::View * | view, | |||
| core::style::Style * | style, | |||
| int | x, | |||
| int | y | |||
| ) |
References dw::ImageMapsList::ImageMap::draw(), lout::container::typed::HashTable< K, V >::get(), and imageMaps.
Referenced by dw::Image::draw().
| int dw::ImageMapsList::link | ( | lout::object::Object * | key, | |
| int | x, | |||
| int | y | |||
| ) |
| void dw::ImageMapsList::setCurrentMapDefaultLink | ( | int | link | ) |
Set default link for current map-.
References currentMap, and dw::ImageMapsList::ImageMap::setDefaultLink().
| 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.
References currentMap, imageMaps, and lout::container::typed::HashTable< K, V >::put().
ImageMap* dw::ImageMapsList::currentMap [private] |
Referenced by addShapeToCurrentMap(), ImageMapsList(), setCurrentMapDefaultLink(), and startNewMap().
lout::container::typed::HashTable<lout::object::Object, ImageMap>* dw::ImageMapsList::imageMaps [private] |
Referenced by drawMap(), ImageMapsList(), link(), startNewMap(), and ~ImageMapsList().
1.5.9