]> git.lyx.org Git - lyx.git/blob - src/insets/insetcaption.h
The speed patch: redraw only rows that have changed
[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 InsetBase::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                           OutputParams const &) const;
39         ///
40         int plaintext(Buffer const & buf, std::ostream & os,
41                   OutputParams const & runparams) const;
42         ///
43         int docbook(Buffer const & buf, std::ostream & os,
44                     OutputParams const & runparams) const;
45 private:
46         ///
47         virtual std::auto_ptr<InsetBase> doClone() const;
48 };
49
50
51 inline
52 bool InsetCaption::display() const
53 {
54         return true;
55 }
56
57
58 inline
59 InsetBase::Code InsetCaption::lyxCode() const
60 {
61         return CAPTION_CODE;
62 }
63
64 #endif