]> git.lyx.org Git - lyx.git/blob - src/insets/insetcaption.h
fix #832
[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
30         bool display() const;
31         ///
32         virtual
33         bool needFullRow() const;
34         ///
35         virtual
36         Inset::Code lyxCode() const;
37         ///
38         virtual
39         string const editMessage() const;
40         ///
41         virtual
42         void draw(BufferView * bv, LyXFont const & f,
43                           int baseline, float & x) const;
44         ///
45         virtual
46         int latex(Buffer const * buf, std::ostream & os,
47                           bool fragile, bool free_spc) const;
48         ///
49         virtual
50         int ascii(Buffer const * buf, std::ostream & os, int linelen) const;
51         ///
52         virtual
53         int docbook(Buffer const * buf, std::ostream & os, bool mixcont) const;
54 protected:
55 private:
56 };
57
58
59 inline
60 bool InsetCaption::display() const
61 {
62         return true;
63 }
64
65
66 inline
67 bool InsetCaption::needFullRow() const
68 {
69         return true;
70 }
71
72
73 inline
74 Inset::Code InsetCaption::lyxCode() const
75 {
76         return CAPTION_CODE;
77 }
78 #endif