summaryrefslogtreecommitdiffstats
path: root/kviewshell/textBox.h
blob: 22e248489df57491b2c5cd409e0a937f4f655230 (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
//
// Class: textBox
//
// Part of KDVI- A previewer for TeX DVI files.
//
// (C) 2004-2005 Stefan Kebekus. Distributed under the GPL.


#ifndef _textbox_h_
#define _textbox_h_

#include <tqrect.h>
#include <tqstring.h>

/** Represents a rectangular region in a RenderedDocumentPage that contains text
    
    This trivial class is used in the RenderedDocumentPage class to
    give a non-graphical representation of text in a rendered document
    page. This is used, e.g. by text search and the text selection
    functions that need to know the contents and the position of text
    on a page
    
    @author Stefan Kebekus <kebekus@kde.org>
    @version 1.0.0
*/

class TextBox
{
public:
  /** \brief Default Constructor

  The default constructor leaves all fields uninitialized.
  */
  TextBox() {}

  /** \brief Constructor

  Trivial constructor leaves that initialized all members.

  @param re value for the box
  @param lT valus for the text field
  */
  TextBox(const TQRect& re, const TQString& lT): box(re), text(lT) {}

  /** \brief Bounding box of the text or hyperlink

  This rectangle specifies where on the page the text or hyperlink is
  found. It uses the same coordinates that were used when the
  associated documentPage was rendered by the
  documentRenderer.drawPage() method. The contents of the box is
  graphically inverted to indicate marked text.
  */
  TQRect    box;

  /** \brief Name of the region

  The text associated with the box is stored here.
  */
  TQString  text;
};



#endif