3 figinset.h - Figure inset header - part of LyX project
4 Copyright 1996 by Ivan Schreter
13 #include "LaTeXFeatures.h"
14 #include "insets/lyxinset.h"
15 /* the rest is figure stuff */
20 class InsetFig: public Inset {
23 InsetFig(int tmpx, int tmpy, Buffer *);
27 int ascent(BufferView *, LyXFont const & font) const;
29 int descent(BufferView *, LyXFont const & font) const;
31 int width(BufferView *, LyXFont const & font) const;
33 void draw(BufferView *, LyXFont const &, int, float &, bool) const;
35 void Write(Buffer const *, std::ostream &) const;
37 void Read(Buffer const *, LyXLex & lex);
39 int Latex(Buffer const *, std::ostream &, bool fragile, bool free_space) const;
41 int Ascii(Buffer const *, std::ostream &, int linelen) const;
43 int Linuxdoc(Buffer const *, std::ostream &) const;
45 int DocBook(Buffer const *, std::ostream &) const;
46 /// Updates needed features for this inset.
47 void Validate(LaTeXFeatures & features) const;
49 /// what appears in the minibuffer when opening
50 string const EditMessage() const;
53 void Edit(BufferView *, int, int, unsigned int);
55 EDITABLE Editable() const;
57 bool Deletable() const;
59 Inset::Code LyxCode() const;
61 Inset * Clone() const;
63 void CallbackFig(long arg);
65 void Preview(string 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
138 /// restore values on the form
140 /// recompute screen params
142 /// regenerate \includegraphics{} command
143 void Regenerate() const;
144 /// regenerate \inlcudegraphics{} command in temporary buffer
145 void TempRegenerate();
146 /// get sizes from .eps file
155 /// reference count for this bitmap
159 /// width of raw figure w/o rotation
161 /// heigt of raw figure w/o rotation
163 /// width and height on screen
165 /// pointer to file name
167 /// type; 0-none, 1-B/W, 2-Grayscale, 3-Color
169 /// reading request is pending on this figure
171 /// could not read it, because it's broken
173 /// when gs was killed, this says that image is ok
175 /// gs pid for reading
182 /// figure data (image)
184 /// inset of this figure