]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetCommand.h
Pure HTML output for math macros.
[lyx.git] / src / insets / InsetCommand.h
index 30f690f6baea833cfa8d14fbad0fc357b647e27a..d1f4af0d0f3344bec806ecb64ae907e6f48adbff 100644 (file)
@@ -35,7 +35,8 @@ class InsetCommand : public Inset
 {
 public:
        ///
-       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:
        ///
@@ -68,7 +75,7 @@ protected:
        ///
        bool getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus &) const;
        ///
-       docstring const getCommand() const { return p_.getCommand(); }
+       docstring const getCommand(OutputParams & rp) const { return p_.getCommand(rp); }
        ///
        std::string const & getCmdName() const { return p_.getCmdName(); }
        ///
@@ -90,9 +97,6 @@ private:
        ///
        InsetCode lyxCode() const { return NO_CODE; }
        ///
-       void edit(Cursor & cur, bool front, 
-               EntryDirection entry_from = ENTRY_DIRECTION_IGNORE);
-       ///
        RenderButton & button() const { return button_; }
        ///
        bool setMouseHover(bool mouse_hover);
@@ -111,8 +115,6 @@ private:
        virtual docstring screenLabel() const = 0;
        ///
        bool showInsetDialog(BufferView * bv) const;
-
-private:
        ///
        InsetCommandParams p_;
        ///
@@ -123,6 +125,9 @@ private:
        mutable RenderButton button_;
 };
 
+/// Decode InsetCommand considering Inset name and data.
+bool decodeInsetParam(std::string const & name, std::string & data,
+       Buffer const & buffer);
 
 } // namespace lyx