]> git.lyx.org Git - lyx.git/blob - src/insets/InsetFlex.h
Strip et al. for citation search
[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 "InsetCollapsible.h"
17
18
19 namespace lyx {
20
21 /** The Flex inset, e.g., CharStyle, Custom inset or XML short element
22
23 */
24 class InsetFlex : public InsetCollapsible {
25 public:
26         ///
27         InsetFlex(Buffer *, std::string const & layoutName);
28         ///
29         docstring layoutName() const override { return from_utf8("Flex:" + name_); }
30         ///
31         InsetLayout const & getLayout() const override;
32         ///
33         InsetCode lyxCode() const override { return FLEX_CODE; }
34         /// Default looks
35         InsetDecoration decoration() const override;
36         ///
37         void write(std::ostream &) const override;
38         /// should paragraph indentation be omitted in any case?
39         bool neverIndent() const override { return true; }
40         ///
41         bool hasSettings() const override { return false; }
42         ///
43         bool canTrackChanges() const override { return name_ != "URL"; }
44         ///
45         bool getStatus(Cursor & cur, FuncRequest const & cmd,
46                 FuncStatus &) const override;
47         ///
48         void doDispatch(Cursor & cur, FuncRequest & cmd) override;
49         ///
50         void updateBuffer(ParIterator const & it, UpdateType utype, bool const deleted = false) override;
51
52 protected:
53         ///
54         InsetFlex(InsetFlex const &);
55
56 private:
57         ///
58         Inset * clone() const override { return new InsetFlex(*this); }
59         ///
60         std::string name_;
61 };
62
63
64 } // namespace lyx
65
66 #endif