]> git.lyx.org Git - lyx.git/blob - src/insets/insetcommandparams.h
Enable convertDefault.sh to run even if its executable bit is not set.
[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 "LString.h"
17
18 #include <iosfwd>
19
20 class LyXLex;
21
22 class InsetCommandParams {
23 public:
24         ///
25         InsetCommandParams();
26         ///
27         explicit
28         InsetCommandParams(string const & n,
29                             string const & c = string(),
30                             string const & o = string());
31         ///
32         void read(LyXLex &);
33         /// Parse the command
34         void scanCommand(string const &);
35         ///
36         void write(std::ostream &) const;
37         /// Build the complete LaTeX command
38         string const getCommand() const;
39         ///
40         string const & getCmdName() const { return cmdname; }
41         ///
42         string const & getOptions() const { return options; }
43         ///
44         string const & getContents() const { return contents; }
45         ///
46         void setCmdName(string const & n) { cmdname = n; }
47         ///
48         void setOptions(string const & o) { options = o; }
49         ///
50         void setContents(string const & c) { contents = c; }
51         ///
52         bool preview() const { return preview_; }
53         ///
54         void preview(bool p) { preview_ = p; }
55
56 private:
57         ///
58         string cmdname;
59         ///
60         string contents;
61         ///
62         string options;
63         ///
64         bool preview_;
65 };
66
67
68 ///
69 bool operator==(InsetCommandParams const &,
70                 InsetCommandParams const &);
71
72 ///
73 bool operator!=(InsetCommandParams const &,
74                 InsetCommandParams const &);
75
76 #endif