3 figinset.h - Figure inset header - part of LyX project
4 (C)1996 by Ivan Schreter
13 #include "LaTeXFeatures.h"
14 #include "insets/lyxinset.h"
15 /* the rest is figure stuff */
21 class InsetFig: public Inset {
24 InsetFig(int tmpx, int tmpy, Buffer *);
28 int Ascent(LyXFont const & font) const;
30 int Descent(LyXFont const & font) const;
32 int Width(LyXFont const & font) const;
34 void Draw(LyXFont font, LyXScreen & scr, int baseline, float & x);
36 void Write(ostream &);
38 void Read(LyXLex & lex);
40 int Latex(ostream &, signed char fragile);
42 int Latex(string & file, signed char fragile);
44 int Linuxdoc(string & file);
46 int DocBook(string & file);
47 /// Updates needed features for this inset.
48 void Validate(LaTeXFeatures & features) const;
50 /// what appears in the minibuffer when opening
51 char const * EditMessage() const { return _("Opened figure"); }
55 unsigned char Editable() const;
57 bool Deletable() const;
59 Inset::Code LyxCode() const;
61 Inset * Clone() const;
63 void CallbackFig(long arg);
65 void Preview(char const * p);
69 /// form for user input
71 /// width and height in pixels on screen
73 /// width and height in postscript units (1/72 inch)
75 /// width of raw figure w/o rotation
77 /// heigt of raw figure w/o rotation
79 /// x and y coordinate in ps units
84 /// changed filename -> for recompute
101 /// width and height types: 0-default, 1-cm, 2-in, 3-%of page
102 /// For width, there is also: 4-% of col
107 /// temporary w and h type
118 /// graphics command, latex version
121 /// Caption for subfigure package
136 /// restore values on the form
138 /// recompute screen params
140 /// regenerate \includegraphics{} command
142 /// regenerate \inlcudegraphics{} command in temporary buffer
143 void TempRegenerate();
144 /// get sizes from .eps file
153 /// reference count for this bitmap
157 /// width of raw figure w/o rotation
159 /// heigt of raw figure w/o rotation
161 /// width and height on screen
163 /// pointer to file name
165 /// type; 0-none, 1-B/W, 2-Grayscale, 3-Color
167 /// reading request is pending on this figure
169 /// could not read it, because it's broken
171 /// when gs was killed, this says that image is ok
173 /// gs pid for reading
180 /// figure data (image)
182 /// inset of this figure