X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2Ffiginset.h;h=178ddf4acf9bd6446d429d2c92284570dc16b8b9;hb=3c8aba3b556871fb1100a2f98cd93d5d4e3f70c9;hp=eb3fddaef84e18b47a2315a6644f7166cc3fb2ef;hpb=0eccdd1c3613e5170deb77b22174dd0afde833e9;p=lyx.git diff --git a/src/insets/figinset.h b/src/insets/figinset.h index eb3fddaef8..178ddf4acf 100644 --- a/src/insets/figinset.h +++ b/src/insets/figinset.h @@ -1,17 +1,17 @@ // -*- C++ -*- /* figinset.h - Figure inset header - part of LyX project - (C)1996 by Ivan Schreter + Copyright 1996 by Ivan Schreter */ -#ifndef _FIGINSET_H -#define _FIGINSET_H +#ifndef FIGINSET_H +#define FIGINSET_H #include "form1.h" -#include "buffer.h" #include "LString.h" +#include "buffer.h" #include "LaTeXFeatures.h" - +#include "insets/lyxinset.h" /* the rest is figure stuff */ struct Figref; @@ -24,49 +24,51 @@ public: /// ~InsetFig(); /// - int Ascent(LyXFont const &font) const; + int ascent(Painter &, LyXFont const & font) const; /// - int Descent(LyXFont const &font) const; + int descent(Painter &, LyXFont const & font) const; /// - int Width(LyXFont const &font) const; + int width(Painter &, LyXFont const & font) const; /// - void Draw(LyXFont font, LyXScreen &scr, int baseline, float &x); + void draw(Painter &, LyXFont const & font, + int baseline, float & x) const; /// - void Write(FILE *file); + void Write(std::ostream &) const; /// - void Read(LyXLex &lex); + void Read(LyXLex & lex); /// - int Latex(FILE *file, signed char fragile); + int Latex(std::ostream &, bool fragile, bool free_space) const; /// - int Latex(string &file, signed char fragile); + int Ascii(std::ostream &) const; /// - int Linuxdoc(string &file); + int Linuxdoc(std::ostream &) const; /// - int DocBook(string &file); + int DocBook(std::ostream &) const; /// Updates needed features for this inset. - void Validate(LaTeXFeatures &features) const; + void Validate(LaTeXFeatures & features) const; /// what appears in the minibuffer when opening - char const* EditMessage() {return "Opened figure";} + char const * EditMessage() const; + /// - void Edit(int, int); + void Edit(BufferView *, int, int, unsigned int); /// - unsigned char Editable() const; + EDITABLE Editable() const; /// bool Deletable() const; /// Inset::Code LyxCode() const; /// - Inset* Clone(); + Inset * Clone() const; /// void CallbackFig(long arg); /// - void Preview(char const *p); + void Preview(char const * p); /// browse for file void BrowseFile(); /// form for user input - FD_Figure *form; + FD_Figure * form; /// width and height in pixels on screen int wid, hgh; /// width and height in postscript units (1/72 inch) @@ -115,29 +117,31 @@ public: float angle; /// graphics command, latex version - string cmd; + mutable string cmd; /// Caption for subfigure package string subcaption; /// various flags int flags; - bool subfigure : 1; + /// + bool subfigure; /// figure reference - Figref *figure; + Figref * figure; /// temporary flags int pflags; - bool psubfigure : 1; + /// + bool psubfigure; private: /// - Buffer *owner; + Buffer * owner; /// restore values on the form void RestoreForm(); /// recompute screen params void Recompute(); /// regenerate \includegraphics{} command - void Regenerate(); + void Regenerate() const; /// regenerate \inlcudegraphics{} command in temporary buffer void TempRegenerate(); /// get sizes from .eps file @@ -177,9 +181,9 @@ struct figdata { /// struct Figref { /// figure data (image) - figdata *data; + figdata * data; /// inset of this figure - InsetFig *inset; + InsetFig * inset; }; #endif