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"
19 #include "support/FileName.h"
20 #include "EmbeddedFiles.h"
24 namespace graphics { class Params; }
30 /// This class holds all the parameters needed by insetGraphics.
31 class InsetGraphicsParams
35 EmbeddedFile filename;
36 /// Scaling the Screen inside Lyx
37 unsigned int lyxscale;
38 /// How to display the image inside LyX
39 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
52 /// scale image before rotating
53 bool scaleBeforeRotation;
55 /// The bounding box with "xLB yLB yRT yRT ", divided by a space!
61 std::string rotateAngle;
62 /// Origin point of rotation
63 std::string rotateOrigin;
64 /// Do we have a subcaption?
66 /// The text of the subcaption.
67 std::string subcaptionText;
68 /// any userdefined special command
72 InsetGraphicsParams();
74 InsetGraphicsParams(InsetGraphicsParams const &);
76 InsetGraphicsParams & operator=(InsetGraphicsParams const &);
77 /// Save the parameters in the LyX format stream.
78 /// Buffer is needed to figure out if a figure is embedded.
79 void Write(std::ostream & os, Buffer const & buf) const;
80 /// If the token belongs to our parameters, read it.
81 bool Read(Lexer & lex, std::string const & token, std::string const & bufpath);
83 // Only a subset of InsetGraphicsParams is needed for display purposes.
84 // This function also interrogates lyxrc to ascertain whether
86 graphics::Params as_grfxParams() const;
89 /// Initialize the object to a default status.
91 /// Copy the other objects content to us, used in copy c-tor and assignment
92 void copy(InsetGraphicsParams const & params);
96 bool operator==(InsetGraphicsParams const &, InsetGraphicsParams const &);
98 bool operator!=(InsetGraphicsParams const &, InsetGraphicsParams const &);