]> git.lyx.org Git - lyx.git/blob - src/lyxrow.h
tab funcs changed
[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 class Paragraph;
21
22 ///
23 class Row {
24 public:
25         ///
26         Row();
27         ///
28         Row(Paragraph * pa, lyx::pos_type po);
29         ///
30         void par(Paragraph * p);
31         ///
32         Paragraph * par();
33         ///
34         Paragraph * par() const;
35         ///
36         void pos(lyx::pos_type p);
37         ///
38         lyx::pos_type pos() const;
39         ///
40         void fill(int f);
41         ///
42         int fill() const;
43         ///
44         void height(unsigned short h);
45         ///
46         unsigned short height() const;
47         ///
48         void width(unsigned int w);
49         ///
50         unsigned int width() const;
51         ///
52         void ascent_of_text(unsigned short a);
53         ///
54         unsigned short ascent_of_text() const;
55         ///
56         void top_of_text(unsigned int top);
57         ///
58         unsigned int top_of_text() const;
59         ///
60         void baseline(unsigned int b);
61         ///
62         unsigned int baseline() const;
63         /// return true if this row is the start of a paragraph
64         bool isParStart() const;
65 private:
66         ///
67         Paragraph * par_;
68         ///
69         lyx::pos_type pos_;
70         /** what is missing to a full row can be negative.
71           Needed for hfills, flushright, block etc. */
72         mutable int fill_;
73         ///
74         unsigned short height_;
75         ///
76         unsigned int width_;
77         /// ascent from baseline including prelude space
78         unsigned short ascent_of_text_;
79         /// the top of the real text in the row
80         unsigned int top_of_text_;
81         ///
82         unsigned int baseline_;
83 };
84
85 #endif