blob: 66de5c6f7120a718caee90a33bda3d3ad76e37dd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
|
// -*- C++ -*-
//
// Class: hyperlink
//
// Part of KDVI- A previewer for TeX DVI files.
//
// (C) 2004-2005 Stefan Kebekus. Distributed under the GPL.
#ifndef _hyperlink_h_
#define _hyperlink_h_
#include <tqrect.h>
#include <tqstring.h>
/** Represents a named, rectangular region in a rendered documentPage
This trivial class is used in the documentPage class to represent
a hyperlink in a rendered documentPage.
@author Stefan Kebekus <kebekus@kde.org>
@version 1.0.0
*/
class Hyperlink
{
public:
/** \brief Default Constructor
The default constructor leaves all fields uninitialized.
*/
Hyperlink() {}
/** \brief Constructor
Trivial constructor leaves that initialized all members.
@param bl value for the baseline field
@param re value for the box
@param lT valus for the text field
*/
Hyperlink(Q_UINT32 bl, const TQRect& re, const TQString& lT): baseline(bl), box(re), linkText(lT) {}
/** \brief Base line of a hyperlink
This field specifies the Y-coordinate of the base line of the
bounding box in the same coordinates that were used when the
associated documentPage was rendered by the
documentRenderer.drawPage() method. It is used to underline
hyperlinks in blue. Note that this field does generally differ from
the Y-coordinate of the bottom of the bounding box, e.g. if the text
in the box contains characters with underlengths, such as 'y', 'j'
or 'g'.
*/
Q_UINT32 baseline;
/** \brief Bounding box of the text or hyperlink
This rectangle specifies where on the page the hyperlink is
found. It uses the same coordinates that were used when the
associated documentPage was rendered by the
documentRenderer.drawPage() method. The box is used to determine if
the mouse pointer hovers over the link.
*/
TQRect box;
/** \brief Name of the region
This field contains the name of the target,
e.g. "http://www.kde.org". If the Hyperlink class is used to
represent text, then the text is stored here.
*/
TQString linkText;
};
#endif
|