]> git.lyx.org Git - lyx.git/blob - src/lyxrow.h
- Link against qt-mt333.lib which is what the current qt3 cvs produces
[lyx.git] / src / lyxrow.h
1 // -*- C++ -*-
2 /**
3  * \file lyxrow.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Matthias Ettrich
8  * \author Lars Gullik Bjønnes
9  *
10  * Full author contact details are available in file CREDITS.
11  *
12  * Metrics for an on-screen text row.
13  */
14
15 #ifndef LYXROW_H
16 #define LYXROW_H
17
18 #include "support/types.h"
19
20 ///
21 class Row {
22 public:
23         ///
24         Row();
25         ///
26         Row(lyx::pos_type pos);
27         ///
28         void pos(lyx::pos_type p);
29         ///
30         lyx::pos_type pos() const;
31         ///
32         void endpos(lyx::pos_type p);
33         ///
34         lyx::pos_type endpos() const;
35         ///
36         int height() const { return ascent_ + descent_; }
37         ///
38         void width(int w);
39         ///
40         int width() const;
41         ///
42         void ascent(int b);
43         ///
44         int ascent() const;
45         ///
46         void descent(int b) { descent_ = b; }
47         ///
48         int descent() const { return descent_; }
49         /// current debugging only
50         void dump(const char * = "") const;
51
52 private:
53         /// first pos covered by this row
54         lyx::pos_type pos_;
55         /// one behind last pos covered by this row
56         lyx::pos_type end_;
57         ///
58         int ascent_;
59         ///
60         int descent_;
61         ///
62         int width_;
63 };
64
65
66 class RowMetrics {
67 public:
68         RowMetrics();
69         /// width of a separator (i.e. space)
70         double separator;
71         /// width of hfills in the body
72         double hfill;
73         /// width of hfills in the label
74         double label_hfill;
75         /// the x position of the row
76         double x;
77 };
78
79
80 #endif