3 figinset.h - Figure inset header - part of LyX project
4 Copyright 1996 by Ivan Schreter
10 #include "figure_form.h"
13 #include "LaTeXFeatures.h"
14 #include "insets/lyxinset.h"
15 #include <sigc++/signal_system.h>
16 /* the rest is figure stuff */
21 class InsetFig: public Inset, public SigC::Object {
24 InsetFig(int tmpx, int tmpy, Buffer const &);
28 int ascent(BufferView *, LyXFont const & font) const;
30 int descent(BufferView *, LyXFont const & font) const;
32 int width(BufferView *, LyXFont const & font) const;
34 void draw(BufferView *, LyXFont const &, int, float &, bool) const;
36 void Write(Buffer const *, std::ostream &) const;
38 void Read(Buffer const *, LyXLex & lex);
40 int Latex(Buffer const *, std::ostream &, bool fragile, bool free_space) const;
42 int Ascii(Buffer const *, std::ostream &, int linelen) const;
44 int Linuxdoc(Buffer const *, std::ostream &) const;
46 int DocBook(Buffer const *, 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 string 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(Buffer const &) const;
64 void CallbackFig(long arg);
66 void Preview(string 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
136 /** Redraw the form (on receipt of a Signal indicating, for example,
137 that the xform colors have been re-mapped).
142 Buffer const * owner;
143 /// restore values on the form
145 /// recompute screen params
147 /// regenerate \includegraphics{} command
148 void Regenerate() const;
149 /// regenerate \inlcudegraphics{} command in temporary buffer
150 void TempRegenerate();
151 /// get sizes from .eps file
153 /// Redraw connection.
162 /// reference count for this bitmap
166 /// width of raw figure w/o rotation
168 /// heigt of raw figure w/o rotation
170 /// width and height on screen
172 /// pointer to file name
174 /// type; 0-none, 1-B/W, 2-Grayscale, 3-Color
176 /// reading request is pending on this figure
178 /// could not read it, because it's broken
180 /// when gs was killed, this says that image is ok
182 /// gs pid for reading
189 /// figure data (image)
191 /// inset of this figure