]> git.lyx.org Git - lyx.git/blob - src/insets/insetcaption.h
Final touch 'inset display()'; fix 'is a bit silly' bug
[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, int linelen) const;
41         ///
42         int docbook(Buffer const & buf, std::ostream & os, bool mixcont) const;
43 };
44
45
46 inline
47 bool InsetCaption::display() const
48 {
49         return true;
50 }
51
52
53 inline
54 InsetOld::Code InsetCaption::lyxCode() const
55 {
56         return CAPTION_CODE;
57 }
58
59 #endif