X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fvspace.h;h=b358b40621b486b7e94ca6077c973dd59de7a072;hb=e5a46922e916a06ad1b958d5895cc3cfb4f13d2c;hp=266e04196da2c6ebf9a674fcc3adb22f30c99604;hpb=ff9b02aabae2253d4176bfd0f2d668ab97d7f908;p=lyx.git diff --git a/src/vspace.h b/src/vspace.h index 266e04196d..b358b40621 100644 --- a/src/vspace.h +++ b/src/vspace.h @@ -1,87 +1,84 @@ // -*- C++ -*- -/* This file is part of - * ====================================================== +/** + * \file vspace.h + * This file is part of LyX, the document processor. + * Licence details can be found in the file COPYING. * - * LyX, The Document Processor - * - * Copyright 1995 Matthias Ettrich - * Copyright 1995-2001 The LyX Team. + * \author Matthias Ettrich * - * ====================================================== */ + * Full author contact details are available in file CREDITS. + */ #ifndef VSPACE_H #define VSPACE_H -#ifdef __GNUG__ -#pragma interface -#endif - #include "lyxgluelength.h" -#include "LString.h" + +namespace lyx { + class BufferParams; class BufferView; -/// +/// A class representing latex vertical spacing class VSpace { public: /// The different kinds of spaces. enum vspace_kind { - /// - NONE, - /// DEFSKIP, - /// SMALLSKIP, - /// MEDSKIP, - /// BIGSKIP, - /// VFILL, - /// - LENGTH + LENGTH ///< user-defined length }; - /// Constructor + VSpace(); - /// Constructor + explicit VSpace(vspace_kind k); - /// Constructor + explicit VSpace(LyXLength const & l); - /// Constructor + explicit VSpace(LyXGlueLength const & l); /// Constructor for reading from a .lyx file - explicit VSpace(string const & data); - - /// access functions + explicit VSpace(std::string const & data); + + /// return the type of vertical space vspace_kind kind() const; - /// - LyXGlueLength length() const; + /// return the length of this space + LyXGlueLength const & length() const; // a flag that switches between \vspace and \vspace* bool keep() const; - /// + /// if set true, use \vspace* when type is not DEFSKIP void setKeep(bool val); /// bool operator==(VSpace const &) const; // conversion + /// how it goes into the LyX file - string const asLyXCommand() const; - /// - string const asLatexCommand(BufferParams const & params) const; - /// - int inPixels(BufferView * bv) const; + std::string const asLyXCommand() const; + /// the latex representation + std::string const asLatexCommand(BufferParams const & params) const; + /// how it is seen in the LyX window + docstring const asGUIName() const; + /// the size of the space on-screen + int inPixels(BufferView const & bv) const; + private: /// This VSpace kind vspace_kind kind_; - /// + /// the specified length LyXGlueLength len_; - /// + /// if true, use \vspace* type bool keep_; }; -#endif + +} // namespace lyx + +#endif // VSPACE_H