2 /* This file is part of
3 * =================================================
5 * LyX, The Document Processor
6 * Copyright 1995 Matthias Ettrich.
7 * Copyright 1995-2002 The LyX Team.
10 * \author Herbert Voss <voss@lyx.org>
11 * ================================================= */
13 #ifndef INSETGRAPHICSPARAMS_H
14 #define INSETGRAPHICSPARAMS_H
27 /// This struct holds all the parameters needed by insetGraphics.
28 struct InsetGraphicsParams
30 /// How do we display the image?
32 DEFAULT, // whatever is in lyxrc.display_graphics
33 COLOR, // full color range
34 GRAYSCALE, // 256 shades of gray
35 MONOCHROME, // In black and white.
36 NONE // only keep a frame in place.
40 DEFAULT_SIZE, // like none
41 WH, // width/height values
42 SCALE // percentage value
46 /// Do we have a subcaption?
48 /// The text of the subcaption.
49 string subcaptionText;
50 /// The bounding box with "xLB yLB yRT yRT ", divided by a space!
56 /// How to display the image
58 /// any userdefined special command
60 /// three possible values for rescaling
68 /// Keep the ratio between height and width when resizing.
70 /// the size for the view inside lyx
74 /// Typ of rescaling the Screen
76 /// Typ of the LyXView, same as for latex
77 sizeType lyxsize_type;
78 /// Origin point of rotation
83 InsetGraphicsParams();
85 InsetGraphicsParams(InsetGraphicsParams const &);
87 InsetGraphicsParams & operator=(InsetGraphicsParams const &);
88 /// Save the parameters in the LyX format stream.
89 void Write(Buffer const * buf, ostream & os) const;
90 /// If the token belongs to our parameters, read it.
91 bool Read(Buffer const * buf, LyXLex & lex, string const & token);
94 /// Initialize the object to a default status.
96 /// Copy the other objects content to us, used in copy c-tor and assignment
97 void copy(InsetGraphicsParams const & params);
101 bool operator==(InsetGraphicsParams const &, InsetGraphicsParams const &);
103 bool operator!=(InsetGraphicsParams const &, InsetGraphicsParams const &);