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(Painter &, LyXFont const & font) const;
29 int descent(Painter &, LyXFont const & font) const;
31 int width(Painter &, LyXFont const & font) const;
33 void draw(Painter &, LyXFont const & font,
34 int baseline, float & x) const;
36 void Write(std::ostream &) const;
38 void Read(LyXLex & lex);
40 int Latex(std::ostream &, bool fragile, bool free_space) const;
42 int Ascii(std::ostream &) const;
44 int Linuxdoc(std::ostream &) const;
46 int DocBook(std::ostream &) const;
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;
54 void Edit(BufferView *, int, int, unsigned int);
56 EDITABLE Editable() const;
58 bool Deletable() const;
60 Inset::Code LyxCode() const;
62 Inset * Clone() const;
64 void CallbackFig(long arg);
66 void Preview(char const * p);
70 /// form for user input
72 /// width and height in pixels on screen
74 /// width and height in postscript units (1/72 inch)
76 /// width of raw figure w/o rotation
78 /// heigt of raw figure w/o rotation
80 /// x and y coordinate in ps units
85 /// changed filename -> for recompute
102 /// width and height types: 0-default, 1-cm, 2-in, 3-%of page
103 /// For width, there is also: 4-% of col
108 /// temporary w and h type
119 /// graphics command, latex version
122 /// Caption for subfigure package
139 /// restore values on the form
141 /// recompute screen params
143 /// regenerate \includegraphics{} command
144 void Regenerate() const;
145 /// regenerate \inlcudegraphics{} command in temporary buffer
146 void TempRegenerate();
147 /// get sizes from .eps file
156 /// reference count for this bitmap
160 /// width of raw figure w/o rotation
162 /// heigt of raw figure w/o rotation
164 /// width and height on screen
166 /// pointer to file name
168 /// type; 0-none, 1-B/W, 2-Grayscale, 3-Color
170 /// reading request is pending on this figure
172 /// could not read it, because it's broken
174 /// when gs was killed, this says that image is ok
176 /// gs pid for reading
183 /// figure data (image)
185 /// inset of this figure