]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insetgraphicsParams.h
Switch from SigC signals to boost::signals
[lyx.git] / src / insets / insetgraphicsParams.h
index d8afae97f79d86480e4e85931ff09a54cd063f73..dc8e0b508b37154929db44d4faef421ee149adfe 100644 (file)
@@ -1,7 +1,7 @@
 // -*- C++ -*-
 /* This file is part of
  * =================================================
- * 
+ *
  *          LyX, The Document Processor
  *          Copyright 1995 Matthias Ettrich.
  *          Copyright 1995-2002 The LyX Team.
 
 #ifdef __GNUG__
 #pragma interface
-#endif 
+#endif
 
 #include "LString.h"
 
 #include "buffer.h"
 #include "lyxlex.h"
 
-using std::ostream;
+#include "graphics/GraphicsParams.h"
+
 
 /// This struct holds all the parameters needed by insetGraphics.
 struct InsetGraphicsParams
@@ -36,7 +37,7 @@ struct InsetGraphicsParams
            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
@@ -47,38 +48,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;
-       /// clip image 
+       /// 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;
+       /// Typ of the LyXView, same as for latex
+       sizeType lyxsize_type;
        /// the size for the view inside lyx
        LyXLength lyxwidth;
        ///
        LyXLength lyxheight;
-       /// Typ of rescaling the Screen
+       /// Typ of rescaling the Screen inside lyx
        int lyxscale;
-       /// Typ of the LyXView, same as for latex
-       sizeType lyxsize_type;
-       /// Origin point of rotation
-       string rotateOrigin;
-       /// Rotation angle.
-       float rotateAngle;
        ///
        InsetGraphicsParams();
        ///
@@ -86,9 +91,14 @@ struct InsetGraphicsParams
        ///
        InsetGraphicsParams & operator=(InsetGraphicsParams const &);
        /// Save the parameters in the LyX format stream.
-       void Write(Buffer const * buf, ostream & os) const;
+       void Write(std::ostream & os) const;
        /// If the token belongs to our parameters, read it.
-       bool Read(Buffer const * buf, LyXLex & lex, string const & token);
+       bool Read(LyXLex & lex, string const & token);
+       /// convert 
+  // Only a subset of InsetGraphicsParams is needed for display purposes.
+  // This function also interrogates lyxrc to ascertain whether
+  // to display or not.
+       grfx::GParams asGParams(string const & filepath) const;
 
 private:
        /// Initialize the object to a default status.
@@ -102,4 +112,4 @@ bool operator==(InsetGraphicsParams const &, InsetGraphicsParams const &);
 ///
 bool operator!=(InsetGraphicsParams const &, InsetGraphicsParams const &);
 
-#endif 
+#endif