]> git.lyx.org Git - lyx.git/blobdiff - src/insets/figinset.h
pos=string::npos for regex not found, use handcoded transform in lstring.C, fix the...
[lyx.git] / src / insets / figinset.h
index 6eb11a733689ba08dca14cb475c0a649318ef666..43d29e2173b06d2b0f02393d698fefe87b56c9b3 100644 (file)
@@ -4,16 +4,17 @@
   (C)1996 by Ivan Schreter
   */
 
-#ifndef _FIGINSET_H
-#define _FIGINSET_H
+#ifndef FIGINSET_H
+#define FIGINSET_H
 
 #include "form1.h"
-#include "buffer.h"
 #include "LString.h"
+#include "buffer.h"
 #include "LaTeXFeatures.h"
-
+#include "insets/lyxinset.h"
 /* the rest is figure stuff */
 
+
 struct Figref;
 
 ///
@@ -24,30 +25,30 @@ public:
        ///
        ~InsetFig();
        ///
-       int Ascent(LyXFont const &font) const;
+       int Ascent(LyXFont const & font) const;
        ///
-       int Descent(LyXFont const &font) const;
+       int Descent(LyXFont const & font) const;
        ///
-       int Width(LyXFont const &font) const;
+       int Width(LyXFont const & font) const;
        ///
-       void Draw(LyXFont font, LyXScreen &scr, int baseline, float &x);
+       void Draw(LyXFont font, LyXScreen & scr, int baseline, float & x);
        ///
-       void Write(FILE *file);
+       void Write(ostream &);
        ///
-       void Read(LyXLex &lex);
+       void Read(LyXLex & lex);
        ///
-       int Latex(FILE *file, signed char fragile);
+       int Latex(ostream &, signed char fragile);
        ///
-       int Latex(LString &file, signed char fragile);
+       int Latex(string & file, signed char fragile);
        ///
-       int Linuxdoc(LString &file);
+       int Linuxdoc(string & file);
        ///
-       int DocBook(LString &file);
+       int DocBook(string & file);
        /// Updates needed features for this inset.
-       void Validate(LaTeXFeatures &features) const;
+       void Validate(LaTeXFeatures & features) const;
 
        /// what appears in the minibuffer when opening
-       char const* EditMessage() {return "Opened figure";}
+       char const * EditMessage() const { return _("Opened figure"); }
        ///
        void Edit(int, int);
        ///
@@ -57,16 +58,16 @@ public:
        ///
        Inset::Code LyxCode() const;
        ///
-       Inset* Clone();
+       Inset * Clone() const;
        ///
        void CallbackFig(long arg);
        ///
-       void Preview(char const *p);
+       void Preview(char const * p);
        /// browse for file
        void BrowseFile();
 
        /// form for user input
-       FD_Figure *form;
+       FD_Figure * form;
        /// width and height in pixels on screen
        int wid, hgh;
        /// width and height in postscript units (1/72 inch)
@@ -79,7 +80,7 @@ public:
        int psx, psy;
 
        /// .eps file name
-       LString fname;
+       string fname;
        /// changed filename -> for recompute
        bool changedfname;
 
@@ -115,23 +116,23 @@ public:
        float angle;
        
        /// graphics command, latex version
-       LString cmd;
+       string cmd;
        
        /// Caption for subfigure package
-       LString subcaption;
+       string subcaption;
 
        /// various flags
        int flags;
        bool subfigure : 1;
        /// figure reference
-       Figref *figure;
+       Figref * figure;
        /// temporary flags
        int pflags;
        bool psubfigure : 1;
 private:
 
        ///
-       Buffer *owner;
+       Buffer * owner;
        /// restore values on the form
        void RestoreForm();
        /// recompute screen params
@@ -160,7 +161,7 @@ struct figdata {
        /// width and height on screen
        int wid, hgh;
        /// pointer to file name
-       LString fname;
+       string fname;
        /// type; 0-none, 1-B/W, 2-Grayscale, 3-Color
        char flags;
        /// reading request is pending on this figure
@@ -177,9 +178,9 @@ struct figdata {
 ///
 struct Figref {
        /// figure data (image)
-       figdata *data;
+       figdata * data;
        /// inset of this figure
-       InsetFig *inset;
+       InsetFig * inset;
 };
 
 #endif