1999-09-27 18:44:28 +00:00
|
|
|
// -*- C++ -*-
|
|
|
|
/* This file is part of
|
2002-03-21 17:27:08 +00:00
|
|
|
* ======================================================
|
|
|
|
*
|
1999-09-27 18:44:28 +00:00
|
|
|
* LyX, The Document Processor
|
2002-03-21 17:27:08 +00:00
|
|
|
*
|
1999-11-04 01:40:20 +00:00
|
|
|
* Copyright 1995 Matthias Ettrich
|
2001-05-30 13:53:44 +00:00
|
|
|
* Copyright 1995-2001 The LyX Team.
|
1999-09-27 18:44:28 +00:00
|
|
|
*
|
1999-11-04 01:40:20 +00:00
|
|
|
* ====================================================== */
|
1999-09-27 18:44:28 +00:00
|
|
|
|
1999-11-04 01:40:20 +00:00
|
|
|
#ifndef LYXROW_H
|
|
|
|
#define LYXROW_H
|
1999-09-27 18:44:28 +00:00
|
|
|
|
2001-11-26 16:42:04 +00:00
|
|
|
#include "support/types.h"
|
|
|
|
|
|
|
|
class Paragraph;
|
1999-09-27 18:44:28 +00:00
|
|
|
|
|
|
|
///
|
2000-06-08 23:16:16 +00:00
|
|
|
class Row {
|
|
|
|
public:
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
2000-06-08 23:16:16 +00:00
|
|
|
Row();
|
2002-12-01 22:59:25 +00:00
|
|
|
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
2001-06-25 00:06:33 +00:00
|
|
|
void par(Paragraph * p);
|
2000-06-08 23:16:16 +00:00
|
|
|
///
|
2001-06-25 00:06:33 +00:00
|
|
|
Paragraph * par();
|
2000-06-08 23:16:16 +00:00
|
|
|
///
|
2001-06-25 00:06:33 +00:00
|
|
|
Paragraph * par() const;
|
2000-06-08 23:16:16 +00:00
|
|
|
///
|
2001-11-27 10:34:16 +00:00
|
|
|
void pos(lyx::pos_type p);
|
2000-06-08 23:16:16 +00:00
|
|
|
///
|
2001-11-27 10:34:16 +00:00
|
|
|
lyx::pos_type pos() const;
|
2000-06-08 23:16:16 +00:00
|
|
|
///
|
|
|
|
void fill(int f);
|
|
|
|
///
|
|
|
|
int fill() const;
|
|
|
|
///
|
|
|
|
void height(unsigned short h);
|
|
|
|
///
|
|
|
|
unsigned short height() const;
|
|
|
|
///
|
2000-06-26 15:10:49 +00:00
|
|
|
void width(unsigned int w);
|
|
|
|
///
|
|
|
|
unsigned int width() const;
|
|
|
|
///
|
2000-06-08 23:16:16 +00:00
|
|
|
void ascent_of_text(unsigned short a);
|
|
|
|
///
|
|
|
|
unsigned short ascent_of_text() const;
|
|
|
|
///
|
|
|
|
void baseline(unsigned int b);
|
|
|
|
///
|
|
|
|
unsigned int baseline() const;
|
|
|
|
///
|
|
|
|
void next(Row * r);
|
|
|
|
///
|
|
|
|
Row * next() const;
|
|
|
|
///
|
|
|
|
void previous(Row * r);
|
|
|
|
///
|
|
|
|
Row * previous() const;
|
|
|
|
private:
|
|
|
|
///
|
2001-06-25 00:06:33 +00:00
|
|
|
Paragraph * par_;
|
2000-06-08 23:16:16 +00:00
|
|
|
///
|
2001-11-27 10:34:16 +00:00
|
|
|
lyx::pos_type pos_;
|
1999-09-27 18:44:28 +00:00
|
|
|
/** what is missing to a full row can be negative.
|
|
|
|
Needed for hfills, flushright, block etc. */
|
2000-06-08 23:16:16 +00:00
|
|
|
mutable int fill_;
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
2000-06-08 23:16:16 +00:00
|
|
|
unsigned short height_;
|
2000-04-26 13:57:28 +00:00
|
|
|
///
|
2000-06-26 15:10:49 +00:00
|
|
|
unsigned int width_;
|
|
|
|
///
|
2000-06-08 23:16:16 +00:00
|
|
|
unsigned short ascent_of_text_;
|
2000-04-26 13:57:28 +00:00
|
|
|
///
|
2000-06-08 23:16:16 +00:00
|
|
|
unsigned int baseline_;
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
2000-06-08 23:16:16 +00:00
|
|
|
Row * next_;
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
2000-06-08 23:16:16 +00:00
|
|
|
Row * previous_;
|
1999-09-27 18:44:28 +00:00
|
|
|
};
|
|
|
|
|
2001-04-04 20:20:42 +00:00
|
|
|
|
|
|
|
inline
|
2001-06-25 00:06:33 +00:00
|
|
|
Paragraph * Row::par()
|
2001-04-04 20:20:42 +00:00
|
|
|
{
|
|
|
|
return par_;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
inline
|
2001-06-25 00:06:33 +00:00
|
|
|
Paragraph * Row::par() const
|
2001-04-04 20:20:42 +00:00
|
|
|
{
|
|
|
|
return par_;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
inline
|
|
|
|
unsigned short Row::height() const
|
|
|
|
{
|
|
|
|
return height_;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
inline
|
|
|
|
Row * Row::next() const
|
|
|
|
{
|
|
|
|
return next_;
|
|
|
|
}
|
|
|
|
|
1999-09-27 18:44:28 +00:00
|
|
|
#endif
|