]> git.lyx.org Git - lyx.git/blob - src/insets/insetcommandparams.h
Rename LatexRunParams::fragile as moving_arg.
[lyx.git] / src / insets / insetcommandparams.h
1 // -*- C++ -*-
2 /**
3  * \file insetcommandparams.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  *
9  * Full author contact details are available in file CREDITS
10  */
11
12 #ifndef INSETCOMMANDPARAMS_H
13 #define INSETCOMMANDPARAMS_H
14
15
16 #include <config.h>
17
18 #include "LString.h"
19
20 #include <iosfwd>
21
22 class LyXLex;
23
24 class InsetCommandParams {
25 public:
26         ///
27         InsetCommandParams();
28         ///
29         explicit
30         InsetCommandParams(string const & n,
31                             string const & c = string(),
32                             string const & o = string());
33         ///
34         void read(LyXLex &);
35         /// Parse the command
36         void scanCommand(string const &);
37         ///
38         void write(std::ostream &) const;
39         /// Build the complete LaTeX command
40         string const getCommand() const;
41         ///
42         string const & getCmdName() const { return cmdname; }
43         ///
44         string const & getOptions() const { return options; }
45         ///
46         string const & getContents() const { return contents; }
47         ///
48         void setCmdName(string const & n) { cmdname = n; }
49         ///
50         void setOptions(string const & o) { options = o; }
51         ///
52         void setContents(string const & c) { contents = c; }
53         ///
54         bool preview() const { return preview_; }
55         ///
56         void preview(bool p) { preview_ = p; }
57
58 private:
59         ///
60         string cmdname;
61         ///
62         string contents;
63         ///
64         string options;
65         ///
66         bool preview_;
67 };
68
69
70 ///
71 bool operator==(InsetCommandParams const &,
72                 InsetCommandParams const &);
73
74 ///
75 bool operator!=(InsetCommandParams const &,
76                 InsetCommandParams const &);
77
78 #endif