X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FParagraphParameters.h;h=6fb9e2bc32343b06f1e1e78518a2d8f2cd0071d3;hb=e54ae72e5fac6f750c3f7972c74bb42b57f3a049;hp=c2ab56d2e4b2c2a4ce4d4238b31ff8297ada2a42;hpb=20d61473cc56884cdc9440a6affb7c964bde2194;p=lyx.git diff --git a/src/ParagraphParameters.h b/src/ParagraphParameters.h index c2ab56d2e4..6fb9e2bc32 100644 --- a/src/ParagraphParameters.h +++ b/src/ParagraphParameters.h @@ -1,22 +1,36 @@ // -*- C++ -*- +/** + * \file ParagraphParameters.h + * This file is part of LyX, the document processor. + * Licence details can be found in the file COPYING. + * + * \author Lars Gullik Bjønnes + * \author Angus Leeming + * \author John Levon + * + * Full author contact details are available in file CREDITS. + */ #ifndef PARAGRAPHPARAMETERS_H #define PARAGRAPHPARAMETERS_H -#ifdef __GNUG__ -#pragma interface -#endif +#include "Layout.h" +#include "Length.h" +#include "Spacing.h" + +#include "support/types.h" +#include "support/docstring.h" -#include "LString.h" -#include "ShareContainer.h" -#include "layout.h" +#include +#include -// Not yet... lyx 1.3.x or so -#define NO_PEXTRA_REALLY 1 -#include "ParameterStruct.h" +namespace lyx { -class VSpace; +class BufferView; +class Length; +class Lexer; +class Paragraph; class Spacing; @@ -30,14 +44,6 @@ public: /// bool sameLayout(ParagraphParameters const &) const; /// - VSpace const & spaceTop() const; - /// - void spaceTop(VSpace const &); - /// - VSpace const & spaceBottom() const; - /// - void spaceBottom(VSpace const &); - /// Spacing const & spacing() const; /// void spacing(Spacing const &); @@ -46,28 +52,10 @@ public: /// void noindent(bool); /// - bool lineTop() const; - /// - void lineTop(bool); - /// - bool lineBottom() const; - /// - void lineBottom(bool); - /// - bool pagebreakTop() const; - /// - void pagebreakTop(bool); - /// - bool pagebreakBottom() const; - /// - void pagebreakBottom(bool); - /// LyXAlignment align() const; /// void align(LyXAlignment); /// - typedef ParameterStruct::depth_type depth_type; - /// depth_type depth() const; /// void depth(depth_type); @@ -80,57 +68,57 @@ public: /// void appendix(bool); /// - string const & labelString() const; - /// - void labelString(string const &); - /// - string const & labelWidthString() const; + docstring const & labelString() const; /// - void labelWidthString(string const &); + void labelString(docstring const &); /// - LyXLength const & leftIndent() const; + docstring const & labelWidthString() const; /// - void leftIndent(LyXLength const &); + void labelWidthString(docstring const &); /// -#ifndef NO_PEXTRA_REALLY + Length const & leftIndent() const; /// - int pextraType() const; - /// - void pextraType(int); - /// - string const & pextraWidth() const; - /// - void pextraWidth(string const &); - /// - string const & pextraWidthp() const; - /// - void pextraWidthp(string const &); + void leftIndent(Length const &); + + /// read the parameters from a lex + void read(Lexer & lex); + + /// write out the parameters to a stream + void write(std::ostream & os) const; + + //friend bool operator==(ParameterStruct const & ps1, + //ParameterStruct const & ps2); + +private: /// - int pextraAlignment() const; + Spacing spacing_; /// - void pextraAlignment(int); + bool noindent_; /// - bool pextraHfill() const; + bool start_of_appendix_; /// - void pextraHfill(bool); + bool appendix_; /// - bool pextraStartMinipage() const; + LyXAlignment align_; /// - void pextraStartMinipage(bool); -#endif -private: + depth_type depth_; /// - void set_from_struct(ParameterStruct const &); + docstring labelstring_; /// - boost::shared_ptr param; + docstring labelwidthstring_; /// - static ShareContainer container; + Length leftindent_; }; -inline -ParagraphParameters::depth_type ParagraphParameters::depth() const -{ - return param->depth; -} + +/** Generate a string \param data from \param par's ParagraphParameters. + The function also generates some additional info needed by the + Paragraph dialog. + */ +void params2string(Paragraph const & par, std::string & data); + + +} // namespace lyx + #endif