2001-03-06 14:07:14 +00:00
|
|
|
|
// -*- C++ -*-
|
2003-08-23 00:17:00 +00:00
|
|
|
|
/**
|
|
|
|
|
* \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<EFBFBD>nnes
|
|
|
|
|
* \author Angus Leeming
|
|
|
|
|
* \author John Levon
|
|
|
|
|
*
|
|
|
|
|
* Full author contact details are available in file CREDITS.
|
|
|
|
|
*/
|
2001-03-06 14:07:14 +00:00
|
|
|
|
|
|
|
|
|
#ifndef PARAGRAPHPARAMETERS_H
|
|
|
|
|
#define PARAGRAPHPARAMETERS_H
|
|
|
|
|
|
2007-04-29 22:04:32 +00:00
|
|
|
|
#include "Layout.h"
|
2007-04-28 12:58:49 +00:00
|
|
|
|
#include "Length.h"
|
2004-03-25 09:16:36 +00:00
|
|
|
|
#include "Spacing.h"
|
2001-08-03 18:28:11 +00:00
|
|
|
|
|
2003-09-06 20:32:37 +00:00
|
|
|
|
#include "support/types.h"
|
2006-10-20 19:26:23 +00:00
|
|
|
|
#include "support/docstring.h"
|
2001-03-06 14:07:14 +00:00
|
|
|
|
|
2003-03-12 06:53:49 +00:00
|
|
|
|
#include <iosfwd>
|
2003-10-07 06:45:25 +00:00
|
|
|
|
#include <string>
|
2003-03-12 06:53:49 +00:00
|
|
|
|
|
2006-10-21 00:16:43 +00:00
|
|
|
|
|
|
|
|
|
namespace lyx {
|
|
|
|
|
|
2003-09-06 20:32:37 +00:00
|
|
|
|
class BufferView;
|
2007-04-28 12:58:49 +00:00
|
|
|
|
class Length;
|
2007-04-26 11:30:54 +00:00
|
|
|
|
class Lexer;
|
2003-03-13 13:56:25 +00:00
|
|
|
|
class Paragraph;
|
2003-09-06 20:32:37 +00:00
|
|
|
|
class Spacing;
|
2001-03-06 14:07:14 +00:00
|
|
|
|
|
2004-02-13 11:05:29 +00:00
|
|
|
|
|
2001-03-06 14:07:14 +00:00
|
|
|
|
///
|
|
|
|
|
class ParagraphParameters {
|
|
|
|
|
public:
|
|
|
|
|
///
|
|
|
|
|
ParagraphParameters();
|
|
|
|
|
///
|
|
|
|
|
void clear();
|
|
|
|
|
///
|
|
|
|
|
bool sameLayout(ParagraphParameters const &) const;
|
|
|
|
|
///
|
|
|
|
|
Spacing const & spacing() const;
|
|
|
|
|
///
|
|
|
|
|
void spacing(Spacing const &);
|
|
|
|
|
///
|
|
|
|
|
bool noindent() const;
|
|
|
|
|
///
|
|
|
|
|
void noindent(bool);
|
|
|
|
|
///
|
|
|
|
|
LyXAlignment align() const;
|
|
|
|
|
///
|
|
|
|
|
void align(LyXAlignment);
|
|
|
|
|
///
|
2001-06-25 00:06:33 +00:00
|
|
|
|
depth_type depth() const;
|
|
|
|
|
///
|
|
|
|
|
void depth(depth_type);
|
2001-03-06 14:07:14 +00:00
|
|
|
|
///
|
|
|
|
|
bool startOfAppendix() const;
|
|
|
|
|
///
|
|
|
|
|
void startOfAppendix(bool);
|
|
|
|
|
///
|
|
|
|
|
bool appendix() const;
|
|
|
|
|
///
|
|
|
|
|
void appendix(bool);
|
|
|
|
|
///
|
2006-10-21 00:16:43 +00:00
|
|
|
|
docstring const & labelString() const;
|
2001-03-06 14:07:14 +00:00
|
|
|
|
///
|
2006-10-21 00:16:43 +00:00
|
|
|
|
void labelString(docstring const &);
|
2001-03-06 14:07:14 +00:00
|
|
|
|
///
|
2006-10-21 00:16:43 +00:00
|
|
|
|
docstring const & labelWidthString() const;
|
2001-03-06 14:07:14 +00:00
|
|
|
|
///
|
2006-10-21 00:16:43 +00:00
|
|
|
|
void labelWidthString(docstring const &);
|
2002-05-08 12:58:16 +00:00
|
|
|
|
///
|
2007-04-28 12:58:49 +00:00
|
|
|
|
Length const & leftIndent() const;
|
2002-05-08 12:58:16 +00:00
|
|
|
|
///
|
2007-04-28 12:58:49 +00:00
|
|
|
|
void leftIndent(Length const &);
|
2003-03-12 06:53:49 +00:00
|
|
|
|
|
|
|
|
|
/// read the parameters from a lex
|
2007-04-26 11:30:54 +00:00
|
|
|
|
void read(Lexer & lex);
|
2003-03-12 06:53:49 +00:00
|
|
|
|
|
|
|
|
|
/// write out the parameters to a stream
|
|
|
|
|
void write(std::ostream & os) const;
|
|
|
|
|
|
2004-03-25 09:16:36 +00:00
|
|
|
|
//friend bool operator==(ParameterStruct const & ps1,
|
|
|
|
|
//ParameterStruct const & ps2);
|
|
|
|
|
|
2001-03-06 14:07:14 +00:00
|
|
|
|
private:
|
|
|
|
|
///
|
2004-03-25 09:16:36 +00:00
|
|
|
|
Spacing spacing_;
|
|
|
|
|
///
|
|
|
|
|
bool noindent_;
|
|
|
|
|
///
|
|
|
|
|
bool start_of_appendix_;
|
|
|
|
|
///
|
|
|
|
|
bool appendix_;
|
2001-03-06 14:07:14 +00:00
|
|
|
|
///
|
2004-03-25 09:16:36 +00:00
|
|
|
|
LyXAlignment align_;
|
2001-03-06 14:07:14 +00:00
|
|
|
|
///
|
2004-03-25 09:16:36 +00:00
|
|
|
|
depth_type depth_;
|
|
|
|
|
///
|
2006-10-21 00:16:43 +00:00
|
|
|
|
docstring labelstring_;
|
2004-03-25 09:16:36 +00:00
|
|
|
|
///
|
2006-10-21 00:16:43 +00:00
|
|
|
|
docstring labelwidthstring_;
|
2004-03-25 09:16:36 +00:00
|
|
|
|
///
|
2007-04-28 12:58:49 +00:00
|
|
|
|
Length leftindent_;
|
2001-03-06 14:07:14 +00:00
|
|
|
|
};
|
2001-04-17 15:15:59 +00:00
|
|
|
|
|
|
|
|
|
|
2004-03-25 09:16:36 +00:00
|
|
|
|
|
2003-03-13 13:56:25 +00:00
|
|
|
|
/** Generate a string \param data from \param par's ParagraphParameters.
|
|
|
|
|
The function also generates some additional info needed by the
|
|
|
|
|
Paragraph dialog.
|
|
|
|
|
*/
|
2003-10-06 15:43:21 +00:00
|
|
|
|
void params2string(Paragraph const & par, std::string & data);
|
2003-03-13 13:56:25 +00:00
|
|
|
|
|
2006-10-21 00:16:43 +00:00
|
|
|
|
|
|
|
|
|
} // namespace lyx
|
|
|
|
|
|
2001-03-06 14:07:14 +00:00
|
|
|
|
#endif
|