class GMapArea: public GPEnabled

This is the base object for all map areas.

Inheritance:


Public Fields

[more]GString url
Optional URL which this map area can be associated with.
[more]GString target
The target for the URL.
[more]GString comment
Comment (displayed in a status line or as a popup hint when the mouse pointer moves over the map area
[more]BorderType border_type
Border type.
[more]bool border_always_visible
If TRUE, the border will be made always visible.
[more]unsigned long int border_color
Border color (when relevant) in 0x00RRGGBB format
[more]int border_width
Border width in pixels
[more]unsigned long int hilite_color
Specified a color for highlighting the internal area of the map area.

Public Methods

[more] GMapArea(void)
Default constructor
[more]bool is_point_inside(int x, int y)
Returns 1 if the given point is inside the hyperlink area
[more]int get_xmin(void)
Returns xmin of the bounding rectangle
[more]int get_ymin(void)
Returns ymin of the bounding rectangle
[more]int get_xmax(void)
Returns xmax of the bounding rectangle.
[more]int get_ymax(void)
Returns xmax of the bounding rectangle.
[more]GRect get_bound_rect(void)
Returns the hyperlink bounding rectangle
[more]void move(int dx, int dy)
Moves the hyperlink along the given vector.
[more]void resize(int new_width, int new_height)
Resizes the hyperlink to fit new bounding rectangle while keeping the (xmin, ymin) points at rest.
[more]void transform(const GRect & grect)
Transforms the hyperlink to be within the specified rectangle
[more]char const* const check_object(void)
Checks if the object is OK.
[more]GString print(void)
Stores the contents of the hyperlink object in a lisp-like format for saving into ANTa chunk (see DjVuAnno)
[more]virtual MapAreaType const get_shape_type( void ) const
Virtual function returning the shape type.
[more]virtual char const* const get_shape_name(void) const
Virtual function returning the shape name.
[more]virtual GP<GMapArea> get_copy(void) const
Virtual function generating a copy of this object
[more]virtual void get_coords( GList<int> & CoordList )
(default are the opposite corners of the enclosing rectangle)

Public

[more]
Virtual function generating a list of defining coordinates


Inherited from GPEnabled:

Public Methods

oGPEnabled& operator=(const GPEnabled & obj)
oint get_count(void) const

Protected Fields

ovolatile int count


Documentation

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:

The map areas can be displayed using two different techniques, which can be combined together:

oGString url
Optional URL which this map area can be associated with. If it's not empty then clicking this map area with the mouse will make the browser load the HTML page referenced by this url

oGString target
The target for the URL. Standard targets are:

oGString comment
Comment (displayed in a status line or as a popup hint when the mouse pointer moves over the map area

oBorderType border_type
Border type. Defines how the map area border should be drawn

obool border_always_visible
If TRUE, the border will be made always visible. Otherwise it will be drawn when the mouse moves over the map area.

ounsigned long int border_color
Border color (when relevant) in 0x00RRGGBB format

oint border_width
Border width in pixels

ounsigned long int hilite_color
Specified a color for highlighting the internal area of the map area. Will work with rectangular map areas only. The color is specified in #00RRGGBB format. A special value of #FFFFFFFF disables highlighting and #FF000000 is for XOR highlighting.

o GMapArea(void)
Default constructor

obool is_point_inside(int x, int y)
Returns 1 if the given point is inside the hyperlink area

oint get_xmin(void)
Returns xmin of the bounding rectangle

oint get_ymin(void)
Returns ymin of the bounding rectangle

oint get_xmax(void)
Returns xmax of the bounding rectangle. In other words, if X is a coordinate of the last point in the right direction, the function will return X+1

oint get_ymax(void)
Returns xmax of the bounding rectangle. In other words, if Y is a coordinate of the last point in the top direction, the function will return Y+1

oGRect get_bound_rect(void)
Returns the hyperlink bounding rectangle

ovoid move(int dx, int dy)
Moves the hyperlink along the given vector. Is used by the hyperlinks editor.

ovoid resize(int new_width, int new_height)
Resizes the hyperlink to fit new bounding rectangle while keeping the (xmin, ymin) points at rest.

ovoid transform(const GRect & grect)
Transforms the hyperlink to be within the specified rectangle

ochar const* const check_object(void)
Checks if the object is OK. Especially useful with GMapPoly where edges may intersect. If there is a problem it returns a string describing it.

oGString print(void)
Stores the contents of the hyperlink object in a lisp-like format for saving into ANTa chunk (see DjVuAnno)

ovirtual MapAreaType const get_shape_type( void ) const
Virtual function returning the shape type.

ovirtual char const* const get_shape_name(void) const
Virtual function returning the shape name.

ovirtual GP<GMapArea> get_copy(void) const
Virtual function generating a copy of this object

o
Virtual function generating a list of defining coordinates

ovirtual void get_coords( GList<int> & CoordList )
(default are the opposite corners of the enclosing rectangle)


Direct child classes:
GMapRect
GMapPoly
GMapOval

Alphabetic index HTML hierarchy of classes or Java


DjVu is a trademark of LizardTech, Inc.
All other products mentioned are registered trademarks or trademarks of their respective companies.