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 #include <sigc++/signal_system.h>
16 /* the rest is figure stuff */
20 #ifdef SIGC_CXX_NAMESPACES
25 class InsetFig: public Inset, public Object {
28 InsetFig(int tmpx, int tmpy, Buffer const &);
32 int ascent(BufferView *, LyXFont const & font) const;
34 int descent(BufferView *, LyXFont const & font) const;
36 int width(BufferView *, LyXFont const & font) const;
38 void draw(BufferView *, LyXFont const &, int, float &, bool) const;
40 void Write(Buffer const *, std::ostream &) const;
42 void Read(Buffer const *, LyXLex & lex);
44 int Latex(Buffer const *, std::ostream &, bool fragile, bool free_space) const;
46 int Ascii(Buffer const *, std::ostream &, int linelen) const;
48 int Linuxdoc(Buffer const *, std::ostream &) const;
50 int DocBook(Buffer const *, std::ostream &) const;
51 /// Updates needed features for this inset.
52 void Validate(LaTeXFeatures & features) const;
54 /// what appears in the minibuffer when opening
55 string const EditMessage() const;
58 void Edit(BufferView *, int, int, unsigned int);
60 EDITABLE Editable() const;
62 bool Deletable() const;
64 Inset::Code LyxCode() const;
66 Inset * Clone(Buffer const &) const;
68 void CallbackFig(long arg);
70 void Preview(string const & p);
74 /// form for user input
76 /// width and height in pixels on screen
78 /// width and height in postscript units (1/72 inch)
80 /// width of raw figure w/o rotation
82 /// heigt of raw figure w/o rotation
84 /// x and y coordinate in ps units
89 /// changed filename -> for recompute
106 /// width and height types: 0-default, 1-cm, 2-in, 3-%of page
107 /// For width, there is also: 4-% of col
112 /// temporary w and h type
123 /// graphics command, latex version
126 /// Caption for subfigure package
140 /** Redraw the form (on receipt of a Signal indicating, for example,
141 that the xform colors have been re-mapped).
146 Buffer const * owner;
147 /// restore values on the form
149 /// recompute screen params
151 /// regenerate \includegraphics{} command
152 void Regenerate() const;
153 /// regenerate \inlcudegraphics{} command in temporary buffer
154 void TempRegenerate();
155 /// get sizes from .eps file
157 /// Redraw connection.
166 /// reference count for this bitmap
170 /// width of raw figure w/o rotation
172 /// heigt of raw figure w/o rotation
174 /// width and height on screen
176 /// pointer to file name
178 /// type; 0-none, 1-B/W, 2-Grayscale, 3-Color
180 /// reading request is pending on this figure
182 /// could not read it, because it's broken
184 /// when gs was killed, this says that image is ok
186 /// gs pid for reading
193 /// figure data (image)
195 /// inset of this figure