]> git.lyx.org Git - lyx.git/blob - src/insets/insetgraphicsParams.h
add warning make controllers compile and remove some alomost unused functions, commen...
[lyx.git] / src / insets / insetgraphicsParams.h
1 // -*- C++ -*-
2 /**
3  * \file insetgraphicsParams.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Baruch Even
8  * \author Herbert Voss
9  *
10  * Full author contact details are available in file CREDITS
11  */
12
13 #ifndef INSETGRAPHICSPARAMS_H
14 #define INSETGRAPHICSPARAMS_H
15
16
17 #include "graphics/GraphicsTypes.h"
18 #include "LString.h"
19 #include "lyxlength.h"
20
21 class LyXLex;
22
23 namespace grfx {
24         class Params;
25 }
26
27 /// This struct holds all the parameters needed by insetGraphics.
28 struct InsetGraphicsParams
29 {
30         /// Image filename.
31         string filename;
32         /// Scaling the Screen inside Lyx
33         unsigned int lyxscale;
34         /// How to display the image inside LyX
35         grfx::DisplayType display;
36         /// Scaling for output (LaTeX)
37         float scale;
38         /// sizes for output (LaTeX)
39         LyXLength width;
40         ///
41         LyXLength height;
42         /// Keep the ratio between height and width when resizing.
43         bool keepAspectRatio;
44         /// draft mode
45         bool draft;
46         /// what to do with zipped files
47         bool noUnzip;
48
49         /// The bounding box with "xLB yLB yRT yRT ", divided by a space!
50         string bb;
51         /// clip image
52         bool clip;
53
54         /// Rotation angle.
55         float rotateAngle;
56         /// Origin point of rotation
57         string rotateOrigin;
58         /// Do we have a subcaption?
59         bool subcaption;
60         /// The text of the subcaption.
61         string subcaptionText;
62         /// any userdefined special command
63         string special;
64
65         ///
66         InsetGraphicsParams();
67         ///
68         InsetGraphicsParams(InsetGraphicsParams const &);
69         ///
70         InsetGraphicsParams & operator=(InsetGraphicsParams const &);
71         /// Save the parameters in the LyX format stream.
72         void Write(std::ostream & os) const;
73         /// If the token belongs to our parameters, read it.
74         bool Read(LyXLex & lex, string const & token);
75         /// convert
76   // Only a subset of InsetGraphicsParams is needed for display purposes.
77   // This function also interrogates lyxrc to ascertain whether
78   // to display or not.
79         grfx::Params as_grfxParams(string const & filepath = string()) const;
80
81 private:
82         /// Initialize the object to a default status.
83         void init();
84         /// Copy the other objects content to us, used in copy c-tor and assignment
85         void copy(InsetGraphicsParams const & params);
86 };
87
88 ///
89 bool operator==(InsetGraphicsParams const &, InsetGraphicsParams const &);
90 ///
91 bool operator!=(InsetGraphicsParams const &, InsetGraphicsParams const &);
92
93 #endif