]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetCommand.h
How about if we write a script to do some of this and stop doing it
[lyx.git] / src / insets / InsetCommand.h
index d62eb31f32161b1bec1079c7e688feccbfbba31a..fee67bf7be7c8312835f206f1f683509ea7df978 100644 (file)
@@ -34,8 +34,9 @@ namespace lyx {
 class InsetCommand : public Inset
 {
 public:
-       /// FIXME: pass Buffer here!
-       InsetCommand(InsetCommandParams const &, std::string const & mailer_name);
+       ///
+       InsetCommand(Buffer *, InsetCommandParams const &,
+               std::string const & mailer_name);
        ///
        ~InsetCommand();
 
@@ -57,6 +58,12 @@ public:
        docstring const getFirstNonOptParam() const { return p_.getFirstNonOptParam(); }
        /// update label and references.
        virtual void updateCommand(docstring const &, bool) {}
+       /// 
+       virtual InsetCommand * asInsetCommand() { return this; }
+       /// 
+       virtual InsetCommand const * asInsetCommand() const { return this; }
+       /// whether to include this inset in the strings generated for the TOC
+       virtual bool isInToc() const { return false; }
 
 protected:
        ///
@@ -108,8 +115,6 @@ private:
        virtual docstring screenLabel() const = 0;
        ///
        bool showInsetDialog(BufferView * bv) const;
-
-private:
        ///
        InsetCommandParams p_;
        ///