3 * \file insetgraphicsParams.h
4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
10 * Full author contact details are available in file CREDITS.
13 #ifndef INSETGRAPHICSPARAMS_H
14 #define INSETGRAPHICSPARAMS_H
17 #include "graphics/GraphicsTypes.h"
18 #include "lyxlength.h"
19 #include "support/filename.h"
23 namespace graphics { class Params; }
28 /// This class holds all the parameters needed by insetGraphics.
29 class InsetGraphicsParams
33 support::DocFileName filename;
34 /// Scaling the Screen inside Lyx
35 unsigned int lyxscale;
36 /// How to display the image inside LyX
37 graphics::DisplayType display;
38 /// Scaling for output (LaTeX)
40 /// sizes for output (LaTeX)
44 /// Keep the ratio between height and width when resizing.
48 /// what to do with zipped files
51 /// The bounding box with "xLB yLB yRT yRT ", divided by a space!
57 std::string rotateAngle;
58 /// Origin point of rotation
59 std::string rotateOrigin;
60 /// Do we have a subcaption?
62 /// The text of the subcaption.
63 std::string subcaptionText;
64 /// any userdefined special command
68 InsetGraphicsParams();
70 InsetGraphicsParams(InsetGraphicsParams const &);
72 InsetGraphicsParams & operator=(InsetGraphicsParams const &);
73 /// Save the parameters in the LyX format stream.
74 void Write(std::ostream & os, std::string const & bufpath) const;
75 /// If the token belongs to our parameters, read it.
76 bool Read(LyXLex & lex, std::string const & token, std::string const & bufpath);
78 // Only a subset of InsetGraphicsParams is needed for display purposes.
79 // This function also interrogates lyxrc to ascertain whether
81 graphics::Params as_grfxParams() const;
84 /// Initialize the object to a default status.
86 /// Copy the other objects content to us, used in copy c-tor and assignment
87 void copy(InsetGraphicsParams const & params);
91 bool operator==(InsetGraphicsParams const &, InsetGraphicsParams const &);
93 bool operator!=(InsetGraphicsParams const &, InsetGraphicsParams const &);