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 "lyxlength.h"
21 namespace grfx = lyx::graphics;
32 /// This struct holds all the parameters needed by insetGraphics.
33 struct InsetGraphicsParams
37 /// Scaling the Screen inside Lyx
38 unsigned int lyxscale;
39 /// How to display the image inside LyX
40 grfx::DisplayType display;
41 /// Scaling for output (LaTeX)
43 /// sizes for output (LaTeX)
47 /// Keep the ratio between height and width when resizing.
51 /// what to do with zipped files
54 /// The bounding box with "xLB yLB yRT yRT ", divided by a space!
61 /// Origin point of rotation
63 /// Do we have a subcaption?
65 /// The text of the subcaption.
66 string subcaptionText;
67 /// any userdefined special command
71 InsetGraphicsParams();
73 InsetGraphicsParams(InsetGraphicsParams const &);
75 InsetGraphicsParams & operator=(InsetGraphicsParams const &);
76 /// Save the parameters in the LyX format stream.
77 void Write(std::ostream & os, string const & bufpath) const;
78 /// If the token belongs to our parameters, read it.
79 bool Read(LyXLex & lex, string const & token, string const & bufpath);
81 // Only a subset of InsetGraphicsParams is needed for display purposes.
82 // This function also interrogates lyxrc to ascertain whether
84 grfx::Params as_grfxParams() const;
87 /// Initialize the object to a default status.
89 /// Copy the other objects content to us, used in copy c-tor and assignment
90 void copy(InsetGraphicsParams const & params);
94 bool operator==(InsetGraphicsParams const &, InsetGraphicsParams const &);
96 bool operator!=(InsetGraphicsParams const &, InsetGraphicsParams const &);