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
19 #include "support/FileName.h"
25 namespace graphics { class Params; }
31 /// This class holds all the parameters needed by insetGraphics.
32 class InsetGraphicsParams
36 support::DocFileName filename;
37 /// Scaling the Screen inside Lyx
38 unsigned int lyxscale;
39 /// If to display the image inside LyX
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
53 /// scale image before rotating
54 bool scaleBeforeRotation;
56 /// The bounding box with "xLB yLB yRT yRT ", divided by a space!
62 std::string rotateAngle;
63 /// Origin point of rotation
64 std::string rotateOrigin;
65 /// any userdefined special command
69 InsetGraphicsParams();
71 InsetGraphicsParams(InsetGraphicsParams const &);
73 void operator=(InsetGraphicsParams const &);
74 /// Save the parameters in the LyX format stream.
75 /// Buffer is needed to figure out if a figure is embedded.
76 void Write(std::ostream & os, Buffer const & buf) const;
77 /// If the token belongs to our parameters, read it.
78 bool Read(Lexer & 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 graphics::Params as_grfxParams() const;
85 // FIXME UNICODE. Write functions need to use odostream instead of ostream firstly.
86 /// Identification of the graphics template. No template equals empty string.
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 &);