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