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
20 #include "graphics/GraphicsTypes.h"
22 #include "lyxlength.h"
30 /// This struct holds all the parameters needed by insetGraphics.
31 struct InsetGraphicsParams
35 /// Scaling the Screen inside Lyx
36 unsigned int lyxscale;
37 /// How to display the image inside LyX
38 grfx::DisplayType display;
39 /// Scaling for output (LaTeX)
41 /// sizes for output (LaTeX)
45 /// Keep the ratio between height and width when resizing.
49 /// what to do with zipped files
52 /// The bounding box with "xLB yLB yRT yRT ", divided by a space!
59 /// Origin point of rotation
61 /// Do we have a subcaption?
63 /// The text of the subcaption.
64 string subcaptionText;
65 /// any userdefined special command
69 InsetGraphicsParams();
71 InsetGraphicsParams(InsetGraphicsParams const &);
73 InsetGraphicsParams & operator=(InsetGraphicsParams const &);
74 /// Save the parameters in the LyX format stream.
75 void Write(std::ostream & os) const;
76 /// If the token belongs to our parameters, read it.
77 bool Read(LyXLex & lex, string const & token);
79 // Only a subset of InsetGraphicsParams is needed for display purposes.
80 // This function also interrogates lyxrc to ascertain whether
82 grfx::Params as_grfxParams(string const & filepath) const;
85 /// Initialize the object to a default status.
87 /// Copy the other objects content to us, used in copy c-tor and assignment
88 void copy(InsetGraphicsParams const & params);
92 bool operator==(InsetGraphicsParams const &, InsetGraphicsParams const &);
94 bool operator!=(InsetGraphicsParams const &, InsetGraphicsParams const &);