]> git.lyx.org Git - features.git/blobdiff - src/insets/InsetCommandParams.h
Allow removing words from the personal dictionary, that weren't previously added.
[features.git] / src / insets / InsetCommandParams.h
index eb976c28d7ce612ae5372bf2120d8400c0108ccf..7ed182ae976e8fa0f16941116c296e0a6bf51e86 100644 (file)
@@ -6,7 +6,7 @@
  *
  * \author Angus Leeming
  * \author Georg Baum
- * \author Richard Heck
+ * \author Richard Kimberly Heck
  *
  * Full author contact details are available in file CREDITS.
  */
@@ -16,8 +16,6 @@
 
 #include "InsetCode.h"
 
-#include "OutputParams.h"
-
 #include "support/docstring.h"
 
 #include <string>
@@ -27,8 +25,9 @@
 
 namespace lyx {
 
-class Lexer;
 class Buffer;
+class Lexer;
+class OutputParams;
 
 class ParamInfo {
 public:
@@ -88,10 +87,10 @@ public:
        };
 
        /// adds a new parameter
-       /// If ignore is true, then the parameter is never saved, and is always
+       /// If ignoreval is true, then the parameter is never saved, and is always
        /// given the default value.
        void add(std::string const & name, ParamType type,
-                ParamHandling = HANDLING_NONE, bool ignore = false,
+                ParamHandling = HANDLING_NONE, bool ignoreval = false,
                 docstring default_value = docstring());
        ///
        bool empty() const { return info_.empty(); }
@@ -147,6 +146,10 @@ public:
        /// FIXME Would be better removed, but is used in BufferView.cpp in
        /// ways that make removal hard.
        docstring getFirstNonOptParam() const;
+       /// Determine whether a parameter is set
+       bool hasParam(std::string const & name) const;
+       /// Get the parameter \p name if it is set, \p defaultValue otherwise
+       docstring const & getParamOr(std::string const & name, docstring const & defaultValue) const;
        /// get parameter \p name
        /// LyX will assert if name is not a valid parameter.
        docstring const & operator[](std::string const & name) const;