3 * \file insetcommandparams.h
4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
7 * \author Angus Leeming
9 * Full author contact details are available in file CREDITS.
12 #ifndef INSETCOMMANDPARAMS_H
13 #define INSETCOMMANDPARAMS_H
22 class InsetCommandParams {
27 explicit InsetCommandParams(std::string const & n,
28 std::string const & c = std::string(),
29 std::string const & o = std::string(),
30 std::string const & s = std::string());
34 void scanCommand(std::string const &);
36 void write(std::ostream &) const;
37 /// Build the complete LaTeX command
38 std::string const getCommand() const;
40 std::string const & getCmdName() const { return cmdname; }
42 std::string const & getOptions() const { return options; }
44 std::string const & getSecOptions() const { return sec_options; }
46 std::string const & getContents() const { return contents; }
48 void setCmdName(std::string const & n) { cmdname = n; }
50 void setOptions(std::string const & o) { options = o; }
52 void setSecOptions(std::string const & s) { sec_options = s; }
54 void setContents(std::string const & c) { contents = c; }
56 bool preview() const { return preview_; }
58 void preview(bool p) { preview_ = p; }
68 std::string sec_options;
75 bool operator==(InsetCommandParams const &, InsetCommandParams const &);
78 bool operator!=(InsetCommandParams const &, InsetCommandParams const &);