]> git.lyx.org Git - lyx.git/blob - src/insets/insetcaption.h
unify API for insets export
[lyx.git] / src / insets / insetcaption.h
1 // -*- C++ -*-
2 /**
3  * \file insetcaption.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Lars Gullik Bjønnes
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #ifndef INSETCAPTION_H
13 #define INSETCAPTION_H
14
15
16 #include "insettext.h"
17
18 /** A caption inset
19 */
20 class InsetCaption : public InsetText {
21 public:
22         ///
23         InsetCaption(BufferParams const &);
24         ///
25         void write(Buffer const & buf, std::ostream & os) const;
26         ///
27         void read(Buffer const & buf, LyXLex & lex);
28         ///
29         virtual bool display() const;
30         ///
31         virtual InsetOld::Code lyxCode() const;
32         ///
33         virtual std::string const editMessage() const;
34         ///
35         virtual void draw(PainterInfo & pi, int x, int y) const;
36         ///
37         virtual int latex(Buffer const & buf, std::ostream & os,
38                           LatexRunParams const &) const;
39         ///
40         int ascii(Buffer const & buf, std::ostream & os,
41                   LatexRunParams const & runparams) const;
42         ///
43         int docbook(Buffer const & buf, std::ostream & os,
44                     LatexRunParams const & runparams) const;
45 };
46
47
48 inline
49 bool InsetCaption::display() const
50 {
51         return true;
52 }
53
54
55 inline
56 InsetOld::Code InsetCaption::lyxCode() const
57 {
58         return CAPTION_CODE;
59 }
60
61 #endif