2 /* This file is part of
3 * =================================================
5 * LyX, The Document Processor
6 * Copyright 1995 Matthias Ettrich.
7 * Copyright 1995-2001 The LyX Team.
9 * This file Copyright 2000 Baruch Even
10 * ================================================= */
12 #ifndef INSETGRAPHICSPARAMS_H
13 #define INSETGRAPHICSPARAMS_H
26 /// This struct holds all the parameters needed by insetGraphics.
27 struct InsetGraphicsParams
32 /// How do we display the image?
34 /// In full color range (if it's not in color we show it as it is)
36 /// In Grayscale (256 shades of gray).
38 /// In black and white.
40 /// Don't display it on screen, only keep a frame in place.
44 /// How to display the image
47 /// Do we have a subcaption?
50 /// The text of the subcaption.
51 string subcaptionText;
53 /// This is the different origins that the graphicx package support.
68 REFERENCE_POINT = LEFTBASELINE
71 /** The resize of the image, is it the default size, in cm, inch or
72 percentage of the page/column width/height */
82 /// Keep the ratio between height and width when resizing.
85 /// What width resize to do?
87 /// Value of width resize
89 /// What height resize to do?
91 /// Value of height resize
94 /// Origin point of rotation
99 InsetGraphicsParams();
101 InsetGraphicsParams(InsetGraphicsParams const &);
103 InsetGraphicsParams & operator=(InsetGraphicsParams const &);
105 /// Save the parameters in the LyX format stream.
106 void Write(Buffer const * buf, ostream & os) const;
108 /// If the token belongs to our parameters, read it.
109 bool Read(Buffer const * buf, LyXLex & lex, string const & token);
111 /// Test the struct to make sure that all the options have legal values.
112 void testInvariant() const;
115 /// Initialize the object to a default status.
118 /// Copy the other objects content to us, used in copy c-tor and assignment
119 void copy(InsetGraphicsParams const & params);
123 bool operator==(InsetGraphicsParams const &, InsetGraphicsParams const &);
125 bool operator!=(InsetGraphicsParams const &, InsetGraphicsParams const &);