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"
30 /// This class holds all the parameters needed by insetGraphics.
31 class InsetGraphicsParams
35 lyx::support::FileName filename;
36 /// Scaling the Screen inside Lyx
37 unsigned int lyxscale;
38 /// How to display the image inside LyX
39 lyx::graphics::DisplayType display;
40 /// Scaling for output (LaTeX)
42 /// sizes for output (LaTeX)
46 /// Keep the ratio between height and width when resizing.
50 /// what to do with zipped files
53 /// The bounding box with "xLB yLB yRT yRT ", divided by a space!
59 std::string rotateAngle;
60 /// Origin point of rotation
61 std::string rotateOrigin;
62 /// Do we have a subcaption?
64 /// The text of the subcaption.
65 std::string subcaptionText;
66 /// any userdefined special command
70 InsetGraphicsParams();
72 InsetGraphicsParams(InsetGraphicsParams const &);
74 InsetGraphicsParams & operator=(InsetGraphicsParams const &);
75 /// Save the parameters in the LyX format stream.
76 void Write(std::ostream & os, std::string const & bufpath) const;
77 /// If the token belongs to our parameters, read it.
78 bool Read(LyXLex & lex, std::string const & token, std::string const & bufpath);
80 // Only a subset of InsetGraphicsParams is needed for display purposes.
81 // This function also interrogates lyxrc to ascertain whether
83 lyx::graphics::Params as_grfxParams() const;
86 /// Initialize the object to a default status.
88 /// Copy the other objects content to us, used in copy c-tor and assignment
89 void copy(InsetGraphicsParams const & params);
93 bool operator==(InsetGraphicsParams const &, InsetGraphicsParams const &);
95 bool operator!=(InsetGraphicsParams const &, InsetGraphicsParams const &);