// -*- C++ -*-
-/* This file is part of*
- * ======================================================
+/**
+ * \file insetcommandparams.h
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
*
- * LyX, The Document Processor
+ * \author Angus Leeming
*
- * Copyright 2002-2001 The LyX Team.
- *
- * ====================================================== */
+ * Full author contact details are available in file CREDITS.
+ */
#ifndef INSETCOMMANDPARAMS_H
#define INSETCOMMANDPARAMS_H
-#ifdef __GNUG__
-#pragma interface
-#endif
-
-#include <config.h>
-
-#include "LString.h"
-
+#include <string>
#include <iosfwd>
+
class LyXLex;
+
class InsetCommandParams {
public:
///
InsetCommandParams();
///
explicit
- InsetCommandParams(string const & n,
- string const & c = string(),
- string const & o = string());
- ///
- bool operator==(InsetCommandParams const &) const;
- ///
- bool operator!=(InsetCommandParams const &) const;
+ InsetCommandParams(std::string const & n,
+ std::string const & c = std::string(),
+ std::string const & o = std::string());
///
void read(LyXLex &);
/// Parse the command
- void scanCommand(string const &);
+ void scanCommand(std::string const &);
///
void write(std::ostream &) const;
/// Build the complete LaTeX command
- string const getCommand() const;
+ std::string const getCommand() const;
///
- string const & getCmdName() const { return cmdname; }
+ std::string const & getCmdName() const { return cmdname; }
///
- string const & getOptions() const { return options; }
+ std::string const & getOptions() const { return options; }
///
- string const & getContents() const { return contents; }
+ std::string const & getContents() const { return contents; }
///
- void setCmdName(string const & n) { cmdname = n; }
+ void setCmdName(std::string const & n) { cmdname = n; }
///
- void setOptions(string const & o) { options = o; }
+ void setOptions(std::string const & o) { options = o; }
///
- void setContents(string const & c) { contents = c; }
+ void setContents(std::string const & c) { contents = c; }
///
- string const getAsString() const;
+ bool preview() const { return preview_; }
///
- void setFromString(string const &);
+ void preview(bool p) { preview_ = p; }
+
private:
///
- string cmdname;
+ std::string cmdname;
///
- string contents;
+ std::string contents;
///
- string options;
+ std::string options;
+ ///
+ bool preview_;
};
+///
+bool operator==(InsetCommandParams const &,
+ InsetCommandParams const &);
+
+///
+bool operator!=(InsetCommandParams const &,
+ InsetCommandParams const &);
+
#endif