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 *);
29 int ascent(Painter &, LyXFont const & font) const;
31 int descent(Painter &, LyXFont const & font) const;
33 int width(Painter &, LyXFont const & font) const;
35 void draw(Painter &, LyXFont const & font,
36 int baseline, float & x) const;
39 int Ascent(LyXFont const & font) const;
41 int Descent(LyXFont const & font) const;
43 int Width(LyXFont const & font) const;
45 void Draw(LyXFont font, LyXScreen & scr, int baseline, float & x);
48 void Write(ostream &);
50 void Read(LyXLex & lex);
52 int Latex(ostream &, signed char fragile);
54 int Latex(string & file, signed char fragile);
56 int Linuxdoc(string & file);
58 int DocBook(string & file);
59 /// Updates needed features for this inset.
60 void Validate(LaTeXFeatures & features) const;
62 /// what appears in the minibuffer when opening
63 char const * EditMessage() const { return _("Opened figure"); }
67 unsigned char Editable() const;
69 bool Deletable() const;
71 Inset::Code LyxCode() const;
73 Inset * Clone() const;
75 void CallbackFig(long arg);
77 void Preview(char const * p);
81 /// form for user input
83 /// width and height in pixels on screen
85 /// width and height in postscript units (1/72 inch)
87 /// width of raw figure w/o rotation
89 /// heigt of raw figure w/o rotation
91 /// x and y coordinate in ps units
96 /// changed filename -> for recompute
113 /// width and height types: 0-default, 1-cm, 2-in, 3-%of page
114 /// For width, there is also: 4-% of col
119 /// temporary w and h type
130 /// graphics command, latex version
133 /// Caption for subfigure package
148 /// restore values on the form
150 /// recompute screen params
152 /// regenerate \includegraphics{} command
154 /// regenerate \inlcudegraphics{} command in temporary buffer
155 void TempRegenerate();
156 /// get sizes from .eps file
165 /// reference count for this bitmap
169 /// width of raw figure w/o rotation
171 /// heigt of raw figure w/o rotation
173 /// width and height on screen
175 /// pointer to file name
177 /// type; 0-none, 1-B/W, 2-Grayscale, 3-Color
179 /// reading request is pending on this figure
181 /// could not read it, because it's broken
183 /// when gs was killed, this says that image is ok
185 /// gs pid for reading
192 /// figure data (image)
194 /// inset of this figure