]> git.lyx.org Git - lyx.git/blob - src/insets/InsetFlex.h
Fix trailing whitespace in cpp files.
[lyx.git] / src / insets / InsetFlex.h
1 // -*- C++ -*-
2 /**
3  * \file InsetFlex.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Angus Leeming
8  * \author Martin Vermeer
9  *
10  * Full author contact details are available in file CREDITS.
11  */
12
13 #ifndef INSETFLEX_H
14 #define INSETFLEX_H
15
16 #include "InsetCollapsable.h"
17
18 namespace lyx {
19
20 /** The Flex inset, e.g., CharStyle, Custom inset or XML short element
21
22 */
23 class InsetFlex : public InsetCollapsable {
24 public:
25         ///
26         InsetFlex(Buffer *, std::string const & layoutName);
27         ///
28         docstring layoutName() const { return from_utf8("Flex:" + name_); }
29         ///
30         InsetLayout const & getLayout() const;
31         ///
32         InsetCode lyxCode() const { return FLEX_CODE; }
33         /// Default looks
34         InsetLayout::InsetDecoration decoration() const;
35         ///
36         void write(std::ostream &) const;
37         /// should paragraph indendation be ommitted in any case?
38         bool neverIndent() const { return true; }
39         ///
40         bool hasSettings() const { return false; }
41         ///
42         bool getStatus(Cursor & cur, FuncRequest const & cmd,
43                 FuncStatus &) const;
44         ///
45         void doDispatch(Cursor & cur, FuncRequest & cmd);
46         ///
47         void updateBuffer(ParIterator const & it, UpdateType utype);
48
49 protected:
50         ///
51         InsetFlex(InsetFlex const &);
52
53 private:
54         ///
55         Inset * clone() const { return new InsetFlex(*this); }
56         ///
57         std::string name_;
58 };
59
60
61 } // namespace lyx
62
63 #endif