]> git.lyx.org Git - lyx.git/blob - src/lyxrow.h
remove broken xpm
[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-2001 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 "support/types.h"
20
21 class Paragraph;
22
23 ///
24 class Row {
25 public:
26         ///
27         Row();
28  
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 baseline(unsigned int b);
57         ///
58         unsigned int baseline() const;
59         ///
60         void next(Row * r);
61         ///
62         Row * next() const;
63         ///
64         void previous(Row * r);
65         ///
66         Row * previous() const;
67 private:
68         ///
69         Paragraph * par_;
70         ///
71         lyx::pos_type pos_;
72         /** what is missing to a full row can be negative.
73           Needed for hfills, flushright, block etc. */
74         mutable int fill_;
75         ///
76         unsigned short height_;
77         ///
78         unsigned int width_;
79         ///
80         unsigned short ascent_of_text_;
81         ///
82         unsigned int baseline_;
83         ///
84         Row * next_;
85         ///
86         Row * previous_;
87 };
88
89
90 inline
91 Paragraph * Row::par()
92 {
93         return par_;
94 }
95
96
97 inline
98 Paragraph * Row::par() const
99 {
100         return par_;
101 }
102
103
104 inline
105 unsigned short Row::height() const
106 {
107         return height_;
108 }
109
110
111 inline
112 Row * Row::next() const
113 {
114         return next_;
115 }
116
117 #endif