]> git.lyx.org Git - lyx.git/blob - src/lyxrow.h
The forms resize patch, and small updates
[lyx.git] / src / lyxrow.h
1 // -*- C++ -*-
2 /* This file is part of
3  * ====================================================== 
4  * 
5  *           LyX, The Document Processor
6  *       
7  *           Copyright 1995 Matthias Ettrich
8  *           Copyright 1995-2000 The LyX Team.
9  *
10  * ====================================================== */
11
12 #ifndef LYXROW_H
13 #define LYXROW_H
14
15 #ifdef __GNUG__
16 #pragma interface
17 #endif
18
19 #include "lyxparagraph.h"
20
21 ///
22 class Row {
23 public:
24         ///
25         Row();
26         ///
27         void par(LyXParagraph * p);
28         ///
29         LyXParagraph * par();
30         ///
31         LyXParagraph * par() const;
32         ///
33         void pos(LyXParagraph::size_type p);
34         ///
35         LyXParagraph::size_type pos() const;
36         ///
37         void fill(int f);
38         ///
39         int fill() const;
40         ///
41         void height(unsigned short h);
42         ///
43         unsigned short height() const;
44         ///
45         void width(unsigned int w);
46         ///
47         unsigned int width() const;
48         ///
49         void ascent_of_text(unsigned short a);
50         ///
51         unsigned short ascent_of_text() const;
52         ///
53         void baseline(unsigned int b);
54         ///
55         unsigned int baseline() const;
56         ///
57         void next(Row * r);
58         ///
59         Row * next() const;
60         ///
61         void previous(Row * r);
62         ///
63         Row * previous() const;
64 private:
65         ///
66         LyXParagraph * par_;
67         ///
68         LyXParagraph::size_type pos_;
69         /** what is missing to a full row can be negative.
70           Needed for hfills, flushright, block etc. */
71         mutable int fill_;
72         ///
73         unsigned short height_;
74         ///
75         unsigned int width_;
76         ///
77         unsigned short ascent_of_text_;
78         ///
79         unsigned int baseline_;
80         ///
81         Row * next_;
82         ///
83         Row * previous_;
84 };
85
86 #endif