Logo Search packages:      
Sourcecode: djvulibre version File versions

GMapArea Class Reference

#include <GMapAreas.h>

Inheritance diagram for GMapArea:

GPEnabled GMapOval GMapPoly GMapRect

List of all members.


Detailed Description

This is the base object for all map areas. It defines some standard interface to access the geometrical properties of the areas and describes the area itsef: {itemize} url# If the optional URL# is specified, the map area will also work as a hyperlink meaning that if you click it with your mouse pointer, the browser will be advised to load the page referenced by the URL#. target# Defines where the specified URL# should be loaded comment# This is a string displayed in a status line or in a popup window when the mouse pointer moves over the hyperlink area border_type#, border_color# and border_width# describes how the area border should be drawn area_color# describes how the area should be highlighted. {itemize}

The map areas can be displayed using two different techniques, which can be combined together: {itemize} Visible border. The border of a map area can be drawn in several different ways (like XOR_BORDER# or SHADOW_IN_BORDER#). It can be made always visible, or appearing only when the mouse pointer moves over the map area. Highlighted contents. Contents of rectangular map areas can also be highlighted with some given color. {itemize}

Definition at line 135 of file GMapAreas.h.


Public Types

enum  BorderType {
  NO_BORDER = 0, XOR_BORDER = 1, SOLID_BORDER = 2, SHADOW_IN_BORDER = 3,
  SHADOW_OUT_BORDER = 4, SHADOW_EIN_BORDER = 5, SHADOW_EOUT_BORDER = 6
}
enum  MapAreaType { UNKNOWN, RECT, OVAL, POLY }
enum  Special_Hilite_Color { NO_HILITE = 0xFFFFFFFF, XOR_HILITE = 0xFF000000 }

Public Member Functions

char const *const check_object (void)
GRect get_bound_rect (void) const
 Returns the hyperlink bounding rectangle.
virtual void get_coords (GList< int > &CoordList) const
virtual GP< GMapAreaget_copy (void) const =0
 Virtual function generating a copy of this object.
int get_count (void) const
virtual char const *const get_shape_name (void) const =0
 Virtual function returning the shape name.
virtual MapAreaType const get_shape_type (void) const
 Virtual function returning the shape type.
int get_xmax (void) const
int get_xmin (void) const
 Returns xmin of the bounding rectangle.
virtual GUTF8String get_xmltag (const int height) const =0
int get_ymax (void) const
int get_ymin (void) const
 Returns ymin of the bounding rectangle.
bool is_point_inside (int x, int y) const
 Returns 1 if the given point is inside the hyperlink area.
virtual void map (GRectMapper &mapper)=0
 Virtual function maps maparea from one area to another using mapper.
void move (int dx, int dy)
GUTF8String print (void)
void resize (int new_width, int new_height)
void transform (const GRect &grect)
virtual void unmap (GRectMapper &mapper)=0
 Virtual function unmaps maparea from one area to another using mapper.
virtual ~GMapArea ()
 Virtual destructor.

Public Attributes

bool border_always_visible
unsigned long int border_color
 Border color (when relevant) in #0x00RRGGBB# format.
BorderType border_type
int border_width
 Border width in pixels.
GUTF8String comment
unsigned long int hilite_color
GUTF8String target
GUTF8String url

Static Public Attributes

static const char BORDER_AVIS_TAG [] = "border_avis"
static const char HILITE_TAG [] = "hilite"
static const char MAPAREA_TAG [] = "maparea"
static const char NO_BORDER_TAG [] = "none"
static const char OVAL_TAG [] = "oval"
static const char POLY_TAG [] = "poly"
static const char RECT_TAG [] = "rect"
static const char SHADOW_EIN_BORDER_TAG [] = "shadow_ein"
static const char SHADOW_EOUT_BORDER_TAG [] = "shadow_eout"
static const char SHADOW_IN_BORDER_TAG [] = "shadow_in"
static const char SHADOW_OUT_BORDER_TAG [] = "shadow_out"
static const char SOLID_BORDER_TAG [] = "border"
static const char TARGET_SELF [] = "_self"
static const char URL_TAG [] = "url"
static const char XOR_BORDER_TAG [] = "xor"

Protected Member Functions

void clear_bounds (void)
virtual char const *const gma_check_object (void) const =0
virtual int gma_get_xmax (void) const =0
virtual int gma_get_xmin (void) const =0
virtual int gma_get_ymax (void) const =0
virtual int gma_get_ymin (void) const =0
virtual bool gma_is_point_inside (const int x, const int y) const =0
virtual void gma_move (int dx, int dy)=0
virtual GUTF8String gma_print (void)=0
virtual void gma_resize (int new_width, int new_height)=0
virtual void gma_transform (const GRect &grect)=0

Protected Attributes

volatile int count
 The reference counter.

Private Member Functions

void initialize_bounds (void)

Private Attributes

bool bounds_initialized
int xmax
int xmin
int ymax
int ymin

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

Generated by  Doxygen 1.6.0   Back to index