Logo Search packages:      
Sourcecode: djvulibre version File versions

GMapRect Class Reference

#include <GMapAreas.h>

Inheritance diagram for GMapRect:

GMapArea GPEnabled

List of all members.


Detailed Description

Implements rectangular map areas. This is the only kind of map areas supporting SHADOW_IN_BORDER#, SHADOW_OUT_BORDER#, SHADOW_EIN_BORDER# and SHADOW_EOUT_BORDER# types of border and area highlighting.

Definition at line 290 of file GMapAreas.h.


GMapAreas.h

Files #"GMapAreas.h"# and #"GMapAreas.cpp"# implement base objects used by the plugin to display and manage hyperlinks and highlighted areas inside a {DjVuImage} page.

The currently supported areas can be rectangular ({GMapRect}), elliptical ({GMapOval}) and polygonal ({GMapPoly}). Every map area besides the definition of its shape contains information about display style and optional { URL}, which it may refer to. If this { URL} is not empty then the map area will work like a hyperlink.

The classes also implement some useful functions to ease geometry manipulations

Definition of base map area classes

Author:
Andrei Erofeev <eaf@geocities.com>
Version:
#
Id
GMapAreas.h,v 1.8 2003/11/07 22:08:21 leonb Exp
#

virtual char const *const gma_check_object (void) const
virtual int gma_get_xmax (void) const
virtual int gma_get_xmin (void) const
virtual int gma_get_ymax (void) const
virtual int gma_get_ymin (void) const
virtual char const *const get_shape_name (void) const
 Returns #"rect"#.
 operator GRect (void)
 Returns {GRect} describing the map area's rectangle.

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
 Returns a copy of the rectangle.
int get_count (void) const
int get_height (void) const
 Returns the height of the rectangle.
virtual MapAreaType const get_shape_type (void) const
 Returns MapRect.
int get_width (void) const
 Returns the width of the rectangle.
int get_xmax (void) const
int get_xmin (void) const
 Returns xmin of the bounding rectangle.
virtual GUTF8String get_xmltag (const int height) const
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)
 Virtual function maps rectangle from one area to another using mapper.
void move (int dx, int dy)
GMapRectoperator= (const GRect &rect)
 Changes the GMapRect#'s geometry.
GUTF8String print (void)
void resize (int new_width, int new_height)
void transform (const GRect &grect)
virtual void unmap (GRectMapper &mapper)
 Virtual function unmaps rectangle from one area to another using mapper.

Static Public Member Functions

static GP< GMapRectcreate (const GRect &rect)
 Create with the specified GRect.
static GP< GMapRectcreate (void)
 Default creator.

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 bool gma_is_point_inside (const int x, const int y) const
virtual void gma_move (int dx, int dy)
virtual GUTF8String gma_print (void)
virtual void gma_resize (int new_width, int new_height)
virtual void gma_transform (const GRect &grect)
 GMapRect (const GRect &rect)

Protected Attributes

volatile int count
 The reference counter.
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