X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2FinsetgraphicsParams.h;h=130e530646a10d7fe611887922295b4f79752c6b;hb=4a5b7a5952ad2381fcdf4830511293e184c7c5a1;hp=719aa22019c0dc9e90637959bc189672de5fc870;hpb=f09619a7e8808cd083a980a4ca13dd64f330b054;p=lyx.git diff --git a/src/insets/insetgraphicsParams.h b/src/insets/insetgraphicsParams.h index 719aa22019..130e530646 100644 --- a/src/insets/insetgraphicsParams.h +++ b/src/insets/insetgraphicsParams.h @@ -22,19 +22,19 @@ #include "buffer.h" #include "lyxlex.h" -using std::ostream; - /// This struct holds all the parameters needed by insetGraphics. struct InsetGraphicsParams { /// How do we display the image? enum DisplayType { + DEFAULT, // whatever is in lyxrc.display_graphics COLOR, // full color range GRAYSCALE, // 256 shades of gray MONOCHROME, // In black and white. NONE // only keep a frame in place. }; - enum sizeType { + /// + enum sizeType { // for latex and/or lyx DEFAULT_SIZE, // like none WH, // width/height values SCALE // percentage value @@ -45,34 +45,42 @@ struct InsetGraphicsParams bool subcaption; /// The text of the subcaption. string subcaptionText; - /// The bounding box with "xLB yLB yRT yRT ", divided by a space! - string bb; + /// Do we rotate? + bool rotate; + /// Origin point of rotation + string rotateOrigin; + /// Rotation angle. + float rotateAngle; /// clip image bool clip; /// draft mode bool draft; - /// How to display the image - DisplayType display; - /// any userdefined special command - string special; - /// three possible values for rescaling + /// what to do with zipped files + bool noUnzip; + /// The bounding box with "xLB yLB yRT yRT ", divided by a space! + string bb; + /// Type of rescaling + sizeType size_type; + /// three possible values for rescaling (latex) LyXLength width; /// LyXLength height; /// int scale; - /// Type of rescaling - sizeType size_type; /// Keep the ratio between height and width when resizing. bool keepAspectRatio; + /// any userdefined special command + string special; + /// How to display the image inside lyx + DisplayType display; /// the size for the view inside lyx + /// Typ of the LyXView, same as for latex + sizeType lyxsize_type; LyXLength lyxwidth; /// LyXLength lyxheight; - /// Origin point of rotation - string rotateOrigin; - /// Rotation angle. - float rotateAngle; + /// Typ of rescaling the Screen inside lyx + int lyxscale; /// InsetGraphicsParams(); /// @@ -80,11 +88,9 @@ struct InsetGraphicsParams /// InsetGraphicsParams & operator=(InsetGraphicsParams const &); /// Save the parameters in the LyX format stream. - void Write(Buffer const * buf, ostream & os) const; + void Write(Buffer const * buf, std::ostream & os) const; /// If the token belongs to our parameters, read it. bool Read(Buffer const * buf, LyXLex & lex, string const & token); - /// Test the struct to make sure that all the options have legal values. - void testInvariant() const; private: /// Initialize the object to a default status.