]> git.lyx.org Git - lyx.git/blob - src/insets/insetcaption.h
Copyright notices
[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 #ifdef __GNUG__
16 #pragma interface
17 #endif
18
19 #include "insettext.h"
20
21 /** A caption inset
22 */
23 class InsetCaption : public InsetText {
24 public:
25         ///
26         InsetCaption(BufferParams const &);
27         ///
28         void write(Buffer const * buf, std::ostream & os) const;
29         ///
30         void read(Buffer const * buf, LyXLex & lex);
31         ///
32         virtual
33         bool display() const;
34         ///
35         virtual
36         bool needFullRow() const;
37         ///
38         virtual
39         Inset::Code lyxCode() const;
40         ///
41         virtual
42         string const editMessage() const;
43         ///
44         virtual
45         void draw(BufferView * bv, LyXFont const & f,
46                           int baseline, float & x, bool cleared) const;
47         ///
48         virtual
49         int latex(Buffer const * buf, std::ostream & os,
50                           bool fragile, bool free_spc) const;
51         ///
52         virtual
53         int ascii(Buffer const * buf, std::ostream & os, int linelen) const;
54         ///
55         virtual
56         int docbook(Buffer const * buf, std::ostream & os, bool mixcont) const;
57 protected:
58 private:
59 };
60
61
62 inline
63 bool InsetCaption::display() const
64 {
65         return true;
66 }
67
68
69 inline
70 bool InsetCaption::needFullRow() const
71 {
72         return true;
73 }
74
75
76 inline
77 Inset::Code InsetCaption::lyxCode() const
78 {
79         return CAPTION_CODE;
80 }
81 #endif