]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetRef.h
Loop refactoring
[lyx.git] / src / insets / InsetRef.h
index c42aa1fa7284f537b22d5737cc03390243705525..d18f61939c86a72c6c1bbc0caff5ba780512be52 100644 (file)
@@ -29,53 +29,54 @@ public:
                std::string short_gui_name;
        };
        static const type_info types[];
-       ///
-       static int getType(std::string const & name);
-       ///
-       static std::string const & getName(int type);
 
        ///
        InsetRef(Buffer * buffer, InsetCommandParams const &);
 
+       ///
+       void changeTarget(docstring const & new_label);
+
        /// \name Public functions inherited from Inset class
        //@{
        ///
-       void doDispatch(Cursor & cur, FuncRequest & cmd);
+       docstring layoutName() const override;
        ///
-       bool getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus & status) const;
+       void doDispatch(Cursor & cur, FuncRequest & cmd) override;
        ///
-       bool isLabeled() const { return true; }
+       bool getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus & status) const override;
        ///
-       docstring toolTip(BufferView const &, int, int) const
+       bool isLabeled() const override { return true; }
+       ///
+       docstring toolTip(BufferView const &, int, int) const override
                { return tooltip_; }
        ///
        docstring getTOCString() const;
        ///
-       bool hasSettings() const { return true; }
+       bool hasSettings() const override { return true; }
        ///
-       InsetCode lyxCode() const { return REF_CODE; }
+       InsetCode lyxCode() const override { return REF_CODE; }
        ///
-       void latex(otexstream &, OutputParams const &) const;
+       void latex(otexstream &, OutputParams const &) const override;
        ///
        int plaintext(odocstringstream & ods, OutputParams const & op,
-                     size_t max_length = INT_MAX) const;
+                     size_t max_length = INT_MAX) const override;
        ///
-       int docbook(odocstream &, OutputParams const &) const;
+       void docbook(XMLStream &, OutputParams const &) const override;
        ///
-       docstring xhtml(XHTMLStream &, OutputParams const &) const;
+       docstring xhtml(XMLStream &, OutputParams const &) const override;
        ///
-       void toString(odocstream &) const;
+       void toString(odocstream &) const override;
        ///
-       void forOutliner(docstring &, size_t const, bool const) const;
+       void forOutliner(docstring &, size_t const, bool const) const override;
        ///
-       void validate(LaTeXFeatures & features) const;
+       void validate(LaTeXFeatures & features) const override;
        ///
-       void updateBuffer(ParIterator const & it, UpdateType);
+       void updateBuffer(ParIterator const & it, UpdateType, bool const deleted = false) override;
        ///
        void addToToc(DocIterator const & di, bool output_active,
-                                 UpdateType utype, TocBackend & backend) const;
+                                 UpdateType utype, TocBackend & backend) const override;
        ///
-       bool forceLTR() const { return true; }
+       bool forceLTR(OutputParams const &) const override;
        //@}
 
        /// \name Static public methods obligated for InsetCommand derived classes
@@ -87,6 +88,8 @@ public:
        ///
        static bool isCompatibleCommand(std::string const & s);
        //@}
+       ///
+       bool outputActive() const { return active_; }
 
 protected:
        ///
@@ -96,13 +99,13 @@ private:
        /// \name Private functions inherited from Inset class
        //@{
        ///
-       Inset * clone() const { return new InsetRef(*this); }
+       Inset * clone() const override { return new InsetRef(*this); }
        //@}
 
        /// \name Private functions inherited from InsetCommand class
        //@{
        ///
-       docstring screenLabel() const;
+       docstring screenLabel() const override;
        //@}
 
        /// \return the label with things that need to be escaped escaped
@@ -119,6 +122,8 @@ private:
        ///
        mutable bool broken_;
        ///
+       mutable bool active_;
+       ///
        mutable docstring tooltip_;
 };