X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Flyxrow.h;h=ac71a2d6615b6b56c1781d4bed02085b52d45103;hb=d899c547de3f689b09cd440a76a46e45cf75c7b0;hp=199ca99f3063f7c2f2e95a55d0c793d791090320;hpb=f1f99a0a16f5d4f2d992adbbf35ec449f95f7d15;p=lyx.git diff --git a/src/lyxrow.h b/src/lyxrow.h index 199ca99f30..ac71a2d661 100644 --- a/src/lyxrow.h +++ b/src/lyxrow.h @@ -5,40 +5,112 @@ * LyX, The Document Processor * * Copyright 1995 Matthias Ettrich - * Copyright 1995-1999 The LyX Team. + * Copyright 1995-2001 The LyX Team. * * ====================================================== */ #ifndef LYXROW_H #define LYXROW_H -#include "lyxparagraph.h" +#ifdef __GNUG__ +#pragma interface +#endif + +#include "support/types.h" + +class Paragraph; /// -struct Row { +class Row { +public: + /// + Row(); + /// + void par(Paragraph * p); + /// + Paragraph * par(); + /// + Paragraph * par() const; + /// + void pos(lyx::pos_type p); + /// + lyx::pos_type pos() const; + /// + void fill(int f); + /// + int fill() const; + /// + void height(unsigned short h); + /// + unsigned short height() const; + /// + void width(unsigned int w); + /// + unsigned int width() const; + /// + void ascent_of_text(unsigned short a); /// - Row() - : par(0), pos(0), baseline(0), fill(0), height(0), - ascent_of_text(0), next(0), previous(0) - {} + unsigned short ascent_of_text() const; /// - LyXParagraph * par; + void baseline(unsigned int b); /// - LyXParagraph::size_type pos; + unsigned int baseline() const; /// - unsigned short baseline; + void next(Row * r); + /// + Row * next() const; + /// + void previous(Row * r); + /// + Row * previous() const; +private: + /// + Paragraph * par_; + /// + lyx::pos_type pos_; /** what is missing to a full row can be negative. Needed for hfills, flushright, block etc. */ - mutable int fill; + mutable int fill_; + /// + unsigned short height_; /// - unsigned short height; + unsigned int width_; /// - unsigned short ascent_of_text; - + unsigned short ascent_of_text_; /// - Row * next; + unsigned int baseline_; /// - Row * previous; + Row * next_; + /// + Row * previous_; }; + +inline +Paragraph * Row::par() +{ + return par_; +} + + +inline +Paragraph * Row::par() const +{ + return par_; +} + + +inline +unsigned short Row::height() const +{ + return height_; +} + + +inline +Row * Row::next() const +{ + return next_; +} + #endif