3 figinset.h - Figure inset header - part of LyX project
4 (C)1996 by Ivan Schreter
13 #include "LaTeXFeatures.h"
15 /* the rest is figure stuff */
20 class InsetFig: public Inset {
23 InsetFig(int tmpx, int tmpy, Buffer *);
27 int Ascent(LyXFont const & font) const;
29 int Descent(LyXFont const & font) const;
31 int Width(LyXFont const & font) const;
33 void Draw(LyXFont font, LyXScreen & scr, int baseline, float & x);
35 void Write(FILE * file);
37 void Read(LyXLex & lex);
39 int Latex(FILE * file, signed char fragile);
41 int Latex(string & file, signed char fragile);
43 int Linuxdoc(string & file);
45 int DocBook(string & file);
46 /// Updates needed features for this inset.
47 void Validate(LaTeXFeatures & features) const;
49 /// what appears in the minibuffer when opening
50 char const * EditMessage() const { return _("Opened figure"); }
54 unsigned char Editable() const;
56 bool Deletable() const;
58 Inset::Code LyxCode() const;
60 Inset * Clone() const;
62 void CallbackFig(long arg);
64 void Preview(char const * p);
68 /// form for user input
70 /// width and height in pixels on screen
72 /// width and height in postscript units (1/72 inch)
74 /// width of raw figure w/o rotation
76 /// heigt of raw figure w/o rotation
78 /// x and y coordinate in ps units
83 /// changed filename -> for recompute
100 /// width and height types: 0-default, 1-cm, 2-in, 3-%of page
101 /// For width, there is also: 4-% of col
106 /// temporary w and h type
117 /// graphics command, latex version
120 /// Caption for subfigure package
135 /// restore values on the form
137 /// recompute screen params
139 /// regenerate \includegraphics{} command
141 /// regenerate \inlcudegraphics{} command in temporary buffer
142 void TempRegenerate();
143 /// get sizes from .eps file
152 /// reference count for this bitmap
156 /// width of raw figure w/o rotation
158 /// heigt of raw figure w/o rotation
160 /// width and height on screen
162 /// pointer to file name
164 /// type; 0-none, 1-B/W, 2-Grayscale, 3-Color
166 /// reading request is pending on this figure
168 /// could not read it, because it's broken
170 /// when gs was killed, this says that image is ok
172 /// gs pid for reading
179 /// figure data (image)
181 /// inset of this figure