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"
20 #include "support/FileName.h"
26 namespace graphics { class Params; }
32 /// This class holds all the parameters needed by insetGraphics.
33 class InsetGraphicsParams
37 support::DocFileName filename;
38 /// Scaling the Screen inside Lyx
39 unsigned int lyxscale;
40 /// If to display the image inside LyX
42 /// Scaling for output (LaTeX)
44 /// sizes for output (LaTeX)
48 /// Keep the ratio between height and width when resizing.
52 /// what to do with zipped files
54 /// scale image before rotating
55 bool scaleBeforeRotation;
57 /// The bounding box with "xLB yLB yRT yRT ", divided by a space!
63 std::string rotateAngle;
64 /// Origin point of rotation
65 std::string rotateOrigin;
66 /// any userdefined special command
70 InsetGraphicsParams();
72 InsetGraphicsParams(InsetGraphicsParams const &);
74 void operator=(InsetGraphicsParams const &);
75 /// Save the parameters in the LyX format stream.
76 /// Buffer is needed to figure out if a figure is embedded.
77 void Write(std::ostream & os, Buffer const & buf) const;
78 /// If the token belongs to our parameters, read it.
79 bool Read(Lexer & lex, std::string const & token, std::string const & bufpath);
81 // Only a subset of InsetGraphicsParams is needed for display purposes.
82 // This function also interrogates lyxrc to ascertain whether
84 graphics::Params as_grfxParams() const;
86 // FIXME UNICODE. Write functions need to use odostream instead of ostream firstly.
87 /// Identification of the graphics template. No template equals empty string.
90 /// Initialize the object to a default status.
92 /// Copy the other objects content to us, used in copy c-tor and assignment
93 void copy(InsetGraphicsParams const & params);
97 bool operator==(InsetGraphicsParams const &, InsetGraphicsParams const &);
99 bool operator!=(InsetGraphicsParams const &, InsetGraphicsParams const &);