]> git.lyx.org Git - lyx.git/blob - src/insets/InsetHFill.h
This should be the last of the commits refactoring the InsetLayout code.
[lyx.git] / src / insets / InsetHFill.h
1 // -*- C++ -*-
2 /**
3  * \file InsetHFill.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author André Pönitz
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #ifndef INSET_HFILL_H
13 #define INSET_HFILL_H
14
15
16 #include "InsetCommand.h"
17
18
19 namespace lyx {
20
21 class InsetHFill : public InsetCommand {
22 public:
23         ///
24         InsetHFill();
25         ///
26         void metrics(MetricsInfo &, Dimension &) const;
27         ///
28         void draw(PainterInfo & pi, int x, int y) const;
29         ///
30         docstring const getScreenLabel(Buffer const &) const;
31         ///
32         InsetCode lyxCode() const { return HFILL_CODE; }
33         ///
34         int plaintext(Buffer const &, odocstream &,
35                       OutputParams const &) const;
36         ///
37         int docbook(Buffer const &, odocstream &,
38                     OutputParams const &) const;
39         ///
40         void write(Buffer const & buf, std::ostream & os) const;
41         /// We don't need \begin_inset and \end_inset
42         bool directWrite() const { return true; }
43         /// is this equivalent to a space (which is BTW different from
44         // a line separator)?
45         bool isSpace() const;
46         ///
47         static CommandInfo const * findInfo(std::string const &);
48         ///
49         static std::string defaultCommand() { return "hfill"; };
50         ///
51         static bool isCompatibleCommand(std::string const & s) 
52                 { return s == "hfill"; }
53 private:
54         virtual Inset * clone() const;
55 };
56
57
58 } // namespace lyx
59
60 #endif